Class OrientGraph
java.lang.Object
com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph
com.tinkerpop.blueprints.impls.orient.OrientBaseGraph
com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph
com.tinkerpop.blueprints.impls.orient.OrientGraph
- All Implemented Interfaces:
OStorageRecoverListener,com.tinkerpop.blueprints.Graph,OrientExtendedGraph,com.tinkerpop.blueprints.IndexableGraph,com.tinkerpop.blueprints.KeyIndexableGraph,com.tinkerpop.blueprints.MetaGraph<ODatabaseDocumentTx>,com.tinkerpop.blueprints.TransactionalGraph
A Blueprints implementation of the graph database OrientDB (http://orientdb.com)
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com) (http://orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph
OrientConfigurableGraph.Settings, OrientConfigurableGraph.THREAD_MODENested classes/interfaces inherited from interface com.tinkerpop.blueprints.TransactionalGraph
com.tinkerpop.blueprints.TransactionalGraph.Conclusion -
Field Summary
FieldsFields inherited from class com.tinkerpop.blueprints.impls.orient.OrientBaseGraph
ADMIN, CLASS_PREFIX, CLUSTER_PREFIX, CONNECTION_IN, CONNECTION_OUT, databaseFields inherited from class com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph
AUTO_SCALE_EDGE_TYPE_DEFAULT, AUTO_START_TX_DEFAULT, EDGE_CONTAINER_EMBEDDED_2_TREE_THRESHOLD_DEFAULT, EDGE_CONTAINER_TREE_2_EMBEDDED_THRESHOLD_DEFAULT, KEEP_IN_MEMORY_REFERENCES_DEFAULT, REQUIRE_TRANSACTION_DEFAULT, SAVE_ORIGINAL_IDS_DEFAULT, settings, STANDARD_ELEMENT_CONSTRAINTS_DEFAULT, STANDARD_EXCEPTIONS, STANDARD_MAX_RETRIES, STANDARD_TX_REQUIRE_FOR_SQL_OPERATIONS, THREAD_MODE_DEFAULT, USE_CLASS_FOR_EDGE_LABEL_DEFAULT, USE_CLASS_FOR_VERTEX_LABEL_DEFAULT, USE_LIGHTWEIGHT_EDGES_DEFAULT, USE_LOG_DEFAULT, USE_VERTEX_FIELDS_FOR_EDGE_LABELS, WARN_ON_FORCE_CLOSING_TX_DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionOrientGraph(ODatabaseDocumentInternal iDatabase) Creates a new Transactional Graph using an existent database instance.OrientGraph(ODatabaseDocumentInternal iDatabase, boolean iAutoStartTx) Creates a new Transactional Graph using an existent database instance and the auto-start setting to determine if auto start a transaction.OrientGraph(ODatabaseDocumentInternal iDatabase, String iUserName, String iUserPasswd) Creates a new Transactional Graph using an existent database instance.OrientGraph(ODatabaseDocumentInternal iDatabase, String iUser, String iPassword, OrientConfigurableGraph.Settings iConfiguration) Creates a new Transactional Graph using an existent database instance.Creates a new Transactional Graph from a pool.OrientGraph(OPartitionedDatabasePool pool, OrientConfigurableGraph.Settings configuration) OrientGraph(String url) Creates a new Transactional Graph from an URL using default user (admin) and password (admin).OrientGraph(String url, boolean iAutoStartTx) Creates a new Transactional Graph from an URL using default user (admin) and password (admin).OrientGraph(String url, String username, String password) Creates a new Transactional Graph from an URL using a username and a password.OrientGraph(String url, String username, String password, boolean iAutoStartTx) Creates a new Transactional Graph from an URL using a username and a password.OrientGraph(org.apache.commons.configuration.Configuration iConfiguration) Builds a OrientGraph instance passing a configuration. -
Method Summary
Modifier and TypeMethodDescriptioncom.tinkerpop.blueprints.FeaturesReturns the current Graph settings.voidremoveEdgeInternal(OrientEdge edge) Removes the Edge from the Graph.Methods inherited from class com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph
autoStartTransaction, begin, commit, isUseLog, rollback, setAutoStartTx, setUseLog, stopTransactionMethods inherited from class com.tinkerpop.blueprints.impls.orient.OrientBaseGraph
addEdge, addTemporaryVertex, addVertex, addVertex, addVertex, attach, clearInitStack, command, configure, convertKey, convertKeys, countEdges, countEdges, countVertices, countVertices, createEdgeType, createEdgeType, createEdgeType, createEdgeType, createEdgeType, createEdgeType, createIndex, createKeyIndex, createVertexType, createVertexType, createVertexType, createVertexType, createVertexType, createVertexType, declareIntent, decodeClassName, deleteEdgeIfAny, detach, drop, dropEdgeType, dropIndex, dropKeyIndex, dropVertexType, encodeClassName, encodeClassNames, executeOutsideTx, getActiveGraph, getActiveIntent, getClassName, getConflictStrategy, getDatabase, getDocument, getEdge, getEdgeBaseType, getEdgeClassNames, getEdgeInstance, getEdgeInstance, getEdgeInstance, getEdges, getEdges, getEdges, getEdgesOfClass, getEdgesOfClass, getEdgeType, getElement, getIndex, getIndexedKeys, getIndexedKeys, getIndices, getProperties, getProperty, getRawGraph, getVertex, getVertexBaseType, getVertexByKey, getVertexInstance, getVertexInstance, getVertexType, getVertices, getVertices, getVertices, getVertices, getVerticesOfClass, getVerticesOfClass, isClosed, makeActive, onStorageRecover, query, removeEdge, removeEdges, removeVertex, reuse, saveIndexConfiguration, setConflictStrategy, setConflictStrategy, setCurrentGraphInThreadLocal, setProperty, setUseLightweightEdges, shutdown, shutdown, shutdown, toString, traverseMethods inherited from class com.tinkerpop.blueprints.impls.orient.OrientConfigurableGraph
getConnectionStrategy, getEdgeContainerEmbedded2TreeThreshold, getEdgeContainerTree2EmbeddedThreshold, getMaxRetries, getThreadMode, init, isAutoScaleEdgeType, isAutoStartTx, isKeepInMemoryReferences, isRequireTransaction, isSaveOriginalIds, isStandardElementConstraints, isStandardExceptions, isTxRequiredForSQLGraphOperations, isUseClassForEdgeLabel, isUseClassForVertexLabel, isUseLightweightEdges, isUseVertexFieldsForEdgeLabels, isWarnOnForceClosingTx, setAutoScaleEdgeType, setConnectionStrategy, setEdgeContainerEmbedded2TreeThreshold, setEdgeContainerTree2EmbeddedThreshold, setKeepInMemoryReferences, setMaxRetries, setRequireTransaction, setSaveOriginalIds, setStandardElementConstraints, setStandardExceptions, setThreadMode, setTxRequiredForSQLGraphOperations, setUseClassForEdgeLabel, setUseClassForVertexLabel, setUseVertexFieldsForEdgeLabels, setWarnOnForceClosingTxMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tinkerpop.blueprints.Graph
addEdge, addVertex, getEdge, getEdges, getEdges, getVertex, getVertices, getVertices, removeEdge, removeVertex, shutdown
-
Field Details
-
features
protected final com.tinkerpop.blueprints.Features features
-
-
Constructor Details
-
OrientGraph
Creates a new Transactional Graph using an existent database instance. User and password are passed in case of re-open.- Parameters:
iDatabase- Underlying database object to attach
-
OrientGraph
Creates a new Transactional Graph using an existent database instance and the auto-start setting to determine if auto start a transaction.- Parameters:
iDatabase- Underlying database object to attachiAutoStartTx- True to auto start a transaction at the beginning and after each commit/rollback
-
OrientGraph
Creates a new Transactional Graph from an URL using default user (admin) and password (admin).- Parameters:
url- OrientDB URL
-
OrientGraph
Creates a new Transactional Graph from an URL using default user (admin) and password (admin). It receives also the auto-start setting to determine if auto start a transaction.- Parameters:
url- OrientDB URLiAutoStartTx- True to auto start a transaction at the beginning and after each commit/rollback
-
OrientGraph
Creates a new Transactional Graph from an URL using a username and a password.- Parameters:
url- OrientDB URLusername- Database user namepassword- Database user password
-
OrientGraph
Creates a new Transactional Graph from an URL using a username and a password. It receives also the auto-start setting to determine if auto start a transaction.- Parameters:
url- OrientDB URLusername- Database user namepassword- Database user passwordiAutoStartTx- True to auto start a transaction at the beginning and after each commit/rollback
-
OrientGraph
Creates a new Transactional Graph from a pool.- Parameters:
pool- Database pool where to acquire a database instance
-
OrientGraph
-
OrientGraph
public OrientGraph(org.apache.commons.configuration.Configuration iConfiguration) Builds a OrientGraph instance passing a configuration. Supported configuration settings are:Name Description Default value blueprints.orientdb.url Database URL - blueprints.orientdb.username User name admin blueprints.orientdb.password User password admin blueprints.orientdb.saveOriginalIds Saves the original element IDs by using the property _id. This could be useful on import of graph to preserve original ids false blueprints.orientdb.keepInMemoryReferences Avoid to keep records in memory but only RIDs false blueprints.orientdb.useCustomClassesForEdges Use Edge's label as OrientDB class. If doesn't exist create it under the hood true blueprints.orientdb.useCustomClassesForVertex Use Vertex's label as OrientDB class. If doesn't exist create it under the hood true blueprints.orientdb.useVertexFieldsForEdgeLabels Store the edge relationships in vertex by using the Edge's class. This allow to use multiple fields and make faster traversal by edge's label (class) true blueprints.orientdb.lightweightEdges Uses lightweight edges. This avoid to create a physical document per edge. Documents are created only when they have properties true blueprints.orientdb.autoStartTx Auto start a transaction as soon the graph is changed by adding/remote vertices and edges and properties true - Parameters:
iConfiguration- graph settings see the details above.
-
OrientGraph
Creates a new Transactional Graph using an existent database instance.- Parameters:
iDatabase- Underlying database object to attach
-
OrientGraph
public OrientGraph(ODatabaseDocumentInternal iDatabase, String iUser, String iPassword, OrientConfigurableGraph.Settings iConfiguration) Creates a new Transactional Graph using an existent database instance.- Parameters:
iDatabase- Underlying database object to attach
-
-
Method Details
-
getFeatures
public com.tinkerpop.blueprints.Features getFeatures()Returns the current Graph settings.- Returns:
- Features object
-
removeEdgeInternal
Removes the Edge from the Graph. Connected vertices aren't removed.
-