Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-proto
Commits
5eec0072
Commit
5eec0072
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-consolidation' into 'dev'
F consolidation See merge request
!2
parents
fb0c2d77
bd37bac6
No related branches found
No related tags found
1 merge request
!2
F consolidation
Pipeline
#12321
passed with warnings
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/caosdb/entity/v1alpha1/main.proto
+132
-7
132 additions, 7 deletions
proto/caosdb/entity/v1alpha1/main.proto
with
132 additions
and
7 deletions
proto/caosdb/entity/v1alpha1/main.proto
+
132
−
7
View file @
5eec0072
...
...
@@ -25,6 +25,108 @@ option java_package = "org.caosdb.api.entity.v1alpha1";
option
cc_enable_arenas
=
true
;
package
caosdb
.
entity.v1alpha1
;
// Data type for references to other entities.
message
ReferenceDataType
{
// The name of the record type which defines the scope of the reference.
string
name
=
1
;
}
// Data type for list value.
message
ListDataType
{
// A list can be a list of atomic data types or references.
oneof
list_data_type
{
// List of atomic data types (e.g. List of DOUBLE)
AtomicDataType
atomic_data_type
=
1
;
// List of reference (e.g. List of Person(s))
ReferenceDataType
reference_data_type
=
2
;
}
}
// Atomic data types.
enum
AtomicDataType
{
// The data type is unset/unknown.
ATOMIC_DATA_TYPE_UNSPECIFIED
=
0
;
// TEXT data type.
ATOMIC_DATA_TYPE_TEXT
=
1
;
// DOUBLE data type.
ATOMIC_DATA_TYPE_DOUBLE
=
2
;
// DATETIME data type.
ATOMIC_DATA_TYPE_DATETIME
=
3
;
// INTEGER data type.
ATOMIC_DATA_TYPE_INTEGER
=
4
;
// BOOLEAN data type.
ATOMIC_DATA_TYPE_BOOLEAN
=
5
;
}
// The property value's data type.
message
DataType
{
// Wraps atomic types, LIST and REFERENCE
oneof
data_type
{
// The atomic data types.
AtomicDataType
atomic_data_type
=
1
;
// A list data type.
ListDataType
list_data_type
=
2
;
// A reference data type.
ReferenceDataType
reference_data_type
=
3
;
}
}
// Represents collection values (e.g. for lists).
message
CollectionValues
{
// List of scalar values.
repeated
ScalarValue
values
=
1
;
}
// Represents special values which are otherwise hard to tranfer via protobuf.
enum
SpecialValue
{
// Represent the NULL value.
SPECIAL_VALUE_UNSPECIFIED
=
0
;
// The empty string.
SPECIAL_VALUE_EMPTY_STRING
=
1
;
}
// A scalar property value.
message
ScalarValue
{
// Wraps different optimized representations of a single value.
oneof
scalar_value
{
// The value as integer
int64
integer_value
=
1
;
// The value as double
double
double_value
=
2
;
// The value as bool
bool
boolean_value
=
3
;
// The value as string
string
string_value
=
4
;
// The value is a special value (e.g. NULL or the empty string)
SpecialValue
special_value
=
5
;
}
}
// The value of a property.
message
Value
{
// Wraps scalar and multi-dimensional values.
oneof
value
{
// The scalar values.
ScalarValue
scalar_value
=
1
;
// The list values.
CollectionValues
list_values
=
2
;
}
}
// The roles of entities.
enum
EntityRole
{
// Unspecified role.
ENTITY_ROLE_UNSPECIFIED
=
0
;
// RecordType
ENTITY_ROLE_RECORD_TYPE
=
1
;
// Record
ENTITY_ROLE_RECORD
=
2
;
// Property
ENTITY_ROLE_PROPERTY
=
3
;
// File
ENTITY_ROLE_FILE
=
4
;
}
// Messages codes. Entities and transactions contain errors, warnings and info
// messages which use these codes.
enum
MessageCode
{
...
...
@@ -318,13 +420,13 @@ message Entity {
// transactions.
Version
version
=
4
;
// Entity role (e.g. RecordType, Property, Record)
string
role
=
5
;
EntityRole
role
=
5
;
// Default unit of this entity (only used by properties).
string
unit
=
6
;
// Default datatype of this entity (only used by properties).
string
datatype
=
7
;
// Default data
type of this entity (only used by properties).
DataType
data
_
type
=
7
;
// Default value of this entity (only used by properties).
string
value
=
8
;
Value
value
=
8
;
// Properties of this entity.
repeated
Property
properties
=
9
;
// Parents of this entity.
...
...
@@ -356,6 +458,27 @@ message Hash {
string
value
=
2
;
}
// The property importance.
enum
Importance
{
// The importance is unset/unknown.
IMPORTANCE_UNSPECIFIED
=
0
;
// The property is obligatory for children of this entity. The server will
// flag an error when an obligatory property of a parent is missing during
// updates or insertions of a child entity. It says: "YOU MUST!"
IMPORTANCE_OBLIGATORY
=
1
;
// The property is recommended for children of this entity. The server will
// flag a warning when a recommended property of a parent is missing during
// updates or insertions of a child entity. It says: "YOU SHOULD!"
IMPORTANCE_RECOMMENDED
=
2
;
// The property is merely suggested for children of this entity. It says:
// "YOU MAY WANT TO?"
IMPORTANCE_SUGGESTED
=
3
;
// The property is fix and child entities should not add this property to
// themselves (This is a bit like static in object-oriented programming
// languages). It says: "KINDLY IGNORE THIS ONE FOR CHILDREN OF THIS ENTITY"
IMPORTANCE_FIX
=
4
;
}
// Property of an entity. Don't confuse with an Entity with role="Property"
message
Property
{
// ID of the implemented Entity
...
...
@@ -365,13 +488,13 @@ message Property {
// Property description
string
description
=
3
;
// Property value
string
value
=
4
;
Value
value
=
4
;
// Property importance
string
importance
=
5
;
Importance
importance
=
5
;
// Property unit
string
unit
=
6
;
// Property datatype
string
datatype
=
7
;
DataType
data
_
type
=
7
;
// Errors of this property
repeated
Message
errors
=
8
;
// Warnings of this property
...
...
@@ -436,6 +559,8 @@ message EntityResponse {
message
IdResponse
{
// The entity id.
string
id
=
1
;
// The entity version.
Version
version
=
5
;
// Errors for this entity which occurred during the current transaction. The
// presence of errors indicates that a transaction was not successful and the
// errors describe why this is the case.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment