@Override public Iterable<org.vertexium.EdgeInfo> getEdgeInfos(Direction direction, String[] labels, Authorizations authorizations) { if (!getFetchHints().isIncludeEdgeRefs()) { throw new VertexiumException("getEdgeInfos called without including any edge infos"); } switch (direction) { case IN: return filterEdgeInfosByLabel(accumuloEdgeInfosToEdgeInfos(getEdgeInfos(direction), Direction.IN), labels); case OUT: return filterEdgeInfosByLabel(accumuloEdgeInfosToEdgeInfos(getEdgeInfos(direction), Direction.OUT), labels); case BOTH: return new JoinIterable<>(getEdgeInfos(Direction.IN, labels, authorizations), getEdgeInfos(Direction.OUT, labels, authorizations)); default: throw new VertexiumException("Unexpected direction: " + direction); } }
private Vertex createVertexFromVertexIteratorValue(Key key, Value value, FetchHints fetchHints, Authorizations authorizations) { return AccumuloVertex.createFromIteratorValue(this, key, value, fetchHints, authorizations); }
@Override public Iterable<Edge> getEdges(Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getGraph().getEdges(getEdgeIds(direction, labelToArrayOrNull(label), authorizations), fetchHints, authorizations); }
@Override public Iterable<EdgeVertexPair> getEdgeVertexPairs(Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { return getEdgeVertexPairs(getEdgeInfos(direction, label, authorizations), fetchHints, null, authorizations); }
@Override public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }
@Override public Iterable<EdgeVertexPair> getEdgeVertexPairs(Direction direction, String label, Authorizations authorizations) { return getEdgeVertexPairs(getEdgeInfos(direction, label, authorizations), getGraph().getDefaultFetchHints(), null, authorizations); }
@Override public Iterable<Edge> getEdges(Direction direction, final String[] labels, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, labels); return getGraph().getEdges(getEdgeIdsWithOtherVertexId(null, direction, labels, authorizations), fetchHints, authorizations); }
@Override public Iterable<String> getEdgeIds(Direction direction, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction); return getEdgeIdsWithOtherVertexId(null, direction, null, authorizations); }
@Override public Iterable<Edge> getEdges(final Vertex otherVertex, Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getGraph().getEdges(getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, labelToArrayOrNull(label), authorizations), fetchHints, authorizations); }
@Override public Iterable<Edge> getEdges(Direction direction, FetchHints fetchHints, Long endTime, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction); return getGraph().getEdges(getEdgeIds(direction, authorizations), fetchHints, endTime, authorizations); }
? ImmutableSet.copyOf(vertexElementData.extendedTableNames) : null; return new AccumuloVertex( graph, vertexElementData.id.toString(),
private Iterable<Map.Entry<Text, org.vertexium.accumulo.iterator.model.EdgeInfo>> getEdgeInfos(Direction direction) { if (!getFetchHints().isIncludeEdgeRefs()) { throw new VertexiumException("getEdgeInfos called without including any edge infos"); } switch (direction) { case IN: if (!getFetchHints().isIncludeInEdgeRefs() && !getFetchHints().hasEdgeLabelsOfEdgeRefsToInclude()) { return null; } if (this.inEdges instanceof EdgesWithEdgeInfo) { return ((EdgesWithEdgeInfo) this.inEdges).getEntries(); } throw new VertexiumException("Cannot get edge info"); case OUT: if (!getFetchHints().isIncludeOutEdgeRefs() && !getFetchHints().hasEdgeLabelsOfEdgeRefsToInclude()) { return null; } if (this.outEdges instanceof EdgesWithEdgeInfo) { return ((EdgesWithEdgeInfo) this.outEdges).getEntries(); } throw new VertexiumException("Cannot get edge info"); case BOTH: return new JoinIterable<>(getEdgeInfos(Direction.IN), getEdgeInfos(Direction.OUT)); default: throw new VertexiumException("Unexpected direction: " + direction); } }
((AccumuloVertex) out).addOutEdge(edge); ((AccumuloVertex) in).addInEdge(edge);
@Override public Iterable<EdgeInfo> getEdgeInfos(Direction direction, Authorizations authorizations) { String[] labels = null; return getEdgeInfos(direction, labels, authorizations); }
@Override public Iterable<Edge> getEdges(Direction direction, final String[] labels, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, labels); return getGraph().getEdges(getEdgeIdsWithOtherVertexId(null, direction, labels, authorizations), fetchHints, authorizations); }
@Override public Iterable<EdgeVertexPair> getEdgeVertexPairs(Direction direction, String[] labels, Authorizations authorizations) { return getEdgeVertexPairs(getEdgeInfos(direction, labels, authorizations), getGraph().getDefaultFetchHints(), null, authorizations); }
@Override public Iterable<String> getEdgeIds(Direction direction, String label, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getEdgeIdsWithOtherVertexId(null, direction, labelToArrayOrNull(label), authorizations); }
@Override public Iterable<String> getEdgeIds(final Direction direction, final String[] labels, final Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, labels); return getEdgeIdsWithOtherVertexId(null, direction, labels, authorizations); }
@Override public Iterable<Edge> getEdges(final Vertex otherVertex, Direction direction, String label, FetchHints fetchHints, Authorizations authorizations) { getFetchHints().validateHasEdgeFetchHints(direction, label); return getGraph().getEdges(getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, labelToArrayOrNull(label), authorizations), fetchHints, authorizations); }
@Override public Iterable<EdgeVertexPair> getEdgeVertexPairs(Direction direction, FetchHints fetchHints, Authorizations authorizations) { return getEdgeVertexPairs(getEdgeInfos(direction, authorizations), fetchHints, null, authorizations); }