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] <javascript:>>:
>
>> 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] <javascript:>.
>> 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