use of com.tinkerpop.frames.VertexFrame in project org.openntf.domino by OpenNTF.
the class MixedFramedVertexList method applyFilter.
public MixedFramedVertexList applyFilter(final String key, final Object value) {
DVertexList vertList = new DVertexList((DVertex) sourceVertex_);
if (this.size() > 0) {
for (Object raw : this) {
VertexFrame vertex = (VertexFrame) raw;
try {
if ("@type".equals(key)) {
if (DGraphUtils.isType(vertex, TypeUtils.toString(value))) {
vertList.add((DVertex) vertex.asVertex());
}
} else {
Object vertexVal = DGraphUtils.getFramedProperty(getGraph(), vertex, key);
if (vertexVal instanceof Collection) {
for (Object rawVal : (Collection) vertexVal) {
if (value.equals(TypeUtils.toString(rawVal))) {
vertList.add((DVertex) vertex.asVertex());
}
}
} else {
if (value.equals(TypeUtils.toString(vertexVal))) {
vertList.add((DVertex) vertex.asVertex());
}
}
}
} catch (Throwable t) {
t.printStackTrace();
}
}
}
MixedFramedVertexList result = new MixedFramedVertexList(getGraph(), sourceVertex_, vertList);
return result;
}
use of com.tinkerpop.frames.VertexFrame in project org.openntf.domino by OpenNTF.
the class MixedFramedVertexList method set.
@Override
public Object set(final int arg0, final Object arg1) {
if (arg1 instanceof VertexFrame) {
Vertex v = ((VertexFrame) arg1).asVertex();
list_.set(arg0, v);
return arg1;
} else {
return null;
}
}
Aggregations