/** * Given a vertexId that represents one side of a relationship, get me the vertex of the other side. */ default Vertex getOtherVertex(String myVertexId, Authorizations authorizations) { return getOtherVertex(myVertexId, getGraph().getDefaultFetchHints(), authorizations); }
Vertex otherVertex = edge.getOtherVertex(startingVertex.getId(), ctx.getFetchHints(), ctx.getAuthorizations()); VertexiumCypherScope.PathItem newPath = previousPath .concat(name, edge)
Vertex otherVertex = edge.getOtherVertex(startingVertex.getId(), ctx.getFetchHints(), ctx.getAuthorizations()); VertexiumCypherScope.PathItem newPath = previousPath .concat(name, edge)
/** * Given a vertexId that represents one side of a relationship, get me the vertex of the other side. */ default Vertex getOtherVertex(String myVertexId, Authorizations authorizations) { return getOtherVertex(myVertexId, getGraph().getDefaultFetchHints(), authorizations); }
List<String> vertexIds = new ArrayList<>(); edges.forEach(edge -> { if (edge.getOtherVertex(sourceVertexId, FetchHints.NONE, authorizations) != null) { vertexIds.add(edge.getOtherVertexId(sourceVertexId));
boolean foundMatch = false; if (edge != null && previousVertex != null) { Vertex vertex = edge.getOtherVertex(previousVertex.getId(), ctx.getFetchHints(), ctx.getAuthorizations()); if (vertexIsMatch(ctx, vertex, labelNames, propertiesMap, scope) && vertexRelationshipMatches(matchContext, matchConstraint, vertex)) {
boolean foundMatch = false; if (edge != null && previousVertex != null) { Vertex vertex = edge.getOtherVertex(previousVertex.getId(), ctx.getFetchHints(), ctx.getAuthorizations()); if (vertexIsMatch(ctx, vertex, labelNames, propertiesMap, scope) && vertexRelationshipMatches(matchContext, matchConstraint, vertex)) {
@Handle public ClientApiVertex handle( @Required(name = "vertexId") String vertexId, @Required(name = "multiValueKey") String multiValueKey, @ActiveWorkspaceId String workspaceId, User user, Authorizations authorizations ) throws Exception { Vertex artifactVertex = graph.getVertex(vertexId, authorizations); ArtifactDetectedObject artifactDetectedObject = VisalloProperties.DETECTED_OBJECT.getPropertyValue(artifactVertex, multiValueKey); Edge edge = graph.getEdge(artifactDetectedObject.getEdgeId(), authorizations); Vertex resolvedVertex = edge.getOtherVertex(artifactVertex.getId(), authorizations); SandboxStatus edgeSandboxStatus = SandboxStatusUtil.getSandboxStatus(edge, workspaceId); boolean isPublicEdge = edgeSandboxStatus == SandboxStatus.PUBLIC; workspaceHelper.deleteEdge(workspaceId, edge, artifactVertex, resolvedVertex, isPublicEdge, Priority.HIGH, authorizations, user); return (ClientApiVertex) ClientApiConverter.toClientApi(artifactVertex, workspaceId, authorizations); } }