/** * Creates an edge between current Vertex and a target Vertex setting label as Edge's label. The fields parameter is an Array of * fields to set on Edge upon creation. Fields must be a odd pairs of key/value or a single object as Map containing entries as * key/value pairs. iClusterName is the name of the cluster where to store the new Edge. * * @param label Edge's label or class * @param inVertex Outgoing target vertex * @param fields Fields must be a odd pairs of key/value or a single object as Map containing entries as key/value pairs * @param iClassName Edge's class name * @param iClusterName The cluster name where to store the edge record * * @return The new Edge created */ public OrientEdge addEdge(String label, final OrientVertex inVertex, final String iClassName, final String iClusterName, final Object... fields) { if (inVertex == null) throw new IllegalArgumentException("destination vertex is null"); final OrientBaseGraph graph = getGraph(); if (graph != null) return graph.addEdgeInternal(this, label, inVertex, iClassName, iClusterName, fields); // IN MEMORY CHANGES ONLY: USE NOTX CLASS return OrientGraphNoTx.addEdgeInternal(null, this, label, inVertex, iClassName, iClusterName, fields); }
/** * (Blueprints Extension) Returns the Vertex type as OrientVertexType object. */ @Override public OrientVertexType getType() { final OrientBaseGraph graph = getGraph(); return new OrientVertexType(graph, getRecord().getSchemaClass()); }
protected void addSingleEdge(final ODocument doc, final OMultiCollectionIterator<Edge> iterable, String fieldName, final OPair<Direction, String> connection, final Object fieldValue, final OIdentifiable iTargetVertex, final String[] iLabels) { final OrientBaseGraph graph = getGraph(); final OrientEdge toAdd = getEdge(graph, doc, fieldName, connection, fieldValue, iTargetVertex, iLabels); if (toAdd != null && (settings.isUseVertexFieldsForEdgeLabels() || toAdd.isLabeled(iLabels))) // ADD THE EDGE iterable.add(toAdd); }
OSchema schema = getGraph().getRawGraph().getMetadata().getSchema();
final OrientBaseGraph graph = getGraph(); if (iDirection == Direction.OUT || iDirection == Direction.BOTH) { if (settings.isUseVertexFieldsForEdgeLabels()) {
OrientBaseGraph.getEdgeClassNames(getGraph(), iLabels); OrientBaseGraph.encodeClassNames(iLabels);
setCurrentGraphInThreadLocal(); OrientBaseGraph.getEdgeClassNames(getGraph(), iLabels); OrientBaseGraph.encodeClassNames(iLabels);
final OrientBaseGraph graph = getGraph(); if (!settings.isUseVertexFieldsForEdgeLabels() && label != null) return false;
OrientBaseGraph.getEdgeClassNames(getGraph(), iLabels); OrientBaseGraph.encodeClassNames(iLabels);
edge = this.sourceVertex.getGraph().getEdgeInstance( this.sourceVertex.getIdentity(), rec.getIdentity(), connection.getValue()); else edge = this.sourceVertex.getGraph().getEdgeInstance( rec.getIdentity(), this.sourceVertex.getIdentity(), connection.getValue()); } else if (immutableSchema.isEdgeType()) { edge = new OrientEdge(this.sourceVertex.getGraph(), rec.getIdentity(), connection.getValue()); } else throw new IllegalStateException("Invalid content found while iterating edges, value '" + value + "' is not an edge");
private void addSingleVertex(final ODocument doc, final OMultiCollectionIterator<Vertex> iterable, String fieldName, final OPair<Direction, String> connection, final Object fieldValue, final String[] iLabels) { final OrientBaseGraph graph = getGraph();
final OrientBaseGraph graph = getGraph();