public class OrientVertex extends OrientElement implements com.tinkerpop.blueprints.Vertex
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_IN_PREFIX |
static String |
CONNECTION_OUT_PREFIX |
DEF_ORIGINAL_ID_FIELDNAME, graph, LABEL_FIELD_NAME, rawElement, settings| Modifier | Constructor and Description |
|---|---|
|
OrientVertex()
(Internal) Called by serialization.
|
protected |
OrientVertex(OrientBaseGraph graph,
OIdentifiable record) |
protected |
OrientVertex(OrientBaseGraph graph,
String className,
Object... fields) |
| Modifier and Type | Method and Description |
|---|---|
OrientEdge |
addEdge(String label,
OrientVertex inVertex,
Object[] fields)
Creates an edge between current Vertex and a target Vertex setting label as Edge's label.
|
OrientEdge |
addEdge(String label,
OrientVertex inVertex,
String iClassName)
Creates an edge between current Vertex and a target Vertex setting label as Edge's label. iClassName is the Edge's class used
if different by label.
|
OrientEdge |
addEdge(String label,
OrientVertex inVertex,
String iClassName,
String iClusterName,
Object... fields)
Creates an edge between current Vertex and a target Vertex setting label as Edge's label.
|
com.tinkerpop.blueprints.Edge |
addEdge(String label,
com.tinkerpop.blueprints.Vertex inVertex)
Creates an edge between current Vertex and a target Vertex setting label as Edge's label.
|
protected void |
addSingleEdge(ODocument doc,
OMultiCollectionIterator<com.tinkerpop.blueprints.Edge> iterable,
String fieldName,
OPair<com.tinkerpop.blueprints.Direction,String> connection,
Object fieldValue,
OIdentifiable iTargetVertex,
String[] iLabels) |
long |
countEdges(com.tinkerpop.blueprints.Direction iDirection,
String... iLabels)
(Blueprints Extension) Returns the number of edges connected to the current Vertex.
|
static Object |
createLink(ODocument iFromVertex,
OIdentifiable iTo,
String iFieldName)
(Internal only) Creates a link between a vertices and a Graph Element.
|
Object |
execute(OCommandPredicate iPredicate)
(Blueprints Extension) Executes the command predicate against current vertex.
|
String |
getBaseClassName()
(Blueprints Extension) Returns "V" as base class name all the vertex sub-classes extend.
|
protected OPair<com.tinkerpop.blueprints.Direction,String> |
getConnection(com.tinkerpop.blueprints.Direction iDirection,
String iFieldName,
String... iClassNames)
Determines if a field is a connections or not.
|
String |
getConnectionClass(com.tinkerpop.blueprints.Direction iDirection,
String iFieldName)
Used to extract the class name from the vertex's field.
|
static com.tinkerpop.blueprints.Direction |
getConnectionDirection(String iConnectionField,
boolean useVertexFieldsForEdgeLabels) |
static String |
getConnectionFieldName(com.tinkerpop.blueprints.Direction iDirection,
String iClassName,
boolean useVertexFieldsForEdgeLabels)
(Internal only) Returns the field name used for the relationship.
|
protected static OrientEdge |
getEdge(OrientBaseGraph graph,
ODocument doc,
String fieldName,
OPair<com.tinkerpop.blueprints.Direction,String> connection,
Object fieldValue,
OIdentifiable iTargetVertex,
String[] iLabels)
(Internal only)
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(com.tinkerpop.blueprints.Direction iDirection,
String... iLabels)
Returns the edges connected to the current Vertex.
|
Iterable<com.tinkerpop.blueprints.Edge> |
getEdges(OrientVertex iDestination,
com.tinkerpop.blueprints.Direction iDirection,
String... iLabels)
(Blueprints Entension) Returns all the edges from the current Vertex to another one.
|
String |
getElementType()
(Blueprints Extension) Returns "Vertex".
|
static String |
getInverseConnectionFieldName(String iFieldName,
boolean useVertexFieldsForEdgeLabels)
(Internal only)
|
String |
getLabel()
(Blueprints Extension) Returns the Vertex's label.
|
Set<String> |
getPropertyKeys()
Returns all the Property names as Set of String. out, in and label are not returned as properties even if are part of the
underlying document because are considered internal properties.
|
Iterable<com.tinkerpop.blueprints.Vertex> |
getVertices(com.tinkerpop.blueprints.Direction iDirection,
String... iLabels)
Returns a lazy iterable instance against vertices.
|
OrientVertexQuery |
query()
Executes a query against the current vertex.
|
void |
remove()
Removes the current Vertex from the Graph. all the incoming and outgoing edges are automatically removed too.
|
static void |
removeEdges(ODocument iVertex,
String iFieldName,
OIdentifiable iVertexToRemove,
boolean iAlsoInverse,
boolean useVertexFieldsForEdgeLabels)
(Internal only)
|
String |
toString()
Returns a string representation of the vertex.
|
OTraverse |
traverse()
Returns a OTraverse object to start traversing from the current vertex.
|
attach, checkClass, checkForClassInSchema, checkIfAttached, compare, compareTo, detach, equals, fromStream, getGraph, getId, getIdentity, getProperty, getRecord, hashCode, isDetached, lock, readExternal, removeProperty, save, save, setCurrentGraphInThreadLocal, setProperties, setProperty, setPropertyInternal, toStream, unlock, validateProperty, writeExternalpublic static final String CONNECTION_OUT_PREFIX
public static final String CONNECTION_IN_PREFIX
public OrientVertex()
protected OrientVertex(OrientBaseGraph graph, String className, Object... fields)
protected OrientVertex(OrientBaseGraph graph, OIdentifiable record)
public static String getConnectionFieldName(com.tinkerpop.blueprints.Direction iDirection, String iClassName, boolean useVertexFieldsForEdgeLabels)
iDirection - Direction between IN, OUT or BOTHiClassName - Class name if anyuseVertexFieldsForEdgeLabels - Graph setting about using the edge label as vertex's fieldpublic static Object createLink(ODocument iFromVertex, OIdentifiable iTo, String iFieldName)
public static com.tinkerpop.blueprints.Direction getConnectionDirection(String iConnectionField, boolean useVertexFieldsForEdgeLabels)
public static String getInverseConnectionFieldName(String iFieldName, boolean useVertexFieldsForEdgeLabels)
public static void removeEdges(ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, boolean iAlsoInverse, boolean useVertexFieldsForEdgeLabels)
protected static OrientEdge getEdge(OrientBaseGraph graph, ODocument doc, String fieldName, OPair<com.tinkerpop.blueprints.Direction,String> connection, Object fieldValue, OIdentifiable iTargetVertex, String[] iLabels)
public Object execute(OCommandPredicate iPredicate)
Iterable friendsOfFriends = (Iterable) luca.execute(new OSQLPredicate("out().out('Friend').out('Friend')"));
iPredicate - Predicate to evaluate. Use OSQLPredicate to use SQLpublic Set<String> getPropertyKeys()
getPropertyKeys in interface com.tinkerpop.blueprints.Elementpublic Iterable<com.tinkerpop.blueprints.Vertex> getVertices(com.tinkerpop.blueprints.Direction iDirection, String... iLabels)
getVertices in interface com.tinkerpop.blueprints.VertexiDirection - The direction between OUT, IN or BOTHiLabels - Optional varargs of Strings representing edge label to considerpublic OrientVertexQuery query()
query in interface com.tinkerpop.blueprints.Vertexpublic OTraverse traverse()
public void remove()
remove in interface com.tinkerpop.blueprints.Elementremove in class OrientElementpublic com.tinkerpop.blueprints.Edge addEdge(String label, com.tinkerpop.blueprints.Vertex inVertex)
addEdge in interface com.tinkerpop.blueprints.Vertexlabel - Edge's label or classinVertex - Outgoing target vertexpublic OrientEdge addEdge(String label, OrientVertex inVertex, String iClassName)
label - Edge's label or classinVertex - Outgoing target vertexiClassName - Edge's class namepublic OrientEdge addEdge(String label, OrientVertex inVertex, Object[] fields)
label - Edge's label or classinVertex - Outgoing target vertexfields - Fields must be a odd pairs of key/value or a single object as Map containing entries as key/value pairspublic OrientEdge addEdge(String label, OrientVertex inVertex, String iClassName, String iClusterName, Object... fields)
label - Edge's label or classinVertex - Outgoing target vertexfields - Fields must be a odd pairs of key/value or a single object as Map containing entries as key/value pairsiClassName - Edge's class nameiClusterName - The cluster name where to store the edge recordpublic long countEdges(com.tinkerpop.blueprints.Direction iDirection,
String... iLabels)
iDirection - The direction between OUT, IN or BOTHiLabels - Optional labels as Strings to considerpublic Iterable<com.tinkerpop.blueprints.Edge> getEdges(com.tinkerpop.blueprints.Direction iDirection, String... iLabels)
getEdges in interface com.tinkerpop.blueprints.VertexiDirection - The direction between OUT, IN or BOTHiLabels - Optional labels as Strings to considerpublic Iterable<com.tinkerpop.blueprints.Edge> getEdges(OrientVertex iDestination, com.tinkerpop.blueprints.Direction iDirection, String... iLabels)
iDestination - The target vertexiDirection - The direction between OUT, IN or BOTHiLabels - Optional labels as Strings to considerpublic String getLabel()
alter database custom useClassForVertexLabel=false
public String getBaseClassName()
getBaseClassName in class OrientElementpublic String getElementType()
getElementType in class OrientElementpublic String toString()
public String getConnectionClass(com.tinkerpop.blueprints.Direction iDirection, String iFieldName)
iDirection - Direction of connectioniFieldName - Full field nameprotected OPair<com.tinkerpop.blueprints.Direction,String> getConnection(com.tinkerpop.blueprints.Direction iDirection, String iFieldName, String... iClassNames)
iDirection - Direction to checkiFieldName - Field nameiClassNames - Optional array of class namesprotected void addSingleEdge(ODocument doc, OMultiCollectionIterator<com.tinkerpop.blueprints.Edge> iterable, String fieldName, OPair<com.tinkerpop.blueprints.Direction,String> connection, Object fieldValue, OIdentifiable iTargetVertex, String[] iLabels)
Copyright © 2009-2014 Orient Technologies. All Rights Reserved.