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 A545646B9 for ; Sat, 4 Jun 2011 08:37:52 +0000 (UTC) Received: (qmail 92717 invoked by uid 500); 4 Jun 2011 08:37:52 -0000 Delivered-To: apmail-incubator-stanbol-dev-archive@incubator.apache.org Received: (qmail 92677 invoked by uid 500); 4 Jun 2011 08:37:52 -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 92669 invoked by uid 99); 4 Jun 2011 08:37:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jun 2011 08:37:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,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; Sat, 04 Jun 2011 08:37:45 +0000 Received: by wwb17 with SMTP id 17so2217556wwb.0 for ; Sat, 04 Jun 2011 01:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=VBWtMaQXQXhyg4P1Z2tzIzpQrfTOkoxJvqalhw5nNSU=; b=Oou1WRlVkFN5vhMckzNWeML4jKuRF4QU6z90a/951I7jgJ/RtnW4QBNfniP2F14sHM xM/X19SPc5Dw9yKHnOkoh3+F/07yq7YniLrFSvoPhBWckxke27tVZrarfHbgh4Brldpp 9PEo0bTX5WiyTTgpRl/w7s/rslYrsGfzFzQMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CoYeDGAT13tZKYcYcjk2c0ykMxXlvK2/VK2Wrlrrq9ubDy7d1s4/YHlWiB3Oxk+l7m m+VxADCMpGAkV5iTSl5Rf+w6cemDwMBxvu/dGlem/bL69U73/Rn6ecvhq+0/iq1NZSS9 jcMpByEOdSLdpnBP5Z0JXfWOO2F8xwUas9AMM= MIME-Version: 1.0 Received: by 10.216.61.135 with SMTP id w7mr334189wec.19.1307176644832; Sat, 04 Jun 2011 01:37:24 -0700 (PDT) Received: by 10.216.71.193 with HTTP; Sat, 4 Jun 2011 01:37:24 -0700 (PDT) In-Reply-To: References: Date: Sat, 4 Jun 2011 10:37:24 +0200 Message-ID: Subject: Re: RESTful API for the Entityhub 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 Hi all, I have decided to delay the implementation of the RESTful interface discussed in this thread until later. In the short term I will add support for creating and updating Entities current RESTful API. The new plan is to start the development in July (after the IKS Workshop in Paris[1]) and in an own branch. This would also provide the possibility to discuss the RESTful interface of the Contenthub. Maybe this two component can share some parts of the implementation. best Rupert Westenthaler On Tue, May 24, 2011 at 2:36 PM, Rupert Westenthaler wrote: > On Tue, May 24, 2011 at 11:08 AM, Bertrand Delacretaz > wrote: >> Hi Rupert, >> >> On Mon, May 23, 2011 at 11:45 PM, Rupert Westenthaler >> wrote: >>> ...Yesterday I published a document [1] that describes how to adopt >>> Linked Data / Linked Media principles for the RESTful API of the >>> Entityhub.... >> >> Cool - I like the Linked Data intro, could be its own document IMO - >> but maybe later, no hurry. >> >> IIUC the proposed URI scheme: >> >> =C2=A0http://{host}/entityhub/{site}/entity/{localname} >> > {site} refers to the ID of the referenced Site as configured for the Enti= tyhub. > >> The http://mpii.de/yago/resource/Berlin entity, for example, would map t= o >> >> =C2=A0http://example.com/entityhub/mpii.de/entity/Berlin >> > > Thats correct if "mupii.de" is configured as ID for the Referenced Site > Given your example I would rather expect users to choose "yago" as ID. > In that case the URI would be > > =C2=A0http://example.com/entityhub/yago/entity/Berlin > >> If I'm correct, why not use a more direct mapping like >> >> =C2=A0http://example.com/hub/entity/mpii.de/yago/resource/Berlin >> >> by simply replacing http:// from the original ID with the constant >> prefix "http://example.com/hub/entity" ? >> >> Locally-defined entities would then be something like >> http://example.com/hub/entity/local/people/rupert >> >> (but maybe I didn't get it ;-) > > I like the general idea because it would allow for a unique URI space > for all Entities managed by the Entityhub. Especially the "/local" > prefix for entity sets that are managed locally and therefore can > support rear/write access. Assuming that a typical user will not be so > interested in what site is actually managing an Entity this is a good > idea. > > However adopting this pattern would also require to rethink the URI > scheme of other functionalities provided by the Entityhub because > currently each referenced site has it's own JAX-RS resource that is > bound to an URI. > > =C2=A0 =C2=A0http://example.com/entityhub/site/{siteId} ... for Reference= d Sites > =C2=A0 =C2=A0http://example.com/entityhub/sites/ ... for the Referenced S= ites Manager > =C2=A0 =C2=A0http://example.com/entityhub/symbol/ ... for locally managed= entities > > Functionalities like retrieval and search are bound to sub paths > e.g. for a referenced site to: > > =C2=A0 =C2=A0http://example.com/entityhub/site/{siteId}/entity?uri=3D{uri= } for > retrieving entities by id > =C2=A0 =C2=A0http://example.com/entityhub/site/{siteId}/find?name=3D{patt= ern} for > simple label based searches > =C2=A0 =C2=A0http://example.com/entityhub/site/{siteId}/query?query=3D{qu= ery} to > parse other queries. > > The current URI scheme would therefore conflict with the URI scheme > proposed by Bertrand's because it would not allow to insert "/entity", > "/find", ... between the {site} and the {entityID}. IMHO to go in line > with Bertrand's proposal one would need to encode such functionalities > within the "prefix". > See the examples below. > > =C2=A0 =C2=A0http://example.com/entityhub/entity/{entityID}[?uri=3D{uri}] > > for retrieving entities either by parsing the local {entityID} or the > remote {uri} of the entity as parameter. > > > =C2=A0 =C2=A0http://example.com/entityhub/find{siteSelector}?name=3D{patt= ern}[&site=3D{siteId}] > > for searching Entities by name on all sites confirming to {siteSelector}. > The {siteSelector} could be used as a prefix to select sites to be > included within the search. e.g. "/local" would only search within > locally managed entities. > As an option one could also support to specify the site to search as para= meter > > > =C2=A0 =C2=A0http://example.com/entityhub/query{siteSelector}?query=3D{qu= ery} > > for parsing queries. > > =C2=A0 =C2=A0http://example.com/entityhub/mapping =C2=A0... for defining = mappings > =C2=A0 =C2=A0http://example.com/entityhub/import ... for importing remote= entities > =C2=A0 =C2=A0http://example.com/entityhub/{futureFeature} ... extension p= oint > > > any opinions, suggestions? > > best > Rupert > >> >> -Bertrand >> >>> [1] http://incubator.apache.org/stanbol/docs/trunk/entityhub/entityhuba= ndlinkeddata.html >> > > > > -- > | 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