-
Notifications
You must be signed in to change notification settings - Fork 9
Api example: registration
der edited this page Mar 27, 2015
·
7 revisions
- Simple registration of external entity
- Simple registration of an internal entity with explicit URI
- Simple registration with automatic identifier allocation
- Registration with an explicit item definition
In all the examples below a registration action is performed by a POST to the endpoint http://registry/reg1
.
We omit prefix declarations for simplicity of presentation. Similarly we omit versioning of register items.
An arbitrary allocated identification number is shown as “xx”.
<http://example.com/anentity> a skos:Concept;
skos:prefLabel "an entity"@en;
.
<http://registry/reg1/_xx> a reg:RegisterItem;
rdfs:label "an entity"@en;
reg:itemClass skos:Concept;
reg:notation "xx";
dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
reg:status reg:statusProposed ;
reg:definition <http://registry/reg1/_xx:1#entityRef> ;
version:interval [ time:hasBeginning [ time:inXSDDateTime "2012-11-11T09:40:00Z"^^xsd:dateTime ] ];
.
<http://registry/reg1/_xx:1#entityRef> a reg:EntityReference;
reg:entity <http://example.com/anentity> ;
reg:sourceGraph <http://registry/reg1/_xx:1#graph> ;
.
<http://registry/reg1/_xx:1#graph> {
<http://example.com/anentity> a skos:Concept;
skos:prefLabel "an entity"@en;
.
}
<eg> a skos:Concept;
skos:prefLabel "an example entity"@en;
.
<http://registry/reg1/_eg> a reg:RegisterItem;
rdfs:label "an example entity"@en;
reg:itemClass skos:Concept;
reg:notation "eg";
dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
reg:status reg:statusProposed ;
reg:definition <http://registry/reg1/_eg:1#entityRef> ;
version:interval [ time:hasBeginning [ time:inXSDDateTime "2012-11-11T09:40:00Z"^^xsd:dateTime ] ];
.
<http://registry/reg1/_eg:1#entityRef> a reg:EntityReference;
reg:entity <http://registry/reg1/eg> ;
reg:sourceGraph <http://registry/reg1/_eg:1#graph> ;
.
<http://registry/reg1/_eg:1#graph> {
<http://registry/reg1/eg> a skos:Concept;
skos:prefLabel "an example entity"@en;
.
}
<> a skos:Concept;
skos:prefLabel "an allocated entity"@en;
.
<http://registry/reg1/_xx> a reg:RegisterItem;
rdfs:label "an allocatedentity"@en;
reg:itemClass skos:Concept;
reg:notation "xx";
dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
reg:status reg:statusProposed ;
reg:definition <http://registry/reg1/_xx:1#entityRef> ;
version:interval [ time:hasBeginning [ time:inXSDDateTime "2012-11-11T09:40:00Z"^^xsd:dateTime ] ];
.
<http://registry/reg1/_xx:1#entityRef> a reg:EntityReference;
reg:entity <http://registry/reg1/xx> ;
reg:sourceGraph <http://registry/reg1/_xx:1#graph> ;
.
<http://registry/reg1/_xx:1#graph> {
<http://registry/reg1/xx> a skos:Concept;
skos:prefLabel "an allocated entity"@en;
.
}
<_eg2> a reg:RegisterItem;
dct:license eg:openlicense;
reg:definition [
reg:entity <eg2>;
]
.
<eg2> a skos:Concept;
skos:prefLabel "an embedded entity"@en;
.
<http://registry/reg1/_eg2> a reg:RegisterItem;
rdfs:label "an embedded entity"@en;
reg:itemClass skos:Concept;
reg:notation "eg2";
dct:license eg:openlicense;
dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
reg:status reg:statusProposed ;
reg:definition <http://registry/reg1/_eg2:1#entityRef> ;
version:interval [ time:hasBeginning [ time:inXSDDateTime "2012-11-11T09:40:00Z"^^xsd:dateTime ] ];
.
<http://registry/reg1/_eg2:1#entityRef> a reg:EntityReference;
reg:entity <http://registry/reg1/eg2> ;
reg:sourceGraph <http://registry/reg1/_eg2:1#graph> ;
.
<http://registry/reg1/_eg2:1#graph> {
<http://registry/reg1/eg2> a skos:Concept;
skos:prefLabel "an embedded entity"@en;
.
}