Return-Path: X-Original-To: apmail-incubator-stanbol-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-stanbol-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C2E7C6337 for ; Tue, 2 Aug 2011 11:53:15 +0000 (UTC) Received: (qmail 41129 invoked by uid 500); 2 Aug 2011 11:53:15 -0000 Delivered-To: apmail-incubator-stanbol-dev-archive@incubator.apache.org Received: (qmail 41017 invoked by uid 500); 2 Aug 2011 11:53:12 -0000 Mailing-List: contact stanbol-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stanbol-dev@incubator.apache.org Delivered-To: mailing list stanbol-dev@incubator.apache.org Received: (qmail 40925 invoked by uid 99); 2 Aug 2011 11:53:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 11:53:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rupert.westenthaler@gmail.com designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-ww0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 11:53:04 +0000 Received: by wwi18 with SMTP id 18so6068849wwi.0 for ; Tue, 02 Aug 2011 04:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=G+YiihneQbg3lwQfDD/QHOfb9g2h29Ys4AXjJj1UrT0=; b=Gj/SfE9Y3JNMBFbO2Xw8OA3H7M0QUmj1tQhWK4YaOJV0AMymfdl4W+Bz1pdttBU444 21dN1pSsH8ClIMferE1g8lJkgtq+0wf+4Ep/hKh8hfOkRIm/M8AQ3pIo9A+P7BXqIsCB wLqaDfphE2IRCja43GMwnOYkXUe5ju4GCchbs= MIME-Version: 1.0 Received: by 10.216.168.72 with SMTP id j50mr502675wel.88.1312285715662; Tue, 02 Aug 2011 04:48:35 -0700 (PDT) Received: by 10.216.70.78 with HTTP; Tue, 2 Aug 2011 04:48:35 -0700 (PDT) In-Reply-To: <798CB1570E93D245815FC1545D41FBA2053B8094@Paperboy.lan.gossinteractive.com> References: <798CB1570E93D245815FC1545D41FBA2053B7FF3@Paperboy.lan.gossinteractive.com> <798CB1570E93D245815FC1545D41FBA2053B8094@Paperboy.lan.gossinteractive.com> Date: Tue, 2 Aug 2011 13:48:35 +0200 Message-ID: Subject: Re: Delete, Update locally cached entities From: Rupert Westenthaler To: stanbol-dev@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 mana= ging local (cached) entities. I am confused with what this page/endpoint ht= tp://localhost:8080/entityhub/entity says (page to get/create/update/delete= Entities Managed by the entity hub). Am I missing something here? > 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 skos:ConcpetScheme. 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=3D{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 subject. Retrieval works the same as for referenced sites curl http://localhost:8080/entityhub/entity?id=3D{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=3D{entity-id} best Rupert Westenthaler > > Rohana > > -----Original Message----- > From: Rupert Westenthaler [mailto:rupert.westenthaler@gmail.com] > Sent: 02 August 2011 11:06 > To: stanbol-dev@incubator.apache.org > 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=3D0" 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 fe= ature. > > best > Rupert Westenthaler > > [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 > [2] http://incubator.apache.org/stanbol/docs/trunk/entityhub/entityhuband= linkeddata.html#cache-controlhttpwwww3orgprotocolsrfc2616rfc2616-sec14htmls= ec149 > >> >> >> Thanks >> >> >> >> Rohana >> >> >> >> >> Sign-up for our monthly newsletter www.gossinteractive.com/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 addressin= g or transmission error has misdirected this email, please notify the autho= r 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. >> >> Email transmission cannot be guaranteed to be secure or error free, as i= nformation may be intercepted, corrupted, lost, destroyed, arrive late or i= ncomplete 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. G= OSS Interactive Ltd accepts no liability for any loss or damage that may be= caused by software viruses. >> >> wn virus check before opening any attachment. GOSS Interactive Ltd accep= ts no liability for any loss or damage that may be caused by software virus= es. >> >> >> >> > > > > -- > | Rupert Westenthaler=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 rupe= rt.westenthaler@gmail.com > | Bodenlehenstra=C3=9Fe 11=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 ++43-699-1110890= 7 > | A-5500 Bischofshofen > --=20 | Rupert Westenthaler=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 rupert= .westenthaler@gmail.com | Bodenlehenstra=C3=9Fe 11=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 ++43-699-11108907 | A-5500 Bischofshofen