Hi, what you need is something like that
person1.addEdge("class:Friend", person2, null, null, "since", "2013-07-30");
look here:
https://github.com/orientechnologies/orientdb/wiki/Graph-Database-Tinkerpop
Am Freitag, 9. Januar 2015 01:27:35 UTC+1 schrieb Tim Kingsbury:
>
>
> Hello,
>
> I am attempting to add some RDF nodes to an empty OrientDB 2.0-RC1
> database through the Blueprints interface. Unfortunately, I'm running into
> problems with adding edges with labels that are URIs. Here's some code that
> demonstrates my problem:
>
> Vertex luca = graph.addVertex(null);
> luca.setProperty("name", "Luca");
>
> Vertex marko = graph.addVertex(null);
> marko.setProperty("name", "Marko");
>
> graph.addEdge(null, luca, marko, "knows");
> graph.addEdge(null, luca, marko, "
> http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
> graph.commit();
>
> Iterable<Edge> edges = luca.getEdges(Direction.BOTH);
> for (Edge e : edges)
> {
> System.out.println("Found edge: " + e.getLabel());
> }
>
>
> When the edges are printed, only the "knows" edge is displayed. The URI
> edge is not retrieved.
>
> In WebStudio, if I "select * from V", the vertexes appear, but only the
> "knows" edge is displayed in the in/out lists.
> Surprisingly, if I "select * from E", both the URI and the "knows" edge
> are listed.
>
> Is there a special trick for adding an edge with a URI label? I assume
> that the colons, periods, and slashes are tripping things up.
>
> Any help would be greatly appreciated!
>
>
> Tim
>
--
---
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.