@Override public void query(GraphRewrite event, GraphTraversal<?, Vertex> pipeline) { switch (searchType) { case EQUALS: pipeline.has(this.propertyName, this.searchValue); break; case NOT_EQUALS: pipeline.has(this.propertyName, P.neq(this.searchValue)); break; case CONTAINS_TOKEN: pipeline.has(this.propertyName, Text.textContains(searchValue)); break; case CONTAINS_ANY_TOKEN: pipeline.has(this.propertyName, new P(new MultipleValueTitanPredicate(), searchValue)); break; case REGEX: pipeline.has(this.propertyName, Text.textRegex(searchValue)); break; case DEFINED: pipeline.has(this.propertyName); break; case NOT_DEFINED: pipeline.hasNot(this.propertyName); break; default: throw new IllegalArgumentException("Unrecognized property query type: " + searchType); } }
@Override public void query(GraphRewrite event, GraphTraversal<?, Vertex> pipeline) { switch (searchType) { case EQUALS: pipeline.has(this.propertyName, this.searchValue); break; case NOT_EQUALS: pipeline.has(this.propertyName, P.neq(this.searchValue)); break; case CONTAINS_TOKEN: pipeline.has(this.propertyName, Text.textContains(searchValue)); break; case CONTAINS_ANY_TOKEN: pipeline.has(this.propertyName, new P(new MultipleValueTitanPredicate(), searchValue)); break; case REGEX: pipeline.has(this.propertyName, Text.textRegex(searchValue)); break; case DEFINED: pipeline.has(this.propertyName); break; case NOT_DEFINED: pipeline.hasNot(this.propertyName); break; default: throw new IllegalArgumentException("Unrecognized property query type: " + searchType); } }