static GraphTraversal<?, ?> transform(final Triple triple) {
        final GraphTraversal<Vertex, ?> matchTraversal = __.as(triple.getSubject().getName());
        
        final Node predicate = triple.getPredicate();
        final String uri = predicate.getURI();
        final String uriValue = Prefixes.getURIValue(uri);
        final String prefix = Prefixes.getPrefix(uri);

        switch (prefix) {
            case "edge":
                return matchTraversal.out(uriValue).as(triple.getObject().getName());
            case "property":
                return matchProperty(matchTraversal, uriValue, PropertyType.PROPERTY, triple.getObject());
            case "value":
                return matchProperty(matchTraversal, uriValue, PropertyType.VALUE, triple.getObject());
            default:
                throw new IllegalStateException(String.format("Unexpected predicate: %s", predicate));
        }
    }
Converts triple patterns into {@link GraphTraversal} instances.
sparql-gremlin/src/main/java/org/apache/tinkerpop/gremlin/sparql/TraversalBuilder.java