本文整理了Java中org.vertexium.Edge.getOtherVertexId()
方法的一些代码示例,展示了Edge.getOtherVertexId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.getOtherVertexId()
方法的具体详情如下:
包路径:org.vertexium.Edge
类名称:Edge
方法名:getOtherVertexId
[英]Given a vertexId that represents one side of a relationship, get me the id of the other side.
[中]给定一个表示关系一方的vertexId,请给我另一方的id。
代码示例来源:origin: org.visallo/visallo-model-vertexium
@Override
protected boolean isIncluded(Edge o) {
String entityVertexId = o.getOtherVertexId(workspaceVertex.getId());
return entityVertexId.equalsIgnoreCase(vertexId);
}
};
代码示例来源:origin: org.visallo/visallo-model-vertexium
protected ImmutableList<String> getDependentPropertyIris(Vertex vertex, String workspaceId) {
List<Edge> dependentProperties = Lists.newArrayList(vertex.getEdges(Direction.OUT, OntologyProperties.EDGE_LABEL_DEPENDENT_PROPERTY, getAuthorizations(workspaceId)));
dependentProperties.sort((e1, e2) -> {
Integer o1 = OntologyProperties.DEPENDENT_PROPERTY_ORDER_PROPERTY_NAME.getPropertyValue(e1, 0);
Integer o2 = OntologyProperties.DEPENDENT_PROPERTY_ORDER_PROPERTY_NAME.getPropertyValue(e2, 0);
return Integer.compare(o1, o2);
});
return ImmutableList.copyOf(dependentProperties.stream().map(e -> {
String propertyId = e.getOtherVertexId(vertex.getId());
return propertyId.substring(VertexiumOntologyRepository.ID_PREFIX_PROPERTY.length());
}).collect(Collectors.toList()));
}
代码示例来源:origin: visallo/vertexium
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getId()).equals(otherVertex.getId());
}
};
代码示例来源:origin: visallo/vertexium
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getId()).equals(otherVertex.getId());
}
};
代码示例来源:origin: visallo/vertexium
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getId()).equals(otherVertex.getId());
}
};
代码示例来源:origin: org.vertexium/vertexium-core
/**
* Given a vertexId that represents one side of a relationship, get me the vertex of the other side.
*/
default Vertex getOtherVertex(String myVertexId, FetchHints fetchHints, Authorizations authorizations) {
String vertexId = getOtherVertexId(myVertexId);
return getGraph().getVertex(vertexId, fetchHints, authorizations);
}
代码示例来源:origin: visallo/vertexium
/**
* Given a vertexId that represents one side of a relationship, get me the vertex of the other side.
*/
default Vertex getOtherVertex(String myVertexId, FetchHints fetchHints, Authorizations authorizations) {
String vertexId = getOtherVertexId(myVertexId);
return getGraph().getVertex(vertexId, fetchHints, authorizations);
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
protected EdgeVertexPair convert(Edge edge) {
String otherVertexId = edge.getOtherVertexId(sourceVertexId);
Vertex otherVertex = vertices.get(otherVertexId);
if (otherVertex == null) {
throw new VertexiumException("Found an edge " + edge.getId() + ", but could not find the vertex on the other end: " + otherVertexId);
}
return new EdgeVertexPair(edge, otherVertex);
}
};
代码示例来源:origin: org.vertexium/vertexium-core
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getSourceVertex().getId()).equals(getOtherVertexId());
}
};
代码示例来源:origin: visallo/vertexium
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getSourceVertex().getId()).equals(getOtherVertexId());
}
};
代码示例来源:origin: org.visallo/visallo-model-vertexium
protected Map<String, Vertex> getWorkspaceVertices(
final Workspace workspace,
List<Edge> entityEdges,
Authorizations authorizations
) {
Map<String, Vertex> workspaceVertices;
Iterable<String> workspaceVertexIds = entityEdges.stream()
.map(edge -> edge.getOtherVertexId(workspace.getWorkspaceId()))
.collect(Collectors.toList());
Iterable<Vertex> vertices = getGraph().getVertices(
workspaceVertexIds,
FetchHint.ALL_INCLUDING_HIDDEN,
authorizations
);
workspaceVertices = Maps.uniqueIndex(vertices, new Function<Vertex, String>() {
@Nullable
@Override
public String apply(Vertex v) {
return v.getId();
}
});
return workspaceVertices;
}
代码示例来源:origin: visallo/vertexium
@Override
protected EdgeVertexPair convert(Edge edge) {
String otherVertexId = edge.getOtherVertexId(sourceVertexId);
Vertex otherVertex = vertices.get(otherVertexId);
if (otherVertex == null) {
throw new VertexiumException("Found an edge " + edge.getId() + ", but could not find the vertex on the other end: " + otherVertexId);
}
return new EdgeVertexPair(edge, otherVertex);
}
};
代码示例来源:origin: org.visallo/visallo-web-product-graph
);
List<String> ids = StreamUtil.stream(productVertexEdges)
.map(edge -> edge.getOtherVertexId(productVertex.getId()))
.collect(Collectors.toList());
Map<String, Boolean> othersById = graph.doVerticesExist(ids, authorizations);
while (edgeIterator.hasNext()) {
Edge propertyVertexEdge = edgeIterator.next();
String otherId = propertyVertexEdge.getOtherVertexId(productVertex.getId());
GraphWorkProductVertex vertexOrNode = new GraphWorkProductVertex();
vertexOrNode.setId(otherId);
代码示例来源:origin: org.visallo/visallo-model-vertexium
String entityVertexId = edge.getOtherVertexId(workspace.getWorkspaceId());
代码示例来源:origin: org.visallo/visallo-model-vertexium
usersWithAccess = stream(userEdges)
.map((edge) -> {
String userId = edge.getOtherVertexId(workspaceId);
代码示例来源:origin: org.vertexium/vertexium-cypher
if (!edge.getOtherVertexId(startingVertex.getId()).equals(endVertex.getId())) {
return;
代码示例来源:origin: visallo/vertexium
if (!edge.getOtherVertexId(startingVertex.getId()).equals(endVertex.getId())) {
return;
代码示例来源:origin: org.visallo/visallo-core
.map(edge -> edge.getOtherVertexId(id))
.collect(Collectors.toList());
Map<String, Vertex> othersById = StreamUtil.stream(graph.getVertices(ids, FetchHint.NONE, authorizations))
String otherId = propertyVertexEdge.getOtherVertexId(id);
TVertex vertex = createWorkProductVertex();
vertex.setId(otherId);
代码示例来源:origin: org.visallo/visallo-web-product-graph
@Override
public void cleanUpElements(
Graph graph,
Vertex productVertex,
Authorizations authorizations
) {
Iterable<Edge> productElementEdges = productVertex.getEdges(
Direction.OUT,
WorkspaceProperties.PRODUCT_TO_ENTITY_RELATIONSHIP_IRI,
authorizations
);
for (Edge productToElement : productElementEdges) {
if (GraphProductOntology.NODE_CHILDREN.hasProperty(productToElement)) {
String otherElementId = productToElement.getOtherVertexId(productVertex.getId());
graph.softDeleteVertex(otherElementId, authorizations);
} else {
graph.softDeleteEdge(productToElement, authorizations);
}
}
graph.flush();
}
代码示例来源:origin: org.visallo/visallo-web
String otherVertexId = edge.getOtherVertexId(graphVertexId);
Vertex otherVertex = graph.getVertex(otherVertexId, authorizations);
if (otherVertex == null) {
内容来源于网络,如有侵权,请联系作者删除!