Hi
On Thu, Feb 2, 2012 at 11:53 AM, Alessandro Adamou <[email protected]> wrote:
>> The entityhub does not support incoming triples. Therefore it is expected
>> that those are missing in the Entityhub specific "application/json"
>> serialization.
>> If you choose a RDF backed serialization such triples may be present if
>> the remote service returns them. This may be the case for the "coolURI"
>> dereferencer.
>
>
> Ok but I still don't understand why it is the acceptable MIME-type that
> makes the difference: does the entityhub json writer filter incoming triples
> or something?
>
If the Dereferencer (like the CoolURI dereferencer you configured)
returns the data as RDF, than the Entityhub directly streams those
results to serializers that also use an RDF graph as source. The
"application/json" serializer directly operates on the entityhub
Representation interface.
Because of that you do not see incoming triples with
"application/json" but all data returned by the CoolURI dereferencer
with RDF based serialization.
>
>> Note that the "application/json" returned by the Entityhub is NOT json-ld
>> but an own JSON serialization.
>
>
> I see, so it's not possible to serialize to json-ld at all?
>
The current "json-ld" serializer has still issues (completeness and
performance) that would makes its usage questionable.
As soon as this issues are solved the Entityhub will use json-ld for
"application/json" requests. The current json format will than use an
mime type such as "application/entityhub+json".
> It might not be a problem for me as I am probably going to use the EntityHub
> Java API and handle Representation objects. I just use the REST API to try
> out the EntityHub itself.
>
On the JavaAPI level you can make a check like
if(representation instance of RdfRepresentation){
((RdfRepresentation)representation).getGraph();
}
this would give you the graph as serialized as RDF.
If you really need to check incoming Triples, than you can use LDPath for that
e.g. go to http://dev.iks-project.eu:8081/entityhub/site/dbpedia/ldpath
and use:
Context:
http://dbpedia.org/resource/Category:Host_cities_of_the_Summer_Olympic_Games
LD-Path:
schema:name = rdfs:label[@en];
members = ^dc:subject :: xsd:anyURI;
the '^{property}' allows to traverse inverse relations.
I hope this makes things more clear
best
Rupert
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen