Another interesting approach would be the use of Sesame RDF library on top
of OrientDB, via Tinkerpop Blueprints:
https://github.com/tinkerpop/blueprints/wiki/Sail-Implementation

In this way you will work on top of Orient as if it where a Triple Store,
and for your interest Sesame can parse JSONLD format:
http://rdf4j.org/sesame/2.7/apidocs/org/openrdf/rio/RDFFormat.html#JSONLD.

Yes, there will be a realt-time mapping, but you shouldn't implement it by
yourself.

This approach is also interesting since if you decide that OrientDB is not
enough for your case, you could replace it with another graph database
which implements Blueprints interface or with a triple store implementing
Sesame interface.

My opinion is that if you should implement a classical Semantic Web
application, i.e. with a live SPARQL endpoint, with many schemas or data
coming from the linked data cloud, you'll be better to start with something
like Sesame. Otherwhise, i.e. if you have your own schema and a fixed set
of queries specific for your application, you could write a custom importer
from JSONLD to your own model and work with Orient or some other data
storage.

Cheers,
   Riccardo


2015-01-10 15:11 GMT+01:00 <[email protected]>:

> Thanks Ricardo, the suggestion seems the way to go.
>
> I have however more problems with json-ld: the @type attribute is a
> defined in orientdb, and therefore fails to store json-ld documents, with
> the error "java.lang.IllegalArgumentException: Unsupported record type: 91
> --> java.lang.IllegalArgumentException: Record type '91' is not supported".
>
> This makes working json-ld in orientdb a hassle - it would require data to
> be parsed from/to a special format every time data is loaded stored. For
> example; I could rename this property simply "type" but then I would have
> to pre-process this to and from "@type" when displaying data.
>
> It seems to me that orientdb should have namespaced their attributes?
> Perhaps mongo style with an underscore. It is also an annoyance that key
> names cannot have semi-colons
>
> Example of a type from the json-ld playground:
> "@type": [
>         "gr:Individual",
>         "pto:Vehicle"
>       ],
>
> With this in mind, my argument would be perhaps to use a polyglot of mongo
> and neo4j as these problems do not exist. I'd be interesting in hearing
> suggestions for work arounds to these issues
>
> - Ashley
>
> Den fredag den 9. januar 2015 kl. 17.30.52 UTC+1 skrev Riccardo Tasso:
>>
>> Hi, interesting question.
>>
>> In Orient you can't avoid @rids, you should create some other property
>> "uri" (without @).
>>
>> I suggest to make Person extending V and Spouse extending E. Imagine you
>> would like to retrieve all the uri's of object properties connecting John
>> Lennon with another Vertex (or Thing). This is the query I would ask to
>> Orient:
>>
>> SELECT distinct(uri) FROM E WHERE out.uri = 'http://dbpedia.org/resource/
>> John_Lennon'
>>
>> And if you would like to retrieve all the John's spouses you can ask for:
>> SELECT distinct(uri) FROM Spouse
>> WHERE out.uri = 'http://dbpedia.org/resource/John_Lennon'
>>
>> Now the first problem is that you should map orient class names with URIs
>> corresponding to RDF classes or RDF object properties, in your case:
>>
>> Person with http://dbpedia.org/ontology/Person
>> Spouse with http://dbpedia.org/ontology/spouse
>>
>> What exactly do you need?
>> Cheers,
>>    Riccardo
>>
>> 2015-01-09 14:24 GMT+01:00 <[email protected]>:
>>
>>> Hi all
>>>
>>> I am experimenting with json-ld in orientdb. I would like to create
>>> edges using URIs rather than RIDs. For example, the "Person" json from the
>>> http://json-ld.org/ homepage is as below:
>>>
>>> {
>>>   "@context": "http://json-ld.org/contexts/person.jsonld";,
>>>   "@id": "http://dbpedia.org/resource/John_Lennon";,
>>>   "name": "John Lennon",
>>>   "born": "1940-10-09",
>>>   "spouse": "http://dbpedia.org/resource/Cynthia_Lennon";
>>> }
>>>
>>> So imagine we have another document for Cynthia, I would like the
>>> "spouse" attribute to be an edge to her document. So we have two classes,
>>> one for Person (V) and another for Spouse (E). Throughout the document,
>>> edges are shown as "#N:M" - is it possible to do this as my desired method?
>>>
>>> The two import examples in the document show the setup for the import
>>> using objectId but make no mention of the graphing. http://www.
>>> orientechnologies.com/docs/last/orientdb-etl.wiki/Import-
>>> from-DBPedia.html http://www.orientechnologies.com/docs/
>>> last/orientdb-etl.wiki/Import-from-PARSE.html
>>>
>>> Thanks
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "OrientDB" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to