com.dooapp.gaedo.blueprints.queries.tests.OrVertexTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gaedo-blueprints Show documentation
Show all versions of gaedo-blueprints Show documentation
Implementation of gaedo mechanisms backed by blueprints graph layer
package com.dooapp.gaedo.blueprints.queries.tests;
import java.util.regex.Pattern;
import com.dooapp.gaedo.blueprints.GraphDatabaseDriver;
import com.dooapp.gaedo.blueprints.strategies.GraphMappingStrategy;
import com.dooapp.gaedo.properties.Property;
import com.tinkerpop.blueprints.Vertex;
public class OrVertexTest extends AggregatedTargettedVertexTest implements VertexTest {
public OrVertexTest(GraphMappingStrategy> strategy, GraphDatabaseDriver driver, Iterable p) {
super(strategy, driver, p);
}
@Override
public boolean matches(Vertex examined) {
boolean returned = false;
for(VertexTest v : tests) {
if(!returned) {
returned |= v.matches(examined);
}
}
return returned;
}
@Override
public void accept(VertexTestVisitor visitor) {
if(visitor.startVisit(this)) {
for(VertexTest v : tests) {
v.accept(visitor);
}
}
visitor.endVisit(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy