stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupert Westenthaler <>
Subject Re: Delete, Update locally cached entities
Date Tue, 02 Aug 2011 11:48:35 GMT
On Tue, Aug 2, 2011 at 1:20 PM, Rohana Rajapakse
<> wrote:
> Hi,
> I was under the impression that the entityhub/entity can be used for managing local (cached)
entities. I am confused with what this page/endpoint http://localhost:8080/entityhub/entity
says (page to get/create/update/delete Entities Managed by the entity hub). Am I missing something

Yeas the entityhub/entity endpoint supports full CRUD. I was thinking
you talk about updating an entity locally cached for a referenced site

Here are some examples for the "entityhub/entity" service endpoint:

create all entities within the parsed RDF graph

curl -X POST -H "Content-Type: application/rdf+xml" --data
"@{rdfXmlFile}" http://localhost:8080/entityhub/entity

Note that Entities are created for all subjects used in triples of the
parsed RDF data. E.g. parsing a RDF file containing a SKOS thesaurus
should create Entities for all skos:Concept's and the

If one only want to create a specific Entity (and ignore all other
triples) one needs to specify the ID of the Entity to create as
additional parameter.

curl -X POST -H "Content-Type: application/rdf+xml" --data
"@{rdfXmlFile}" http://localhost:8080/entityhub/entity?id={entity-uri}

This will only create the Entity with the id {entity-uri} and ignore
all triples within the parsed {rdfXmlFile} that use an other URI as

Retrieval works the same as for referenced sites

curl http://localhost:8080/entityhub/entity?id={entity-uri}

Update works the same way. Only use -X PUT instead of -X POST

To delete an Entity use

curl -X DELETE http://localhost:8080/entityhub/entity?id={entity-id}

Rupert Westenthaler

> Rohana
> -----Original Message-----
> From: Rupert Westenthaler []
> Sent: 02 August 2011 11:06
> To:
> Subject: Re: Delete, Update locally cached entities
> Hi
> On Tue, Aug 2, 2011 at 10:42 AM, Rohana Rajapakse
> <> wrote:
>> How do you delete/update locally cached entities in Entityhub? Which
>> endpoint(s) can I use? Can someone pass me a sample CURL instructions
>> please.
> ReferencedSites are read only. Via the RESTful interface there is no
> possibility to delete/update entities.
> Currently there is also no possibility to control the behavior of the
> local cache.
> The preferred way to provide this feature would be to use the HTTP
> Cache-Control headers [1] as described by [2].
> This would allow to update the local cache by adding the
> "Cache-Control: max-age=0" to a request.
> To support this one would also need to extend the interface of the
> ReferencedSite to allow to parse CacheControl parameters along with
> requests.
> If this would solve your issue I can create an JIRA issue for this new feature.
> best
> Rupert Westenthaler
> [1]
> [2]
>> Thanks
>> Rohana
>> Sign-up for our monthly newsletter
>> Registered Office: c/o Bishop Fleming, Cobourg House, Mayflower Street, Plymouth,
PL1 1LG. Company Registration No: 3553908
>> This email contains proprietary information, some or all of which may be legally
privileged. It is for the intended recipient only. If an addressing or transmission error
has misdirected this email, please notify the author by replying to this email. If you are
not the intended recipient you may not use, disclose, distribute, copy, print or rely on this
>> Email transmission cannot be guaranteed to be secure or error free, as information
may be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses.
This email and any files attached to it have been checked with virus detection software before
transmission. You should nonetheless carry out your own virus check before opening any attachment.
GOSS Interactive Ltd accepts no liability for any loss or damage that may be caused by software
>> wn virus check before opening any attachment. GOSS Interactive Ltd accepts no liability
for any loss or damage that may be caused by software viruses.
> --
> | Rupert Westenthaler   
> | Bodenlehenstraße 11                             ++43-699-11108907
> | A-5500 Bischofshofen

| Rupert Westenthaler   
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

View raw message