Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • caosdb/src/caosdb-proto
1 result
Show changes
Commits on Source (1)
......@@ -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);
}