Hi!
I created a remote OrientDb database in the console and then tried to load
the vertices and edges using the Graph API from a file. The program ran
smoothly and I used Gremlin to check the loading. While I can see the
Vertices are loaded with the properties, I see that the edges on the other
hand have not been loaded. I am using v 1.7.9 community. Here is the
relevant code snippet:
Vertex vSub = graph.addVertex("class:Subject");
String s = entryTerms[0].trim();
vSub.setProperty("sval", s);
//graph.commit();
Vertex vObj = graph.addVertex("class:Object");
String o = entryTerms[2];
for(int count = 3; count < entryTerms.length - 1; count++)
o = o + " " + entryTerms[count];
vObj.setProperty("oval", o);
//graph.commit();
String e = entryTerms[1];
Edge ePred = graph.addEdge(null, vSub, vObj, e);
System.out.println("Created edge: " + ePred.getId());
vertexCount++;
if (((line % 15000) == 0) && (line != 0))
{
System.out.println("Added " + vertexCount + " vertices...");
//commit transaction also here
graph.commit();
}
} catch( Exception e ) {
graph.rollback();
Upon running the code I see in the output :
Created edge: #9:-4468->#9:-4469
Created edge: #9:-4470->#9:-4471
Created edge: #9:-4472->#9:-4473
Created edge: #9:-4474->#9:-4475
It seems the code is doing its job but somehow in Gremlin I cannot see the
edges.
I did not do any initializations for Gremlin in the code. Here are some
sample results from Gremlin:
gremlin> g.v('9:7105').map
==>{oval=
http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/StandardizationInstitution1
}
gremlin> g.v('9:7105').oval
==>
http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/StandardizationInstitution1
gremlin> g.E
gremlin> g.E.map
gremlin>
As you can see here, the vertices are fine. However, there is no error
message or results for the edges.
Can anyone please help me understand?
Thanks in advance for your time.
--
---
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.