src/main/java/com/datastax/sparql/gremlin/SparqlToGremlinCompiler.java
// VISITING SPARQL ALGEBRA OP BASIC TRIPLE PATTERNS - MAYBE
VISITING SPARQL ALGEBRA OP BASIC TRIPLE PATTERNS - MAYBE
VISITING SPARQL ALGEBRA OP BASIC TRIPLE PATTERNS - MAYBE
@Override
	public void visit(final OpBGP opBGP) {
		{
			System.out.println("Inside opBGP ---------------------------------------------->");
			final List<Triple> triples = opBGP.getPattern().getList();
			final Traversal[] matchTraversals = new Traversal[triples.size()];
			int i = 0;
			for (final Triple triple : triples) {
				matchTraversals[i++] = TraversalBuilder.transform(triple);
				if (optionalFlag) {
					optionalTraversals.add(matchTraversals[i - 1]);
					optionalVariable.add(triple.getObject().toString());
					System.out.println("Inside Optional traversal==========================");
				} else {
					traversalList.add(matchTraversals[i - 1]);
					System.out.println("Inside regular traversal==========================");
				}
			}
		}
	}
@ Override public void visit ( final OpBGP opBGP ) { { System . out . println ( "Inside opBGP ---------------------------------------------->" ) ; final List < Triple > triples = opBGP . getPattern ( ) . getList ( ) ; final Traversal [ ] matchTraversals = new Traversal [ triples . size ( ) ] ; int i = 0 ; for ( final Triple triple : triples ) { matchTraversals [ i ++ ] = TraversalBuilder . transform ( triple ) ; if ( optionalFlag ) { optionalTraversals . add ( matchTraversals [ i - 1 ] ) ; optionalVariable . add ( triple . getObject ( ) . toString ( ) ) ; System . out . println ( "Inside Optional traversal==========================" ) ; } else { traversalList . add ( matchTraversals [ i - 1 ] ) ; System . out . println ( "Inside regular traversal==========================" ) ; } } } }
VISITING SPARQL ALGEBRA OP BASIC TRIPLE PATTERNS - MAYBE
VISITING SPARQL ALGEBRA OP BASIC TRIPLE PATTERNS - MAYBE