public Set < ODocument > getEdgesBetweenVertexes ( final ODocument iVertex1 , final ODocument iVertex2 , final String [ ] iLabels , final String [ ] iClassNames ) { final Set < ODocument > result = new HashSet < ODocument > ( ) ; if ( iVertex1 != null && iVertex2 != null ) { // CHECK OUT EDGES for ( OIdentifiable e : getOutEdges ( iVertex1 ) ) { final ODocument edge = ( ODocument ) e ; if ( checkEdge ( edge , iLabels , iClassNames ) ) { if ( edge . < ODocument > field ( "in" ) . equals ( iVertex2 ) ) result . add ( edge ) ; } } // CHECK IN EDGES for ( OIdentifiable e : getInEdges ( iVertex1 ) ) { final ODocument edge = ( ODocument ) e ; if ( checkEdge ( edge , iLabels , iClassNames ) ) { if ( edge . < ODocument > field ( "out" ) . equals ( iVertex2 ) ) result . add ( edge ) ; } } } return result ; }
Returns all the edges between the vertexes iVertex1 and iVertex2 with label between the array of labels passed as iLabels and with class between the array of class names passed as iClassNames .