Entityhub Site Manager
Service Endpoint /entityhub/sites
List of subresources:
- /entityhub/sites/referenced
- /entityhub/sites/entity
- /entityhub/sites/find
- /entityhub/sites/query
- /entityhub/sites/ldpath
- /entityhub/sites/reconcile: Implements the Google Refine Reconciliation API over all referenced sites.
Subresource /referenced
Description | This service returns a json array containing the IDs of all referenced sites. Sites returned by this Method can be accessed via the SITE service endpoint. |
---|---|
Request | GET /entityhub/sites/referenced |
Parameter | none |
Produces | application/json |
Example
curl "https://enrich.acdh.oeaw.ac.at/entityhub/sites/referenced"
Example response
["http:\/\/localhost:8080\/entityhub\/site\/dbpedia\/", "http:\/\/localhost:8080\/entityhub\/site\/musicbrainz\/"]
Test
You can check the referenced sites in this installation by clicking here.
Subresource /entity?id={URI}
Description | This service searches all referenced sites for the entity with the parsed URI and returns the result in the requested entity in the media type. If the requested entity can not be found a 404 is returned. |
---|---|
Request | GET /entityhub/sites/entity?id={URI} |
Parameter | id: the URI of the requested Entity |
Produces | Depends on requested media type |
Example
curl "https://enrich.acdh.oeaw.ac.at/entityhub/sites/entity?id=http://dbpedia.org/resource/Paris"
Test
Search for entity 'Paris' in DBPedia.Subresource /find?name={name}
Description | This service can be used to search all referenced sites for entities with the parsed name. Both a POST and a GET version are available. |
---|---|
Requests |
|
Parameters |
|
Produces | Depends on requested media type |
Example
curl -X POST -d "name=Bishofsh*&limit=10&offset=0" https://enrich.acdh.oeaw.ac.at/entityhub/sites/find
Test
Subresource /query
Description | Allows to parse JSON serialized field queries to the sites endpoint. |
---|---|
Request | -X POST -H "Content-Type:application/json" --data "@fieldQuery.json" /entityhub/sites/query |
Parameter | query: the JSON serialised FieldQuery (see section "FieldQuery JSON format" below) |
Produces | The results of the query serialised in the format as specified by the Accept header |
Example
curl -X POST -H "Content-Type:application/json" --data "@fieldQuery.json" https://enrich.acdh.oeaw.ac.at/entityhub/sites/query
Note: "@fieldQuery.json" links to a local file that contains the parsed Fieldquery (see ection "FieldQuery JSON format" for examples).
Subresource LDPath (/ldpath?ldpath={ldpath}&context={context})
Description | This service can be used to execute an LDPath program on one or more Entities (contexts). Both a POST and a GET version are available. |
---|---|
Request |
|
Parameter |
|
Produces: | Produces an RDF Graph with the parsed context(s) as subject the field selected by the LDPath program as properties and the selected values as object. All RDF serialisations are supported however JSON-LD seams to be a natural fit for the data created by LDPath. JSON-LD is also the default encoding. |
Example
The following LDPath statement will be executed on the defined contexts
curl -X POST -d "context=http://dbpedia.org/resource/Paris&ldpath=name%20%3D%20rdfs%3Alabel%5B%40en%5D%3B" https://enrich.acdh.oeaw.ac.at/entityhub/sites/ldpath
NOTE: the LDPath MUST BE URLEncoded. The decoded string of the above example is "name = rdfs:label[@en];" and would select the english label of Paris in the field "name".
Test
Execute the LDPath on the Context:
Other LDPath Examples:
- This select all persons a) directly connected b) member of the same category c) member of a (direct) sub-category:
- Schema translation: The following example converts dbpedia data for to schema.org
- Simple reasoning: The following shows an example how LD Path can be used to
for deduce additional knowledge for a given context.
In this case sub-property, inverse- and transitive relations as defined by the SKOS ontology are expressed in LD Path.
NOTE: the rule for 'skos:narrowerTransitive' will not scale in big Thesaurus (e.g. for the root node it will return every concept in the Thesaurus). In contrast the 'skos:broaderTransitive' rule is ok even for big Thesaurus as long as they are not cyclic (such as the DBPedia Categories).