예제 #1
0
 @Override
 public final Incidence getNextIncidenceAtEdge(Graph traversalContext, Direction direction) {
   Incidence i;
   try {
     i =
         localGraphDatabase.getIncidenceObject(
             storingGraphDatabase.getNextIncidenceIdAtEdgeId(id));
   } catch (RemoteException e) {
     throw new RuntimeException(e);
   }
   if (traversalContext == null) {
     while (((i != null)
         && (direction != null)
         && (direction != Direction.BOTH)
         && (direction != i.getDirection()))) {
       i = i.getNextIncidenceAtEdge();
     }
   } else {
     if ((direction != null) && (direction != Direction.BOTH)) {
       while ((i != null)
           && ((!traversalContext.containsVertex(i.getVertex()))
               || (direction != i.getDirection()))) {
         i = i.getNextIncidenceAtEdge();
       }
     } else {
       while ((i != null) && (!traversalContext.containsVertex(i.getVertex()))) {
         i = i.getNextIncidenceAtEdge();
       }
     }
   }
   return i;
 }
예제 #2
0
 @Override
 public Incidence getNextIncidenceAtEdge() {
   if (getGraph().getTraversalContext() == null) {
     try {
       return localGraphDatabase.getIncidenceObject(
           storingGraphDatabase.getNextIncidenceIdAtEdgeId(id));
     } catch (RemoteException e) {
       throw new RuntimeException(e);
     }
   } else {
     return getNextIncidenceAtEdge(getGraph().getTraversalContext());
   }
 }
예제 #3
0
 @Override
 public final Incidence getNextIncidenceAtEdge(Graph traversalContext) {
   Incidence currentIncidence;
   try {
     currentIncidence =
         localGraphDatabase.getIncidenceObject(
             storingGraphDatabase.getNextIncidenceIdAtEdgeId(
                 storingGraphDatabase.getEdgeIdAtIncidenceId(id)));
   } catch (RemoteException e) {
     throw new RuntimeException(e);
   }
   while ((traversalContext != null)
       && (currentIncidence != null)
       && (!traversalContext.containsVertex(currentIncidence.getVertex()))) {
     currentIncidence = currentIncidence.getNextIncidenceAtEdge();
   }
   return currentIncidence;
 }
예제 #4
0
 @Override
 public final Incidence getNextIncidenceAtEdge(Direction direction) {
   if (getGraph().getTraversalContext() == null) {
     Incidence i;
     try {
       i =
           localGraphDatabase.getIncidenceObject(
               storingGraphDatabase.getNextIncidenceIdAtEdgeId(id));
     } catch (RemoteException e) {
       throw new RuntimeException(e);
     }
     if ((direction != null) && (direction != Direction.BOTH)) {
       while ((i != null) && (direction != i.getDirection())) {
         i.getNextIncidenceAtEdge();
       }
     }
     return i;
   } else {
     return getNextIncidenceAtEdge(getGraph().getTraversalContext(), direction);
   }
 }