Skip to content

Api example: search

der edited this page Nov 19, 2012 · 4 revisions

Search API

Request

GET http://registry/reg1?query=foo

Response

<http://registry/reg1?query=foo&frstPage> a ldp:Page;
    ldp:pageOf <http://registry/reg1?query=foo>;
    # ldp:nextPage omited because there isn't one, pattern would be <http://registry/reg1?query=foo&_page=1>;
    lda:items ( <http://registry/reg1/foo1> <http://registry/reg1/foo2> <http://registry/reg1/foo3> ) ;
    .
<http://registry/reg1/foo1> a skos:Concept;
    rdfs:label "I am foo number 1"@en;
.
<http://registry/reg1/foo2> a skos:Concept;
    rdfs:label "I am foo number 2"@en;
.
<http://registry/reg1/foo3> a skos:Concept;
    rdfs:label "I am foo number 3"@en;
.

Request

GET http://registry/reg1?query=foo&_view=with_metadata

Response

<http://registry/reg1?query=foo&_view=with_metadata&frstPage> a ldp:Page;
    ldp:pageOf <http://registry/reg1?query=foo&_view=with_metadata>;
    # ldp:nextPage omited because there isn't one, pattern would be <http://registry/reg1?query=foo&_page=1>;
    lda:items ( <http://registry/reg1/foo1> <http://registry/reg1/foo2> <http://registry/reg1/foo3> ) ;
    .
<http://registry/reg1/_foo1> a reg:RegisterItem;
    reg:register <http://registry/reg1> ;
    reg:notation "item1";
    reg:itemClass  skos:Concept;
    owl:versionInfo "1";
    rdfs:label "I am foo number 1"@en;
    dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    dct:dateAccepted  "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    reg:status  reg:statusValid ;
    reg:definition <http://registry/reg1/_foo1:1#entityRef> ;
.
<http://registry/reg1/_foo1:1#entityRef> a reg:EntityReference;
    reg:entity <http://registry/reg1/foo1>;
.
<http://registry/reg1/foo1> a skos:Concept;
    rdfs:label "I am foo number 1"@en;
.
<http://registry/reg1/_foo2> a reg:RegisterItem;
    reg:register <http://registry/reg1> ;
    reg:notation "item1";
    reg:itemClass  skos:Concept;
    owl:versionInfo "1";
    rdfs:label "I am foo number 2"@en;
    dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    dct:dateAccepted  "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    reg:status  reg:statusValid ;
    reg:definition <http://registry/reg1/_foo2:1#entityRef> ;
.
<http://registry/reg1/_foo2:1#entityRef> a reg:EntityReference;
    reg:entity <http://registry/reg2/foo1>;
.
<http://registry/reg1/foo2> a skos:Concept;
    rdfs:label "I am foo number 2"@en;
.
<http://registry/reg1/_foo3> a reg:RegisterItem;
    reg:register <http://registry/reg1> ;
    reg:notation "item1";
    reg:itemClass  skos:Concept;
    owl:versionInfo "1";
    rdfs:label "I am foo number 3"@en;
    dct:dateSubmitted "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    dct:dateAccepted  "2012-11-11T09:40:00Z"^^xsd:dateTime ;
    reg:status  reg:statusValid ;
    reg:definition <http://registry/reg1/_foo3:1#entityRef> ;
.
<http://registry/reg1/_foo3:1#entityRef> a reg:EntityReference;
    reg:entity <http://registry/reg1/foo3>;
.
<http://registry/reg1/foo3> a skos:Concept;
    rdfs:label "I am foo number 3"@en;
.
Clone this wiki locally