Skip to content
Snippets Groups Projects
Verified Commit 12f07226 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: retrieve simple entity

parent dd9abe34
No related branches found
No related tags found
No related merge requests found
Pipeline #10121 passed with warnings
......@@ -24,68 +24,88 @@ option java_multiple_files = true;
option java_package = "org.caosdb.api.entity.v1alpha1";
package caosdb.entity.v1alpha1;
// Entity version
// Version of an entity.
message Version {
// Version id
string id = 1;
}
// Unit of a value or default unit of a Property
message Unit {
// The string representation of the unit
string str = 1;
}
// Basic datatype. To be used as the datatype of a value or as the default datatype of a Property
message BasicDatatype {
// Name of the basic datatype (e.g. integer, double, boolean)
string name = 1;
}
// Reference datatype. To be used as the datatype of a value or as the default datatype of a Property
message ReferenceDatatype {
// The referenced record type
string reference = 1;
}
// Entity
// This is the main class for CaosDB's entities.
message Entity {
// Entity ID
string eid = 1;
// Entity Name
string id = 1;
// Entity name
string name = 2;
// Entity Description
// Entity description
string description = 3;
// Entity Version
// Entity version
Version version = 4;
// Entity Role
// Entity role (e.g. RecordType, Property, Record)
string role = 5;
// Default unit (only used by Properties)
Unit unit = 6;
// Default datatype (only used by Properties)
oneof datatype {
// Basic datatype (e.g. integer, double)
BasicDatatype basic = 7;
// Reference datatype
ReferenceDatatype reference = 8;
};
// Default unit of this entity (only used by properties).
string unit = 6;
// Default datatype of this entity (only used by properties).
string datatype = 7;
// Properties of this entity.
repeated Property properties = 8;
// Parents of this entity.
repeated Parent parents = 9;
}
// RetrieveRequest message
message RetrieveRequest {
// requested entity
Entity entity = 1;
// Property of an entity. Don't confuse with an Entity with role="Property"
message Property {
// ID of the implemented Entity
string id = 1;
// Property name
string name = 2;
// Property description
string description = 3;
// Property value
string value = 4;
// Property importance
string importance = 5;
// Property unit
string unit = 6;
// Property datatype
string datatype = 7;
}
// Parent of an entity.
message Parent {
// ID of the parernt entity.
string id = 1;
// Name of the parernt entity.
string name = 2;
// Description of the parent entity.
string description = 3;
}
// RetrieveResponse message
// Request a transaction of an entity by its ID. This can be used to implement
// a retrieval or deletion.
message ByIdRequest {
// ID of requested entity
string id = 1;
}
// Response to a retrieve request
message RetrieveResponse {
// payload of the retrieval
Entity entity = 1;
}
// Wrapper for different kinds of retrievals (currently, only by ID). We need
// this in order to make a repeated field of these different kinds of
// retrievals.
message RetrieveRequest {
// Wrapped special kind of request.
oneof wrapped_request {
// A single retrieve
ByIdRequest by_id = 1;
}
}
// Entity Transaction Service
service EntityTransactionService {
// Retrieve a single entity
// Issue a single retrieve request
rpc Retrieve(RetrieveRequest) returns (RetrieveResponse);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment