// Path: src/main/java/com/blazegraph/gremlin/structure/BlazeGraph.java
// public static enum Match {
//         
//     /**
//      * Match any terms in the search string (OR).
//      */
//     ANY,
//         
//     /**
//      * Match all terms in the search string (AND).
//      */
//     ALL,
//         
//     /**
//      * Match the search string exactly using a regex filter. Most expensive
//      * option - use ALL instead if possible.
//      */
//     EXACT;
//         
// }


import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;
import org.openrdf.model.Literal;
import org.openrdf.model.Resource;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import com.bigdata.rdf.model.BigdataBNode;
import com.bigdata.rdf.model.BigdataStatement;
import com.bigdata.rdf.sparql.ast.QueryHints;
import com.bigdata.rdf.store.BDS;
import com.blazegraph.gremlin.structure.BlazeGraph.Match;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.joining;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.function.Function;
     */
    String removeVertex(final BlazeVertex v) {
        final URI id = v.rdfId();
        final StringBuilder vc = buildValuesClause(
                new StringBuilder(), "?id", asList(id));
        final String queryStr =
                REMOVE_VERTEX.replace(Templates.VALUES, vc.toString());
        return queryStr;
    }
    
    /**
     * @see {@link Templates#REMOVE_REIFIED_ELEMENT}
     */
    String removeReifiedElement(final BlazeReifiedElement e) {
        final BigdataBNode sid = e.rdfId();
        final BigdataStatement stmt = sid.getStatement();
        final Resource s = stmt.getSubject();
        final URI p = stmt.getPredicate();
        final Value o = stmt.getObject();
        final StringBuilder vc = buildValuesClause(new StringBuilder(), 
                new String[] { "?s", "?p", "?o" }, 
                new Value[]  { s, p, o });
        final String queryStr =
                REMOVE_REIFIED_ELEMENT.replace(Templates.VALUES, vc.toString());
        return queryStr;
    }
    
    /**
     * @see {@link Templates#TEXT_SEARCH}
     */
// Path: src/main/java/com/blazegraph/gremlin/structure/BlazeGraph.java
// public static enum Match {
//         
//     /**
//      * Match any terms in the search string (OR).
//      */
//     ANY,
//         
//     /**
//      * Match all terms in the search string (AND).
//      */
//     ALL,
//         
//     /**
//      * Match the search string exactly using a regex filter. Most expensive
//      * option - use ALL instead if possible.
//      */
//     EXACT;
//         
// }


// Path: src/main/java/com/blazegraph/gremlin/structure/SparqlGenerator.java
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality;
import org.openrdf.model.Literal;
import org.openrdf.model.Resource;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import com.bigdata.rdf.model.BigdataBNode;
import com.bigdata.rdf.model.BigdataStatement;
import com.bigdata.rdf.sparql.ast.QueryHints;
import com.bigdata.rdf.store.BDS;
import com.blazegraph.gremlin.structure.BlazeGraph.Match;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.joining;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.function.Function;

     */
    String removeVertex(final BlazeVertex v) {
        final URI id = v.rdfId();
        final StringBuilder vc = buildValuesClause(
                new StringBuilder(), "?id", asList(id));
        final String queryStr =
                REMOVE_VERTEX.replace(Templates.VALUES, vc.toString());
        return queryStr;
    }
    
    /**
     * @see {@link Templates#REMOVE_REIFIED_ELEMENT}
     */
    String removeReifiedElement(final BlazeReifiedElement e) {
        final BigdataBNode sid = e.rdfId();
        final BigdataStatement stmt = sid.getStatement();
        final Resource s = stmt.getSubject();
        final URI p = stmt.getPredicate();
        final Value o = stmt.getObject();
        final StringBuilder vc = buildValuesClause(new StringBuilder(), 
                new String[] { "?s", "?p", "?o" }, 
                new Value[]  { s, p, o });
        final String queryStr =
                REMOVE_REIFIED_ELEMENT.replace(Templates.VALUES, vc.toString());
        return queryStr;
    }
    
    /**
     * @see {@link Templates#TEXT_SEARCH}
     */
    String search(final String search, final Match match) {