@Override public <V> VertexProperty<V> property(final String key, final V value) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value)); }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().vertices(direction, edgeLabels), v -> v.equals(starVertex) ? starVertex : new ComputerAdjacentVertex(v)); }
@Override public <V> VertexProperty<V> property(final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(cardinality, key, value, keyValues)); }
@Override public <V> VertexProperty<V> property(final String key) { return new ComputerVertexProperty<>(this.getBaseVertex().property(key)); }
@Override public Iterator<Edge> edges(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().edges(direction, edgeLabels), ComputerEdge::new); }
@Override public Edge addEdge(final String label, final Vertex inVertex, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return new ComputerEdge(this.getBaseVertex().addEdge(label, inVertex, keyValues)); }
@Override public <V> VertexProperty<V> property(final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(cardinality, key, value, keyValues)); }
@Override public <V> VertexProperty<V> property(final String key, final V value) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value)); }
@Override public <V> VertexProperty<V> property(final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value, keyValues)); }
@Override public Iterator<Vertex> vertices(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().vertices(direction, edgeLabels), v -> v.equals(starVertex) ? starVertex : new ComputerAdjacentVertex(v)); }
@Override public <V> VertexProperty<V> property(final String key) { return new ComputerVertexProperty<>(this.getBaseVertex().property(key)); }
@Override public Edge addEdge(final String label, final Vertex inVertex, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return new ComputerEdge(this.getBaseVertex().addEdge(label, inVertex, keyValues)); }
@Override public <V> VertexProperty<V> property(final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value, keyValues)); }
@Override public Iterator<Edge> edges(final Direction direction, final String... edgeLabels) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.incidentAndAdjacentElementsCanNotBeAccessedInMapReduce(); return IteratorUtils.map(this.getBaseVertex().edges(direction, edgeLabels), ComputerEdge::new); }