find vertex name

34 views
Skip to first unread message

eswar reddy

unread,
May 27, 2016, 7:21:49 AM5/27/16
to OrientDB
hi
while traversing I am getting all edges, labels and getting "#rid"  but I want that Vertex name (class name) vertex name and properties of vertex .
suppose

#20:3 ---->edgelablename;
#23:7----->edgelablename2

but where #20:0 is there I want  vertex name
thanks in advandce

user.w...@gmail.com

unread,
May 27, 2016, 8:11:24 AM5/27/16
to OrientDB
Hi,

1) Could you explain it better?
2) Do you have a query example to post?
3) Could you post your schema?

Regards,
Michela

eswar reddy

unread,
May 27, 2016, 9:07:58 AM5/27/16
to OrientDB
hi

Iterator<Edge> it = outEdge.iterator();

while(it.hasNext())

{

                     

System.out.println(graph.getVertex(target.getId())+"------->"+it.next().getLabel());

}


using  above logic I can able to get the vertex name and  label of the edges then I want get  properties of that vertex class also

a------outedge----> 1
a<-----inedge-------2
b------outedge----> 3
c<-----inedge-------4
c------outedge----> 5
b<-----inedge-------6
a,b,c are the class (vertex) 1,2,3,4,5,6 are the edges
now I want get properties of a,b,c
thanks

user.w...@gmail.com

unread,
May 27, 2016, 9:13:24 AM5/27/16
to OrientDB
Hi,

in this case you can use target.getProperties("<property name>");

Hope it helps,.

Regards,
Michela
Reply all
Reply to author
Forward
0 new messages