diff --git a/README-github.md b/README-github.md index 68e627aa..227780d3 100644 --- a/README-github.md +++ b/README-github.md @@ -2,7 +2,7 @@ Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents into one scalable high-performance operational database. -![image](http://www.orientdb.com/images/orientdb_logo_mid.png) +![image](http://www.orientdb.dev/images/orientdb_logo_mid.png) ## Documentation Builds diff --git a/README.md b/README.md index acf16b50..872a6d0a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OrientDB Manual - version {{book.currentVersion}} -![image](https://orientdb.com/wp-content/themes/orientdb/img/logo-black.png) +![image](https://orientdb.dev/wp-content/themes/orientdb/img/logo-black.png) Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents into one scalable high-performance operational database. @@ -20,7 +20,7 @@ Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brin | | [Caching Levels](internals/Caching.md) | [.NET](https://github.com/orientechnologies/OrientDB-NET.binary) | | | [Common Use Cases](legacy/Use-Cases.md) | [Other Drivers](apis-and-drivers/README.md) | | | | [Network Binary Protocol](internals/Network-Binary-Protocol.md) | -| | | [Javadocs](http://www.orientechnologies.com/javadoc/latest/) | +| | | [Javadocs](http://www.orientdb.dev/javadoc/latest/) | ### Operations @@ -46,18 +46,18 @@ Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brin - [Network-Binary-Protocol](internals/Network-Binary-Protocol.md) - [Gephi Graph Analysis Visual tool](plugins/Gephi.md) - [Rexster Support and configuration](plugins/Rexster.md) -- [Continuous integration](http://helios.orientechnologies.com/) +- [Continuous integration](http://helios.orientdb.dev/) ### Resources -- [User Group](https://orientdb.com/active-user-community) - Have question, troubles, problems? +- [User Group](https://orientdb.dev/active-user-community) - Have question, troubles, problems? - [#orientdb IRC channel on freenode](http://webchat.freenode.net/?channels=orientdb) -- [Professional Support](https://orientdb.com/support) -- [Training](https://orientdb.com/training) - Training and classes. -- [Events](https://orientdb.com/event) - Follow OrientDB at the next event! -- [Team](https://orientdb.com/team/) - Meet the team behind OrientDB +- [Professional Support](https://orientdb.dev/support) +- [Training](https://orientdb.dev/training) - Training and classes. +- [Events](https://orientdb.dev/event) - Follow OrientDB at the next event! +- [Team](https://orientdb.dev/team/) - Meet the team behind OrientDB - [Contribute](misc/Contribute-to-OrientDB.md) - Contribute to the project. -- [Who is using OrientDB?](https://orientdb.com/customers) - Clients using OrientDB in production. +- [Who is using OrientDB?](https://orientdb.dev/customers) - Clients using OrientDB in production. ## Questions or Need Help? diff --git a/book.toml b/book.toml index 803e838e..f7333396 100644 --- a/book.toml +++ b/book.toml @@ -1,6 +1,6 @@ [book] title = "OrientDB" -author = "community" +authors = ["community"] description = "OrientDB documentation" src = "./src" @@ -24,18 +24,16 @@ limit-results = 15 #from mdbook-variables [preprocessor.variables.variables] book.CE_name= "orientdb-community" -book.CE_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-community/3.2.26/orientdb-community-3.2.26.tar.gz" +book.CE_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-community/3.2.53/orientdb-community-3.2.53.tar.gz" book.EE_name= "agent" -book.EE_link = "https://repo1.maven.org/maven2/com/orientechnologies/agent/3.2.26/agent-3.2.26.jar" -book.TP2_name = "orientdb-community-tp2" -book.TP2_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-community-tp2/3.2.26/orientdb-community-tp2-3.2.26.tar.gz" +book.EE_link = "https://repo1.maven.org/maven2/com/orientechnologies/agent/3.2.53/agent-3.2.53.jar" book.TP3_name = "orientdb-community-tp3" -book.TP3_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-tp3/3.2.26/orientdb-tp3-3.2.26.tar.gz" +book.TP3_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-tp3/3.2.53/orientdb-tp3-3.2.53.tar.gz" book.TP3Spatial_name = "orientdb-community-spatial" -book.TP3Spatial_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-tp3/3.2.26/orientdb-tp3-3.2.26.tar.gz" +book.TP3Spatial_link = "https://repo1.maven.org/maven2/com/orientechnologies/orientdb-tp3/3.2.53/orientdb-tp3-3.2.53.tar.gz" book.source_repository = "https://github.com/orientechnologies/orientdb/blob/develop/" -book.lastGA = "3.2.26" -book.currentVersion = "3.2.26" +book.lastGA = "3.2.53" +book.currentVersion = "4.0.0" book.demoDBVersion_screenshots ="0.76" -book.javase = "https://docs.oracle.com/javase/8/docs" -book.javadoc = "https://orientdb.com/javadoc/develop" +book.javase = "https://docs.oracle.com/javase/17/docs" +book.javadoc = "https://orientdb.dev/javadocs/develop" diff --git a/orientdb-docs.iml b/orientdb-docs.iml deleted file mode 100644 index 8021953e..00000000 --- a/orientdb-docs.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/README.md b/src/README.md index acf16b50..4e88a42d 100644 --- a/src/README.md +++ b/src/README.md @@ -1,6 +1,6 @@ # OrientDB Manual - version {{book.currentVersion}} -![image](https://orientdb.com/wp-content/themes/orientdb/img/logo-black.png) +![image](_cover_small.png) Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents into one scalable high-performance operational database. @@ -20,7 +20,7 @@ Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brin | | [Caching Levels](internals/Caching.md) | [.NET](https://github.com/orientechnologies/OrientDB-NET.binary) | | | [Common Use Cases](legacy/Use-Cases.md) | [Other Drivers](apis-and-drivers/README.md) | | | | [Network Binary Protocol](internals/Network-Binary-Protocol.md) | -| | | [Javadocs](http://www.orientechnologies.com/javadoc/latest/) | +| | | [Javadocs](http://www.orientdb.dev/javadoc/latest/) | ### Operations @@ -46,18 +46,18 @@ Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brin - [Network-Binary-Protocol](internals/Network-Binary-Protocol.md) - [Gephi Graph Analysis Visual tool](plugins/Gephi.md) - [Rexster Support and configuration](plugins/Rexster.md) -- [Continuous integration](http://helios.orientechnologies.com/) +- [Continuous integration](http://helios.orientdb.dev/) ### Resources -- [User Group](https://orientdb.com/active-user-community) - Have question, troubles, problems? +- [User Group](https://orientdb.dev/active-user-community) - Have question, troubles, problems? - [#orientdb IRC channel on freenode](http://webchat.freenode.net/?channels=orientdb) -- [Professional Support](https://orientdb.com/support) -- [Training](https://orientdb.com/training) - Training and classes. -- [Events](https://orientdb.com/event) - Follow OrientDB at the next event! -- [Team](https://orientdb.com/team/) - Meet the team behind OrientDB +- [Professional Support](https://orientdb.dev/support) +- [Training](https://orientdb.dev/training) - Training and classes. +- [Events](https://orientdb.dev/event) - Follow OrientDB at the next event! +- [Team](https://orientdb.dev/team/) - Meet the team behind OrientDB - [Contribute](misc/Contribute-to-OrientDB.md) - Contribute to the project. -- [Who is using OrientDB?](https://orientdb.com/customers) - Clients using OrientDB in production. +- [Who is using OrientDB?](https://orientdb.dev/customers) - Clients using OrientDB in production. ## Questions or Need Help? diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 68c97914..e9ac8005 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -5,7 +5,6 @@ ## FIRST STEPS * [Introduction](introduction/README.md) - * [About This Manual](misc/About-This-Manual.md) * [Overview of OrientDB](misc/Overview.md) * [Editions](misc/Editions.md) * [Release 3.2](release/3.2/README.md) @@ -65,8 +64,6 @@ * [Queue system](gettingstarted/Queue-use-case.md) * [Import Tutorials](gettingstarted/tutorials/Import-Tutorials.md) * [Importing the Open Beer Database into OrientDB](gettingstarted/tutorials/Import-the-Database-of-Beers.md) - * [Importing the *northwind* Database from Neo4j](gettingstarted/tutorials/Tutorial-Importing-the-northwind-Database-from-Neo4j.md) - * [Importing the *movie* Database from Neo4j](gettingstarted/tutorials/Tutorial-Importing-the-Movie-Database-from-Neo4j.md) * [General Information](general/README.md) * [Supported Types](general/Types.md) * [Schema](general/Schema.md) @@ -155,13 +152,11 @@ * [Restore](console/Console-Command-Restore.md) * [Set](console/Console-Command-Set.md) * [Set Server User](console/Console-Command-Set-Server-User.md) - * [Custom Console Commands](console/Console-Custom-Commands.md) * [OrientDB Administrative and Utility Programs](programs/Administrative-Utility-Programs.md) * [backup](programs/backup.md) * [shutdown](programs/shutdown.md) * [stresstester](programs/stresstester.md) * [OrientDB Data Import Programs](programs/Data-Import-Programs.md) - * [orientdb-neo4j-importer](programs/orientdb-neo4j-importer.md) * [oetl](programs/oetl.md) * [OrientDB Server Administration](admin/README.md) * [Installation](admin/installation/README.md) @@ -224,16 +219,6 @@ * [CREATE SYSTEM USER](serverlevel/Create-System-User.md) * [ALTER SYSTEM ROLE](serverlevel/Alter-System-Role.md) * [EXISTS SYSTEM USER](serverlevel/Exists-System-User.md) - * [Teleporter](teleporter/Teleporter-Home.md) migration tool - * [Installation and configuration](teleporter/Teleporter-Installation-and-Configuration.md) - * [Execution strategies](teleporter/Teleporter-Execution-Strategies.md) - * [Sequential executions and One-Way Synchronizer](teleporter/Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md) - * [Import filters](teleporter/Teleporter-Import-Filters.md) - * [Inheritance](teleporter/Teleporter-Inheritance.md) - * [Single Table Inheritance](teleporter/Teleporter-Single-Table-Inheritance.md) - * [Table Per Class Inheritance](teleporter/Teleporter-Table-Per-Class-Inheritance.md) - * [Table Per Concrete Class Inheritance](teleporter/Teleporter-Table-Per-Concrete-Class-Inheritance.md) - * [Import Configuration](teleporter/Teleporter-Import-Configuration.md) * [ETL](etl/ETL-Introduction.md) * [Configuration](etl/Configuration-File.md) * [Blocks](etl/Block.md) @@ -247,7 +232,6 @@ * [Import from RDBMS](etl/Import-from-DBMS.md) * [Import from DB-Pedia](etl/Import-from-DBPedia.md) * [Import from Parse (Facebook)](etl/Import-from-PARSE.md) - * [Neo4j to OrientDB Importer](neo4j-to-orientdb-importer/README.md) ## SQL, API, DRIVERS @@ -326,278 +310,7 @@ * [Defining Database Schema](java/Java-Schema-Api.md) * [Classes](java/Document-API-Class.md) * [Property](java/Document-API-Property.md) - * [Reference](java/ref/README.md) - * [OClass](java/ref/OClass.md) - * [addCluster()](java/ref/OClass/addCluster.md) - * [addClusterId()](java/ref/OClass/addClusterId.md) - * [addSuperClass()](java/ref/OClass/addSuperClass.md) - * [count()](java/ref/OClass/count.md) - * [createIndex()](java/ref/OClass/createIndex.md) - * [createProperty()](java/ref/OClass/createProperty.md) - * [dropProperty()](java/ref/OClass/dropProperty.md) - * [existsProperty()](java/ref/OClass/existsProperty.md) - * [getAllSubclasses()](java/ref/OClass/getAllSubclasses.md) - * [getAllSuperClasses()](java/ref/OClass/getAllSuperClasses.md) - * [getAutoShardingIndex()](java/ref/OClass/getAutoShardingIndex.md) - * [getClassIndex()](java/ref/OClass/getClassIndex.md) - * [getClassIndexes()](java/ref/OClass/getClassIndexes.md) - * [getClassInvolvedIndexes()](java/ref/OClass/getClassInvolvedIndexes.md) - * [getClusterIds()](java/ref/OClass/getClusterIds.md) - * [getDefaultClusterId()](java/ref/OClass/getDefaultClusterId.md) - * [getIndexedProperties()](java/ref/OClass/getIndexedProperties.md) - * [getName()](java/ref/OClass/getName.md) - * [getProperty()](java/ref/OClass/getProperty.md) - * [getSubclasses()](java/ref/OClass/getSubclasses.md) - * [getSuperClassesNames()](java/ref/OClass/getSuperClassesNames.md) - * [hasClusterId()](java/ref/OClass/hasClusterId.md) - * [hasPolymorphicClusterId()](java/ref/OClass/hasPolymorphicClusterId.md) - * [hasSuperClasses()](java/ref/OClass/hasSuperClasses.md) - * [isEdgeType()](java/ref/OClass/isEdgeType.md) - * [isVertexType()](java/ref/OClass/isVertexType.md) - * [properties()](java/ref/OClass/properties.md) - * [propertiesMap()](java/ref/OClass/propertiesMap.md) - * [removeClusterId()](java/ref/OClass/removeClusterId.md) - * [removeSuperClass()](java/ref/OClass/removeSuperClass.md) - * [setDefaultClusterId()](java/ref/OClass/setDefaultClusterId.md) - * [setName()](java/ref/OClass/setName.md) - * [truncate()](java/ref/OClass/truncate.md) - * [truncateCluster()](java/ref/OClass/truncateCluster.md) - * [OCluster](java/ref/OCluster.md) - * [close()](java/ref/OCluster/close.md) - * [delete()](java/ref/OCluster/delete.md) - * [deleteRecord()](java/ref/OCluster/deleteRecord.md) - * [exists()](java/ref/OCluster/exists.md) - * [getFileName()](java/ref/OCluster/getFileName.md) - * [getFirstPosition()](java/ref/OCluster/getFirstPosition.md) - * [getId()](java/ref/OCluster/getId.md) - * [getLastPosition()](java/ref/OCluster/getLastPosition.md) - * [getName()](java/ref/OCluster/getName.md) - * [getNextPosition()](java/ref/OCluster/getNextPosition.md) - * [getRecordSize()](java/ref/OCluster/getRecordsSize.md) - * [getTombstonesCount()](java/ref/OCluster/getTombstonesCount.md) - * [hideRecord()](java/ref/OCluster/hideRecord.md) - * [open()](java/ref/OCluster/open.md) - * [truncate()](java/ref/OCluster/truncate.md) - * [updateRecord()](java/ref/OCluster/updateRecord.md) - * [ODatabaseDocument](java/ref/ODatabaseDocument.md) - * [addCluster()](java/ref/ODatabaseDocument/addCluster.md) - * [begin()](java/ref/ODatabaseDocument/begin.md) - * [browseClass()](java/ref/ODatabaseDocument/browseClass.md) - * [browseCluster()](java/ref/ODatabaseDocument/browseCluster.md) - * [close()](java/ref/ODatabaseDocument/close.md) - * [command()](java/ref/ODatabaseDocument/command.md) - * [commit()](java/ref/ODatabaseDocument/commit.md) - * [countClass()](java/ref/ODatabaseDocument/countClass.md) - * [countClusterElements()](java/ref/ODatabaseDocument/countClusterElements.md) - * [createClass()](java/ref/ODatabaseDocument/createClass.md) - * [createClassIfNotExists()](java/ref/ODatabaseDocument/createClassIfNotExists.md) - * [createEdgeClass()](java/ref/ODatabaseDocument/createEdgeClass.md) - * [createVertexClass()](java/ref/ODatabaseDocument/createVertexClass.md) - * [declareIntent()](java/ref/ODatabaseDocument/declareIntent.md) - * [delete()](java/ref/ODatabaseDocument/delete.md) - * [dropCluster()](java/ref/ODatabaseDocument/dropCluster.md) - * [execute()](java/ref/ODatabaseDocument/execute.md) - * [getActiveIntent()](java/ref/ODatabaseDocument/getActiveIntent.md) - * [getClass()](java/ref/ODatabaseDocument/getClass.md) - * [getClusterIdByName()](java/ref/ODatabaseDocument/getClusterIdByName.md) - * [getClusterNameById()](java/ref/ODatabaseDocument/getClusterNameById.md) - * [getClusters()](java/ref/ODatabaseDocument/getClusters.md) - * [getDefaultClusterId()](java/ref/ODatabaseDocument/getDefaultClusterId.md) - * [getMetadata()](java/ref/ODatabaseDocument/getMetadata.md) - * [getName()](java/ref/ODatabaseDocument/getName.md) - * [getRecord()](java/ref/ODatabaseDocument/getRecord.md) - * [getRecordType()](java/ref/ODatabaseDocument/getRecordType.md) - * [getTransaction()](java/ref/ODatabaseDocument/getTransaction.md) - * [getURL()](java/ref/ODatabaseDocument/getURL.md) - * [getUser()](java/ref/ODatabaseDocument/getUser.md) - * [incrementalBackup()](java/ref/ODatabaseDocument/incrementalBackup.md) - * [isActiveOnCurrentThread()](java/ref/ODatabaseDocument/isActiveOnCurrentThread.md) - * [isClosed()](java/ref/ODatabaseDocument/isClosed.md) - * [live()](java/ref/ODatabaseDocument/live.md) - * [load()](java/ref/ODatabaseDocument/load.md) - * [query()](java/ref/ODatabaseDocument/query.md) - * [registerListener()](java/ref/ODatabaseDocument/registerListener.md) - * [newBlob()](java/ref/ODatabaseDocument/newBlob.md) - * [newEdge()](java/ref/ODatabaseDocument/newEdge.md) - * [newElement()](java/ref/ODatabaseDocument/newElement.md) - * [newInstance()](java/ref/ODatabaseDocument/newInstance.md) - * [newVertex()](java/ref/ODatabaseDocument/newVertex.md) - * [rollback()](java/ref/ODatabaseDocument/rollback.md) - * [save()](java/ref/ODatabaseDocument/save.md) - * [truncateCluster()](java/ref/ODatabaseDocument/truncateCluster.md) - * [unregisterListener()](java/ref/ODatabaseDocument/unregisterListener.md) - * [ODatabaseSession](java/ref/ODatabaseSession.md) - * [ODatabaseListener](java/ref/ODatabaseListener.md) - * [OEdge](java/ref/OEdge.md) - * [getFrom()](java/ref/OEdge/getFrom.md) - * [getTo()](java/ref/OEdge/getTo.md) - * [isLightweight()](java/ref/OEdge/isLightweight.md) - * [OElement](java/ref/OElement.md) - * [asEdge()](java/ref/OElement/asEdge.md) - * [asVertex()](java/ref/OElement/asVertex.md) - * [getProperty()](java/ref/OElement/getProperty.md) - * [getPropertyNames()](java/ref/OElement/getPropertyNames.md) - * [getSchemaType()](java/ref/OElement/getSchemaType.md) - * [isEdge()](java/ref/OElement/isEdge.md) - * [isVertex()](java/ref/OElement/isVertex.md) - * [removeProperty()](java/ref/OElement/removeProperty.md) - * [setProperty()](java/ref/OElement/setProperty.md) - * [OFunction](java/ref/OFunction.md) - * [**`getCode()`**](java/ref/OFunction/getCode.md) - * [**`getId()`**](java/ref/OFunction/getId.md) - * [**`getLanguage()`**](java/ref/OFunction/getLanguage.md) - * [**`getName()`**](java/ref/OFunction/getName.md) - * [**`getParameters()`**](java/ref/OFunction/getParameters.md) - * [**`isIdempotent()`**](java/ref/OFunction/isIdempotent.md) - * [**`setCode()`**](java/ref/OFunction/setCode.md) - * [**`setIdempotent()`**](java/ref/OFunction/setIdempotent.md) - * [**`setLanguage()`**](java/ref/OFunction/setLanguage.md) - * [**`setName()`**](java/ref/OFunction/setName.md) - * [**`setParameters()`**](java/ref/OFunction/setParameters.md) - * [OFunctionLibrary](java/ref/OFunctionLibrary.md) - * [createFunction()](java/ref/OFunctionLibrary/createFunction.md) - * [dropFunction()](java/ref/OFunctionLibrary/dropFunction.md) - * [getFunction()](java/ref/OFunctionLibrary/getFunction.md) - * [getFunctionNames()](java/ref/OFunctionLibrary/getFunctionNames.md) - * [OIntent](java/ref/OIntent.md) - * [OLiveQueryMonitor](java/ref/OLiveQueryMonitor.md) - * [OLiveQueryResultListener](java/ref/OLiveQueryResultListener.md) - * [onCreate()](java/ref/OLiveQueryResultListener/onCreate.md) - * [onDelete()](java/ref/OLiveQueryResultListener/onDelete.md) - * [onEnd()](java/ref/OLiveQueryResultListener/onEnd.md) - * [onError()](java/ref/OLiveQueryResultListener/onError.md) - * [onUpdate()](java/ref/OLiveQueryResultListener/onUpdate.md) - * [OMetadata](java/ref/OMetadata.md) - * [getFunctionLibrary()](java/ref/OMetadata/getFunctionLibrary.md) - * [getSchema()](java/ref/OMetadata/getSchema.md) - * [OProperty](java/ref/OProperty.md) - * [getDefaultValue()](java/ref/OProperty/getDefaultValue.md) - * [getLinkedClass()](java/ref/OProperty/getLinkedClass.md) - * [getLinkedType()](java/ref/OProperty/getLinkedType.md) - * [getMax()](java/ref/OProperty/getMax.md) - * [getMin()](java/ref/OProperty/getMin.md) - * [getName()](java/ref/OProperty/getName.md) - * [getType()](java/ref/OProperty/getType.md) - * [isMandatory()](java/ref/OProperty/isMandatory.md) - * [isNotNull()](java/ref/OProperty/isNotNull.md) - * [isReadonly()](java/ref/OProperty/isReadonly.md) - * [setDefaultValue()](java/ref/OProperty/setDefaultValue.md) - * [setLinkedClass()](java/ref/OProperty/setLinkedClass.md) - * [setLinkedType()](java/ref/OProperty/setLinkedType.md) - * [setMax()](java/ref/OProperty/setMax.md) - * [setMin()](java/ref/OProperty/setMin.md) - * [setName()](java/ref/OProperty/setName.md) - * [setType()](java/ref/OProperty/setType.md) - * [ORecordOperation](java/ref/ORecordOperation.md) - * [OResult](java/ref/OResult.md) - * [OResultSet](java/ref/OResultSet.md) - * [close()](java/ref/OResultSet/close.md) - * [edgeStream()](java/ref/OResultSet/edgeStream.md) - * [elementStream()](java/ref/OResultSet/elementStream.md) - * [estimateSize()](java/ref/OResultSet/estimateSize.md) - * [hasNext()](java/ref/OResultSet/hasNext.md) - * [next()](java/ref/OResultSet/next.md) - * [remove()](java/ref/OResultSet/remove.md) - * [stream()](java/ref/OResultSet/stream.md) - * [vertexStream()](java/ref/OResultSet/vertexStream.md) - * [ORID](java/ref/ORID.md) - * [OrientDB](java/ref/OrientDB.md) - * [create()](java/ref/OrientDB/create.md) - * [createIfNotExists()](java/ref/OrientDB/createIfNotExists.md) - * [drop()](java/ref/OrientDB/drop.md) - * [exists()](java/ref/OrientDB/exists.md) - * [list()](java/ref/OrientDB/list.md) - * [open()](java/ref/OrientDB/open.md) - * [ORule](java/ref/ORule.md) - * [OSchema](java/ref/OSchema.md) - * [countClasses()](java/ref/OSchema/countClasses.md) - * [createAbstractClass()](java/ref/OSchema/createAbstractClass.md) - * [createClass()](java/ref/OSchema/createClass.md) - * [dropClass()](java/ref/OSchema/dropClass.md) - * [existsClass()](java/ref/OSchema/existsClass.md) - * [getClass()](java/ref/OSchema/getClass.md) - * [getClassByClusterId()](java/ref/OSchema/getClassByClusterId.md) - * [getClasses()](java/ref/OSchema/getClasses.md) - * [getClassesRelyOnCluster()](java/ref/OSchema/getClassesRelyOnCluster.md) - * [getOrCreateClass()](java/ref/OSchema/getOrCreateClass.md) - * [OSecurityRole](java/ref/OSecurityRole.md) - * [addRule()](java/ref/OSecurityRole/addRule.md) - * [allow()](java/ref/OSecurityRole/allow.md) - * [getDocument()](java/ref/OSecurityRole/getDocument.md) - * [getName()](java/ref/OSecurityRole/getName.md) - * [getParentRole()](java/ref/OSecurityRole/getParentRole.md) - * [getRuleSet()](java/ref/OSecurityRole/getRuleSet.md) - * [grant()](java/ref/OSecurityRole/grant.md) - * [hasRule()](java/ref/OSecurityRole/hasRule.md) - * [revoke()](java/ref/OSecurityRole/revoke.md) - * [setParentRole()](java/ref/OSecurityRole/setParentRole.md) - * [OSecurityUser](java/ref/OSecurityUser.md) - * [addRole()](java/ref/OSecurityUser/addRole.md) - * [allow()](java/ref/OSecurityUser/allow.md) - * [checkPassword()](java/ref/OSecurityUser/checkPassword.md) - * [getAccountStatus()](java/ref/OSecurityUser/getAccountStatus.md) - * [getDocument()](java/ref/OSecurityUser/getDocument.md) - * [getName()](java/ref/OSecurityUser/getName.md) - * [getPassword()](java/ref/OSecurityUser/getPassword.md) - * [getRoles()](java/ref/OSecurityUser/getRoles.md) - * [isRuleDefined()](java/ref/OSecurityUser/isRuleDefined.md) - * [hasRole()](java/ref/OSecurityUser/hasRole.md) - * [removeRole()](java/ref/OSecurityUser/removeRole.md) - * [setAccountStatus()](java/ref/OSecurityUser/setAccountStatus.md) - * [setName()](java/ref/OSecurityUser/setName.md) - * [setPassword()](java/ref/OSecurityUser/setPassword.md) - * [OServer](java/ref/OServer.md) - * [addTemporaryUser()](java/ref/OServer/addTemporaryUser.md) - * [addUser()](java/ref/OServer/addUser.md) - * [authenticate()](java/ref/OServer/authenticate.md) - * [dropUser()](java/ref/OServer/dropUser.md) - * [existsStoragePath()](java/ref/OServer/existsStoragePath.md) - * [getAvailableStorageNames()](java/ref/OServer/getAvailableStorageNames.md) - * [getConfiguration()](java/ref/OServer/getConfiguration.md) - * [getDatabaseDirectory()](java/ref/OServer/getDatabaseDirectory.md) - * [getInstance()](java/ref/OServer/getInstance.md) - * [getInstanceByPath()](java/ref/OServer/getInstanceByPath.md) - * [getStoragePath()](java/ref/OServer/getStoragePath.md) - * [isActive()](java/ref/OServer/isActive.md) - * [isAllowed()](java/ref/OServer/isAllowed.md) - * [openDatabase()](java/ref/OServer/openDatabase.md) - * [restart()](java/ref/OServer/restart.md) - * [saveConfiguration()](java/ref/OServer/saveConfiguration.md) - * [shutdown()](java/ref/OServer/shutdown.md) - * [startup()](java/ref/OServer/startup.md) - * [OTransaction](java/ref/OTransaction.md) - * [amountOfNestedTxs()](java/ref/OTransaction/amountOfNestedTxs.md) - * [begin()](java/ref/OTransaction/begin.md) - * [close()](java/ref/OTransaction/close.md) - * [commit()](java/ref/OTransaction/commit.md) - * [getDatabase()](java/ref/OTransaction/getDatabase.md) - * [getEntryCount()](java/ref/OTransaction/getEntryCount.md) - * [getInvolvedIndexes()](java/ref/OTransaction/getInvolvedIndexes.md) - * [getIsolationLevel()](java/ref/OTransaction/getIsolationLevel.md) - * [getNewRecordEntriesByClass()](java/ref/OTransaction/getNewRecordEntriesByClass.md) - * [getNewRecordEntriesByCluster()](java/ref/OTransaction/getNewRecordEntriesByCluster.md) - * [getRecordEntry()](java/ref/OTransaction/getRecordEntry.md) - * [getRecordOperations()](java/ref/OTransaction/getRecordOperations.md) - * [getStatus()](java/ref/OTransaction/getStatus.md) - * [hasRecordCreation()](java/ref/OTransaction/hasRecordCreation.md) - * [rollback()](java/ref/OTransaction/rollback.md) - * [setIsolationLevel()](java/ref/OTransaction/setIsolationLevel.md) - * [OType](java/ref/OType.md) - * [OVertex](java/ref/OVertex.md) - * [addEdge()](java/ref/OVertex/addEdge.md) - * [getEdges()](java/ref/OVertex/getEdges.md) - * [getVertices()](java/ref/OVertex/getVertices.md) - * [TinkerPop 2.6 Graph API](java/Graph-Database-Tinkerpop.md) - * [Tutorial](java/Tutorial-Java.md) - * [Vertices and Edges](java/Graph-VE.md) - * [Blueprints Extension](java/Graph-Blueprints.md) - * [Factory](java/Graph-Factory.md) - * [Schema](java/Graph-Schema.md) - * [Class](java/Graph-Schema-Class.md) - * [Property](java/Graph-Schema-Property.md) - * [Partitioned](java/Partitioned-Graphs.md) * [Lightweight Edges](java/Lightweight-Edges.md) - * [Graph Batch Insert](java/Graph-Batch-Insert.md) * [Apache TinkerPop 3](tinkerpop3/OrientDB-TinkerPop3.md) * [Document API](java/Document-Database.md) * [Documents](java/Document-API-Documents.md) @@ -617,7 +330,6 @@ * [Concurrency Control](java/Java-Multi-Threading-Concurrency.md) * [Transactions](java/Transaction-propagation.md) * [Fetching Strategies](java/Fetching-Strategies.md) - * [Graph Consistency](java/Graph-Consistency.md) * [Binary Data](java/Binary-Data.md) * [JPA](java/JPA-Configuration.md) * [JDBC Driver](jdbc-driver/README.md) @@ -792,7 +504,6 @@ * [Security](security/Security.md) * [OrientDB Security Guide](security/OrientDB-Security-Guide.md) - * [OrientDB Data Protection and Privacy](security/SAP-Enterprise-OrientDB-DPP.md) * [Database security](security/Database-Security.md) * [Server security](security/Server-Security.md) * [Database encryption](security/Database-Encryption.md) diff --git a/src/admin/Backup-and-Restore.md b/src/admin/Backup-and-Restore.md index c9ee50fc..5aec143e 100644 --- a/src/admin/Backup-and-Restore.md +++ b/src/admin/Backup-and-Restore.md @@ -8,7 +8,7 @@ The [`BACKUP DATABASE`](../console/Console-Command-Backup.md) command executes a Backups and restores are much faster than the [`EXPORT DATABASE`](../console/Console-Command-Export.md) and [`IMPORT DATABASE`](../console/Console-Command-Import.md) commands. You can also automate backups using the [Automatic Backup](../plugins/Automatic-Backup.md) server plugin. Additionally, beginning with version 2.2 of [Enterprise Edition](../ee/Enterprise-Edition.md) OrientDB introduces major support for [incremental backups](Incremental-Backup-And-Restore.md). ->**NOTE**: OrientDB Community Edition does not support backing up remote databases. OrientDB [Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise/) does support this feature. For more information on how to implement this with Enterprise Edition, see [Remote Backups](http://www.orientechnologies.com/enterprise/last/servermanagement.html). +>**NOTE**: OrientDB Community Edition does not support backing up remote databases. OrientDB [Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise/) does support this feature. For more information on how to implement this with Enterprise Edition, see [Remote Backups](http://www.orientdb.dev/enterprise/last/servermanagement.html). ## Backups versus Exports diff --git a/src/admin/Functions-DB-Access.md b/src/admin/Functions-DB-Access.md index 3fb945d1..309b00cf 100644 --- a/src/admin/Functions-DB-Access.md +++ b/src/admin/Functions-DB-Access.md @@ -5,7 +5,7 @@ When you create a function for OrientDB, it always binds the special variable `o | Function | Description | |---|---| -| `orient.getDatabase()` | Returns the current [document database](http://www.orientechnologies.com/javadoc/latest/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.html) instance. | +| `orient.getDatabase()` | Returns the current [document database](http://www.orientdb.dev/javadoc/latest/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.html) instance. | For security reason starting from *OrientDB 3.0.29*, the usage of Java classes is forbidden by default, with a class filter implemented in the JS engine. diff --git a/src/admin/Import-RDBMS-to-Graph-Model.md b/src/admin/Import-RDBMS-to-Graph-Model.md index ea9bf521..fdeefa19 100644 --- a/src/admin/Import-RDBMS-to-Graph-Model.md +++ b/src/admin/Import-RDBMS-to-Graph-Model.md @@ -1,4 +1,4 @@ # Import from RDBMS to Graph Model -To import from RDBMS to OrientDB using the Graph Model the ETL tool is the suggested way to do it. Take a look at: [Import from CSV to a Graph](http://www.orientechnologies.com/docs/last/orientdb-etl.wiki/Import-from-CSV-to-a-Graph.html). +To import from RDBMS to OrientDB using the Graph Model the ETL tool is the suggested way to do it. Take a look at: [Import from CSV to a Graph](http://www.orientdb.dev/docs/last/orientdb-etl.wiki/Import-from-CSV-to-a-Graph.html). diff --git a/src/admin/Import-from-Neo4j-into-OrientDB.md b/src/admin/Import-from-Neo4j-into-OrientDB.md index f0badf2d..aabdec87 100644 --- a/src/admin/Import-from-Neo4j-into-OrientDB.md +++ b/src/admin/Import-from-Neo4j-into-OrientDB.md @@ -3,7 +3,7 @@ Neo4j is an open-source graph database that queries and manipulates data using its own Cypher Query Language. ->For more information on the differences between Neo4j and OrientDB, please refer to the [OrientDB vs. Neo4j](http://orientdb.com/orientdb-vs-neo4j/) page. +>For more information on the differences between Neo4j and OrientDB, please refer to the [OrientDB vs. Neo4j](http://orientdb.dev/orientdb-vs-neo4j/) page. >Neo4j and Cypher are registered trademark of Neo Technology, Inc. diff --git a/src/admin/Incremental-Backup-And-Restore.md b/src/admin/Incremental-Backup-And-Restore.md index 58bcc771..b4d4e39f 100644 --- a/src/admin/Incremental-Backup-And-Restore.md +++ b/src/admin/Incremental-Backup-And-Restore.md @@ -5,7 +5,7 @@ An incremental backup generates smaller backup files by storing only the delta between two versions of the database. This is useful when you execute a backup on a regular basis and you want to avoid having to back up the entire database each time. The easiest way to execute a backup and a restore is using [Studio](../studio/backups-imports-exports/Studio-Backup-Management.md). ->**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). +>**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). NOTE: Lucene Indexes are not supported yet in the incremental backup/restore process. Once the incremental restore is finished the indexes rebuild is necessary see (here)[https://github.com/orientechnologies/orientdb/issues/5958] diff --git a/src/admin/Unix-Service.md b/src/admin/Unix-Service.md index 9bfe0b82..237e1345 100644 --- a/src/admin/Unix-Service.md +++ b/src/admin/Unix-Service.md @@ -64,7 +64,7 @@ The OrientDB's package contains a service descriptor file for systemd based di # vi /etc/systemd/system/orientdb.service # -# Copyright (c) OrientDB LTD (http://http://orientdb.com/) +# Copyright (c) OrientDB LTD (http://http://orientdb.dev/) # [Unit] @@ -141,12 +141,12 @@ The installation process gives an output similar to the following one: ```sh ... -==> Downloading https://orientdb.com/download.php?file=orientdb-community-.tar.gz +==> Downloading https://orientdb.dev/download.php?file=orientdb-community-.tar.gz ==> /usr/bin/nohup /usr/local/Cellar/orientdb//libexec/bin/server.sh & ==> /usr/local/Cellar/orientdb//libexec/bin/shutdown.sh ==> OrientDB installed, server's root user password is 'changeme' ==> Please, follow the instruction on the link below to reset it -==> http://orientdb.com/docs/2.2/Server-Security.html#restoring-the-servers-user-root +==> http://orientdb.dev/docs/2.2/Server-Security.html#restoring-the-servers-user-root ... ``` diff --git a/src/apis-and-drivers/README.md b/src/apis-and-drivers/README.md index 3a96c9d7..6b174bf7 100644 --- a/src/apis-and-drivers/README.md +++ b/src/apis-and-drivers/README.md @@ -19,7 +19,7 @@ This is the list of the known drivers to use OrientDB through different language -
JAVA
+
JAVA
Java (native) API Native @@ -103,7 +103,7 @@ This is the list of the known drivers to use OrientDB through different language -
Go-Lang
+
Go-Lang
OrientGO Binary @@ -180,7 +180,7 @@ This is the list of the known drivers to use OrientDB through different language Scala runs on top of JVM and it's fully compatible with Java applications like OrientDB - Scala Page + Scala Page Native Offers suggestions and examples to use it without pains @@ -211,7 +211,7 @@ This is the list of the known drivers to use OrientDB through different language -
Clojure
+
Clojure
Clojure binding Native diff --git a/src/console/Console-Command-Backup.md b/src/console/Console-Command-Backup.md index 556b2773..35bc6116 100644 --- a/src/console/Console-Command-Backup.md +++ b/src/console/Console-Command-Backup.md @@ -7,7 +7,7 @@ Executes a complete backup on the currently opened database. It then compresses Backups and restores are similar to the [`EXPORT DATABASE`](Console-Command-Export.md) and [`IMPORT DATABASE`](Console-Command-Import.md), but they offer better performance than these options. ->**NOTE**: OrientDB Community Edition does not support backing up remote databases. OrientDB [Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise/) does support this feature. For more information on how to implement this with Enterprise Edition, see [Remote Backups](http://www.orientechnologies.com/enterprise/last/servermanagement.html). +>**NOTE**: OrientDB Community Edition does not support backing up remote databases. OrientDB [Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise/) does support this feature. For more information on how to implement this with Enterprise Edition, see [Remote Backups](http://www.orientdb.dev/enterprise/last/servermanagement.html). **Syntax:** diff --git a/src/console/Console-Custom-Commands.md b/src/console/Console-Custom-Commands.md deleted file mode 100644 index 35b0d480..00000000 --- a/src/console/Console-Custom-Commands.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Custom Console Commands - -In addition to the commands implemented by OrientDB, you can also develop custom commands to extend features in your particular implementation. To do this, edit the [OConsoleDatabaseApp](https://github.com/orientechnologies/orientdb/blob/master/tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java) class and add to it a new method. There's an auto-discovery system in place that adds the new method to the available commands. To provide a description of the command, use annotations. The command name must follow the Java code convention of separating words using camel-case. - -For instance, consider a case in which you might want to add a `MOVE CLUSTER` command to the console: - -```java -@ConsoleCommand(description = "Move the physical location of cluster files") -public void moveCluster( - @ConsoleParameter(name = "cluster-name", description = "The name or the id of the cluster to remove") String iClusterName, - @ConsoleParameter(name = "target-path", description = "path of the new position where to move the cluster files") String iNewPath ) { - - checkCurrentDatabase(); // THE DB MUST BE OPENED - - System.out.println("Moving cluster '" + iClusterName + "' to path " + iNewPath + "..."); - } -``` - -Once you have this code in place, `MOVE CLUSTER` now appears in the listing of available commands shown by `HELP`. - -
-orientdb> HELP
-
-AVAILABLE COMMANDS:
-
- * alter class    Alter a class in the database schema
- * alter cluster  Alter class in the database schema
- ...                            ...
- * move cluster                 Move the physical location of cluster files
- ...                            ...
- * help                         Print this help
- * exit                         Close the console
-
-orientdb> MOVE CLUSTER foo /temp
-
-Moving cluster 'foo' to path /tmp...
-
- -In the event that you develop a custom command and find it especially useful in your deployment, you can contribute your code to the [OrientDB Community](https://groups.google.com/forum/#!forum/orient-database)! - diff --git a/src/console/Console-Modes.md b/src/console/Console-Modes.md index 8a7c0089..c970f35f 100644 --- a/src/console/Console-Modes.md +++ b/src/console/Console-Modes.md @@ -14,7 +14,7 @@ You can launch the console in interactive mode by executing the `console.sh` for $ cd $ORIENTDB_HOME/bin $ ./console.sh -OrientDB console v.X.X.X (build 0) www.orientdb.com +OrientDB console v.X.X.X (build 0) www.orientdb.dev Type 'HELP' to display all the commands supported. Installing extensions for GREMLIN language v.X.X.X diff --git a/src/distributed/Data-Centers.md b/src/distributed/Data-Centers.md index 472e9331..253b0546 100644 --- a/src/distributed/Data-Centers.md +++ b/src/distributed/Data-Centers.md @@ -1,7 +1,7 @@ # Data Centers -Starting from [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) v2.2.4, you can define how your servers are deployed in multiple **Data Centers**. +Starting from [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise) v2.2.4, you can define how your servers are deployed in multiple **Data Centers**. ![Studio-Data-Centers](../images/studio-data-centers.png) @@ -20,7 +20,7 @@ All you need is using the tag `"dataCenters"` in your [`default-distributed-conf }, ``` -NOTE: _This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support)_. +NOTE: _This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support)_. Example: @@ -41,7 +41,7 @@ Example: }, ``` -![DC](http://orientdb.com/wp-content/uploads/2016/07/orientdb-dc1.png) +![DC](http://orientdb.dev/wp-content/uploads/2016/07/orientdb-dc1.png) ## Write Quorum @@ -99,7 +99,7 @@ In order to automatically manage conflicts, the suggested configuration is alway ## Conflict Resolution Policy -In [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) the additional `dc` [Conflict Resolution Strategy](Distributed-Architecture.md#conflict-resolution-policy) is supported to let to a configured data center to always win in case of conflict. To use this strategy in the conflict resolution chain, append `dc` at the chain by overwriting the global setting `distributed.conflictResolverRepairerChain`. Example: +In [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise) the additional `dc` [Conflict Resolution Strategy](Distributed-Architecture.md#conflict-resolution-policy) is supported to let to a configured data center to always win in case of conflict. To use this strategy in the conflict resolution chain, append `dc` at the chain by overwriting the global setting `distributed.conflictResolverRepairerChain`. Example: `-Ddistributed.conflictResolverRepairerChain=majority,content,version,dc{winner:asia}` diff --git a/src/distributed/Distributed-Architecture-Lifecycle.md b/src/distributed/Distributed-Architecture-Lifecycle.md index 0ee3e983..51c5195d 100644 --- a/src/distributed/Distributed-Architecture-Lifecycle.md +++ b/src/distributed/Distributed-Architecture-Lifecycle.md @@ -11,7 +11,7 @@ When start a OrientDB server in distributed mode (```bin/dserver.sh```) it looks At startup each Server Node sends an IP Multicast message in broadcast to discover if an existent cluster is available to join it. If available the Server Node will connect to it, otherwise creates a new cluster. -![image](http://www.orientdb.org/images/cluster-autodiscovering.png) +![image](http://www.orientdb.dev/images/cluster-autodiscovering.png) This is the default configuration contained in ```config/hazelcast.xml``` file. Below the multicast configuration fragment: @@ -75,7 +75,7 @@ To join a cluster the Server Node has to configure the cluster group name and pa All the nodes in the distributed cluster must have the same settings. -![image](http://www.orientdb.org/images/cluster-security.png) +![image](http://www.orientdb.dev/images/cluster-security.png) For more information look at: [Hazelcast Encryption](https://docs.hazelcast.org/docs/3.10/manual/html-single/#encryption). @@ -94,7 +94,7 @@ You can have multiple OrientDB clusters in the same network, what identifies a c In this case Server #2 joins the existent cluster. -![image](http://www.orientdb.org/images/cluster-join.png) +![image](http://www.orientdb.dev/images/cluster-join.png) When a node joins an existent cluster, the most updated copy of the database is downloaded to the joining node if the distributed configuration has `autoDeploy:true`. If the node is rejoining the cluster after a disconnection, a delta backup is requested first. If not available a full backup is sent to the joining server. If it has been configured a sharded configuration, the joining node will ask for separate parts of the database to multiple available servers to reconstruct the own database copy. If any copy of database was already present, that is moved under `backup/databases` folder. @@ -102,13 +102,13 @@ When a node joins an existent cluster, the most updated copy of the database is Multiple clusters can coexist in the same network. Clusters can't see each others because are isolated black boxes. -![image](http://www.orientdb.org/images/cluster-multiple.png) +![image](http://www.orientdb.dev/images/cluster-multiple.png) ### Distribute the configuration to the clients Every time a new Server Node joins or leaves the Cluster, the new Cluster configuration is broadcasted to all the connected clients. Everybody knows the cluster layout and who has a database! -![image](http://www.orientdb.org/images/cluster-cfg.png) +![image](http://www.orientdb.dev/images/cluster-cfg.png) ## Fail over management @@ -116,7 +116,7 @@ Every time a new Server Node joins or leaves the Cluster, the new Cluster config When a Server Node becomes unreachable (because it’s crashed, network problems, high load, etc.) the Cluster treats this event as if the Server Node left the cluster. -![image](http://www.orientdb.org/images/cluster-crash.png) +![image](http://www.orientdb.dev/images/cluster-crash.png) Starting from v2.2.13, the unreachable server is removed from the [distributed configuration](Distributed-Configuration.md) only if it's dynamic, that means it hasn't registered under the [`servers`](Distributed-Configuration.md#default-distributed-db-configjson) configuration. Once removed it doesn't concur to the quorum anymore. Instead, if the server has been registered under [`servers`](Distributed-Configuration.md#default-distributed-db-configjson), it's kept in configuration waiting for a rejoining. @@ -126,13 +126,13 @@ The [`newNodeStrategy`](Distributed-Configuration.md#default-distributed-db-conf All the clients connected to the unreachable node will switch to another server transparently without raising errors to the Application User Application doesn’t know what is happening! -![image](http://www.orientdb.org/images/cluster-clientswitch.png) +![image](http://www.orientdb.dev/images/cluster-clientswitch.png) ### Re-distribute the updated configuration again After the Server #2 left the Cluster the updated configuration is sent again to all the connected clients. -![image](http://www.orientdb.org/images/cluster-recfg.png) +![image](http://www.orientdb.dev/images/cluster-recfg.png) Continue with: - [Distributed Architecture](Distributed-Architecture.md) diff --git a/src/distributed/Distributed-Configuration.md b/src/distributed/Distributed-Configuration.md index 36817c13..7c323f8e 100644 --- a/src/distributed/Distributed-Configuration.md +++ b/src/distributed/Distributed-Configuration.md @@ -92,7 +92,7 @@ Where: |**writeQuorum**|On "write" operation (any write on database) this is the number of responses to be coherent before sending the response to the client. Set to 1 if you don't want this check at write time. Suggested value is "majority", the default, that means N/2+1 where N is the number of available nodes. In this way the quorum is reached only if the majority of nodes are coherent. "all" means all the available nodes. Starting from v2.2, N represent the MASTER only servers. For more information look at [Server Roles](Distributed-Architecture.md#server-roles).|"majority"| |**readYourWrites**|Whether the write quorum is satisfied only when also the local node responded. This assures current the node can read its writes. Disable it to improve replication performance if such consistency is not important. Can be true or false|true| |**newNodeStrategy**|Strategy to use when a new node joins the cluster. Default is `static` that means the server is automatically registered under `servers` list in configuration. If it is `dynamic`, then the node is not registered. This affects the strategy when a node is unreachable. If it is not registered (dynamic), it is removed from the configuration, so it does not concur in the quorum. Available since v2.2.13|static| -|**dataCenters**|(Since v2.2.4) Optional (and only available in the [Enterprise Edition](http://orientdb.com/orientdb-enterprise), contains the definition of the data centers. For more information look at [Data Centers](Data-Centers.md)|-| +|**dataCenters**|(Since v2.2.4) Optional (and only available in the [Enterprise Edition](http://orientdb.dev/orientdb-enterprise), contains the definition of the data centers. For more information look at [Data Centers](Data-Centers.md)|-| |**servers**|(Since v2.1) Optional, contains the map of server roles in the format server-name : role. * means any server. Available roles are "MASTER" (default) and "REPLICA". For more information look at [Server roles](Distributed-Architecture.md#server-roles)|-| |**clusters**|if the object containing the clusters' configuration as map cluster-name : cluster-configuration. * means all the clusters and is the cluster's default configuration|-| @@ -237,7 +237,7 @@ Uses manual IP like explained in [Manual IP](Distributed-Configuration.md#manual ## Asynchronous replication mode -If you are replication OrientDB database across multiple Data Centers, look at [Data Centers Configuration](Data-Centers.md) available only with the [Enterprise Edition](http://orientdb.com/orientdb-enterprise). +If you are replication OrientDB database across multiple Data Centers, look at [Data Centers Configuration](Data-Centers.md) available only with the [Enterprise Edition](http://orientdb.dev/orientdb-enterprise). If you are using the Community Edition or if you don't have multiple data centers, but just a network with high latency, in order to reduce the impact of the latency in the replication, the suggested configuration is to set `executionMode` to "asynchronous". In asynchronous mode any operation is executed on local node and then replicated. In this mode the client doesn't wait for the quorum across all the servers, but receives the response immediately after the local node answer. Example: @@ -362,4 +362,4 @@ Introduced Load balancing at client level. For more information look at [load ba ### v1.7 Simplified configuration by moving. Removed some flags (replication:boolean, now it’s deducted by the presence of “servers” field) and settings now are global (autoDeploy, hotAlignment, offlineMsgQueueSize, readQuorum, writeQuorum, failureAvailableNodesLessQuorum, readYourWrites), but you can overwrite them per-cluster. -For more information look at [News in 1.7](http://www.orientechnologies.com/distributed-architecture-sharding/). +For more information look at [News in 1.7](http://www.orientdb.dev/distributed-architecture-sharding/). diff --git a/src/distributed/Distributed-Sharding.md b/src/distributed/Distributed-Sharding.md index 800cbade..6c6aaf46 100644 --- a/src/distributed/Distributed-Sharding.md +++ b/src/distributed/Distributed-Sharding.md @@ -11,7 +11,7 @@ The following is an example that splits the [class](../datamodeling/Concepts.md# This means that OrientDB will consider any record/document/graph element in any of the three [clusters](../datamodeling/Concepts.md#cluster) as “Clients” (Client [class](../datamodeling/Concepts.md#class) relies on such [clusters](../datamodeling/Concepts.md#cluster)). In [Distributed-Architecture](Distributed-Architecture.md) each cluster can be assigned to one or more server nodes. -![image](http://www.orientdb.com/images/distributed-sharding-class.png) +![image](http://www.orientdb.dev/images/distributed-sharding-class.png) Shards, based on clusters, work against indexed and non-indexed class/clusters. @@ -23,7 +23,7 @@ For example, consider a configuration where the Client [class](../datamodeling/C - `client_europe`, will be managed only by the node, ”europe" - `client_china`, will be managed by all of the nodes (it would be equivalent as writing `“”`, see cluster "*", the default one) -![image](http://www.orientdb.com/images/distributed-sharding-replica-class.png) +![image](http://www.orientdb.dev/images/distributed-sharding-replica-class.png) ## Configuration In order to keep things simple, the entire OrientDB Distributed Configuration is stored on a single JSON file. The [distributed database configuration](Distributed-Configuration.md#default-distributed-db-configjson) for [Multiple servers per cluster](#multiple-servers-per-cluster) JSON object looks somethings like this: @@ -119,11 +119,11 @@ OrientDB supports [MapReduce](http://en.wikipedia.org/wiki/MapReduce) without Ha SELECT MAX(amount), COUNT(*), SUM(amount) FROM Client ``` -![image](http://www.orientdb.com/images/distributed-query-map.png) +![image](http://www.orientdb.dev/images/distributed-query-map.png) In this case the query is executed across all the 3 nodes and then filtered again on the starting node. -![image](http://www.orientdb.com/images/distributed-query-reduce.png) +![image](http://www.orientdb.dev/images/distributed-query-reduce.png) ## Define the target cluster/shard The application can decide where to insert a new Client by passing the cluster number or name. Example: @@ -165,8 +165,8 @@ OrientDB guarantees strong consistency if it's configured to have a `writeQuorum All the indexes are managed locally by a server. This means that if a class is spanned across three clusters on three different servers, each server will have it’s own local indexes. By executing a [distributed query (Map/Reduce like)](Distributed-Sharding.md#mapreduce) each server will use own indexes. ## Hot management of distributed configuration -With Community Edition the distributed configuration cannot be changed at run-time but you have to stop and restart all the nodes. [Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise) allows to create and drop new shards without stopping the distributed cluster. +With Community Edition the distributed configuration cannot be changed at run-time but you have to stop and restart all the nodes. [Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise) allows to create and drop new shards without stopping the distributed cluster. -By using Enterprise Edition and the [Workbench](http://www.orientechnologies.com/enterprise/last/clustermgmt.html), you can deploy the database to the new server and define the cluster to assign to it. In this example a new server "usa2" is created where only the cluster `client_usa` will be copied. After the deployment, cluster `client_usa` will be replicated against nodes "usa" and "usa2". +By using Enterprise Edition and the [Workbench](http://www.orientdb.dev/enterprise/last/clustermgmt.html), you can deploy the database to the new server and define the cluster to assign to it. In this example a new server "usa2" is created where only the cluster `client_usa` will be copied. After the deployment, cluster `client_usa` will be replicated against nodes "usa" and "usa2". -![image](http://www.orientdb.com/images/distributed-sharding-addserver.png) +![image](http://www.orientdb.dev/images/distributed-sharding-addserver.png) diff --git a/src/distributed/Replication.md b/src/distributed/Replication.md index 18372bc8..3069c18c 100644 --- a/src/distributed/Replication.md +++ b/src/distributed/Replication.md @@ -8,27 +8,27 @@ Replication works only in the [Distributed-Architecture](Distributed-Architectur ## Sharing of database In Distributed Architecture the replicated database must have the same name. When an OrientDB Server is starting, it sends the list of current databases (all the databases located under ```$ORIENTDB_HOME/databases``` directory) to all the nodes in the cluster. If other nodes have databases with the same name, a replication is automatically set. -![image](http://www.orientdb.org/images/distributed-db-share.png) +![image](http://www.orientdb.dev/images/distributed-db-share.png) _NOTE: In Distributed Architecture assure to avoid conflict with database names, otherwise 2 different databases could start replication with the chance to get corrupted._ If the [database configuration](Distributed-Configuration.md#default-distributed-db-configjson) has the setting ```"autoDeploy" : true```, then the databases are automatically deployed across the network to the other nodes as soon as they join the cluster. -![image](http://www.orientdb.org/images/distributed-db-autodeploy.png) +![image](http://www.orientdb.dev/images/distributed-db-autodeploy.png) ## Server unreachable In case a server becomes unreachable, the node is removed by [database configuration](Distributed-Configuration.md#default-distributed-db-configjson) unless the setting ```"hotAlignment" : true```. In this case all the new synchronization messages are kept in a distributed queue. -![image](http://www.orientdb.org/images/distributed-srv-unreacheable.png) +![image](http://www.orientdb.dev/images/distributed-srv-unreacheable.png) As soon as the Server becomes online again, it starts the synchronization phase (status=SYNCHRONIZING) by polling all the synchronization messages in the queue. -![image](http://www.orientdb.org/images/distributed-srv-backonline.png) +![image](http://www.orientdb.dev/images/distributed-srv-backonline.png) Once the alignment is finished, the node becomes online (status=ONLINE) and the replication continues like at the beginning. -![image](http://www.orientdb.org/images/distributed-srv-restored.png) +![image](http://www.orientdb.dev/images/distributed-srv-restored.png) ## Further readings diff --git a/src/ee/Auditing.md b/src/ee/Auditing.md index cd92ba0e..ec6e4f67 100644 --- a/src/ee/Auditing.md +++ b/src/ee/Auditing.md @@ -1,6 +1,6 @@ # Auditing -Starting in OrientDB 2.1, the Auditing component is part of the [Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise/). This page refers to the Auditing feature and how to work with it. The Studio web tool provides a GUI for Auditing that makes configuration easier. Look at the [Auditing page in Studio](../studio/server-management/Studio-Auditing.md). +Starting in OrientDB 2.1, the Auditing component is part of the [Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise/). This page refers to the Auditing feature and how to work with it. The Studio web tool provides a GUI for Auditing that makes configuration easier. Look at the [Auditing page in Studio](../studio/server-management/Studio-Auditing.md). By default all the auditing logs are saved as documents of class `AuditingLog`. If your account has enough privileges, you can directly query the auditing log. Example on retrieving the last 20 logs: `select from AuditingLog order by @rid desc limit 20`. diff --git a/src/ee/Cluster-Management.md b/src/ee/Cluster-Management.md index dcbcaa43..489dfe08 100644 --- a/src/ee/Cluster-Management.md +++ b/src/ee/Cluster-Management.md @@ -5,7 +5,7 @@ # Cluster Management This is the section (available only for the Enterprise Edition) to work with OrientDB Cluster as DBA/DevOps. ->**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). +>**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). On the top of the page are reported the number of active nodes joining your cluster. diff --git a/src/ee/Enterprise-Edition.md b/src/ee/Enterprise-Edition.md index 0b8c9cdb..20e816c8 100644 --- a/src/ee/Enterprise-Edition.md +++ b/src/ee/Enterprise-Edition.md @@ -3,8 +3,6 @@ This is the main guide on using OrientDB Enterprise Edition. -Enterprise Edition is a commercial product developed by SAP. - OrientDB Enterprise Edition is designed specifically for applications seeking a scalable, robust, and secure multi-model database. Its main goal is to save time and money on your OrientDB investment by reducing risk, cost, effort, and time invested in a business critical application. It includes all Community features plus professional enterprise tools such as support for [Query Profiler](./Server-Profiler.md), [Distributed Clustering](./Cluster-Management.md) configuration, [Auditing Tools](./Security.md), [Metrics recording](../Server-Management.md), [Non-Stop Incremental Backups](./Backup-Management.md), [Teleporter](./Teleporter.md) to import data from any Relational DBMS. @@ -19,7 +17,7 @@ At run-time, the Enterprise edition logs this message: 2016-08-04 09:38:26:589 INFO * ORIENTDB - ENTERPRISE EDITION * [OEnterpriseAgent] 2016-08-04 09:38:26:589 INFO ***************************************************************************** [OEnterpriseAgent] 2016-08-04 09:38:26:589 INFO * If you are in Production or Test, you must purchase a commercial license. * [OEnterpriseAgent] -2016-08-04 09:38:26:589 INFO * For more information look at: http://orientdb.com/orientdb-enterprise/ * [OEnterpriseAgent] +2016-08-04 09:38:26:589 INFO * For more information look at: http://orientdb.dev/orientdb-enterprise/ * [OEnterpriseAgent] 2016-08-04 09:38:26:590 INFO ***************************************************************************** [OEnterpriseAgent] ``` diff --git a/src/ee/Neo4j-Importer.md b/src/ee/Neo4j-Importer.md index b9628abd..4ae9e6d1 100644 --- a/src/ee/Neo4j-Importer.md +++ b/src/ee/Neo4j-Importer.md @@ -12,7 +12,7 @@ Imported neo4j items are: - unique constraints - indexes -**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/). +**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/). This visual tool consists in a wizard composed of 2 simple steps. Let's have a look at each configuration step. diff --git a/src/ee/Security.md b/src/ee/Security.md index 984364a2..5e81c120 100644 --- a/src/ee/Security.md +++ b/src/ee/Security.md @@ -2,7 +2,7 @@ > Only users with grant `server.security` can see this section ->**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). +>**NOTE**: This feature is available only in the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise). If you are interested in a commercial license look at [OrientDB Subscription Packages](http://orientdb.com/support). # Security diff --git a/src/ee/Server-Management.md b/src/ee/Server-Management.md index 0837edfa..7fdbdb65 100644 --- a/src/ee/Server-Management.md +++ b/src/ee/Server-Management.md @@ -1,6 +1,6 @@ # Server Management -This is the section to work with OrientDB Server as DBA/DevOps with [Enterprise Edition](http://orientdb.com/enterprise/). +This is the section to work with OrientDB Server as DBA/DevOps with [Enterprise Edition](http://orientdb.dev/enterprise/). > Only users with grant `server.metrics` can see this section > diff --git a/src/ee/Teleporter.md b/src/ee/Teleporter.md index d484eb8b..08d291d6 100644 --- a/src/ee/Teleporter.md +++ b/src/ee/Teleporter.md @@ -6,7 +6,7 @@ In Studio 2.2 you can configure the execution of the new Teleporter plugin, which allows you to import your relational database into OrientDB in few simple steps. If you are interested in a detailed description of the tool, of its inner workings and features you can view the [Teleporter Documentation](../teleporter/Teleporter-Home.md). -**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/). **But beware**: in **Community Edition** you can migrate your source relational database but **you cannot enjoy the synchronize feature**, only available in the **Enterprise Edition**. +**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.dev/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/). **But beware**: in **Community Edition** you can migrate your source relational database but **you cannot enjoy the synchronize feature**, only available in the **Enterprise Edition**. This visual tool consists in a wizard composed of 4 steps, where just **Step 1** and **Step 2** are strictly necessary in order to perform your migration. diff --git a/src/etl/Import-from-JSON.md b/src/etl/Import-from-JSON.md index 7943fd5a..42e751a0 100644 --- a/src/etl/Import-from-JSON.md +++ b/src/etl/Import-from-JSON.md @@ -150,4 +150,4 @@ END ETL PROCESSOR Once ready, let's open the database with Studio and this is the result: -![](http://www.orientdb.com/images/etl_imported_json.png) +![](http://www.orientdb.dev/images/etl_imported_json.png) diff --git a/src/etl/Import-from-PARSE.md b/src/etl/Import-from-PARSE.md index d0378e09..fe26e00b 100644 --- a/src/etl/Import-from-PARSE.md +++ b/src/etl/Import-from-PARSE.md @@ -60,7 +60,7 @@ Notes: - Links are similar to OrientDB RID (but it requires a costly JOIN to be traversed), but made as an embedded object containing: - `className` as target class name - `objectId` as target objectId -- Parse has ACL at record level, like [OrientDB](http://www.orientechnologies.com/docs/last/orientdb.wiki/Security.html#record-level-security). +- Parse has ACL at record level, like [OrientDB](http://www.orientdb.dev/docs/last/orientdb.wiki/Security.html#record-level-security). In order to import a PARSE file, you need to create the ETL configuration using JSON as Extractor. diff --git a/src/fiveminute/java.md b/src/fiveminute/java.md index fe77f7f4..87a31495 100644 --- a/src/fiveminute/java.md +++ b/src/fiveminute/java.md @@ -12,7 +12,7 @@ To run OrientDB you will need a Java SDK installed on your machine. OrientDB run Download OrientDB from the following URL: -[https://orientdb.org/download](https://orientdb.org/download) +[https://orientdb.dev/download](https://orientdb.org/download) Unzip it on your FileSystem and open a shell in the directory. @@ -61,7 +61,7 @@ You will see OrientDB starting ,,, .,` ,,. `, GRAPH DATABASE `` `. - `` orientdb.com + `` orientdb.dev ` 2017-08-14 14:11:12:824 INFO Loading configuration from: /Users/luigidellaquila/temp/orient/orientdb-community-3.0.0m2/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml] diff --git a/src/gettingstarted/Tutorial-Clusters.md b/src/gettingstarted/Tutorial-Clusters.md index c476ab7e..13b0fb39 100644 --- a/src/gettingstarted/Tutorial-Clusters.md +++ b/src/gettingstarted/Tutorial-Clusters.md @@ -42,23 +42,23 @@ Suppose you have a class `Customer` that relies on two clusters: - `China_customers`, which is a cluster that contains all customers in China. -![Class-Custer](http://www.orientdb.org/images/class-clusters.png) +![Class-Custer](http://www.orientdb.dev/images/class-clusters.png) In ths deployment, the default cluster is `USA_customers`. Therefore, when 'Cluster Selection' is set to 'default' records added with the [`INSERT`](../sql/SQL-Insert.md) statement belong to 'USA_customers' unless specified otherwise. If the selection strategy is 'default' then inserting data into a non-default cluster would require that you specify the cluster you want to insert the data into in your `INSERT` statement. -![Class-Cluster](http://www.orientdb.org/images/class-newrecord.png) +![Class-Cluster](http://www.orientdb.dev/images/class-newrecord.png) If we have different remote servers servicing customers in China and the USA, then it might also make sense to have 'Cluster Selection' set to 'local'. This will result in modifications of the customer class to take place on the cluster associated with the server making the modification. When you run a query on the `Customer` class, such as [`SELECT`](../sql/SQL-Query.md), for instance: -![Class-Cluster](http://www.orientdb.org/images/class-query.png) +![Class-Cluster](http://www.orientdb.dev/images/class-query.png) OrientDB scans all clusters associated with the class looking for matches. In the event that you know the cluster in which the data you seek is stored, you can optimize the query by querying that cluster directly and thus avoid scanning all the others clusters. -![Class-Cluster](http://www.orientdb.org/images/class-query-cluster.png) +![Class-Cluster](http://www.orientdb.dev/images/class-query-cluster.png) Here, OrientDB only scans the `China_customers` cluster of the `Customer` class in looking for matches. diff --git a/src/gettingstarted/Tutorial-Installation-Operations.md b/src/gettingstarted/Tutorial-Installation-Operations.md index 96185e25..c0b87050 100644 --- a/src/gettingstarted/Tutorial-Installation-Operations.md +++ b/src/gettingstarted/Tutorial-Installation-Operations.md @@ -2,14 +2,14 @@ # Installation OrientDB is available in two editions: -- **[Community Edition](http://www.orientechnologies.com/orientdb/)** This edition is released as an open source project under the [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0.html). This license allows unrestricted free usage for both open source and commercial projects. -- **[[Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise/)](http://www.orientechnologies.com/enterprise.htm)** OrientDB Enterprise edition is commercial software built on top of the Community Edition. Enterprise is developed by the same team that developed the OrientDB engine. It serves as an extension of the Community Edition by providing Enterprise features such as: +- **[Community Edition](http://www.orientdb.dev/orientdb/)** This edition is released as an open source project under the [Apache 2 license](http://www.apache.org/licenses/LICENSE-2.0.html). This license allows unrestricted free usage for both open source and commercial projects. +- **[[Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise/)](http://www.orientdb.dev/enterprise.htm)** OrientDB Enterprise edition is commercial software built on top of the Community Edition. Enterprise is developed by the same team that developed the OrientDB engine. It serves as an extension of the Community Edition by providing Enterprise features such as: - Query Profiler - Distributed Clustering configuration - Metrics Recording - Live Monitoring with configurable Alerts -An Enterprise Edition license is included without charge if you purchase [Support](http://www.orientechnologies.com/support/). +An Enterprise Edition license is included without charge if you purchase [Support](http://www.orientdb.dev/support/). ### Prerequisites @@ -26,7 +26,7 @@ This means the only requirement for using OrientDB is to have [Java version 1.6 ### Download Binaries -The easiest and fastest way to start using OrientDB is to download binaries from the [Official OrientDB Download Page](http://www.orientechnologies.com/download/). +The easiest and fastest way to start using OrientDB is to download binaries from the [Official OrientDB Download Page](http://www.orientdb.dev/download/). ### Compile Your Own Community Edition diff --git a/src/gettingstarted/Tutorial-Java-Hooks.md b/src/gettingstarted/Tutorial-Java-Hooks.md index 7f9b1992..a4872583 100644 --- a/src/gettingstarted/Tutorial-Java-Hooks.md +++ b/src/gettingstarted/Tutorial-Java-Hooks.md @@ -7,7 +7,7 @@ The following tutorial will walk you through exactly how to accomplish this use ## Assumptions It is assumed that you have already downloaded and installed a [Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html). In my case I downloaded Java JDK version 8 for Windows 64 bit and installed it to folder C:\Program Files\Java\jdk1.8.0_40. -It is also assumed that you have [downloaded](http://www.orientechnologies.com/download/), installed, and configured a working OrientDB Server. In my case I installed it to folder C:\Program Files\orientdb-community-2.0.5. +It is also assumed that you have [downloaded](http://www.orientdb.dev/download/), installed, and configured a working OrientDB Server. In my case I installed it to folder C:\Program Files\orientdb-community-2.0.5. Exact instructions for these two steps are outside the scope of this tutorial. diff --git a/src/gettingstarted/Tutorial-Relationships.md b/src/gettingstarted/Tutorial-Relationships.md index 8028a983..e4e23b65 100644 --- a/src/gettingstarted/Tutorial-Relationships.md +++ b/src/gettingstarted/Tutorial-Relationships.md @@ -15,7 +15,7 @@ Consider, as an example, a database where you need to establish relationships be Relational databases store the value of the target record in the `address` row of the `Customer` table. This is the Foreign Key. The foreign key points to the Primary Key of the related record in the `Address` table. -![RDBMS 1-to-1](http://www.orientdb.org/images/rdbms-1to1.jpg) +![RDBMS 1-to-1](http://www.orientdb.dev/images/rdbms-1to1.jpg) Consider a case where you want to view the address of a customer named Luca. In a Relational database, like MySQL, this is how you would query the table: @@ -31,7 +31,7 @@ What happens here is a `JOIN`. That is, the contents of two tables are joined to Given that it is not possible to store multiple values in one field, a customer record cannot have multiple foreign keys which refers to different addresses. The only way to manage a 1-to-Many Relationship in databases of this kind is to move the Foreign Key to the `Address` table. -![RDBMS 1-to-N](http://www.orientdb.org/images/rdbms-1toN.jpg) +![RDBMS 1-to-N](http://www.orientdb.dev/images/rdbms-1toN.jpg) For example, consider a case where you want to return all addresses connected to the customer Luca, this is how you would query the table: @@ -44,7 +44,7 @@ mysql> SELECT B.location FROM Customer A, Addre The most complicated case is the Many-to-Many relationship. To handle associations of this kind, Relational databases require a separate, intermediary table that matches rows from both `Customer` and `Address` tables in all required combinations. This results in a double `JOIN` per record at runtime. -![RDBMS Many-to-Many](http://www.orientdb.org/images/rdbms-NtoM.jpg) +![RDBMS Many-to-Many](http://www.orientdb.dev/images/rdbms-NtoM.jpg) For example, consider a case where you want to return all address for the customer Luca, this is how you would query the table: @@ -72,7 +72,7 @@ In the database industry, there are a number of indexing algorithms available. Balance trees all work in a similar manner. For example, consider a case where you're looking for an entry with the name `Luca`: after only five hops, the record is found. -![RDBMS Indexes](http://www.orientdb.org/images/index-lookup.jpg) +![RDBMS Indexes](http://www.orientdb.dev/images/index-lookup.jpg) While this is fine on a small database, consider what would happen if there were millions or billions of records. The database would have to go through many, many more hops to find `Luca`. And, the database would execute this operation on every `JOIN` per record. Picture: joining four tables with thousands of records. The number of `JOIN` operations could run in the millions. diff --git a/src/gettingstarted/Tutorial-Run-the-console.md b/src/gettingstarted/Tutorial-Run-the-console.md index 0b8d4c43..49e2d8ff 100644 --- a/src/gettingstarted/Tutorial-Run-the-console.md +++ b/src/gettingstarted/Tutorial-Run-the-console.md @@ -18,7 +18,7 @@ To launch the OrientDB console, run the following command after you start the da $ cd $ORIENTDB_HOME/bin $ ./console.sh -OrientDB console v.X.X.X (build 0) www.orientdb.com +OrientDB console v.X.X.X (build 0) www.orientdb.dev Type 'HELP' to display all the commands supported. Installing extensions for GREMLIN language v.X.X.X diff --git a/src/gettingstarted/Tutorial-Run-the-server.md b/src/gettingstarted/Tutorial-Run-the-server.md index eb18b8f9..99c26498 100644 --- a/src/gettingstarted/Tutorial-Run-the-server.md +++ b/src/gettingstarted/Tutorial-Run-the-server.md @@ -112,7 +112,7 @@ By default, OrientDB listens on two different ports for external connections. - **Binary**: OrientDB listens on port `2424` for binary connections from the console and for clients and drivers that support the [Network Binary Protocol](../internals/Network-Binary-Protocol.md). -- **HTTP**: OrientDB listens on port `2480` for HTTP connections from [OrientDB Studio Web Tool](http://www.orientechnologies.com/docs/last/orientdb-studio.wiki/Home-page.html) and clients and drivers that support the [HTTP/REST protocol](../misc/OrientDB-REST.md), or similar tools, such as [cURL](http://en.wikipedia.org/wiki/cURL). +- **HTTP**: OrientDB listens on port `2480` for HTTP connections from [OrientDB Studio Web Tool](http://www.orientdb.dev/docs/last/orientdb-studio.wiki/Home-page.html) and clients and drivers that support the [HTTP/REST protocol](../misc/OrientDB-REST.md), or similar tools, such as [cURL](http://en.wikipedia.org/wiki/cURL). If you would like the database server to listen at different ports or IP address, you can define these values in the configuration file `config/orientdb-server-config.xml`. diff --git a/src/gettingstarted/tutorials/README.md b/src/gettingstarted/tutorials/README.md index da1f6ad2..6d4d99f9 100644 --- a/src/gettingstarted/tutorials/README.md +++ b/src/gettingstarted/tutorials/README.md @@ -1,9 +1,4 @@ ---- -search: - keywords: ['tutorials'] ---- - # Tutorials This Section includes all the Tutorials available in this Manual. - \ No newline at end of file + diff --git a/src/gettingstarted/tutorials/Tutorial-Importing-the-Movie-Database-from-Neo4j.md b/src/gettingstarted/tutorials/Tutorial-Importing-the-Movie-Database-from-Neo4j.md deleted file mode 100644 index 40899ce7..00000000 --- a/src/gettingstarted/tutorials/Tutorial-Importing-the-Movie-Database-from-Neo4j.md +++ /dev/null @@ -1,203 +0,0 @@ - -| | | -|----|-----| -|![](../../images/warning.png)| This is a legacy strategy to migrate from Neo4j. The new strategy is to migrate using the [Neo4j to OrientDB Importer](../../neo4j-to-orientdb-importer/README.md). - - -# Tutorial: Importing the *movie* Database from Neo4j - -In this tutorial we will follow the steps described in the [Import from Neo4j using GraphML](../../admin/Import-from-Neo4j-using-GraphML.md) section to import the Neo4j's *movie* example database into OrientDB. - -We will also provide some examples of queries using the OrientDB's [MATCH](../../sql/SQL-Match.md) syntax, making a comparison with the corresponding Neo4j's Cypher query language. - -For general information on the possible Neo4j to OrientDB migration strategies, please refer to the [Import from Neo4j](../../admin/Import-from-Neo4j-into-OrientDB.md) section. - ->Neo4j and Cypher are registered trademark of Neo Technology, Inc. - -## Exporting from Neo4j - -Assuming you have already downloaded and unpacked the [Neo4j Shell Tools](https://github.com/jexp/neo4j-shell-tools), and restarted the Neo4j Server, as described in the Section [Exporting GraphML](../../admin/Import-from-Neo4j-using-GraphML.md#exporting-graphml), you can export the *movie* database using `neo4j-shell` with a command like the following one: - -```sh -D:\neo4j\neo4j-community-3.0.6\bin>neo4j-shell.bat - -Welcome to the Neo4j Shell! Enter 'help' for a list of commands -NOTE: Remote Neo4j graph database service 'shell' at port 1337 - -neo4j-sh (?)$ export-graphml -t -o d:/movie.graphml -Wrote to GraphML-file d:/movies.graphml 0. 100%: nodes = 171 rels = 253 properties = 564 time 270 ms total 270 ms -``` - -In the example above the exported *movie* graph is stored under `D:\movie.graphml`. - - -## Importing into OrientDB - -In this tutorial we will import in OrientDB the file `movie.graphml` using the OrientDB's [Console](../../console/README.md). For other GraphML import methods, please refer to the section [Importing GraphML](../../admin/Import-from-Neo4j-using-GraphML.md#importing-graphml). - -The OrientDB's Console output generated during the import process is similar to the following (note that first we create a *movie* database using the command `CREATE DATABASE`, and then we do the actual import using the command `IMPORT DATABASE`): - -```sh -D:\orientdb\orientdb-enterprise-2.2.8\bin>console.bat - -OrientDB console v.2.2.8-SNAPSHOT (build 2.2.x@r39259e190e16045fe1425b1c0485f8562fca055b; 2016-08-23 14:38:49+0000) www.orientdb.com -Type 'help' to display all the supported commands. -Installing extensions for GREMLIN language v.2.6.0 - -orientdb> CREATE DATABASE PLOCAL:D:/orientdb/orientdb-enterprise-2.2.8/databases/movie - -Creating database [PLOCAL:D:/orientdb/orientdb-enterprise-2.2.8/databases/movie] using the storage type [PLOCAL]... -Database created successfully. - -Current database is: PLOCAL:D:/orientdb/orientdb-enterprise-2.2.8/databases/movie -orientdb {db=movie}> IMPORT DATABASE D:/movie.graphml - -Importing GRAPHML database from D:/movie.graphml with options ()... -Done: imported 171 vertices and 253 edges -orientdb {db=movie}> -``` - -As you can see from the output above, as a result of the import 171 vertices and 253 edges have been created in OrientDB. This is exactly the same number of nodes and relationships exported from Neo4j. - -For more tips and tricks related to the import process, please refer to [this](../../admin/Import-from-Neo4j-using-GraphML.md#import-tips-and-tricks) section. - - -## Query Comparison - -Once the *movie* database has been imported into OrientDB, you may use several ways to access its data. - -The `MATCH` [syntax](../../sql/SQL-Match.md) and the tool [Studio](../../studio/README.md) can be used, for instance, in a similar way to the Neo4j's Cypher and Browser. - -The following sections include a comparison of the Neo4j's Cypher and OrientDB's `MATCH` syntax for some queries that you can execute against the *movie* database. - - -### Find the actor named "Tom Hanks" - -Neo4j's Cypher: - -``` -MATCH (tom:Person {name: "Tom Hanks"}) -RETURN tom -``` - -OrientDB's MATCH: - -``` -MATCH {class: Person, as: tom, where: (name = 'Tom Hanks')} -RETURN $pathElements -``` - -### Find the movie with title "Cloud Atlas" - -Neo4j's Cypher: - -``` -MATCH (cloudAtlas:Movie {title: "Cloud Atlas"}) -RETURN cloudAtlas -``` - -OrientDB's MATCH: - -``` -MATCH {class: Movie, as: cloudAtlas, where: (title = 'Cloud Atlas')} -RETURN $pathElements -``` - -### Find 10 people - -Neo4j's Cypher: - -``` -MATCH (people:Person) -RETURN people.name -LIMIT 10 -``` - -OrientDB's MATCH: - -``` -MATCH {class: Person, as: people} -RETURN people.name -LIMIT 10 -``` - -### Find the movies released in the 1990s - -Neo4j's Cypher: - -``` -MATCH (nineties:Movie) -WHERE nineties.released > 1990 AND nineties.released < 2000 -RETURN nineties.title -``` - -OrientDB's MATCH: - -``` -MATCH {class: Movie, as: nineties, WHERE: (released > 1990 AND released < 2000 )} -RETURN nineties.title -``` - -### List all Tom Hanks movies - -Neo4j's Cypher: - -``` -MATCH (tom:Person {name: "Tom Hanks"})-[:ACTED_IN]->(tomHanksMovies) -RETURN tom, tomHanksMovies -``` - -OrientDB's MATCH: - -``` -MATCH {class: Person, as: tom, where: (name = 'Tom Hanks')}-ACTED_IN->{as: tomHanksMovies} -RETURN $pathElements -``` - -### Find out who directed "Cloud Atlas" - -Neo4j's Cypher: - -``` -MATCH (cloudAtlas {title: "Cloud Atlas"})<-[:DIRECTED]-(directors) -RETURN directors.name -``` - -OrientDB's MATCH: - -``` -MATCH {class: Movie, as: cloudAtlas, where: (title = 'Cloud Atlas')}<-DIRECTED-{as: directors} -RETURN directors.name -``` - -### Find Tom Hanks' co-actors - -Neo4j's Cypher: - -``` -MATCH (tom:Person {name:"Tom Hanks"})-[:ACTED_IN]->(m)<-[:ACTED_IN]-(coActors) -RETURN DISTINCT coActors.name -``` - -OrientDB's MATCH: - -``` -MATCH {class: Person, as: tom, where: (name = 'Tom Hanks')}-ACTED_IN->{as: m}<-ACTED_IN-{class: Person,as: coActors} -RETURN coActors.name -``` - -### Find how people are related to "Cloud Atlas" - -Neo4j's Cypher: - -``` -MATCH (people:Person)-[relatedTo]-(:Movie {title: "Cloud Atlas"}) -RETURN people.name, Type(relatedTo), relatedTo -``` - -OrientDB's MATCH: - -``` -MATCH {class: Person, as: people}--{as: m, where: (title = 'Cloud Atlas')} -RETURN $pathElements -``` diff --git a/src/gettingstarted/tutorials/Tutorial-Importing-the-northwind-Database-from-Neo4j.md b/src/gettingstarted/tutorials/Tutorial-Importing-the-northwind-Database-from-Neo4j.md deleted file mode 100644 index cec5f57c..00000000 --- a/src/gettingstarted/tutorials/Tutorial-Importing-the-northwind-Database-from-Neo4j.md +++ /dev/null @@ -1,152 +0,0 @@ - -# Tutorial: Importing the *northwind* Database from Neo4j - -In this tutorial we will use the [_Neo4j to OrientDB Importer_](../../neo4j-to-orientdb-importer/README.md) to import the Neo4j *northwind* example database into OrientDB. - -For general information on the possible Neo4j to OrientDB migration strategies, please refer to the [Import from Neo4j](../../admin/Import-from-Neo4j-into-OrientDB.md) section. - ->Neo4j and Cypher are registered trademark of Neo Technology, Inc. - - -## Preparing for the migration - -Please download and install OrientDB: - -
$ wget {{book.TP2_link}} -O {{book.TP2_name}}-{{book.lastGA}}.tar.gz
-$ tar xvf {{book.TP2_name}}-{{book.lastGA}}.tar.gz
- -Download and install the _Neo4j to OrientDB Importer_: - -
$ wget http://central.maven.org/maven2/com/orientechnologies/orientdb-neo4j-importer/{{book.lastGA}}/orientdb-neo4j-importer-{{book.lastGA}}.tar.gz
-$ tar xfv orientdb-neo4j-importer-{{book.lastGA}}.tar.gz -C orientdb-community-{{book.lastGA}} --strip-components=1 
- -For further information on the OrientDB's installation, please refer to this [section](../Tutorial-Installation.md). - -For further information on the _Neo4j to OrientDB Importer_ installation, please refer to this [section](../../neo4j-to-orientdb-importer/README.md#installation). - - -## Starting the migration - -Assuming that: - -* `/home/santo/neo4j/neo4j-community-3.0.7/lib` is the full path to the directory that includes the Neo4j's libraries - -* `/home/santo/data/graph.db_northwind` is the full path to the directory that contains the Neo4j's _northwind_ database - -* `/home/santo/orientdb/orientdb-community-2.2.12/databases/northwind_import` is the full path to the directory where you would like to migrate the _northwind_ database - -* that no Neo4j and OrientDB servers are running on those directories - -you can import the _northwind_ database with a command similar to the following: - -```sh -./orientdb-neo4j-importer.sh \ - -neo4jlibdir /home/santo/neo4j/neo4j-community-3.0.7/lib \ - -neo4jdbdir /home/santo/neo4j/data/graph.db_northwind \ - -odbdir /home/santo/orientdb/orientdb-community-2.2.12/databases/northwind_import -``` - -For further information on how to use the _Neo4j to OrientDB Importer_, please refer to this [section](../../neo4j-to-orientdb-importer/README.md#usage). - - -## Migration output - -The following is the output that is written by the _Neo4j to OrientDB Importer_ during the `northwind` database migration: - -``` -Neo4j to OrientDB Importer v.2.2.12-SNAPSHOT - Copyrights (c) 2016 OrientDB LTD - -WARNING: 'o' option not found. Defaulting to 'false'. - -Please make sure that there are no running servers on: - '/home/santo/neo4j/data/graph.db_northwind' (Neo4j) -and: - '/home/santo/orientdb/orientdb-community-2.2.12/databases/northwind_import' (OrientDB) - -Initializing Neo4j...Done - -Initializing OrientDB...Done - -Importing Neo4j database: - '/home/santo/neo4j/data/graph.db_northwind' -into OrientDB database: - '/home/santo/orientdb/orientdb-community-2.2.12/databases/northwind_import' - -Getting all Nodes from Neo4j and creating corresponding Vertices in OrientDB... - 1035 OrientDB Vertices have been created (100% done) -Done - -Creating internal Indices on property 'Neo4jNodeID' on all OrientDB Vertices Classes... - 5 OrientDB Indices have been created (100% done) -Done - -Getting all Relationships from Neo4j and creating corresponding Edges in OrientDB... - 3139 OrientDB Edges have been created (100% done) -Done - -Getting Constraints from Neo4j and creating corresponding ones in OrientDB... - 0 OrientDB Indices have been created -Done - -Getting Indices from Neo4j and creating corresponding ones in OrientDB... - 5 OrientDB Indices have been created (100% done) -Done - -Import completed! - -Shutting down OrientDB...Done -Shutting down Neo4j...Done - -=============== -Import Summary: -=============== - -- Found Neo4j Nodes : 1035 --- With at least one Label : 1035 ---- With multiple Labels : 0 --- Without Labels : 0 -- Imported OrientDB Vertices : 1035 (100%) - -- Found Neo4j Relationships : 3139 -- Imported OrientDB Edges : 3139 (100%) - -- Found Neo4j Constraints : 0 -- Imported OrientDB Constraints (Indices created) : 0 - -- Found Neo4j (non-constraint) Indices : 5 -- Imported OrientDB Indices : 5 (100%) - -- Additional created Indices (on vertex properties 'Neo4jNodeID') : 5 - -- Total Import time: : 29 seconds --- Initialization time : 7 seconds --- Time to Import Nodes : 6 seconds (181.67 nodes/sec) --- Time to Import Relationships : 7 seconds (459.79 rels/sec) --- Time to Import Constraints and Indices : 4 seconds (1.21 indices/sec) --- Time to create internal Indices (on vertex properties 'Neo4jNodeID') : 4 seconds (1.22 indices/sec) -``` - - -## Connecting to the newly imported Database - -General information on how to connect to a newly imported database can be found in [this](../../neo4j-to-orientdb-importer/README.md#connecting-to-the-newly-imported-database) section. - -The following is a partial visualization of the _northwind_ database done with the Graph Editor included in the OrientDB's [Studio](../../studio/README.md) tool: - -![](../../images/import_from_neo4j/northwind/northwind_graph_editor.PNG) - -As you can see from the _Limit_ field, the visualization is limited to 200 vertices. - -The following, instead, is the graph returned by the following [`MATCH`](../../sql/SQL-Match.md) query (the query returns all nodes connected to the Order with `orderID` 10344): - -```sql -MATCH {class: Order, where: (orderID = 10344)}--{as: n} RETURN $pathelements -``` - -![](../../images/import_from_neo4j/northwind/northwind_match_query.PNG) - -From Studio's [Schema Manager](../../studio/working-with-schemas/README.md), you can check all imported Vertex Classes (node Labels in Neo4j), Edge Classes (Relationship Types in Neo4j), and Indexes: - -![](/images/import_from_neo4j/northwind/northwind_schema_manager.PNG) - -`V` and `E` are special classes: they include all Vertices and all Edges. diff --git a/src/internals/Caching.md b/src/internals/Caching.md index 269d8c07..f97afb1d 100644 --- a/src/internals/Caching.md +++ b/src/internals/Caching.md @@ -3,7 +3,7 @@ OrientDB has several caching mechanisms that act at different levels. Look at this picture: -![image](http://www.orientdb.org/images/caching.png) +![image](http://www.orientdb.dev/images/caching.png) - **Local cache** is one per database instance (and per thread in multi-thread environment) - **[Storage](../datamodeling/Concepts.md)**, it could cache depending on the implementation. This is the case for the **Local Storage** (disk-based) that caches file reads to reduce I/O requests @@ -14,7 +14,7 @@ OrientDB has several caching mechanisms that act at different levels. Look at th ## Local Mode (embedded database) -![image](http://www.orientdb.org/images/cache-flow.png) +![image](http://www.orientdb.dev/images/cache-flow.png) When the client application asks for a record OrientDB checks: - if a **transaction** has begun then it searches inside the transaction for changed records and returns it if found @@ -23,7 +23,7 @@ When the client application asks for a record OrientDB checks: ## Client-Server Mode (remote database) -![image](http://www.orientdb.org/images/cache_flow_client_server.png) +![image](http://www.orientdb.dev/images/cache_flow_client_server.png) When the client application asks for a record OrientDB checks: - if a **transaction** has begun then it searches inside the transaction for changed records and returns it if found diff --git a/src/internals/Local-Storage.md b/src/internals/Local-Storage.md index fa03fe76..a437c4e9 100644 --- a/src/internals/Local-Storage.md +++ b/src/internals/Local-Storage.md @@ -7,7 +7,7 @@ Local storage is the first version of disk-based storage engine, but has been re A **local** storage is composed of multiple [Cluster](#local-physical-cluster) and [Data Segments](#data-segment). -![](http://www.orientdb.org/images/orientdb-storage.png) +![](http://www.orientdb.dev/images/orientdb-storage.png) ## Local Physical Cluster @@ -39,4 +39,4 @@ The first file is the one that contains the real data. The '0' in the name indic Interaction between components: load record use case: -![](http://www.orientdb.org/images/orientdb-loadrecord.png) +![](http://www.orientdb.dev/images/orientdb-loadrecord.png) diff --git a/src/internals/System-Users.md b/src/internals/System-Users.md index 13331a2f..5a320e25 100644 --- a/src/internals/System-Users.md +++ b/src/internals/System-Users.md @@ -6,13 +6,13 @@ A *server user* is specified in the `` section of the *orientdb-server-co A *database user* resides in each database as an *OUser* record, and its associated roles and permissions apply only to that database. -A third type of user now exists, called a *system user*. A *system user* is similar in concept to a *server user* but resides in the [system database](System-Database.md) as an *OUser* record. Like a *database user*, a *system user* is assigned roles that are comprised of resources and permissions. See [Database Security](http://orientdb.com/docs/last/Database-Security.html). What's unique about a *system user* is that its roles may be specified per-database or against the server, depending on the chosen resource. +A third type of user now exists, called a *system user*. A *system user* is similar in concept to a *server user* but resides in the [system database](System-Database.md) as an *OUser* record. Like a *database user*, a *system user* is assigned roles that are comprised of resources and permissions. See [Database Security](http://orientdb.dev/docs/last/Database-Security.html). What's unique about a *system user* is that its roles may be specified per-database or against the server, depending on the chosen resource. ## Authenticator To support the *system users* a new authenticator has been added, called *OSystemUserAuthenticator*. It is enabled, by default, in the *security.json* configuration file, and has been added in the chain of authenticators. See [New Security Features](../security/Security-OrientDB-New-Security-Features.md). ## Users and Roles -To create new *System users*, they are added to the system database, and the procedure is identical to adding a user as outlined in [Database Security](http://orientdb.com/docs/last/Database-Security.html). +To create new *System users*, they are added to the system database, and the procedure is identical to adding a user as outlined in [Database Security](http://orientdb.dev/docs/last/Database-Security.html). The main difference between a *system user* and a *database user* comes with roles. A role can be created that allows a *system user* to have access to a specific database, multiple databases, or all databases while still supporting the standard database resources (such as *database*, *database.class*, *database.cluster*, *database.command*). diff --git a/src/internals/Transactions.md b/src/internals/Transactions.md index a8b9f761..d98d78cc 100644 --- a/src/internals/Transactions.md +++ b/src/internals/Transactions.md @@ -84,7 +84,7 @@ At operation 7 the client 1 reads the version of y which was written at operatio Transactions are client-side only until the commit. This means that if you're using the "remote" protocol the server can't see local changes. -![Transaction in Remote context](http://www.orientdb.org/images/transaction-remote.png) +![Transaction in Remote context](http://www.orientdb.dev/images/transaction-remote.png) In this scenario you can have different isolation levels with commands. This issue will be solved with OrientDB v3.0 where the transaction will be flushed to the server before to execute the command. diff --git a/src/java/Document-Database.md b/src/java/Document-Database.md index 8baaf607..e7169176 100644 --- a/src/java/Document-Database.md +++ b/src/java/Document-Database.md @@ -35,7 +35,7 @@ orientDB.close(); >For more information, see > ->- Javadoc: [JavaDoc](http://www.orientechnologies.com/javadoc/latest/) +>- Javadoc: [JavaDoc](http://www.orientdb.dev/javadoc/latest/) >- [OrientDB Studio Web tool](../studio/README.md). diff --git a/src/java/Graph-Batch-Insert.md b/src/java/Graph-Batch-Insert.md deleted file mode 100644 index 1f5c5b54..00000000 --- a/src/java/Graph-Batch-Insert.md +++ /dev/null @@ -1,115 +0,0 @@ - -# Graph Batch Insert - -Creating big graphs in OrientDB is a common operation, so OrientDB provides some APIs to make it fast and easy. - - -## Basic use case - -For a basic use case, where your graph fits in the following constraints: - -- a single vertex class -- a single edge class -- vertices are identified by a numeric (Long) id -- no properties on vertices and edges - -OrientDB provides an API called [OGraphBatchInsertBasic]({{ book.javadoc }}/com/orientechnologies/orient/graph/batch/OGraphBatchInsertBasic.html). - -This API is designed for fast batch import of simple graphs, starting from an empty (or non existing) DB. - -These limitations are intended to have best performance on a very simple use case. If these limitations do not fit your requirements you can rely on other implementations. - - -### Typical usage: - -``` - OGraphBatchInsertSimple batch = new OGraphBatchInsertSimple("plocal:your/db", "admin", "admin"); - batch.begin(); - batch.createEdge(0L, 1L); - batch.createEdge(0L, 2L); - ... - batch.end(); - ``` - -There is no need to create vertices before connecting them: - -``` - batch.createVertex(0L); - batch.createVertex(1L); - batch.createEdge(0L, 1L); - ``` - -is equivalent to (but less performing than): - - -``` - batch.createEdge(0L, 1L); -``` - -`batch.createVertex()` is needed only if you want to create unconnected vertices. - - -## Slightly more complex use case - -For a use case, where your graph fits in the following constraints: - -- a single vertex class -- a single edge class -- vertices are identified by a numeric (Long) id -- edges and/or vertices have properties - -OrientDB provides an API called [OGraphBatchInsert]({{ book.javadoc }}/com/orientechnologies/orient/graph/batch/OGraphBatchInsert.html). - -This API is designed for fast batch import of simple graphs, starting from an empty (or non existing) DB. - -This batch insert procedure is made of four phases, that have to be executed in the correct order: - - 1. begin(): initializes the database - 2. create edges (with or without properties) and vertices - 3. set properties on vertices - 4. end(): flushes data to db - - -### Typical usage: - -``` -OGraphBatchInsert batch = new OGraphBatchInsert("plocal:your/db", "admin", "admin"); - -//phase 1: begin -batch.begin(); - -//phase 2: create edges -Map edgeProps = new HashMap(); -edgeProps.put("foo", "bar"); -batch.createEdge(0L, 1L, edgeProps); -batch.createVertex(2L); -batch.createEdge(3L, 4L, null); -... - -//phase 3: set properties on vertices, THIS CAN BE DONE ONLY AFTER EDGE AND VERTEX CREATION -Map vertexProps = new HashMap(); - vertexProps.put("foo", "bar"); -batch.setVertexProperties(0L, vertexProps); -... - -//phase 4: end -batch.end(); -``` - -There is no need to create vertices before connecting them: - -``` - batch.createVertex(0L); - batch.createVertex(1L); - batch.createEdge(0L, 1L, props); -``` - -is equivalent to (but less performing than): - -``` - batch.createEdge(0L, 1L, props); -``` - -`batch.createVertex(Long)` is needed only if you want to create unconnected vertices. - - diff --git a/src/java/Graph-Blueprints.md b/src/java/Graph-Blueprints.md deleted file mode 100644 index 560c1cb5..00000000 --- a/src/java/Graph-Blueprints.md +++ /dev/null @@ -1,236 +0,0 @@ - -# Using the Blueprints Extensions - -OrientDB is a graph database that merges graph, document and object-oriented worlds together. Below are some of the features exclusive to OrientDB through the Blueprints Extensions. - ->For information on tuning your graph database, see [Performance Tuning Blueprints](../tuning/Performance-Tuning-Graph.md). - -## Custom Types - -OrientDB supports custom types for vertices and edges in an Object Oriented manner. This feature is not supported directly through Blueprints, but there is a way to implement them. If you want to create a schema to work with custom types, see [Graph Schema](Graph-Schema.md). - -Additionally, OrientDB introduces a few variants to Blueprint methods for working with types. - -### Creating Vertices and Edges in Specific Clusters - -By default, each class has one cluster with the same name. You can add multiple clusters to the class, allowing OrientDB to write vertices and edges on multiple files. - -For instance, - -```java -// SAVE THE VERTEX INTO THE CLUSTER 'PERSON_USA' -// ASSIGNED TO THE NODE 'USA' -graph.addVertex("class:Person,cluster:Person_usa"); -``` - -### Retrieving Vertices and Edges by Type - -To retrieve all vertices of the `Person` class, use the special `getVerticesOfClass(String className)` method. - -For instance, - -```java -for (Vertex v : graph.getVerticesOfClass("Person")) { - System.out.println(v.getProperty("name")); -} -``` - -Here, it retrieves all vertices of the class `Person` as well as all sub-classes. It does this because OrientDB uses polymorphism by default. If you would like to retrieve only those vertices of the `Person` class, excluding sub-types, use the `getVerticesOfClass(String className, boolean polymorphic)` method, specifying `false` in the `polymorphic` argument. For instance, - -```java -for (Vertex v : graph.getVerticesOfClass("Person", false)) { - System.out.println(v.getProperty("name")); -} -``` - -You can also use variations on these with the `.getEdges()` method: - -- `getEdgesOfClass(String className)` -- `getEdgesOfClass(String, className, boolean polymorphic)` - -## Ordered Edges - -By default, OrientDB uses a set to handle edge collection. But, sometimes it's better to have an ordered list to access the edge by an offset. - -- For instance, - - ```java - person.createEdgeProperty(Direction.OUT, "Photos").setOrdered(true); - ``` - -- Whenever you access the edge collection, it orders the edges. Consider the example below, which prints all photos in the database in an ordered way: - - ```java - for (Edge e : loadedPerson.getEdges(Direction.OUT, "Photos")) { - System.out.println( "Photo name: " + e.getVertex(Direction.IN).getProperty("name") ); - } - ``` - -- To access the underlying edge list, you need to use the Document Database API. Consider this example, which swaps the tenth photo with the last: - - ```java - // REPLACE EDGE Photos - List photos = loadedPerson.getRecord().field("out_Photos"); - photos.add(photos.remove(9)); - ``` -- You can get the same result through SQL by executing the following commands in the terminal: - -
-  orientdb> CREATE PROPERTY out_Photos LINKLIST
-  orientdb> ALTER PROPERTY User.out_Photos CUSTOM ORDERED=TRUE
-  
- -## Detached Elements - -When working with web applications, it is very common to query elements and render them to the user, allowing them to apply changes. - -Consider what happens when the user changes some fields and saves. Previously, the developer had to track the changes in a separate structure, load the vertex or edge from the database, and then apply the changes to the element. Beginning in version 1.7 OrientDB, there are two new methods in the Graph API on the `OrientElement` and `OrientBaseGraph` classes: - -- `OrientElement.detach()` and `OrientBaseGraph.detach(OrientElement)` methods fetch all record content in memory and resets the connection to the Graph instance. -- `OrientElement.attach()` and `OrientBaseGraph.attach(OrientElement)` methods save the detached element back into the database and restores the connection between the Graph Element and the Graph instance. - -For instance, to use these begin by loading a vertex and detaching it: - -```java -OrientGraph g = OrientGraph("plocal:/temp/db"); -try { - Iterable results = g.query().has("name", EQUALS, "fast"); - for (OrientVertex v : results) - v.detach(); -} finally { - g.shutdown(); -} -``` - -Update the element, either from the GUI or by application: - -```java -v.setProperty("name", "super fast!"); -``` - -When the user saves, re-attach the element and save it to the database: - -```java -OrientGraph g = OrientGraph("plocal:/temp/db"); -try { - v.attach(g); - v.save(); -} finally { - g.shutdown(); -} -``` - -### FAQ - -**Do `detach()` methods work recursively to detach all connected elements?** -No, it only works on the current element. - -**Can you add an edge against detached elements?** -No, you can only get, set or remove a property while it's detached. Any other operation that requires the database it throws an `IllegalStateException` exception. - -## Executing Commands - -The OrientDB Blueprints implementation allows you to execute commands using SQL, JavaScript and all other supported languages. - -### SQL Queries - -It is possible to have parameters in a query using [prepared queries](Document-API-Documents.md#prepared-queries). - -```java -for (Vertex v : (Iterable) graph.command(new OCommandSQL( - "SELECT EXPAND( out('bought') ) FROM Customer WHERE name = 'Jay'")).execute()) { - System.out.println("- Bought: " + v); -} -``` - -To execute an asynchronous query: - -```java -graph.command( - new OSQLAsynchQuery("SELECT FROM Member", - new OCommandResultListener() { - int resultCount =0; - @Override - public boolean result(Object iRecord) { - resultCount++; - Vertex doc = graph.getVertex( iRecord ); - return resultCount < 100; - } - } ).execute(); -``` - -### SQL Commands - -In addition to queries, you can also execute any SQL command, such as [`CREATE VERTEX`](../sql/SQL-Create-Vertex.md), [`UPDATE`](../sql/SQL-Update.md), or [`DELETE VERTEX`](../sql/SQL-Delete-Vertex.md). For instance, consider a case where you want to set a new property called `local` to `true` on all the customers that live in Rome. - -```java -int modified = graph.command( - new OCommandSQL("UPDATE Customer SET local = true WHERE 'Rome' IN out('lives').name")).execute()); -``` - -If the command modifies the schema, (such as in cases like [`CREATE CLASS`](../sql/SQL-Create-Class.md), [`ALTER CLASS`](../sql/SQL-Alter-Class.md), [`DROP CLASS`](../sql/SQL-Drop-Class.md), [`CREATE PROPERTY`](../sql/SQL-Create-Property.md), [`ALTER PROPERTY`](../sql/SQL-Alter-Property.md), and [`DROP PROPERTY`](../sql/SQL-Drop-Property.md), remember you need to force the schema update of the database instance you're using by calling the `.reload()` method. - -```java -graph.getRawGraph().getMetadata().getSchema().reload(); -``` - ->For more information, see [SQL Commands](../sql/SQL-Commands.md) - -### SQL Batch - -To execute multiple SQL commands in a batch, use the `OCommandScript` and SQL as the language. This is recommended when creating edges on the server-side, to minimize the network roundtrip. - -```java -String cmd = "BEGIN;"; -cmd += "LET a = CREATE VERTEX SET script = true;"; -cmd += "LET b = SELECT FROM V LIMIT 1;"; -cmd += "LET e = CREATE EDGE FROM $a TO $b RETRY 100;"; -cmd += "COMMIT;"; -cmd += "return $e;"; - -OIdentifiable edge = graph.command(new OCommandScript("sql", cmd)).execute(); -``` - ->For more information, see [SQL Batch](../sql/SQL-batch.md) - -### Database Functions - -To execute database functions, you must write it in JavaScript or any other supported languages. For the examples, consider a function called `updateAllTheCustomersInCity(cityName)` that executes the same update as above. Note the `'Rome'` attribute passed in the `execute()` method: - -```java -graph.command(new OCommandFunction( - "updateAllTheCustomersInCity")).execute("Rome")); -``` - -### Executing Code - -To execute code on the server side, you can select between the supported language, (which by default is JavaScript): - -```java -graph.command( - new OCommandScript("javascript", "for(var i=0;i<10;++i){ print('\nHello World!'); }")).execute()); -``` - -This prints the line "Hello World!" ten times in the server console, or in the local console, if the database has been opened in PLocal mode. - -## Accessing the Graph - -The TinkerPop Blueprints API is quite raw and doesn't provide ad hoc methods for very common use cases. To get around this, you may need to access the `ODatabaseGraphTx` object to extend what you can do through the underlying graph engine. Common operations are: -- Counting incoming and outgoing edges without browsing them. -- Getting incoming and outgoing vertices without browsing the edges. -- Executing a query using an SQL-like language integrated in the engine. - -The [`OrientGraph`]({{ book.javadoc }}/com/tinkerpop/blueprints/impls/orient/OrientGraph.html) class provides the method `.getRawGraph()` to return the underlying Document database. For instance, - -```java -final OrientGraph graph = new OrientGraph("plocal:C:/temp/graph/db"); -try { - OResultSet result = graph.getRawGraph().query("SELECT FROM V WHERE color = 'red'"); -} finally { - graph.shutdown(); -} -``` - -### Security - -If you want to use OrientDB security, use the construction that retrieves the Database URL, user and password. For more information on OrientDB security, see [Security](../security/Security.md). By default, it uses the `admin` user. diff --git a/src/java/Graph-Consistency.md b/src/java/Graph-Consistency.md deleted file mode 100644 index 504a3968..00000000 --- a/src/java/Graph-Consistency.md +++ /dev/null @@ -1,64 +0,0 @@ - - -# Graph Consistency - -Before OrientDB v2.1.7, the graph consistency could be assured only by using transactions. The problems with using transactions for simple operations like creation of edges are: - -- **speed**, the transaction has a cost in comparison with non-transactional operations -- management of **optimistic retry** at application level. Furthermore, with 'remote' connections this means high latency -- **low scalability on high concurrency** (this will be resolved in OrientDB v3.0, where commits will not lock the database anymore) - -As of v2.1.7, OrientDB provides a new mode to manage graphs without using transactions. It uses the Java class `OrientGraphNoTx` or via SQL by changing the global setting `sql.graphConsistencyMode` to one of the following values: -- `tx`, the default, uses transactions to maintain consistency. This was the only available setting before v2.1.7 -- `notx_sync_repair`, avoids the use of transactions. Consistency, in case of a JVM crash, is guaranteed through a database repair operation, which runs at startup in synchronous mode. The database cannot be used until the repair is finished. -- `notx_async_repair`, also avoids the use of transactions. Consistency, in case of JVM crash, is guaranteed through a database repair operation, which runs at startup in asynchronous mode. The database can be used immediately, as the repair procedure will run in the background. - -Both the new modes `notx_sync_repair` and `notx_async_repair` will manage conflicts automatically, with a configurable RETRY (default=50). In case changes to the graph occur concurrently, any conflicts are caught transparently by OrientDB and the operations are repeated. The operations that support the auto-retry are: - -- `CREATE EDGE` -- `DELETE EDGE` -- `DELETE VERTEX` - -## Usage - -To use consistency modes that don't use transactions, set the `sql.graphConsistencyMode` global setting to `notx_sync_repair` or `notx_async_repair` in OrientDB `bin/server.sh` script or in the `config/orientdb-server-config.xml` file under properties section. Example: - -```xml -... - - ... - - ... - -``` - -The same could be set by code, before you open any Graph. Example: - -```java -OGlobalConfiguration.SQL_GRAPH_CONSISTENCY_MODE.setValue("notx_sync_repair"); -``` - -To make this setting persistent, set the `txRequiredForSQLGraphOperations` property in the storage configuration, so during the following opening of the Graph, you don't need to set the global setting again: - -```java -g.getRawGraph().getStorage().getConfiguration().setProperty("txRequiredForSQLGraphOperations", "false"); -``` - - -### Usage via Java API -In order to use non-transactional graphs, after having configured the consistency mode (as above), you can now work with the `OrientGraphNoTx` class. Example: - -```java -OrientGraphNoTx g = new OrientGraphNoTx("plocal:/temp/mydb"); -... -v1.addEdge( "Friend", v2 ); -``` - -Concurrent threads that change the graph will retry the graph change in case of concurrent modification (MVCC). The default value for maximum retries is 50. To change this value, call the `setMaxRetries()` API: - -```java -OrientGraphNoTx g = new OrientGraphNoTx("plocal:/temp/mydb"); -g.setMaxRetries(100); -``` - -This setting will be used on the active graph instance. You can have multiple threads, which work on the same graph by using multiple graph instances, one per thread. Each thread can then have different settings. It's also allowed to work with threads, which use transactions (`OrientGraph` class) and to work with concurrent threads, which don't use transactions. diff --git a/src/java/Graph-Database-Tinkerpop.md b/src/java/Graph-Database-Tinkerpop.md deleted file mode 100644 index bfb0fc95..00000000 --- a/src/java/Graph-Database-Tinkerpop.md +++ /dev/null @@ -1,193 +0,0 @@ - -# Graph API - -> GroupId: **com.orientechnologies** ArtifactId: **orientdb-graphdb** - - -## Introduction - -[Tinkerpop](http://www.tinkerpop.com) provides a complete stack to handle Graph Databases: -- [**Blueprints**](http://wiki.github.com/tinkerpop/blueprints) Provides a collection of interfaces and implementations to common, complex data structures. - - In short, Blueprints provides a one-stop shop for implemented interfaces to help developers create software without getting tied down to the particular, underlying data management systems. -- [**Pipes**](http://pipes.tinkerpop.com) Provides a graph-based data flow framework for Java 1.6+. - - Process graphs are composed of a set of process vertices connected to one another by a set of communication edges. Pipes supports the splitting, merging, and transformation of data from input to output/ -- [**Gremlin**](http://wiki.github.com/tinkerpop/gremlin) Provides a Turing-complete graph-based programming language designed for key/value pairs in multi-relational graphs. Gremlin makes use of an XPath-like syntax to support complex graph traversals. This language has applications in the areas of graph query, analysis, and manipulation. -- [**Rexster**](http://rexster.tinkerpop.com) Provides a RESTful graph shell that exposes any Blueprints graph as a standalone server. - - Extensions support standard traversal goals such as search, score, rank, and (in concert) recommendation. Rexster makes extensive use of Blueprints, Pipes, and Gremlin. In this way it's possible to run Rexster over various graph systems. to configure Rexster to work with OrientDB, see the guide [Rexster Configuration](../plugins/Rexster.md). -- [**Sail Ouplementation**](https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation) Provides support for using OrientDB as an RDF Triple Store. - -## Getting Started with Blueprints - -OrientDB supports three different kinds of storages, depending on the [Database URL](../datamodeling/Concepts.md#database-url) used: - -- **Persistent Embedded Graph Database**: Links to the application as a JAR, (that is, with no network transfer). Use [PLocal](../internals/Paginated-Local-Storage.md) with the `plocal` prefix. For instance, `plocal:/tmp/graph/test`. -- **In-Memory Embedded Graph Database**: Keeps all data in memory. Use the `memory` prefix, for instance `memory:test`. -- **Persistent Remote Graph Database** Uses a binary protocol to send and receive data from a remote OrientDB server. Use the `remote` prefix, for instance `remote:localhost/test` Note that this requires an OrientDB server instance up and running at the specific address, (in this case, localhost). Remote databases can be persistent or in-memory as well. - -In order to use the Graph API, you need to create an instance of the [`OrientGraph`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientGraph.html) class. The constructor receives a [Database URL](../datamodeling/Concepts.md#database-url) that is the location of the database. If the database already exists, the Graph API opens it. If it doesn't exist, the Graph API creates it. - ->**NOTE**: When creating a database through the Graph API, you can only create PLocal and Memory databases. Remote databases must already exist. - ->**NOTE**: In v. 2.2 and following releases, when using PLocal or Memory,please set MaxDirectMemorySize (JVM setting) to a high value, like 512g ``` -XX:MaxDirectMemorySize=512g ``` - -When building multi-threaded application, use one instance of [`OrientGraph`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientGraph.html) per thread. Bear in mind that all graph components, such as vertices and edges, are not thread safe. So, sharing them between threads may result in unpredictable results. - -Remember to always close the graph instance when you are done with it, using the `.shutdown()` method. For instance: - -```java -OrientGraph graph = new OrientGraph("plocal:C:/temp/graph/db"); -try { - ... -} finally { - graph.shutdown(); -} -``` - -### Using the Factory - -Beginning with version 1.7, OrientDB introduces the [`OrientGraphFactory`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientGraphFactory.html) class as new method for creating graph database instances through the API. - -```java -// AT THE BEGINNING -OrientGraphFactory factory = new OrientGraphFactory("plocal:/tmp/graph/db").setupPool(1,10); - -// EVERY TIME YOU NEED A GRAPH INSTANCE -OrientGraph graph = factory.getTx(); -try { - ... - -} finally { - graph.shutdown(); -} -``` - ->For more information, see [Graph Factory](Graph-Factory.md). - - -## Transactions - -Prior to version 2.1.7, whenever you modify the graph database instance, OrientDB automatically starts an implicit transaction, in the event that no previous transactions are running. When you close the graph instance, it commits the transaction automatically by calling the `.shutdown()` method or through `.commit()`. This allows you to roll changes back where necessary, using the `.rollback()` method. - -Beginning in version 2.1.8, you can set the [Consistency Level](Graph-Consistency.md). Changes within the transaction remain temporary until the commit or the closing of the graph database instance. Concurrent threads or external clients can only see the changes after you fully commit the transaction. - -For instance, - -```java -try{ - Vertex luca = graph.addVertex(null); // 1st OPERATION: IMPLICITLY BEGINS TRANSACTION - luca.setProperty( "name", "Luca" ); - Vertex marko = graph.addVertex(null); - marko.setProperty( "name", "Marko" ); - Edge lucaKnowsMarko = graph.addEdge(null, luca, marko, "knows"); - graph.commit(); -} catch( Exception e ) { - graph.rollback(); -} -``` - -By surrounding the transaction in `try` and `catch`, you ensure that any errors that occur roll the transaction back to its previous state for all relevant elements. For more information, see [Concurrency](../general/Concurrency.md). - ->**NOTE**: Prior to version 2.1.7, to work with a graph always use transactional [`OrientGraph`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientGraph.html) instances and never the non-transactional instances to avoid graph corruption from multi-threaded updates. -> -> Non-transactional graph instances are created with -> ->```java ->OrientGraphNoTx graph = factor.getNoTx(); ->``` -> ->This instance is only useful when you don't work with data, but want to define the [database schema](Graph-Schema.md) or for [bulk inserts](#using-non-transactional-graphs). - -### Optimistic Transactions - -OrientDB supports optimistic transactions. This means that no lock is kept when a transaction runs, but at commit time each graph element version is checked to see if there has been an update by another client. - -For this reason, write your code to handle the concurrent updating case: - - -```java -for (int retry = 0; retry < maxRetries; ++retry) { - try { - // LOOKUP FOR THE INVOICE VERTEX - Iterable invoices = graph.getVertices("invoiceId", 2323); - Vertex invoice = invoices.iterator().next(); - - // CREATE A NEW ITEM - Vertex invoiceItem = graph.addVertex("class:InvoiceItem"); - invoiceItem.field("price", 1000); - // ADD IT TO THE INVOICE - invoice.addEdge(invoiceItem); - graph.commit(); - - // OK, EXIT FROM RETRY LOOP - break; - } catch( ONeedRetryException e ) { - // SOMEONE HAVE UPDATE THE INVOICE VERTEX AT THE SAME TIME, RETRY IT - } -} -``` - -### Using Non-Transactional Graphs - -In cases such as massive insertions, you may find the standard transactional graph `OrientGraph` is too slow for your needs. You can speed the operations up by using the non-transactional `OrientGraphNoTx` graph. - -With the non-transactional graph, each operation is *atomic* and it updates data on each operation. When the method returns, the underlying storage updates. This works best for bulk inserts and massive operations, or for schema definitions. - ->**NOTE**: Using non-transactional graphs may cause corruption in the graph in cases where changes are made through multiple threads at the same time. It is recommended that you only use non-transactional graph instances for single-threaded operations. - -## Graph Configuration - -Beginning in version 1.6 of OrientDB, you can configure the graph by setting all of its properties during construction: - -- **`blueprints.orientdb.url`** Defines the database URL. -- **`blueprints.orientdb.username`** Defines the username - - Default: `admin` -- **`blueprints.orientdb.password`** Defines the user password. - - Default: `admin` -- **`blueprints.orientdb.saveOriginalIds`** Defines whether it saves the original element ID's by using the property `id`. You may find this useful when importing a graph to preserve original ID's. - - Default: `false` -- **`blueprints.orientdb.keepInMemoryReferences`** Defines whether it avoids keeping records in memory, by using only Record ID's. - - Default: `false` -- **`blueprints.orientdb.useCustomClassesForEdges`** Defines whether it uses the edge label as the OrientDB class. If the class doesn't exist, it creates it for you. - - Default: `true` -- **`blueprints.orientdb.useCustomClassesForVertex`** Defines whether it uses the vertex label as the OrientDB class. If the class doesn't exist, it creates it for you. - - Default: `true` -- **`blueprints.orientdb.useVertexFieldsForEdgeLabels`** Defines whether it stores the edge relationship in the vertex by using the edge class. This allows you to use multiple fields and makes traversals by the edge label (class) faster. - - Default: `true` -- **`blueprints.orientdb.lightweightEdges`** Defines whether it uses [Lightweight Edges](Lightweight-Edges.md). This allows you to avoid creating a physical document per edge. Documents are only created when edges have properties. - - Default: `false` -- **`blueprints.orientdb.autoStartTx`** Defines whether it auto-starts transactions when the graph is changed by adding or removing vertices, edges and properties. - - Default: `true` - -## Using Gremlin - -You can also use the Gremlin language with OrientDB. To do so, initialize it, using `OGremlinHelper`: - -```java -OGremlinHelper.global().create() -``` - ->For more information on Gremlin usage, see: -> ->- [How to use the Gremlin language with OrientDB](../gremlin/Gremlin.md) ->- [Getting started with Gremlin](http://github.com/tinkerpop/gremlin/wiki/Getting-Started) ->- [Usage of Gremlin through HTTP/RESTful API using the Rexter project](https://github.com/tinkerpop/rexster/wiki/Using-Gremlin). - - -## Multi-Threaded Applications - -In order to use the OrientDB Graph API with multi-threaded applications, you must use one `OrientGraph` instance per thread. - -For more information about multi-threading look at [Java Multi Threading](Java-Multi-Threading.md). Bear in mind, graph components (such as, Vertices and Edges) are not thread-safe. Sharing them between threads could cause unpredictable errors. - diff --git a/src/java/Graph-Factory.md b/src/java/Graph-Factory.md deleted file mode 100644 index 4f3f023a..00000000 --- a/src/java/Graph-Factory.md +++ /dev/null @@ -1,82 +0,0 @@ - -# Graph Factory - -The [TinkerPop Blueprints](https://github.com/tinkerpop/blueprints/wiki) standard does not implement a proper "factory" method for creating and pooling Graph Database instances. In applications based on OrientDB, you may occasionally encounter legacy workarounds that attempt to implement this feature by mixing the Graph and Document API's. - -With the introduction of the `OrientGraphFactory` class, managing graphs is much simpler. - -- By default, the class acts as a factory, creating new Graph Database instances every time. -- You can configure it to work as a pool, recycling Graph Database instances as need. -- When running in PLocal mode, if the database itself doesn't exist, the class creates it for you. -- It returns both transactional and non-transactional Graph Database instances. -- When you call the `shutdown()` method, it returns the pooled instance so that you can reuse the pool. - -## Using Graph Factories - -Using a Graph Factory in your application is relatively straightforward. First, create and configure a factory instance using the `OrientGraphFactory` class. Then, use the factory whenever you need to create an `OrientGraph` instance and shut it down to return it to the pool. When you're done with the factory, close it to release all instances and free up system resources. - - -### Creating Factories - -The basic way to create the factory with the default user `admin`, (which passes the password `admin`, by default): - -```java -OrientGraphFactory factory = new OrientGraphFactory("plocal:/temp/mydb"); -``` - -In the event that you have implemented basic security housekeeping on your database, like changing the default `admin` password or if you want to use a different user, you can pass the username and password as arguments to `OrientGraphFactory`: - -```java -OrientGraphFactory factory = new OrientGraphFactory("plocal:/temp/mydb", "jayminer", "amigarocks"); -``` - -#### Recycling Pools - -In addition to creating new Graph Database instances, the factory can also create recyclable pools, by using the `setPool()` method: - -```java -OrientGraphFactory factory = new OrientGraphFactory("plocal:/temp/mydb").setupPool(1, 10); -``` - -This sets the pool up to use a minimum of 1 and a maximum of 10 Graph Database instances. - -### Using Graph Instances - -Once you create and configure the factory, you can get the Graph Database instance to start using it with your application. OrientDB provides three methods for getting this instance. Which you use depends on preference and whether you want a transactional instance. - -- To retrieve a transactional instance, use the `getTx()` method on your factory object: - - ```java - OrientGraph txGraph = factory.getTx(); - ``` - -- To retrieve a non-transactional instance, use the `getNoTx()` method on your factory object: - - ```java - OrientGraphNoTx noTxGraph = factory.getNoTx(); - ``` -- Alternatively, if you plan to get several Graph Database instances of the same type, you can use the `setTransactional()` method to define the kind you want, then use the `get()` method for each instance you retrieve: - - ```java - factory.setTransactional(false); - OrientGraphNoTx noTxGraph = (OrientGraphNoTx) factory.get(); - ``` - -### Shutting Down Graph Instances - -When you're done with a Graph Database instance, you can return it to the pool by calling the `shutdown()` method on the instance. This method does not close the instance. The instance remains open and available for the next requester: - -```java -graph.shutdown(); -``` - -### Releasing the Graph Factory - -When you're ready to release all instances, call the `close()` method on the factory. In the case of pool usage, this also frees up the system resources claimed by the pool: - -```java -factory.close(); -``` - - - diff --git a/src/java/Graph-Schema-Class.md b/src/java/Graph-Schema-Class.md deleted file mode 100644 index cfb6461c..00000000 --- a/src/java/Graph-Schema-Class.md +++ /dev/null @@ -1,94 +0,0 @@ - -# Classes in the Graph Database - -Classes are a concept drawn from the Object-Oriented Programming paradigm. OrientDB defines it as a record-type. In the Relational Model, it is nearest the concept of the table. Classes can be schema-less, schema-full or mixed. Classes can inherit from another class, shaping a tree of classes. Due to inheritance, the subclass extends the parent class, inheriting all the attributes as though they were its own. - -Each class has one cluster defined as its default cluster, but it can support multiple clusters. In this case by default, OrientDB writes new records in the default cluster, but reads always occur on defined clusters. When you create a new class, it creates a default physical cluster with the same name as the class, changed to lowercase. - -In Graph Databases, the structure follows tow classes: `V` as the base class for vertices and `E` as the base class for edges. OrientDB builds these classes automatically when you create the graph database. In the event that you don't have these classes, create them, (see below). - - -## Working with Vertex and Edge Classes - -While you can build graphs using `V` and `E` class instances, it is strongly recommended that you create custom types for vertices and edges. - -To create a custom vertex class (or type) use the `createVertexType()`: - -```java -// Create Custom Vertex Class -OrientVertexType account = graph.createVertexType("Account"); -``` - -To create a vertex of that class `Account`, pass a string with the format `"class:"`: - -```java -// Add Vertex Instance -Vertex v = graph.addVertex("class:Account"); -``` - -In Blueprints, edges have the concept of labels used in distinguishing between edge types. OrientDB binds the concept of edge labels to edge classes. There is a similar method in creating custom edge types, using `createEdgeType(, ); // Vertex -graph.createEdgeType(, ); // Edge -``` - -For instance, create the base class `Account`, then create two subclasses: `Provider` and `Customer`: - -```java -// Create Vertex Base Class -graph.createVertexType("Account"); - -// Create Vertex Subclasses -graph.createVertexType("Customer", "Account"); -graph.createVertexType("Provider", "Account"); -``` - - -## Retrieve Types - -Classes are polymorphic. If you search for generic vertices, you also receive all custom vertex instances: - -```java -// Retrieve Vertices -Iterable allVertices = graph.getVertices(); -``` - -To retrieve custom classes, use the `getVertexType()` and the `getEdgeType` methods. For instance, retrieving from the `graph` database instance: - -```java -OrientVertexType accountVertex = graph.getVertexType("Account"); -OrientEdgeType livesEdge = graph.getEdgeType("Lives"); -``` - -## Drop Persistent Types - -To drop a persistent class, use the `dropVertexType()` and `dropVertexType()` methods. For instance, dropping from the `graph` database instance: - -```java -graph.dropVertexType("Address"); -graph.dropEdgeType("Lives"); -``` diff --git a/src/java/Graph-Schema-Property.md b/src/java/Graph-Schema-Property.md deleted file mode 100644 index 8dec93e8..00000000 --- a/src/java/Graph-Schema-Property.md +++ /dev/null @@ -1,118 +0,0 @@ - -# Graph Database Properties - -Fields in classes are called properties. In this guide, you can consider properties synonymous with fields. - - -## Working with Properties - -In order to use properties in your application, you first need to create the class and set an instance. Once you have the class set, you can begin to work with properties on that class. - - -### Creating Properties - -You can define properties for that class. For instance, - -```java -// Retrieve Vertex -OrientVertexType accountVertex = graph.getVertexType("Account"); - -// Create Properties -accountVertex.createProperty("id", OType.INTEGER); -accountVertex.createProperty("birthDate", OType.DATE); -``` - -Bear in mind, each field must belong to a [Type](../general/Types.md). - -### Dropping Properties - -To drop a persistent class property, use the [`OClass.dropProperty()`](ref/OClass/dropProperty.md) method. For instance, - -```java -accountVertex.dropProperty("name"); -``` - -This drops the property `name`. OrientDB does not remove dropped properties from the record unless you delete them explicitly using the SQL [`UPDATE`](../sql/SQL-Update.md) command with the `REMOVE` clause. - -```java -// Drop the Property -accountVertex.dropProperty("name"); - -// Remove the Records -database.command(new OCommandSQL("UPDATE Account REMOVE name").execute(); -``` - -## Using Constraints - -| | | -|----|-----| -|![](../images/warning.png)| Using constraints with a distributed database may cause unexpected results. Some operations execute in two steps: create and update, such as when creating an edge and then updating the vertex. Constraints like `MANDATORY` and `NOTNULL` against fields would fail on distributed databases during the creation phase.| - -OrientDB supports a number of constraints for each field: - -| Constraint | Method | Description | -|---|---|---| -| **Minimum Value** | `setMin()` | Defines the minimum value. Property accepts strings and also works on date ranges.| -| **Maximum Value** | `setMax()` | Defines the maximum value. Property accepts strings and also works on date ranges.| -| **Mandatory** | `setMandatory()` | Defines whether the property must be specified. | -| **Read Only** | `setReadonly()` | Defines whether you can update the property after creating the record.| -| **Not Null** | `setNotNull()` | Defines whether the property accepts null values.| -| **Unique** | | Defines whether the property must be unique.| -| **Regex** | | Defines whether the property must satisfy a Regular Expressions value.| -| **Ordered** | `setOrdered()` | Defines whether the edge list must be ordered, ensuring that a `List` is not used in place of a `Set`.| - -For example, - -```java -// Create Unique Nickname -profile.createProperty("nick", OType.STRING).setMin("3").setMax("30") - .setMandatory(true).setNotNull(true); -profile.createIndex("nickIdx", OClass.INDEX_TYPE.UNIQUE, "nick"); - -// Create User Properties -profile.createProperty("name", OType.STRING).setMin("3").setMax("30"); -profile.createProperty("surname", OType.STRING).setMin("3").setMax("30"); -profile.createProperty("registeredOn", OType.DATE).setMin("2010-01-01 00:00:00"); -profile.createProperty("lastAccessOn", OType.DATE).setMin("2010-01-01 00:00:00"); -``` - -### Indexes as Constraints - -In order to set the property value to unique, use the `UNIQUE` index as a constraint by passing a `Parameter` object with the key `type`. For instance, - -```java -graph.createKeyIndex("id", Vertex.class, new Parameter("type", "UNIQUE")); -``` - -OrientDB applies this constraint to all vertex and subclass instances. To specify an index against a custom type, use the `class` parameter. - -```java -graph.createKeyIndex("name", Vertex.class, new Parameter("class", "Member")); -``` - -You can also define a unique index against a custom type: - -```java -graph.createKeyIndex("id", Vertex.class, new Parameter("type", "UNIQUE"), - new Parameter("class", "Member")); -``` - -You can then retrieve a vertex or an edge by key prefixing the class name to the field. For instance, using the about `Member.name` in place of only `name`, which allows you to use the index created against the filed `name` in the class `Member`. - -```java -for( Vertex v : graph.getVertices("Member.name", "Jay")) { - System.out.println("Found vertex: " + v) -} -``` - -If the class name is not passed, then it uses `V` for the vertices and `E` for edges. - -```java -graph.getVertices("name", "Jay"); -graph.getEdges("age", 20); -``` ->For more information, see -> ->- [Indexes](../indexing/Indexes.md) ->- [Graph Schema](Graph-Schema.md) ->- [Graph Database](Graph-Database-Tinkerpop.md) diff --git a/src/java/Graph-Schema.md b/src/java/Graph-Schema.md deleted file mode 100644 index f8c1e3b9..00000000 --- a/src/java/Graph-Schema.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Graph Schema - -In OrientDB you can use a Graph Database in schema-less mode, or you can enforce strict data model through a schema. When using a schema, you can use it on all data or only define constraints on certain fields, allowing users to add custom fields to records. - -The schema mode you use is defined at a class-level. So, for instance you might have a class `Employee` that is schema-full with a class `EmployeeInformation` that is schema-less. - -- **Schema-Full**: Enables the strict-mode at a class level and sets all fields to mandatory. -- **Schema-Less**: Creates classes with no properties. By default, this is non-strict-mode, allowing records to have arbitrary fields. -- **Schema-Hybrid**: Creates classes and defines some of the fields, while leaving the records to define custom fields. Sometimes, this is also called **Schema-Hybrid**. - ->**NOTE**: Bear in mind that any changes you make to the class schema are not transactional. You must execute them outside of a transaction. - -To access the schema, you can use either [SQL](../sql/SQL-Metadata.md#querying-the-schema) or the API. The examples in the following pages use the Java API. - -- [**Graph Database Classes**](Graph-Schema-Class.md) -- [**Graph Database Properties**](Graph-Schema-Property.md) - ->For more information, see [Blog: Using Schema with Graphs](http://orientechnologies.blogspot.it/2013/08/orientdb-using-schema-with-graphs.html) - diff --git a/src/java/Graph-VE.md b/src/java/Graph-VE.md deleted file mode 100644 index ca76d639..00000000 --- a/src/java/Graph-VE.md +++ /dev/null @@ -1,233 +0,0 @@ - -# Vertices and Edges - -Similar to the Console interface, you can also create, manage and control vertices and edges through the Graph API. - - -## Vertices - -To create a new vertex in the current Graph Database instance, call the [`Vertex OrientGraph.addVertex(Object id)`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.html#addVertex(java.lang.Object) method. Note that this ignores the `id` parameter, given that the OrientDB implementation assigns a unique ID once it creates the vertex. To return the unique ID, run the [`Vertex.getId()`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#getId() method on the object. - -For instance, - -```java -Vertex v = graph.addVertex(null); -System.out.println("Created vertex: " + v.getId()); -``` - -### Retrieving Vertices - -To retrieve all vertices on the object, use the `getVertices()` method. For instance, - -```java -for (Vertex v : graph.getVertices()) { - System.out.println(v.getProperty("name")); -} -``` - -To lookup vertices by a key, call the `getVertices()` method by passing the field name and the value to match. Remember that in order to use indexes, you should use the "class" dot (.) "property name" as field name. Example: - -```java -for( Vertex v : graph.getVertices("Account.id", "23876JS2") ) { - System.out.println("Found vertex: " + v ); -} -``` - -To know more about how to define indexes look at: [Using Graph Indexes](http://orientdb.com/docs/last/Performance-Tuning-Graph.html#use-indexes-to-lookup-vertices-by-an-id). - -### Removing Vertices - -To remove a vertex from the current Graph Database, call the [`OrientGraph.removeVertex(Vertex vertex)`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.html#removeVertex(Vertex) method. This disconnects the vertex from the graph database and then removes it. Disconnection deletes all vertex edges as well. - -For instance, - -```java -graph.removeVertex(luca); -``` - -Disconnects and removes the vertex `luca`. - - -## Edges - -Edges link two vertices in the database. The vertices must exist already. To create a new edge in the current Graph Database, call the [`Edge OrientGraph.addEdge(Object id, Vertex outVertex, Vertex inVertex, String label )`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.html#addEdge(java.lang.Object,-Vertex,-Vertex,-java.lang.String) method. - -Bear in mind that OrientDB ignores the `id` parameter, given that it assigns a unique ID when it creates the edge. To access this ID, use the [`Edge.getId()`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#getId() method. `outVertex` refers to the vertex instance where the edge starts and `inVertex` refers to where the edge ends. `label` indicates the edge label. Specify it as `null` if you don't want to assign a label. - -For instance, - -```java -Vertex luca = graph.addVertex(null); -luca.setProperty("name", "Luca"); - -Vertex marko = graph.addVertex(null); -marko.setProperty("name", "Marko"); - -Edge lucaKnowsMarko = graph.addEdge(null, luca, marko, "knows"); -System.out.println("Created edge: " + lucaKnowsMarko.getId()); -``` - -For more information on optimizing edge creation through concurrent threads and clients, see [Concurrency on Adding Edges](../general/Concurrency.md#concurrency-when-adding-edges). - -### Retrieving Edges - -To retrieve all edges use the [getEdges()](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.html#getEdges() method: - -```java -for (Edge e : graph.getEdges()) { - System.out.println(e.getProperty("age")); -} -``` - -When using [Lightweight Edges](Lightweight-Edges.md), OrientDB stores edges as links rather than records. This improves performance, but as a consequence, the `.getEdges()` method only retrieves records of the class `E`. When using Lightweight Edges, OrientDB only creates records in class `E` under certain circumstances, such as when the edge has properties. Otherwise, the edges exist as links on the in and out vertices. - -If you want to use `.getEdges()` to return all edges, disable the Lightweight Edges feature by executing the following command: - -
-orientdb> ALTER DATABASE my_db useLightweightEdges=FALSE
-
- -You only need to run this command once to disable Lightweight Edges. The change only takes effect on edges you create after running it. For existing edges, you need to convert them from links to actual edges before the `.getEdges()` method returns all edges. For more information, see [Troubleshooting](../misc/Troubleshooting.md#why-cant-i-see-all-the-edges). - ->**NOTE**: Since version 2.0 of OrientDB, the Lightweight Edges feature is disabled by default. - - -### Removing Edges - -To remove an edge from the current Graph Database, call the [`OrientGraph.removeEdge(Edge edge)`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.html#removeEdge(Edge) method. It removes the edge connecting two vertices. - -For instance, - -```java -graph.removeEdge(lucaKnowsMarko); -``` - -## Vertex and Edge Properties - -Vertices and Edges can have multiple properties. The key to this property is a String, the value any [Types](../general/Types.md) supported by OrientDB. - -| Method | Description | -|---|---| -| [**`setProperty(String key, Object value)`**](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#setProperty(java.lang.String,-java.lang.Object) | Sets the property.| -| [**`Object getProperty(String key)`**](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#getProperty(java.lang.String) | Retrieves the property.| -| [**`void removeProperty(String key)`**](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#removeProperty(java.lang.String) | Removes the property.| - -For instance, - -```java -vertex2.setProperty("x", 30.0f); -vertex2.setProperty("y", ((float) vertex1.getProperty( "y" )) / 2); - -for (String property : vertex2.getPropertyKeys()) { - System.out.println("Property: " + property + "=" + vertex2.getProperty(property)); -} - -vertex1.removeProperty("y"); -``` - -### Setting Multiple Properties - -The OrientDB implementation of the Blueprints extension supports setting multiple properties in one command against vertices and edges, using the [`setProperties(Object ...)`](http://www.orientechnologies.com/javadoc/latest/com/tinkerpop/blueprints/impls/orient/OrientElement.html#setProperties(java.lang.Object...) method. This improves performance by allowing you to avoid saving the graph element each time you set a property. - -For instance, - -```java -vertex.setProperties( "name", "Jill", "age", 33, "city", "Rome", "born", "Victoria, TX" ); -``` - -You can also pass a Map of values as the first argument. In this case all map entries are set as element properties: - -```java -Map props = new HashMap(); -props.put("name", "Jill"); -props.put("age", 33); -props.put("city", "Rome"); -props.put("born", "Victoria, TX"); -vertex.setProperties(props); -``` - -### Creating Element and Properties Together - -In addition to the above methods, using the OrientDB Blueprint implementation, you can also set the initial properties while creating vertices or edges. - -For instance, - -- To create a vertex and set the initial properties: - - ```java - graph.addVertex("class:Customer", "name", "Jill", - "age", 33, "city", "Rome", "born", "Victoria, TX"); - ``` - - This line creates a new vertex of the class `Customer`. It sets the initial properties for `name`, `age`, `city`, and `born`. - -- The same procedure also works for edges. - - ```java - person1.addEdge("class:Friend", person1, person2, null, - "since", "2013-07-30"); - ``` - - This creates an edge of the class `Friend` between the vertices `person1` and `person2` with the property `since`. - -Both methods accept `Map` as a parameter, allowing you to set one property per map entry, such as in the above example. - -## Using Indices - -OrientDB allows query execution against any field of a vertex or edge, indexed or non-indexed. To speed up queries, set up indices on key properties that use in the query. - -- For instance, say that you have a query that looks for all vertices with the name `OrientDB`. For instance, - - ```java - graph.getVertices("name", "OrientDB"); - ``` - -- Without an index against the property `name`, this query can take up a lot of time. You can improve performance by creating a new index against the `name` property: - - ```java - graph.createKeyIndex("name", Vertex.class); - ``` - -- In cases where the name must be unique, you can enforce this constraint by setting the index as `UNIQUE`. (This feature is only available in OrientDB). - - ```java - graph.createKeyIndex("name", Vertex.class, new Parameter("type", "UNIQUE")); - ``` - - It applies this constraint to vertices and sub-type instances. - -- To create an index against a custom type, such as the `Customer` vertex, use the additional `class` parameter: - - ```java - graph.createKeyIndex("name", Vertex.class, new Parameter("class", "Customer")); - ``` - -- You can also have both unique indices against custom types: - - ```java - graph.createKeyIndex("name", Vertex.class, new Parameter("type", "UNIQUE"), new Parameter("class", "Customer")); - ``` -- To create a case-insensitive index, use the `collate` parameter: - - ```java - graph.createKeyIndex("name", Vertex.class, new Parameter("type", "UNIQUE"), new Parameter("class", "Customer"),new Parameter("collate", "ci")); - ``` - -- To get a vertex or edge by key prefix, use the class name before the property. For example above, you would use `Customer.name` instead of just `name` to create the index against the field of that class: - - ```java - for (Vertex v : graph.getVertices("Customer.name", "Jay")) { - System.out.println("Found vertex: " + v); - } - ``` - -- In the event that the class name is not passed, it uses `V` for vertices and `E` for edges: - - ```java - graph.getVertices("name", "Jay"); - graph.getEdges("age", 20); - ``` - ->For more information, see [Indexes](../indexing/Indexes.md). - - diff --git a/src/java/Java-API.md b/src/java/Java-API.md index a4909d14..95a742ee 100644 --- a/src/java/Java-API.md +++ b/src/java/Java-API.md @@ -3,7 +3,7 @@ OrientDB is written completely in the Java language. This means that you can use its Java API's without needing to install any additional drivers or adapters. ->For more information, see the [OrientDB Java Documentation](http://www.orientechnologies.com/javadoc/develop/) +>For more information, see the [OrientDB Java Documentation](http://www.orientdb.dev/javadoc/develop/) ## Component Architecture diff --git a/src/java/Partitioned-Graphs.md b/src/java/Partitioned-Graphs.md deleted file mode 100644 index 2d0fa25a..00000000 --- a/src/java/Partitioned-Graphs.md +++ /dev/null @@ -1,261 +0,0 @@ - -# Partitioned Graphs - -You can partition graphs using the [Record-level Security](../security/Database-Security.md#record-level-security) feature. This allows you to separate database records as sandboxes, where "restricted" records are inaccessible to unauthorized users. For more information about other solution for Multi-Tenant applications, look at [Multi-Tenant](../datamodeling/Multi-Tenant.md). - -This tutorial provides a demonstration of sandboxing with the Graph API and the [TinkerPop](Graph-Database-Tinkerpop.md) stack. Partitioned Graph Databases allow you to build [Multi-tenant](http://en.wikipedia.org/wiki/Multitenancy) applications. - ->**Requirements**: ->- OrientDB 1.2.0-SNAPSHOT or higher ->- TinkerPop Blueprints 2.2.0 or higher - - -## Creating a Graph Database - -To create a Partitioned Graph Database, you first need to create a database in which to partition. For instance, the example below covers creating a `blog` database of the Graph type on the local file system: - -
-$ cd $ORIENTDB_HOME/bin
-$ ./console.sh
-OrientDB console v.1.2.0-SNAPSHOT www.orientechnologies.com
-Type 'help' to display all the commands supported.
-
-Installing extensions for GREMLIN language v.2.2.0-SNAPSHOT
-
-orientdb> CREATE DATABASE local::../databases/blog 
-          admin admin_passwd local graph
-Creating database [local:../databases/blog] using the storage type [local]...
-Database created successfully.
-
-Current database is: local:../databases/blog
-
- - - -## Enabling Partitioned Graphs - -Once you have created the Graph Database instance, you need to enable partitioning. Alter the `V` and `E` classes to extend the `ORestricted`. Doing so allows you to restrict vertex and edge instances. - -
-orientdb {db=blog}> ALTER CLASS V SUPERCLASS ORestricted
-Class updated successfully
-
-orientdb {db=blog}> ALTER CLASS E SUPERCLASS ORestricted
-Class updated successfully
-
- -## Create Users - -With the database online and the vertex and edge classes altered to restricted, create two test users, (`luca` and `steve`), to use in exploring how sandboxing works on a Partitioned Graph Database. - -These users represent users who blog on the application you're building. Their level of permissions and authorization relates to the `writer` role. First, ensure that the `writer` role exists on your database: - -
-orientdb {db=blog}> SELECT RID, name, rules FROM ORole 
-                    WHERE name = "writer"
-
----+------+--------+-----------------------------------------------
- # | RID  | name   | rules
----+------+--------+-----------------------------------------------
- 0 | #4:2 | writer | {database=2, database.schema=7, 
-   |      |        | database.cluster.internal=2,
-   |      |        | database.cluster.orole=2, 
-   |      |        | database.cluster.ouser=2,
-   |      |        | database.class.*=15, database.cluster.*=15,
-   |      |        | database.command=15, database.hook.record=15}
----+------+--------+-----------------------------------------------
-
-3 item(s) found. Query executed in 0.045 sec(s).
-
- -Running these commands shows that you do in fact have a `writer` role configured on your database and that it uses a Record ID of `#4:2`. You can now create the users. There are two methods available to you, depending on which version of OrientDB you use. - -### Creating Users - -Beginning with version 2.1, OrientDB now features a [`CREATE USER`](../sql/SQL-Create-User.md) command. This allows you to create a new user in the current database, as opposed to inserting the credentials into the `OUser` and `ORole` classes. - -To create users for Luca and Steve, run the following commands: - -
-orientdb {db=blog}> CREATE USER luca IDENTIFIED BY luca_passwd
-                    ROLE writer
-
-orientdb {db=blog}> CREATE USER steve IDENTIFIED BY steve_passwd 
-                    ROLE writer
-
- -The users are now active on your database as `luca` and `steve`. - -### Inserting Users - -For older implementations of OrientDB, there is no [`CREATE USER`](../sql/SQL-Create-User.md) command available to you. To add users before version 2.1, you need to use [`INSERT`](../sql/SQL-Insert.md) statements to add the new values into the `OUser` class, using the record ID for the `writer` role, which you found above as `#4:2`: - - -
-orientdb {db=blog}> INSERT INTO OUser SET name = 'luca', 
-                    status = 'ACTIVE', password = 'luca_passwd', 
-					roles = [#4:2]
-
-Inserted record 'OUser#5:4{name:luca,password: {SHA-256}D70F47790F
-689414789EEFF231703429C7F88A10210775906460EDBF38589D90,roles:[1]} 
-v1' in 0,001000 sec(s).
-
-orientdb {db=blog}> INSERT INTO OUser SET name = 'steve', 
-                    status = 'ACTIVE', password = 'steve_passwd', 
-					roles = [#4:2]
-
-Inserted record 'OUser#5:3{name:steve,password: {SHA-256}F148389D0
-80CFE85952998A8A367E2F7EAF35F2D72D2599A5B0412FE4094D65C,roles:[1]}
-v1' in 0,001000 sec(s).
-
- - -## Creating Graphs - -In order to work with the partition, you need to create graphs for each user on the database. This requires that you log out from the `admin` user and log back in as Luca and then Steve, then create vertexes and edges with which to work. - - -### Create a Graph for Luca - -First, using [`DISCONNECT`](../console/Console-Command-Disconnect.md) and [`CONNECT`](../console/Console-Command-Connect.md) disconnect from your admin session on the `blog` database and reconnect as Luca's user. - -
-orientdb {db=blog}> DISCONNECT
-Disconnecting from the database [blog]...OK
-
-orientdb> CONNECT local:../databases/blog luca luca_passwd
-Connecting to database [local:../databases/blog] with user 'luca'...OK
-
-orientdb {db=blog}>
-
- -Now that you're logged in under Luca's user, using the [`CREATE VERTEX`](../sql/SQL-Create-Vertex.md) command, create two vertices: one for restaurants and one for pizza. - -
-orientdb {db=blog}> CREATE VERTEX SET label = 'food', 
-                    name = 'Pizza'
-Created vertex 'V#9:0{label:food,name:Pizza,_allow:[1]} v0' in 0,001000 sec(s).
-
-orientdb {db=blog}> CREATE VERTEX SET label = 'restaurant', 
-                    name = "Dante's Pizza"
-Created vertex 'V#9:1{label:restaurant,name:Dante's Pizza,_allow:[1]} v0' in 0,000000 sec(s).
-
- -Connect these vertices with an edge for menus, using [`CREATE EDGE`](../sql/SQL-Create-Edge.md): - -
-orientdb {db=blog}> CREATE EDGE FROM #9:0 TO #9:1 SET label = 'menu'
-Created edge '[E#10:0{out:#9:0,in:#9:1,label:menu,_allow:[1]} 
-v1]' in 0,003000 sec(s).
-
- -You can check the status using [`SELECT`](../sql/SQL-Query.md) against these vertices: - - -
-orientdb {db=blog}> SELECT FROM V
-
- ---+------+------------+---------------+-----------------
-  # | RID  | label      | name          | _allow | out
- ---+------+------------+---------------+--------+--------
-  0 | #9:0 | food       | Pizza         | [1]    | [1]
-  1 | #9:1 | restaurant | Dante's Pizza | [1]    | null
- ---+------+------------+---------------+--------+--------
- 2 item(s) found. Query executed in 0.034 sec(s).
-
- - - -### Creating a Graph for Steve - - -Now let's connect to the database using the 'Steve' user and check if there are vertices: - -
-orientdb {db=blog}> DISCONNECT
-Disconnecting from the database [blog]...OK
-
-orientdb> CONNECT local:../databases/blog steve steve_passwd
-Connecting to database [local:../databases/blog] with user 'steve'...OK
-
-orientdb {db=blog}> SELECT FROM V
-
-0 item(s) found. Query executed in 0.0 sec(s).
-
- -This confirms that the user Steve does not have access to vertices created by Luca. Now, create some as Steve: - - -
-orientdb {db=blog}> CREATE VERTEX SET label = 'car', 
-                    name = 'Ferrari Modena'
-
-Created vertex 'V#9:2{label:car,name:Ferrari Modena,_allow:[1]} v0' in 0,000000 sec(s).
-
-orientdb {db=blog}> CREATE VERTEX SET label = 'driver', 
-                    name = 'steve'
-
-Created vertex 'V#9:3{label:driver,name:steve,_allow:[1]} v0' in 0,000000 sec(s).
-
-orientdb {db=blog}> CREATE EDGE FROM #9:2 TO #9:3 
-                    SET label = 'drive'
-					
-Created edge '[E#10:1{out:#9:2,in:#9:3,label:drive,_allow:[1]} v1]' in 0,002000 sec(s).
-
- -Run the [`SELECT`](../sql/SQL-Query.md) query from earlier to see the vertices you've created: - - -
-orientdb {db=blog}> SELECT FROM V
-
----+------+--------+----------------+--------+------
- # | RID  | label  | name           | _allow | out
----+------+--------+----------------+--------+------
- 0 | #9:2 | car    | Ferrari Modena | [1]    | [1]
- 1 | #9:3 | driver | steve          | [1]    | null
----+------+--------+----------------+--------+------
-
-2 item(s) found. Query executed in 0.034 sec(s).
-
- -As you can see, Steve's user still can't see vertices and edged that were created by other users. For the sake of example, see what happens when you try to create an edge that connects vertices from different users: - -
-orientdb {db=blog}> CREATE EDGE FROM #9:2 TO #9:0 
-                    SET label = 'security-test'
-
-Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: 
-Error on execution of command: OCommandSQL [text=create edge from #9:2 to #
-9:0 set label = 'security-test'] 
-Error: java.lang.IllegalArgumentException: Source vertex '#9:0' does not exist
-
- -The partition used by Luca remains totally isolated from the one used by Steve. OrientDB operates on the assumption that the other partition doesn't exist, it remains invisible to the current user while still present in the database. - - -## TinkerPop Stack - -The [Record-level Security](../security/Database-Security.md#record-level-security) feature is very powerful because it acts at a low-level within the OrientDB engine. This allows for better integration of security features with the Java API and the [TinkerPop](Graph-Database-Tinkerpop.md) stack. - - -For instance, try to display all vertices and edges using [Gremlin](../gremlin/Gremlin.md): - - -
-gremlin> g.V
-==> [v[#9:2], v[#9:3]]
-Script executed in 0,448000 sec(s).
-
-gremlin> g.E
-==> e[#10:1][#9:2-drive->#9:3]
-Script executed in 0,123000 sec(s).
-
- ->This feature works with other technologies that rely on TinkerPop Blueprints: -> ->- [TinkerPop Rexter](https://github.com/tinkerpop/rexster/wiki) ->- [TinkerPop Pipes](https://github.com/tinkerpop/pipes/wiki) ->- [TinkerPop Furnace](https://github.com/tinkerpop/furnace/wiki) ->- [TinkerPop Frames](https://github.com/tinkerpop/frames/wiki) ->- [ThinkAurelius Faunus](http://thinkaurelius.github.com/faunus/) diff --git a/src/java/Tutorial-Java.md b/src/java/Tutorial-Java.md deleted file mode 100644 index 6acc7d9d..00000000 --- a/src/java/Tutorial-Java.md +++ /dev/null @@ -1,116 +0,0 @@ - -# Java API Tutorial (LEGACY) - -In the event that you have only used Relational database systems, you may find much of OrientDB very unfamiliar. Given that OrientDB supports Document, Graph and Object Oriented modes, it requires that you use different Java API's, but there are some similarities between them. - -Similar to the JDBC, the TinkerPop produces the [Blueprints API](https://github.com/tinkerpop/blueprints), which provides support for basic operations on Graph databases. Using the OrientDB adapter, you can operate on a database without needing to manage OrientDB classes. This makes the resulting code more portable, given that Blueprints offers adapters for other Graph database system. - -Tweaking the database configuration itself requires that you use the OrientDB API's directly. It is recommended in these situations that you use a mix, (that is, Blueprints when you can and the OrientDB API's where necessary). - - -## OrientDB Java API's - -OrientDB provides three different Java API's that allow you to work with OrientDB. Choose the Java API that supports the mode in which you want to work: - -- [Graph API](Graph-Database-Tinkerpop.md) -- [Document API](Document-Database.md) -- [Object API](Object-Database.md) - ->For more information on the API's in general, see [Java API](Java-API.md) - -### Use Case: Graph API - -Consider as an example setting up a Graph Database using the Java API with Blueprint. - -#### Connecting to a Graph Database - -In order to use the Graph API, you need to create an `OrientGraph` object first: - -```java -import com.tinkerpop.blueprints.impls.orient.OrientGraph; - -OrientGraph graph = new OrientGraph("embedded:./test", - "username", "password"); -``` - -When your application runs, these lines initialize the `graph` object to your OrientDB database using the Graph API. - -#### Inserting Vertices - -While you can work with the generic vertex class `V`, you gain much more power by defining custom types for vertices. For instance, - -```java -graph.createVertexType("Person"); -graph.createVertexType("Address"); -``` - -The Blueprint adapter for OrientDB is thread-safe and where necessary automatically creates transactions. That is, it creates a transaction at the first operation, in the event that you have not yet explicitly started one. You have to specify where these transactions end, for commits or rollbacks. - -To add vertices into the database with the Blueprints API: - -```java -Vertex vPerson = graph.addVertex("class:Person"); -vPerson.setProperty("firstName", "John"); -vPerson.setProperty("lastName", "Smith"); - -Vertex vAddress = graph.addVertex("class:Address"); -vAddress.setProperty("street", "Van Ness Ave."); -vAddress.setProperty("city", "San Francisco"); -vAddress.setProperty("state", "California"); -``` - -When using the Blueprint API, keep in mind that the specific syntax to use is `class:`. You must use this syntax when creating an object in order to specify its class. Note that this is not mandatory. It is possible to specify a null value, (which means that the vertex uses the default `V` vertex class, as it is the super-class for all vertices in OrientDB). For instance, - -```java -Vertex vPerson = graph.addVertex(null); -``` -However, when creating vertices in this way, you cannot distinguish them from other vertices in a query. - - -#### Inserting Edges - -While you can work with the generic edge class `E`, you gain much more power by defining custom types for edges. The method for adding edges is similar to that of vertices: - -```java -OrientEdge eLives = graph.addEdge(null, vPerson, vAddress, "lives"); -``` - -OrientDB binds the Blueprint label concept to the edge class. That is, you can create an edge of the class `lives` by passing it as a label or as a class name. - -```java -OrientEdge eLives = graph.addEdge("class:lives", vPerson, vAddress, null); -``` - -You have now created: - -``` -[John Smith:Person] --[lives]--> [Van Ness Ave:Address] -``` - -Bear in mind that, in this example, you have used a partially schema-full mode, given that you defined the vertex types, but not their properties. By default, OrientDB dynamically accepts everything and works in a schema-less mode. - - -### Use Case: SQL Queries - -While the Tinkerpop interfaces do allow you to execute fluent queries in SQL or Gremlin, you can also utilize the power of OrientDB SQL through the `.command()` method. For instance, - - -```java -for (Vertex v : (Iterable) graph.command( - new OCommandSQL( - "SELECT EXPAND(OUT('bough')) FROM Customer" - + "WHERE name='Jay'")).execute()) { - System.out.println("- Bought: " + v); -} -``` - -In addition to queries, you can also execute any SQL command, such as [`CREATE VERTEX`](../sql/SQL-Create-Vertex.md), [`UPDATE`](../sql/SQL-Update.md), or [`DELETE VERTEX`](../sql/SQL-Delete-Vertex.md). For instance, - -```java -int modified = graph.command( - new OCommandSQL( - "UPDATE Customer SET local = TRUE" - + "WHERE 'Rome' IN out('lives').name")).execute()); -``` - -Running this command sets a new property called `local` to `TRUE` on all instances in the class `Customer` where these customers live in Rome. diff --git a/src/java/ref/OClass.md b/src/java/ref/OClass.md deleted file mode 100644 index 9030c8d0..00000000 --- a/src/java/ref/OClass.md +++ /dev/null @@ -1,74 +0,0 @@ - -# Java API - OClass - -This class provides a standard interface for handling database classes. - -## Managing Database Classes - -OrientDB draws from the Object Oriented programming paradigm in the concept of a [class](../../general/Schema.md#class), which for the purposes of clarity is called a *database class* in this Reference guide, to avoid confusion with classes in Java. Database classes are loosely comparable with tables in Relational databases. But, unlike tables, database classes are not required to follow a schema unless you want them to follow a schema. In Java, database classes implement the `OClass` class. - -This class is available at `com.orientechnologies.orient.core.metadata.schema`. - -```java -import com.orientechnologies.orient.core.metadata.schema.OClass; -``` - -Once you've imported the class to your application, you can use to build particular instances in your code. - - -## Methods - -### Managing Classes - -| Method | Return Type | Description | -|---|---|---| -| [**`addSuperClass()`**](OClass/addSuperClass.md) | `OClass` | Adds a superclass to the database class | -| [**`count()`**](OClass/count.md) | [`Long`]({{ book.javase }}/api/java/lang/Long.html) | Counts the number of records in the class | -| [**`getAllSubclasses()`**](OClass/getAllSubclasses.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``](OClass.md) | Retrieves classes that use this class as their superclass, and subclasses of these classes, (the complete hierarchy) | -| [**`getAllSuperClasses()`**](OClass/getAllSuperClasses.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``](OClass.md)| Retrieves all superclasses of this class | -| [**`getSubclasses()`**](OClass/getSubclasses.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``](OClass.md) | Retrieves classes that use this class as their immediate superclass, (one level hierarchy) | -| [**`getSuperClassesNames()`**](OClass/getSuperClassesNames.md) | [`List`]({{ book.javase }}/api/java/util/List.html)[``]({{ book.javase }}/api/java/lang/String.html) | Retrieves the names of all superclasses for this class | -| [**`hasSuperClasses()`**](OClass/hasSuperClasses.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class has superclasses | -| [**`isEdgeType()`**](OClass/isEdgeType.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class is an edge | -| [**`isVertexType()`**](OClass/isVertexType.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class is a vertex | -| [**`removeSuperClass()`**](OClass/removeSuperClass.md) | `OClass` | Removes a superclass from the class | -| [**`setName()`**](OClass/setName.md) | `OClass` | Sets the class name | - -### Managing Clusters - -| Method | Return Type | Description | -|---|---|---| -| [**`addCluster()`**](OClass/addCluster.md) | `OClass` | Adds a cluster to the database class, by its name | -| [**`addClusterId()`**](OClass/addClusterId.md) | `OClass` | Add a cluster to the database class, by its Cluster ID | -| [**`getClusterIds`**](OClass/getClusterIds.md) | [`int[]`]({{ book.javase }}/api/java/util/Array.html) | Retrieves ID's for clusters on the class | -| [**`getDefaultClusterId()`**](OClass/getDefaultClusterId.md) | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Retrieves the default Cluster ID | -| [**`hasClusterId()`**](OClass/hasClusterId.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class uses the given Cluster ID | -| [**`hasPolymorphicClusterId()`**](OClass/hasPolymorphicClusterId.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class or any superclasses of the class use the given Cluster ID | -| [**`setDefaultClusterId()`**](OClass/setDefaultClusterId.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Configures the default cluster, by Cluster ID | -| [**`removeClusterId()`**](OClass/removeClusterId.md) | `OClass` | Removes a Cluster ID | -| [**`truncate()`**](OClass/truncate.md) | `void` | Removes all data from all clusters on the class | -| [**`truncateCluster()`**](OClass/truncateCluster.md) | `OClass` | Removes all data in cluster with the given name | - -### Managing Properties - -| Method | Return Type | Description | -|---|---|---| -| [**`createProperty()`**](OClass/createProperty.md) | [`OProperty`](OProperty.md) | Creates a property (that is, a field) on the class | -| [**`dropProperty()`**](OClass/dropProperty.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Removes property from class | -| [**`existsProperty()`**](OClass/existsProperty.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether a property exists on the class | -| [**`getIndexedProperties()`**](OClass/getIndexedProperties.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html) [``](OProperty.md) | Retrieves a collection of properties that are indexed | -| [**`getProperty()`**](OClass/getProperty.md) | [`OProperty`](OProperty.md) | Retrieves the given property | -| [**`properties()`**](OClass/properties.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``](OProperty.md) | Retrieves properties on the class | -| [**`propertiesMap()`**](OClass/propertiesMap.md) | [`Map`]({{ book.javase }}/api/java/util/Map.html) [`` | Retrieves properties on the class | - -### Managing Indexes - -| Method | Return Type | Description | -|---|---|---| -| [**`areIndexed()`**](OClass/areIndexed.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the given fields are contained as first key fields in the database class indexes | -| [**`createIndex()`**](OClass/createIndex.md) | `OIndex` | Creates an index on the given property | -| [**`getAutoShardingIndex()`**](OClass/getAutoShardingIndex.md) | `OIndex` | Retrieves the auto sharding index configured for the class, if any | -| [**`getClassIndex()`**](OClass/getClassIndex.md) | `OIndex` | Retrieves the requested index instance | -| [**`getClassIndexes()`**](OClass/getClassIndexes.md) | [`Set`]({{ book.javase }}/api/java/util/Set.html)`>` | Retrieves indexes for the class | -| [**`getClassInvolvedIndexes()`**](OClass/getClassInvolvedIndexes.md) | [`Set`]({{ book.javase }}/api/java/util/Set.html)`>` | Retrieves indexes that include the given properties as first keys | -| [**`getIndexedProperties()`**](OClass/getIndexedProperties.md) | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``](OProperty.md) | Retrieves a collection of properties that are indexed | diff --git a/src/java/ref/OClass/addCluster.md b/src/java/ref/OClass/addCluster.md deleted file mode 100644 index 941c995d..00000000 --- a/src/java/ref/OClass/addCluster.md +++ /dev/null @@ -1,56 +0,0 @@ - -# OClass - addCluster() - -This method adds a cluster to the database class. - -## Adding Clusters - -When OrientDB saves records, it stores then clusters, using either physical or in-memory storage. With this method you can add a cluster to the class. - -### Syntax - -``` -OClass OClass().addCluster(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the cluster name | - - -#### Return Type - -This method returns the updated [`OClass`](../OClass.md) instance. - - -### Examples - -Consider the use case of a method that provisions a database for your application. You might run this as part of the installation process or to set up a new database for a particular process. - -```java -public ODatabaseDocument db; -private Logger logger; - -// Provision Class with new Clusters -public void provisionClassClusters(OClass cls, List clusters){ - - // Log Operation - logger.info("Adding clusters to class"); - - // Iterator over List of Clusters - for(String name : clusters){ - - logger.debug( - String.format("Creating Cluster '%s' on class '%s'", - name, - cls.getName()); - cls.addCluster(name); - } - logger.debug("Done"); -} -``` - -This method takes an [`OClass`](../OClass.md) instance and a [`List`]({{ book.javase }}/java/util/List.html)[``]({{ book.javase }}/java/lang/String.html) instance, which contains a list of new cluster names. - - - diff --git a/src/java/ref/OClass/addClusterId.md b/src/java/ref/OClass/addClusterId.md deleted file mode 100644 index c7652493..00000000 --- a/src/java/ref/OClass/addClusterId.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OClass - addClusterId() - -This method adds a cluster to the database class. - -## Adding Clusters - -When OrientDB saves records, it stores then clusters, using either physical or in-memory storage. With this method you can add a cluster to the class, defining the cluster by the Cluster ID. - -### Syntax - -``` -OClass OClass().addClusterId(int name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`Integer`]({{ book.javase }}/api/java/lang/Integer.html) | Defines the Cluster ID | - - -#### Return Type - -This method returns the updated [`OClass`](../OClass.md) instance. - diff --git a/src/java/ref/OClass/addSuperClass.md b/src/java/ref/OClass/addSuperClass.md deleted file mode 100644 index bdfaff27..00000000 --- a/src/java/ref/OClass/addSuperClass.md +++ /dev/null @@ -1,52 +0,0 @@ - -# OClass - addSuperClass() - -This method adds a superclass to the database class. - -## Adding Superclasses - -OrientDB supports polymorphism in database classes. This means that you can register an [`OClass`](../OClass.md) instance to extend another [`OClass`](../OClass.md) instance. Using this method, you can assign the given database class as the superclass to this class. - -### Syntax - -``` -OClass OClass().addSuperClass(OClass superClass) -``` - -| Argument | Type | Description | -|---|---|---| -| **`superClass`** | [`OClass`](../OClass.md) | Defines the superclass | - -#### Return Value - -This method returns an [`OClass`](../OClass.md) instance. - -### Example - -Imagine you want a method to provision a database for your application. You might want to add a series of classes in sequence and then add them to the relevant superclass. - -```java -private ODatabaseDocument db; -private Logger logger; - -public void provisionSubClasses(OClass superCls, List classes){ - - // Log Operation - logger.info(String.format( - "Adding subclasses to %s", - superCls.getName())); - - // Iterate over subclasses - for(OClass cls : classes){ - - // Log Debug Message - logger.debug(String.format( - "Adding subclass '%s', - cls.getName())); - - // Add Superclass to Class - cls.addSuperClass(superCls); - } - logger.debug("Done"); -} -``` diff --git a/src/java/ref/OClass/areIndexed.md b/src/java/ref/OClass/areIndexed.md deleted file mode 100644 index dc4df14b..00000000 --- a/src/java/ref/OClass/areIndexed.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OClass - areIndexed() - -This method determines whether the given fields are contained as first key fields in the database class indexes. - -## Checking Indexes - -OrientDB provides support for several different kinds of indexes, which you can use to improve database performance on queries. With this method, you can check a series of fields in the database class to determine whether any are contained as first key fields in the class indexes. - -### Syntax - -``` -// METHOD 1 -Boolean OClass().areIndexed(Collection colFields) - -// METHOD 2 -Boolean OClass().areIndexed(String... strFields) -``` - -| Argument | Type | Description | -|---|---|---| -| **`colFields`** | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``]({{ book.javase/api/java/lang/String.html) | Defines a collection of fields to check | -| **`strFields`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines fields to check | - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance. If the return value is `true`, it indicates that the the given fields are contained as first key fields in the database class indexes. - diff --git a/src/java/ref/OClass/count.md b/src/java/ref/OClass/count.md deleted file mode 100644 index 051ac24c..00000000 --- a/src/java/ref/OClass/count.md +++ /dev/null @@ -1,47 +0,0 @@ - -# OClass - count() - -This method counts the number of the records of this class. It also considers the records in subclasses. - -## Counting Records - -When you create records on the database, they're created as part of a database class. Using this method you can retrieve a count of all records created on the given class. By default, it includes all subclasses. You can also pass it a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance to define whether you want it to exclude subclass records. - -### Syntax - -``` -// METHOD 1 -Long OClass().count() - -// METHOD 2 -Long OClass().count(Boolean isPolymorphic) -``` - -| Argument | Type | Description | -|---|---|---| -| **`isPolymorphic`** | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether method includes records of subclasses in the count | - -#### Return Value - -This method returns a [`Long`]({{ book.javase }}/api/java/lang/Long.html) instance, which provides the number of records in the database class or class and subclasses. - -### Example - -Imagine a social media application where the user accounts are defined by a dedicated class. You might use the `count()` method to report membership on the webpage. - -```java -private ODatabaseDocument; -private Logger logger; - -public Long getUserCount(){ - - // Retrieve the User OClass - OClass userCls = db.getClass("users"); - - // Return User Count - return userCls.count(); -} -``` - -This method uses the [`getClass()`](../ODatabaseDocument/getClass.md) method to retrieve the user class name, the executes the `count()` method to return the number of records on the class. - diff --git a/src/java/ref/OClass/createIndex.md b/src/java/ref/OClass/createIndex.md deleted file mode 100644 index f9407e6a..00000000 --- a/src/java/ref/OClass/createIndex.md +++ /dev/null @@ -1,48 +0,0 @@ - -# OClass - createIndex() - -This method creates an index on the given fields. - -## Creating Indexes - -OrientDB provides support for several different types of indexes, which can help improve performance in retrieving records. Using this method, you can create them on a particular class, indexing the given fields (that is, properties), on the class. - - -### Syntax - -``` -// METHOD 1 -OIndex OClass().createIndex(String name, - OClass.INDEX_TYPE type, - String... fields) - -// METHOD 2 -OIndex OClass().createIndex(String name, - String type-name, - OProgressListener listener, - ODocument metadata, - String... fields) - -// METHOD 3 -OIndex OClass().createIndex(String name, - String type-name, - OProgressListener listener - ODocument metadata, - String algorithm, - String... fields) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the index name | -| **`type`** | `OClass.INDEX_TYPE` | Defines the index type | -| **`fields`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the fields to index | -| **`type-name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the index type, as a string | -| **`listener`** | `OProgressListener` | Defines the progress listener for the index | -| **`metadata`** | `ODocument` | Defines metadata for the index | -| **`algorithm`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the algorithm to use | - - -#### Return Value - -This method creates an index on the given properties for the class. It then returns the index as an `OIndex` instance. diff --git a/src/java/ref/OClass/createProperty.md b/src/java/ref/OClass/createProperty.md deleted file mode 100644 index c58e101f..00000000 --- a/src/java/ref/OClass/createProperty.md +++ /dev/null @@ -1,49 +0,0 @@ - -# OClass - createProperty() - -This method creates a property on the class. - -## Creating Properties - -Classes in OrientDB can feature fields that contain particular types of data. In the comparison to Relational databases, if the class is the table, the properties are the columns in the table. Using this method, you can create new properties on the class, naming it and typing its contents. - -### Syntax - -``` -// METHOD 1 -OProperty OClass().createProperty( - String name, - OType type) - -// METHOD 2 -OProperty OClass().createProperty( - String name, - OType type, - OClass linkedClass) - -// METHOD 3 -OProperty OClass().createProperty( - String name, - OType type, - OType linkedType) - -// METHOD 4 -OProperty OClass().createProperty( - String name, - OType type, - OType linkedType, - Boolean isUnsafe) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | -| **`type`** | [`OType`](../OType.md) | Defines the property type | -| **`linkedClass`** | [`OClass`](../OClass.md) | Defines the class to link to, for use with properties of the type `LINK`, `LINKLIST`, `LINKSET`, `LINKMAP`, `EMBEDDED`, `EMBEDDEDLIST`. You can further specify the type for embedded classes. | -| **`linkedType`** | [`OType`](../OType.md) | Defines the linked type, for use with properties of the types: `EMBEDDEDLIST`, `EMBEDDEDSET` or `EMBEDDEDMAP`. Set this argument to `null` for all other cases. | -| **`isUnsafe`** | Defines whether it should check the persistent data for compatibility. Only use if all persistent data is compatible with the property. | - -#### Return Value - -This method returns the created property as an [`OProperty`](../OProperty.md) instance. - diff --git a/src/java/ref/OClass/dropProperty.md b/src/java/ref/OClass/dropProperty.md deleted file mode 100644 index fffb8a29..00000000 --- a/src/java/ref/OClass/dropProperty.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - dropProperty() - -This method removes a property from the class. - -## Removing Properties - -Occasionally, you may encounter situations where you need to rework class instances from within your application. Using this method you can remove properties from the [`OClass`](../OClass.md) instance. - -### Syntax - -``` -void OClass().dropProperty(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | - - - - diff --git a/src/java/ref/OClass/existsProperty.md b/src/java/ref/OClass/existsProperty.md deleted file mode 100644 index 3b91b277..00000000 --- a/src/java/ref/OClass/existsProperty.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - existsProperty() - -This method determines whether the given property exists on the class. - -## Checking Properties - -In cases where your application operates on a database it didn't configure or when you suspect other clients or users might have modified the class schema, you may want to check that a given property exists before initiating an operation. This method checks whether the given property name exists. You can then use its return to decide whether or not you want to proceed. - -### Syntax - -``` -boolean OClass().existsProperty(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) result. The return value is `true` when the given property name exists on the class. diff --git a/src/java/ref/OClass/getAllSubclasses.md b/src/java/ref/OClass/getAllSubclasses.md deleted file mode 100644 index 94aa47a8..00000000 --- a/src/java/ref/OClass/getAllSubclasses.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - getAllSubclasses() - -This method retrieves all subclasses of the class. - -## Retrieving Subclasses - -OrientDB borrows the concept of a class from the Object Oriented programming paradigm. This borrowing includes polymorphism, the idea that a database class can have subclasses. Using this method, you can retrieve all subclasses of the given class and the subclasses of these subclasses. - -Note, the method retrieves the complete hierarchy of the class, following inheritance of subclasses to the immediate subclasses. In cases where you only want to retrieve the immediate subclasses to the class, use the [`getSubclasses()`](getSubclasses.md) method. - -### Syntax - -``` -Collection OClass().getAllSubclasses() -``` - -#### Return Value - -This method returns a [`Collection`]({{ book.javase }}/api/java/util/Collection.html) instance that contains a series of [`OClass`](../OClass.md) instances for the retrieved subclasses. - - diff --git a/src/java/ref/OClass/getAllSuperClasses.md b/src/java/ref/OClass/getAllSuperClasses.md deleted file mode 100644 index 553e4170..00000000 --- a/src/java/ref/OClass/getAllSuperClasses.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OClass - getAllSuperClasses() - -This method retrieves [`OClass`](../OClass.md) instances for all classes registered as superclasses of this class. - -## Retrieving Super Classes - -OrientDB borrows the concept of a class from the Object Oriented programming paradigm. This borrowing includes polymorphism, the idea that a database class can have subclasses. Using this method, you can retrieve all superclasses of the given class. - -### Syntax - -``` -Collection OClass().getAllSuperClasses() -``` - -#### Return Value - -This method returns a [`Collection`]({{ book.javase }}/api/java/util/Collection.html) instance that contains instances of [`OClass`](../OClass.md) for each class that is a superclass of this class. diff --git a/src/java/ref/OClass/getAutoShardingIndex.md b/src/java/ref/OClass/getAutoShardingIndex.md deleted file mode 100644 index d20796c1..00000000 --- a/src/java/ref/OClass/getAutoShardingIndex.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OClass - getAutoShardingIndex() - -This method retrieves the auto sharding index configured for the class, if any. - -## Retrieving Auto Sharding Indexes - -### Syntax - -``` -OIndex OClass().getAutoShardingIndex() -``` - -#### Return Value - -This method returns an `OIndex` instance for the auto-sharding index configured for the class. diff --git a/src/java/ref/OClass/getClassIndex.md b/src/java/ref/OClass/getClassIndex.md deleted file mode 100644 index 9a36eb9c..00000000 --- a/src/java/ref/OClass/getClassIndex.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OClass - getClassIndex() - -This method retrieves the given index for the class. - -## Retrieving Indexes - -### Syntax - -``` -OIndex OClass().getClassIndex(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database index name | - -#### Return Value - -This method returns an `OIndex` instance for the requested index. - diff --git a/src/java/ref/OClass/getClassIndexes.md b/src/java/ref/OClass/getClassIndexes.md deleted file mode 100644 index d2687d83..00000000 --- a/src/java/ref/OClass/getClassIndexes.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OClass - getClassIndexes() - -This method retrieves indexes for the class. - -## Retrieving Indexes - -### Syntax - -``` -Set> OClass().getClassIndexes() -``` - -#### Return Value - -This method returns a [`Set`]({{ book.javase }}/api/java/util/Set.html) instance, which contains the `OIndex` instances for the class. diff --git a/src/java/ref/OClass/getClassInvolvedIndexes.md b/src/java/ref/OClass/getClassInvolvedIndexes.md deleted file mode 100644 index b97ea3ed..00000000 --- a/src/java/ref/OClass/getClassInvolvedIndexes.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OClass - getClassInvolvedIndexes() - -This method retrieves indexes that contain the given field names as their first keys. - -## Retrieving Class Involved Indexes - - -### Syntax - -``` -// METHOD 1 -Set> OClass().getClassInvolvedIndexes(Collection colFields) - -// METHOD 2 -Set> OClass().getClassInvolvedIndexes(String... strFields) -``` - -| Argument | Type | Description | -|---|---|---| -| **`colFields`** | [`Collection`]({{ book.javase }}/api/java/util/Collection.html)[``]({{ book.javase }}/api/java/lang/String.html) | Defines the fields to check | -| **`strFields`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the fields to check | - -#### Return Value - -This method returns a [`Set`]({{ book.javase }}/api/java/util/Set.html) instance that contains instances of `OIndex` for each index that includes the given fields as first keys. - diff --git a/src/java/ref/OClass/getClusterIds.md b/src/java/ref/OClass/getClusterIds.md deleted file mode 100644 index 24ef3850..00000000 --- a/src/java/ref/OClass/getClusterIds.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OClass - getClusterIds() - -This method retrieves the ID's for all clusters registered with the class. - -## Retrieving Cluster ID's - -When OrientDB stores records it assigns each a Record ID, (for instance #5:24). The first element of a Record ID provides the Cluster ID, the second the position of the record in the cluster. Using this method you can retrieve the ID's for all clusters registered with the [`OClass`](../OClass.md) instance. - -### Syntax - -``` -int[] OClass().getClusterIds() -``` - -#### Return Value - -This method returns an [`Array`]({{ book.javase }}/api/java/util/Array.html) of [`int`]({{ book.javase }}/api/java/lang/Integer.html) values. Each integer provides the ID for a cluster registered to this [`OClass`](../OClass.md) instance. - - diff --git a/src/java/ref/OClass/getDefaultClusterId.md b/src/java/ref/OClass/getDefaultClusterId.md deleted file mode 100644 index cb32ae25..00000000 --- a/src/java/ref/OClass/getDefaultClusterId.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OClass - getDefaultClusterId() - -This method retrieves the default Cluster ID for the class. - -## Retrieving the Default Cluster ID - -When OrientDB stores records it assigns each a Record ID, (for instance #5:24). The first element of a Record ID provides the Cluster ID, the second the position of the record in the cluster. Every class has a default cluster, which it uses to store records whenever the target cluster is left unspecified. Using this method, you can retrieve the Cluster ID for the default cluster. - -### Syntax - -``` -int OClass().getDefaultClusterId() -``` - -#### Return Value - -This method returns an [`int`]({{ book.javase }}/api/java/lang/Integer.html) instance. It provides the identification number of the default cluster for the class. - - diff --git a/src/java/ref/OClass/getIndexedProperties.md b/src/java/ref/OClass/getIndexedProperties.md deleted file mode 100644 index 4c5e01ff..00000000 --- a/src/java/ref/OClass/getIndexedProperties.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OClass - getIndexedProperties() - -This method returns the properties on the class that have indexes. - -## Retrieving Indexed Properties - -When you create an index in OrientDB, the index is applied to properties on the class. Using this method, you can retrieve a collection of all properties that have indexes. You might find this useful when optimizing queries or as an automated troubleshooting tool, that checks which properties have indexes in determining which need indexes. - -### Syntax - -``` -Collection OClass().getIndexedProperties() -``` - -#### Return Value - -This method returns a [`Collection`]({{ book.javase }}/api/java/util/Collection.html) instance that contains instances of [`OProperty`](../OProperty.md) that correspond to properties that have indexes. diff --git a/src/java/ref/OClass/getName.md b/src/java/ref/OClass/getName.md deleted file mode 100644 index bb0db97e..00000000 --- a/src/java/ref/OClass/getName.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OClass - getName() - -This method returns the logical name of the class. - -## Retrieving Class Names - -Internally, OrientDB manages classes as [`OClass`](../OClass.md) instance. But, each database class has a logical name that gets used in [OrientDB SQL](../../../sql) queries. Using this method, you can retrieve the logical name as string. - -### Syntax - -``` -String OClass().getName() -``` - -#### Return Type - -This method returns a [`String`]({{ book.javase }}/java/lang/String.html) instance, which provides the logical name of the [`OClass`](../OClass.md). - diff --git a/src/java/ref/OClass/getProperty.md b/src/java/ref/OClass/getProperty.md deleted file mode 100644 index ff3e7276..00000000 --- a/src/java/ref/OClass/getProperty.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - getProperty() - -This method retrieves the given property instance from the class. - -## Retrieving Properties - -In cases where you want to operate on properties rather than the values they contain, you can use this method to retrieve [`OProperty`](../OProperty.md) instances for the given property on the class. - -### Syntax - -``` -OProperty OClass().getProperty(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property you want | - -#### Return Value - -This method returns an [`OProperty`](../OProperty.md) instance for the requested property on the class. diff --git a/src/java/ref/OClass/getSubclasses.md b/src/java/ref/OClass/getSubclasses.md deleted file mode 100644 index 12c98455..00000000 --- a/src/java/ref/OClass/getSubclasses.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OClass - getSubclasses() - -This method retrieves the immediate subclasses for the class. - -## Retrieving Subclasses - -OrientDB borrows the concept of a class from the Object Oriented programming paradigm. This borrowing includes polymorphism, the idea that a database class can have subclasses. Using this method, you can retrieve all subclasses of the given class. - -Note, the method only retrieves those classes that use this class as their immediate superclass. It does not follow the inheritance any deeper to subclasses of these subclasses. To retrieve all subclasses, including subclasses of the immediate subclasses, use the [`getAllSubclasses()`](getAllSubclasses.md) method. - -### Syntax - -``` -Collection OClass().getSubclasses() -``` - -#### Return Value - -This method returns a `Collection` instance that contains [`OClass`](../OClass.md) instances for each subclass registered to this class. diff --git a/src/java/ref/OClass/getSuperClassesNames.md b/src/java/ref/OClass/getSuperClassesNames.md deleted file mode 100644 index 8c3c772b..00000000 --- a/src/java/ref/OClass/getSuperClassesNames.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OClass - getSuperClassesNames() - -This method retrieves the names of all classes registered as superclasses of this class. - -## Retrieving Super Classes - -OrientDB borrows the concept of class from the Object Oriented programming paradigm. This borrowing includes polymorphism, the idea that a class can have subclasses that inherit features from it.In cases where the given [`OClass`](../OClass.md) instance is itself a subclass, you can use this method to retrieve a list of all classes that are superclasses to this class. - -### Syntax - -``` -List OClass().getSuperClassesNames() -``` - -#### Return Value - -This method returns a [`List`]({{ book.javase }}/api/java/util/List.html) instance that contains instances of the [`String`]({{ book.javase }}/api/java/lang/String.html) class, providing names of all classes registered as superclasses of this class. diff --git a/src/java/ref/OClass/hasClusterId.md b/src/java/ref/OClass/hasClusterId.md deleted file mode 100644 index 88c99f0b..00000000 --- a/src/java/ref/OClass/hasClusterId.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - hasClusterId() - -This method determines whether the class uses a cluster, as defined by the Cluster ID. - -## Checking for Clusters - -Where classes are used to organized what data you store, clusters define where and how you store data. Using this method, you can determine whether the class uses the given cluster, identifying the cluster you want to check for by its Cluster ID, (the first number in a Record ID). - -### Syntax - -``` -boolean OClass().hasClusterId(int clusterId) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Defines the cluster you want to check for by its Cluster ID | - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, where a `true` value indicates that the class does use the given cluster. diff --git a/src/java/ref/OClass/hasPolymorphicClusterId.md b/src/java/ref/OClass/hasPolymorphicClusterId.md deleted file mode 100644 index 8963c639..00000000 --- a/src/java/ref/OClass/hasPolymorphicClusterId.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - hasPolymorphicClusterId() - -This method determines whether the class or any subclass of the class use the given cluster. - -## Checking for Clusters - -OrientDB borrows the concept of class from the Object Oriented programming paradigm. This borrowing includes polymorphism, the idea that a class can have subclasses and superclasses. Those superclasses and subclasses have their own clusters used in storing records. This method determines whether any class that is a superclass or subclass of this class uses the given cluster, as defined by its Cluster ID (the first number in a Record ID). - -### Syntax - -``` -boolean OClass().hasPolymorphicClusterId(int clusterId) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Defines the cluster you want to check for, by its Cluster ID | - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, where a `true` value indicates that polymorphic classes of this class do use the given cluster. diff --git a/src/java/ref/OClass/hasSuperClasses.md b/src/java/ref/OClass/hasSuperClasses.md deleted file mode 100644 index eea47da5..00000000 --- a/src/java/ref/OClass/hasSuperClasses.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OClass - hasSuperClasses() - -This method determines whether the class is a subclass of another class. - -## Checking for Superclasses - -OrientDB borrows the concept of class from the Objected Oriented programming paradigm. This borrowing includes polymorphism, or the idea that a class can be a subclass of and inherit from another class. Using this method, you can determine whether your [`OClass`](../OClass.md) instance inherits from any superclasses. - -### Syntax - -``` -boolean OClass().hasSuperClasses() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, where a `true` value indicates that it is a subclass. diff --git a/src/java/ref/OClass/isEdgeType.md b/src/java/ref/OClass/isEdgeType.md deleted file mode 100644 index bd99d870..00000000 --- a/src/java/ref/OClass/isEdgeType.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OClass - isEdgeType() - -This method determines whether the class is an edge. - -## Checking Edges - -In a Graph database, certain records serve as vertices while others serve as edges connecting the vertices to each other. Both of these each have their own database classes. When a record serves as an edge it belongs either to the `E` database class or to a class that extends the `E` class. - -Using this method, you can determine whether the given class functions as an edge on the database. To determine whether the class is a vertex, see [`isVertexType()`](isVertexType.md). - -### Syntax - -``` -boolean OClass().isEdgeType() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, where `true` indicates that the class is an edge. - - - - - diff --git a/src/java/ref/OClass/isVertexType.md b/src/java/ref/OClass/isVertexType.md deleted file mode 100644 index 7a9ce777..00000000 --- a/src/java/ref/OClass/isVertexType.md +++ /dev/null @@ -1,26 +0,0 @@ - -# OClass - isVertexType() - -This method determines whether the class is a vertex. - -## Checking Edges - -In a Graph database, certain records serve as vertices while others serve as edges connecting the vertices to each other. Both of these each have their own database classes. When a record serves as a vertex it belongs either to the `V` database class or to a class that extends the `V` class. - -Using this method, you can determine whether the given class functions as a vertex on the database. To determine whether the class functions as an edge, see [`isEdgeType()`](isEdgeType.md). - - -### Syntax - -``` -boolean OClass().isVertexType() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, where `true` indicates that the class is a vertex. - - - - - diff --git a/src/java/ref/OClass/properties.md b/src/java/ref/OClass/properties.md deleted file mode 100644 index d4bc683e..00000000 --- a/src/java/ref/OClass/properties.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OClass - properties() - -This method retrieves the properties on the class. - -## Retrieving Properties - -Where the class allows you to organize groups of records by their particular purpose or usage, OrientDB uses properties to organize the data you store on records. Using this method, you can retrieve the properties on a class, for situations where you need to operate on them collectively. - -### Syntax - -``` -Collection OClass().properties() -``` - -#### Return Value - -This method returns a [`Collection`]({{ book.javase }}/api/java/util/Collection.html) that contains [`OProperty`](../OProperty.md) instances for each property configured on the class. - - diff --git a/src/java/ref/OClass/propertiesMap.md b/src/java/ref/OClass/propertiesMap.md deleted file mode 100644 index b7519d2a..00000000 --- a/src/java/ref/OClass/propertiesMap.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OClass - propertiesMap() - -This method retrieves the properties on the class. - -## Retrieving Properties - -Where the class allows you to organize groups of records by their particular purpose or usage, OrientDB uses properties to organize the data you store on records. Using this method, you can retrieve the properties on a class, for situations where you need to operate on them collectively. - -### Syntax - -``` -Map OClass().properties() -``` - -#### Return Value - -This method returns a [`Map`]({{ book.javase }}/api/java/util/Map.html) that contains a series of key/value entries, where the key is a [`String`]({{ book.javase }}/api/java/lang/String.html) providing the property name and the value is the [`OProperty`](../OProperty.md) instance for each property on the class. - - diff --git a/src/java/ref/OClass/removeClusterId.md b/src/java/ref/OClass/removeClusterId.md deleted file mode 100644 index 793a484a..00000000 --- a/src/java/ref/OClass/removeClusterId.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OClass - removeClusterId() - -This method removes a Cluster ID from the class. - -## Removing Cluster ID's - -### Syntax - -``` -OClass OClass().removeClusterId(int clusterId) -``` - -| Argument | Type | Description| -|---|---|---| -| **`clusterId`** | [`int`]({{ book.javase }}/api/java/lang/Integer.html)| Defines the Cluster ID you want to remove | - -#### Return Value - -This method returns an updated [`OClass`](../OClass.md) instance. - diff --git a/src/java/ref/OClass/removeSuperClass.md b/src/java/ref/OClass/removeSuperClass.md deleted file mode 100644 index 703488a2..00000000 --- a/src/java/ref/OClass/removeSuperClass.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - removeSuperClass() - -This method removes a superclass from a class. - -## Removing Superclasses - -OrientDB borrows the concept of a class from the Object Oriented programming paradigm. This borrowing includes the idea that database classes can inherit from their superclasses. - -### Syntax - -``` -OClass OClass().removeSuperClass(OClass class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | [`OClass`](../OClass.md) | Defines the superclass that you want to remove | - -#### Return Value - -This method returns the updated [`OClass`](../OClass.md) instance. diff --git a/src/java/ref/OClass/setDefaultClusterId.md b/src/java/ref/OClass/setDefaultClusterId.md deleted file mode 100644 index 9e3f727e..00000000 --- a/src/java/ref/OClass/setDefaultClusterId.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OClass - setDefaultClusterId() - -This method configures the default cluster for the class. - -## Setting the Default Cluster ID - -When OrientDB stores records it assigns each a Record ID, (for instance #5:24). The first element of a Record ID provides the Cluster ID, the second the position of the record in the cluster. Every class has a default cluster, which it uses to store records whenever the target cluster is left unspecified. This method allows you to configure which cluster you want to use as the default for the class. - -### Syntax - -``` -void OClass().setDefaultClusterId(int clusterId) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Defines the Cluster ID to set | - diff --git a/src/java/ref/OClass/setName.md b/src/java/ref/OClass/setName.md deleted file mode 100644 index 63de0693..00000000 --- a/src/java/ref/OClass/setName.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OClass - setName() - -This method sets the name for the class. - -## Setting the Class Name - -Database classes in OrientDB have names, allowing you to reference them and request the [`OClass`](../OClass.md) instance using a simple string. This method allows you to define the string OrientDB uses as its class name. - -### Syntax - -``` -OClass OClass().setName(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the new class name | - -#### Return Value - -This method returns the updated [`OClass`](../OClass.md) instance. diff --git a/src/java/ref/OClass/truncate.md b/src/java/ref/OClass/truncate.md deleted file mode 100644 index 51242041..00000000 --- a/src/java/ref/OClass/truncate.md +++ /dev/null @@ -1,14 +0,0 @@ - -# OClass - truncate() - -This method removes all data from all clusters the class uses. - -## Truncating Class - -Classes have one or more clusters that they use to store records on the database. When your application has been running for a while, you may encounter issues that require basic or drastic housekeeping on the database. Using this method you can truncate all clusters associated with the class, removing all data from each cluster. - -### Syntax - -``` -void OClass().truncate() -``` diff --git a/src/java/ref/OClass/truncateCluster.md b/src/java/ref/OClass/truncateCluster.md deleted file mode 100644 index e482dcb2..00000000 --- a/src/java/ref/OClass/truncateCluster.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OClass - truncateCluster() - -This method removes all data from the given cluster. - -## Truncating Clusters - -Classes can have several clusters that they use to store records. When your application has been running for a while, you may encounter issues that require basic or drastic housekeeping on class clusters. Use this method when you need to remove all data from a cluster, such as when the records are obsolete or no longer necessary. - -Note that after you call this method, OrientDB needs to rebuild indexes on the class. - -### Syntax - -``` -OClass OClass().truncateCluster(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the cluster you want to truncate | - -#### Return Value - -This method returns an updated [`OClass`](../OClass.md) instance. - - - diff --git a/src/java/ref/OCluster.md b/src/java/ref/OCluster.md deleted file mode 100644 index fd055f67..00000000 --- a/src/java/ref/OCluster.md +++ /dev/null @@ -1,34 +0,0 @@ - -# OCluster - -This class provides an interface for interacting with clusters. - -## Managing Database Clusters - -Clusters in OrientDB are where the server actually stores data, whether on the physical disk or in memory. They are comparable to the partition in Relational databases. Using the `OCluster` interface, you can operate directly on clusters from your application. - -```java -import com.orientechnologies.orient.core.storage.OCluster; -``` - -## Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`close()`**](OCluster/close.md) | `void` | Closes the cluster | -| [**`delete()`**](OCluster/delete.md) | `void` | Removes the cluster | -| [**`deleteRecord()`**](OCluster/deleteRecord.md) | `boolean` | Removes record from cluster | -| [**`exists()`**](OCluster/exists.md) | `boolean` | Indicates whether the cluster exists | -| [**`getFileName()`**](OCluster/getFileName.md) | `String` | Retrieves filename for the cluster | -| [**`getFirstPosition()`**](OCluster/getFirstPosition.md) | `long` | Retrieves the position of the first record in the cluster | -| [**`getId()`**](OCluster/getId.md) | `int` | Retrieves the Cluster ID | -| [**`getLastPosition()`**](OCluster/getLastPosition.md) | `long` | Retrieves the position of the last record in the cluster | -| [**`getName()`**](OCluster/getName.md) | `String` | Retrieves the logical name of the cluster | -| [**`getNextPosition()`**](OCluster/getNextPosition.md) | `long` | Retrieves the position of the next record in the cluster | -| [**`getRecordSize()`**](OCluster/getRecordsSize.md) | `long` | Retrieves the size of the records in bytes contained in this cluster | -| [**`getTombstonesCount()`**](OCluster/getTombstonesCount.md) | `long` | Retrieves the number of hidden records in the cluster | -| [**`hideRecord()`**](OCluster/hideRecord.md) | `boolean` | Hides the given record from queries | -| [**`open()`**](OCluster/open.md) | `void` | Opens the cluster | -| [**`truncate()`**](OCluster/truncate.md) | `void` | Truncates the cluster | -| [**`updateRecord()`**](OCluster/updateRecord.md) | `void` | Updates the given record | - diff --git a/src/java/ref/OCluster/close.md b/src/java/ref/OCluster/close.md deleted file mode 100644 index b05cff53..00000000 --- a/src/java/ref/OCluster/close.md +++ /dev/null @@ -1,13 +0,0 @@ -# OCluster - close() - -Closes the cluster. - -## Closing Clusters - -Using this method you can close the [`OCluster`](../OCluster.md) instance. To open the cluster, use the [`open()`](open.md) method. - -### Syntax - -``` -void OCluster().close() -``` diff --git a/src/java/ref/OCluster/delete.md b/src/java/ref/OCluster/delete.md deleted file mode 100644 index 4675d0a8..00000000 --- a/src/java/ref/OCluster/delete.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OCluster - delete() - -Removes the cluster. - -## Removing Clusters - -Using this method you can remove the cluster from OrientDB with all its records. - -### Syntax - -``` -void OCluster().delete() -``` - - diff --git a/src/java/ref/OCluster/deleteRecord.md b/src/java/ref/OCluster/deleteRecord.md deleted file mode 100644 index 71ace408..00000000 --- a/src/java/ref/OCluster/deleteRecord.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OCluster - deleteRecord() - -Removes the given Record ID from the cluster. - -## Removing Records - -In OrientDB, the Record ID is composed of two numeric values: the Cluster ID and the record's position in the cluster. Using this method, you can remove records from the cluster by position. - -### Syntax - -``` -boolean OCluster().deleteRecord(long position) -``` - -| Argument | Type | Description | -|---|---|---| -| **`position`** | `long` | Position of record to delete | - - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the record was successfully deleted. diff --git a/src/java/ref/OCluster/exists.md b/src/java/ref/OCluster/exists.md deleted file mode 100644 index 29f5486b..00000000 --- a/src/java/ref/OCluster/exists.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OCluster - exists() - -Indicates whether the cluster exists. - -## Checking Cluster Existence - -Using this method you can check whether a given [`OCluster`](../OCluster.md) instance exists on the database. - -### Syntax - -``` -boolean OCluster().exists() -``` - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the cluster exists. diff --git a/src/java/ref/OCluster/getFileName.md b/src/java/ref/OCluster/getFileName.md deleted file mode 100644 index 359b4ce7..00000000 --- a/src/java/ref/OCluster/getFileName.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OCluster - getFileName() - -Retrieves the cluster filename. - -## Getting Filenames - -OrientDB stores physical clusters in a file on your system. Using this method you can retrieve the filename for the cluster. - -### Syntax - -``` -String OCluster().getFileName() -``` - -#### Return Value - -This method returns a `String` instance. The value is the filename of the cluster. - diff --git a/src/java/ref/OCluster/getFirstPosition.md b/src/java/ref/OCluster/getFirstPosition.md deleted file mode 100644 index 78d3e7a4..00000000 --- a/src/java/ref/OCluster/getFirstPosition.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OCluster - getFirstPosition() - -Retrieves the first Record ID position in the cluster. - -## Getting Record Positions - -When you query OrientDB, the records in the result-set each have a Record ID, which is composed of two numbers. The first number is the Cluster ID, the second is the record's position in the cluster. Using this method you can retrieve the first record position in this cluster. - -### Syntax - -``` -long OCluster().getFirstPosition() -``` - -#### Return Value - -This method returns a `long` value that represents the first record position in the cluster. diff --git a/src/java/ref/OCluster/getId.md b/src/java/ref/OCluster/getId.md deleted file mode 100644 index 458f9694..00000000 --- a/src/java/ref/OCluster/getId.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OCluster - getId() - -Retrieves the Cluster ID. - -## Getting Cluster ID's - -When you retrieve a record from OrientDB, it displays a Record ID that is composed of two numbers. The first number is the Cluster ID, a numeric value that identifies the Cluster within the database. Using this method, you can retrieve the Cluster ID to use in your application. - -### Syntax - -``` -int OCluster().getId() -``` - -#### Return Value - -This method returns an `int` instance. The value represents the Cluster ID. - - - - - diff --git a/src/java/ref/OCluster/getLastPosition.md b/src/java/ref/OCluster/getLastPosition.md deleted file mode 100644 index 5cfa848f..00000000 --- a/src/java/ref/OCluster/getLastPosition.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OCluster - getLastPosition() - -Retrieves the last Record ID position in the cluster. - -## Getting Record Positions - -When you query OrientDB, the records in the result-set each have a Record ID, which is composed of two numbers. The first number is the Cluster ID, the second is the record's position in the cluster. Using this method you can retrieve the last record position in this cluster. - -### Syntax - -``` -long OCluster().getLastPosition() -``` - -#### Return Value - -This method returns a `long` value that represents the last record position in the cluster. diff --git a/src/java/ref/OCluster/getName.md b/src/java/ref/OCluster/getName.md deleted file mode 100644 index 13f2f753..00000000 --- a/src/java/ref/OCluster/getName.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OCluster - getName() - -Retrieves the logical name of the cluster. - -## Retrieving the Cluster Name - -When you create a cluster on a database, OrientDB uses two reference values to identify it later: an integer that represents the Cluster ID and a string that provides its logical name. Using this method you can retrieve the logical name for the cluster. - -### Syntax - -``` -String OCluster().getName() -``` - -#### Return Value - -This method returns a `String` value that provides the logical name for the cluster. - - diff --git a/src/java/ref/OCluster/getNextPosition.md b/src/java/ref/OCluster/getNextPosition.md deleted file mode 100644 index d08d6f1c..00000000 --- a/src/java/ref/OCluster/getNextPosition.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OCluster - getNextPosition() - -Retrieves the next Record ID position in the cluster. - -## Getting Record Positions - -When you query OrientDB, the records in the result-set each have a Record ID, which is composed of two numbers. The first number is the Cluster ID, the second is the record's position in the cluster. Using this method you can retrieve the next record position in this cluster. - -### Syntax - -``` -long OCluster().getNextPosition() -``` - -#### Return Value - -This method returns a `long` value that represents the next record position in the cluster. diff --git a/src/java/ref/OCluster/getRecordsSize.md b/src/java/ref/OCluster/getRecordsSize.md deleted file mode 100644 index c7916df1..00000000 --- a/src/java/ref/OCluster/getRecordsSize.md +++ /dev/null @@ -1,18 +0,0 @@ -# OCluster - getRecordsSize() - -Retrieves the size of the records contained in the cluster. - -## Getting Record Sizes - -Using this method you can retrieve the size of the records in the cluster in bytes. - -### Syntax - -``` -long OCluster().getRecordSize() -``` - -#### Return Value - -This method returns a `long` instance. The value provides the size of the records in the cluster in bytes. - diff --git a/src/java/ref/OCluster/getTombstonesCount.md b/src/java/ref/OCluster/getTombstonesCount.md deleted file mode 100644 index 57afae6c..00000000 --- a/src/java/ref/OCluster/getTombstonesCount.md +++ /dev/null @@ -1,18 +0,0 @@ -# OCluster - getTombstonesCount() - -Retrieves the number of hidden records in the cluster. - -## Hidden Records - -In OrientDB it's possible to remove a record from queries without deleting the data from the cluster. This is done by setting a 'tombstone' on the record. You may find this useful in cases where you would like to implement a trashcan safety features, where deleted records are hidden for a time before they're permanently removed from the database. Using this method, you can retrieve the number of tombstone records in the cluster. - -### Syntax - -``` -long OCluster().getTombstonesCount() -``` - -#### Return Value - -This method returns a `long` value, which indicates the number of hidden records in the cluster. - diff --git a/src/java/ref/OCluster/hideRecord.md b/src/java/ref/OCluster/hideRecord.md deleted file mode 100644 index 0551660c..00000000 --- a/src/java/ref/OCluster/hideRecord.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OCluster - hideRecord() - -Removes a record from queries without deleting the record from the database. - -## Hiding Records - -In OrientDB you can remove a record from queries without actually removing the data from the database. This is done by setting a 'tombstone' on the record, indicating to OrientDB that it should remain hidden. You may find this useful when implementing a 'trashcan' safety feature, to prevent users from accidentally deleting data from the database. - -### Syntax - -``` -boolean OCluster().hideRecord(long pos) -``` - -| Argument | Type | Description | -|---|---|---| -| **`pos`** | `long` | The position of the record in the cluster | - -#### Return Type - -This method returns a `boolean` value, indicating whether the record was successfully hidden. diff --git a/src/java/ref/OCluster/open.md b/src/java/ref/OCluster/open.md deleted file mode 100644 index cab53292..00000000 --- a/src/java/ref/OCluster/open.md +++ /dev/null @@ -1,15 +0,0 @@ - -# OCluster - open() - -Opens the cluster. - -## Opening Clusters - -In order to access cluster data from your application, you need to open it. In order to close it and free up resources later, use the [`close()`](close.md) method. - -### Syntax - -``` -void OCluster().open() -``` - diff --git a/src/java/ref/OCluster/truncate.md b/src/java/ref/OCluster/truncate.md deleted file mode 100644 index a3c3746e..00000000 --- a/src/java/ref/OCluster/truncate.md +++ /dev/null @@ -1,15 +0,0 @@ - -# OCluster - truncate() - -Deletes cluster content without deleting the cluster. - -## Truncating Clusters - -Occasionally, you may find yourself in situations where you need to remove data from the cluster without removing the cluster itself. Using this method, you can truncate the cluster, just as you would in OrientDB SQL using the [`TRUNCATE CLUSTER`](../../../sql/SQL-Truncate-Cluster.md) statement. - -### Syntax - -``` -void OCluster().truncate() -``` - diff --git a/src/java/ref/OCluster/updateRecord.md b/src/java/ref/OCluster/updateRecord.md deleted file mode 100644 index 175e16b6..00000000 --- a/src/java/ref/OCluster/updateRecord.md +++ /dev/null @@ -1,24 +0,0 @@ -# OCluster - updateRecord() - -Updates the given record with new data. - -## Updating Records - -When working with clusters, you can update a record through the [`OCluster`](../OCluster.md) instance using this method. - -### Syntax - -``` -void OCluster().updateRecord( - long pos, - byte[] content, - int version, - byte type) -``` - -| Argument | Type | Description | -|---|---|---| -| **`pos`** | `long` | Position of record in cluster | -| **`content`** | `byte[]` | Content to set on the record | -| **`version`** | `int` | Version of record to update | -| **`type`** | `byte` | Record type | diff --git a/src/java/ref/ODatabaseDocument.md b/src/java/ref/ODatabaseDocument.md deleted file mode 100644 index d9361a8a..00000000 --- a/src/java/ref/ODatabaseDocument.md +++ /dev/null @@ -1,133 +0,0 @@ - -# Java API - ODatabaseDocument - -This class provides a unified Multi-Model interface for managing and administering OrientDB Document and Graph databases. - -## Managing Databases - -In previous versions of OrientDB, separate classes were used for Document and Graph databases. This is because OrientDB began as a Document database and added support for Graph databases later, based on the Apache TinkerPop 2.x standard. Beginning in version 3.0.x using this class, OrientDB provides a common interface for both database types. It can be found at `com.orientechnologies.orient.core.db.document` . For instance, - -```java -import com.orientechnologies.orient.core.db.document.ODatabaseDocument; -``` - -Once you've imported the class to your application, you can use one of the constructors to build a particular instance in your code. - -### Example - -In order to operate on an instance of this class, you need to create it on the OrientDB Server, then open it through an [`OrientDB()`](OrientDB.md) or [`OServer`](OServer.md) instance. For example, in your own application you might want to streamline the startup process, so that it creates a working database in the event that one isn't ready, then opens it. - -```java -// INITIALIZE VARIABLES -private OrientDB orientdb; - -// OPEN/CREATE DATABASE -public static ODatabaseDocument openDatabase(String name) { - - // Initialize Server Connection - orientdb = new OrientDB("embedded:/tmp/", OrientDBConfig.defaultConfig()); - - // Check if Database Exists - if (!orientdb.exists(name)){ - orientdb.create(name, ODatabaseType.PLOCAL); - } - - return orientdb.open(name, "admin", "admin"); - -} -``` - -Here, the method uses the [`exists`](OrientDB/exists.md) method to determine of the database exists, runs the [`create()`](OrientDB/create.md) if it doesn't, then uses [`open()`](OrientDB/open.md) with default credentials to open the `ODatabaseDocument` instance in your application. - - -## Methods - - - -| Method | Return Type | Description | -|---|---|---| -| [**`close()`**](ODatabaseDocument/close.md) | `void` | Closes the database | -| [**`command()`**](ODatabaseDocument/command.md) | [`OResultSet`](OResultSet.md) | Executes idempotent or non-idempotent query | -| [**`execute()`**](ODatabaseDocument/execute.md) | [`OResultSet`](OResultSet.md) | Executes a query | -| [**`getMetadata()`**](ODatabaseDocument/getMetadata.md) | [`OMetadata`](OMetadata.md) | Retrieves the database metadata | -| [**`getName()`**](ODatabaseDocument/getName.md) | `String` | Retrieves the logical name of the database | -| [**`getURL()`**](ODatabaseDocument/getURL.md) | `String` | Retrieves the database URL | -| [**`getUser()`**](ODatabaseDocument/getUser.md) | [`OSecurityUser`](OSecurityUser.md) | Retrieves the current user | -| [**`incrementalBackup()`**](ODatabaseDocument/incrementalBackup.md) | `String` | Performs an incremental backup of the database to the given path | -| [**`isActiveOnCurrentThread()`**](ODatabaseDocument/isActiveOnCurrentThread.md) | `boolean` | Checks whether the current database is active on the current thread | -| [**`isClosed()`**](ODatabaseDocument/isClosed.md) | `boolean` | Checks whether the database is closed | -| [**`live()`**](ODatabaseDocument/live.md) | [`OLiveQueryMonitor`](OLiveQueryMonitor.md) | Subscribes query as a live query | -| [**`load()`**](ODatabaseDocument/load.md) | ` RET` | Loads a record by its Record ID | -| [**`query()`**](ODatabaseDocument/query.md) | [`OResultSet`](OResultSet.md) | Queries the database | -| [**`registerListener()`**](ODatabaseDocument/registerListener.md) | `void` | Subscribes the given listener to database events | -| [**`save()`**](ODatabaseDocument/save.md) | `T` | Saves the given entity to the database | -| [**`unregisterListener()`**](ODatabaseDocument/unregisterListener.md) | `void` | Unsubscribes the given listener from database events | - - -### Managing Classes and Clusters - -| Method | Return Type | Description | -|---|---|---| -| [**`addCluster()`**](ODatabaseDocument/addCluster.md) | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Adds a cluster to the database. | -| [**`browseClass`**](ODatabaseDocument/browseClass.md) | `ORecordIteratorClass` | Retrieves all records of the given database class | -| [**`browseCluster()`**](ODatabaseDocument/browseCluster.md) | ` ORecordIteratorCluster` | Retrieves all records of the given cluster | -| [**`countClass()`**](ODatabaseDocument/countClass.md) | [`long`]({{ book.javase }}/api/java/lang/Long.html) | Retrieves the number of records in the given database class | -| [**`countClusterElements()`**](ODatabaseDocument/countClusterElements.md) | [`long`]({{ book.javase }}/api/java/lang/Long.html) | Counts all entities in the specified cluster. | -| [**`createClass()`**](ODatabaseDocument/createClass.md) | [`OClass`](OClass.md) | Creates a new database class | -| [**`createClassIfNotExists()`**](ODatabaseDocument/createClassIfNotExists.md) | [`OClass`](OClass.md) | Creates a new database class, if not exists | -| [**`createEdgeClass()`**](ODatabaseDocument/createEdgeClass.md) | [`OClass`](OClass.md) | Creates a database class as an extension of the `E` edge class | -| [**`createVertexClass()`**](ODatabaseDocument/createVertexClass.md) | [`OClass`](OClass.md) | Creates a database class as an extension of the `V` vertex class | -| [**`dropCluster()`**](ODatabaseDocument/dropCluster.md) | `boolean` | Removes cluster from database | -| [**`existsCluster()`**](ODatabaseDocument/existsCluster.md) | `boolean` | Determines whether a cluster exists on the database | -| [**`getClass()`**](ODatabaseDocument/getClass.md) | [`OClass`](OClass.md) | Retrieves the given class from the database | -| [**`getClusterIdByName()`**](ODatabaseDocument/getClusterIdByName.md) | `int` | Retrieves the Cluster ID for the given cluster name | -| [**`getClusterNameById()`**](ODatabaseDocument/getClusterNameById.md) | `String` | Retrieves the cluster name for the given ID | -| [**`getClusters()`**](ODatabaseDocument/getClusters.md) | `int` | Returns the number of clusters on the database | -| [**`getDefaultClusterId()`**](ODatabaseDocument/getDefaultClusterId.md) | `int` | Returns the default Cluster ID | -| [**`truncateCluster()`**](ODatabaseDocument/truncateCluster.md) | `void` | Removes all data from the given cluster | - - - - -### Managing Records - -| Method | Return Type | Description | -|---|---|---| -| [**`delete()`**](ODatabaseDocument/delete.md) | `ODatabase` | Removes a record from the database | -| [**`getRecord()`**](ODatabaseDocument/getRecord.md) | ` RET` | Retrieves a record from the database | -| [**`getRecordType()`**](ODatabaseDocument/getRecordType.md) | [`byte`]({{ book.javase }}/api/java/lang/Byte.html) | Returns the default record type | -| [**`newBlob()`**](ODatabaseDocument/newBlob.md) | `OBlob` | Creates a new instance of a binary blob containing the given bytes | -| [**`newEdge()`**](ODatabaseDocument/newEdge.md) | [`OEdge`](OEdge.md) | Creates a new edge between the given vertices | -| [**`newElement()`**](ODatabaseDocument/newElement.md) | [`OElement`](OElement.md) | Creates a new element (that is, a document, vertex or edge) | -| [**`newInstance()`**](ODatabaseDocument/newInstance.md) | `RET` | Creates a new document, vertex or edge | -| [**`newVertex()`**](ODatabaseDocument/newVertex.md) | [`OVertex`](OVertex.md) | Creates a new vertex | - -### Managing Transactions - -| Method | Return Type | Description | -|---|---|---| -| [**`begin()`**](ODatabaseDocument/begin.md) | `ODatabase` | Initiates a transaction | -| [**`commit()`**](ODatabaseDocument/commit.md) | `ODatabase` | Commits a transaction | -| [**`getTransaction()`**](ODatabaseDocument/getTransaction.md) | [`OTransaction`](OTransaction.md) | Retrieves the current transaction | -| [**`rollback()`**](ODatabaseDocument/rollback.md) | `ODatabase` | Reverts changes | - - -### Managing Intents - - -| Method | Return Type | Description | -|---|---|---| -| [**`declareIntent()`**](ODatabaseDocument/declareIntent.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Declares an intent for the database. | -| [**`getActiveIntent()`**](ODatabaseDocument/getActiveIntent.md) | [`OIntent`](OIntent.md) | Returns the Intent active for the current session | diff --git a/src/java/ref/ODatabaseDocument/addCluster.md b/src/java/ref/ODatabaseDocument/addCluster.md deleted file mode 100644 index c5d11e6f..00000000 --- a/src/java/ref/ODatabaseDocument/addCluster.md +++ /dev/null @@ -1,24 +0,0 @@ - -# ODatabaseDocument - addCluster() - -This method creates a new cluster for the database. - -## Adding Clusters - -When you create a class, OrientDB automatically generates a cluster in which to store the data for that class. While this may be sufficient for many purposes, there is some benefit in creating additional clusters to better organize the data for the class. For instance, in a class used to manage accounts, you might separate clusters by region. Using this method you can create new cluster on the database. - -### Syntax - -``` -int ODatabaseDocument().addCluster(String clusterName, Object... parameters); -``` - -| Argument | Type | Description | -|--|---| -| **`clusterName`** | [`String`]({{ book.javase }}/java/lang/String.html) | Defines the logical name of the cluster | -| **`parameters`** | [`Object`]({{ book.javase }}/java/lang/Object.html) | Defines cluster creation options | - -#### Return Type - -This method returns a [`int`]({{ book.javase }}/java/lang/Integer.html) instance, which represents the created cluster's Cluster ID. That is, the numeric identifier that occurs in the first value of a Record ID. - diff --git a/src/java/ref/ODatabaseDocument/begin.md b/src/java/ref/ODatabaseDocument/begin.md deleted file mode 100644 index a07c272f..00000000 --- a/src/java/ref/ODatabaseDocument/begin.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ODatabaseDocument - begin() - -This method initiates a transaction on the database. - -## Beginning Transactions - -OrientDB supports the use of ACID transactions. This allows you to isolate database operations into units of work that you can commit or rollback later, depending on whether later conditions are met. Using this method you can initiate a transaction. To save a transaction or revert the changes, see [`commit()`](commit.md) and [`rollback()`](rollback.md) methods. - -### Syntax - -``` -ODatabase ODatabaseDocument.begin() -``` - -#### Return Type - -This method returns the database instance itself, providing a fluent interface. This is useful when calling multiple methods in a chain. diff --git a/src/java/ref/ODatabaseDocument/browseClass.md b/src/java/ref/ODatabaseDocument/browseClass.md deleted file mode 100644 index 3e3065a8..00000000 --- a/src/java/ref/ODatabaseDocument/browseClass.md +++ /dev/null @@ -1,30 +0,0 @@ - -# ODatabaseDocument - browseClass() - -This method returns all records in the given database class. It also returns subclasses, where available. - - -## Browsing Records by Class - -Records in OrientDB belong to a [database class](../../../general/Schema.md#class), which internally is an implementation of [`OClass`](../OClass.md). Using this method, you can retrieve all records that belong to a particular database class. - -### Syntax - -``` -// METHOD 1 -ORecordIteratorClass ODatabaseDocument().browseClass(String name) - -// METHOD 2 -ORecordIteratorClass ODatabaseDocument().browseClass(String name, Boolean polymorphic) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | -| **`polymorphic`** | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Defines whether the database class is polymorphic, (that is, whether it has sub-classes) | - -#### Return Value - -This method returns an `ORecordIteratorClass` instance that contains the relevant `ODocument` instances. `ODocument` is an subclass of [`OElement`](../OElement.md). - - diff --git a/src/java/ref/ODatabaseDocument/browseCluster.md b/src/java/ref/ODatabaseDocument/browseCluster.md deleted file mode 100644 index eef52e46..00000000 --- a/src/java/ref/ODatabaseDocument/browseCluster.md +++ /dev/null @@ -1,32 +0,0 @@ - -# ODatabaseDocument - browseCluster() - -This method retrieves all records stored on the given cluster. - -## Browsing Records by Cluster - -When you save records to the database, OrientDB stores them in a cluster. The cluster can be physical or in-memory. Using this method, you can retrieve records by the cluster they're stored in. - -### Syntax - -``` -// METHOD 1 - ORecordIteratorCluster ODatabaseDocument().browseCluster( - String name) - -// METHOD 2 - ORecordIteratorCluster ODatabaseDocument().browseCluster( - String name, - long startPosition, - long endPosition) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the cluster name | -| **`startPosition`** | [`long`]({{ book.javase }}/api/java/lang/Long.html) | Defines the starting position for the records you want to retrieve | -| **`endPosition`** | [`long`]({{ book.javase }}/api/java/lang/Long.html) | Defines the ending position for the record you want to retrieve | - -#### Return Value - -This method returns an `ORecordIteratorCluster` instance, which contains instances of the generic, which can be any class that extends the `ORecord` class. The `ORecord` class itself extends the [`OElement`](../OElement.md) class. diff --git a/src/java/ref/ODatabaseDocument/close.md b/src/java/ref/ODatabaseDocument/close.md deleted file mode 100644 index 38899174..00000000 --- a/src/java/ref/ODatabaseDocument/close.md +++ /dev/null @@ -1,16 +0,0 @@ - -# ODatabaseDocument - close() - -This method closes the database. - -## Closing Databases - -Using this method, you can close an opened database, freeing up resources for other uses. In the event that the database is already closed, this method does nothing. When you close a database, any open transactions are closed, their changed rolled back. - -### Syntax - -``` -void ODatabaseDocument().close() -``` - - diff --git a/src/java/ref/ODatabaseDocument/command.md b/src/java/ref/ODatabaseDocument/command.md deleted file mode 100644 index 5de9399d..00000000 --- a/src/java/ref/ODatabaseDocument/command.md +++ /dev/null @@ -1,25 +0,0 @@ - -# ODatabaseDocument - command() - -This method executes a generic command. - -## Executing Commands - -Using this method you can issue a command to the OrientDB database. The command can either be idempotent or non-idempotent. The return value is an [`OResultSet`](../OResultSet.md) instance. Note that you need to close the result-set after usage to free up resources. - -### Syntax - -``` -OResultSet ODatabaseDocument().command(String query, Map args) -``` - -| Argument | Type | Description | -|---|---|---| -| **`query`** | [`String`]({{ book.javase }}/java/lang/String.html) | Defines the query you want to execute. | -| **`args`** | [`Map`]({{ book.javase }}/java/util/Map.html) | Defines parameters for use in formatting the query. | - -### Return Value - -This method returns an [`OResultSet`](../OResultSet.md) instance, which contains the result-set of your query. Note that you need to close it when you're done to free up resources. - - diff --git a/src/java/ref/ODatabaseDocument/commit.md b/src/java/ref/ODatabaseDocument/commit.md deleted file mode 100644 index da1b37ce..00000000 --- a/src/java/ref/ODatabaseDocument/commit.md +++ /dev/null @@ -1,22 +0,0 @@ - -# ODatabaseDocument - commit() - -This method saves changes made in a transaction onto the database. - -## Beginning Transactions - -OrientDB supports the use of ACID transactions. This allows you to isolate database operations into units of work that you can commit or rollback later, depending on whether later conditions are met. Using this method you can commit a transaction. To initiate a transaction or revert the changes, see [`begin()`](begin.md) and [`rollback()`](rollback.md) methods. - -### Syntax - -``` -ODatabase ODatabaseDocument.commit() -``` - -#### Exceptions - -In the event of error, such as the transaction encountering a conflict, this method raises an `OTransactionException` exception. - -#### Return Type - -This method returns the database instance itself, providing a fluent interface. This is useful when calling multiple methods in a chain. diff --git a/src/java/ref/ODatabaseDocument/countClass.md b/src/java/ref/ODatabaseDocument/countClass.md deleted file mode 100644 index 5c995cff..00000000 --- a/src/java/ref/ODatabaseDocument/countClass.md +++ /dev/null @@ -1,28 +0,0 @@ - -# ODatabaseDocument - countClass() - -This method returns the number of records in a given database class. - -## Counting Records by Class - -OrientDB organizes data by a database class, which is an instance of the [`OClass`](../OClass.md) class. Using this method, you can retrieve a count of the number of records in a given database class. - -### Syntax - -``` -// METHOD 1 -long ODatabaseDocument().countClass(String name) - -// METHOD 2 -long ODatabaseDocument().countClass(String name, Boolean isPolymorphic) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | -| **`isPolymorphic`** | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Defines whether the class has sub-classes | - -#### Return Value - -This method returns a [`Long`]({{ book.javase }}/api/java/lang/Long.html) instance that represents the number of records on the given database class. - diff --git a/src/java/ref/ODatabaseDocument/countClusterElements.md b/src/java/ref/ODatabaseDocument/countClusterElements.md deleted file mode 100644 index c55c909d..00000000 --- a/src/java/ref/ODatabaseDocument/countClusterElements.md +++ /dev/null @@ -1,27 +0,0 @@ - -# ODatabaseDocument - countClusterElements() - -This method counts all entities in the specified cluster. - -## Counting Cluster Elements - -A cluster is the physical or in-memory container in which records are stored. Whenever you create an [`OClass`](../OClass.md) instance, OrientDB simultaneously creates a default [`OCluster`](../OCluster.md) in which to store data of that class. Often a class will have several clusters, allowing you to better organize the data they contain. Using this method you can determine the number of records stored in each cluster, as identified by its Cluster ID, (that is, the first number in the Record ID) or by an array of Cluster ID's. - -### Syntax - -``` -long ODatabaseDocument().countClusterElements(int clusterId) -long ODatabaseDocument().countClusterElements(int[] clusterIds) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | [`int`]({{ book.javase }}/api/java/lang/Integer.html) | Defines the identifier for an individual cluster. | -| **`clusterIds`** | [`int[]`]({{ book.javase }}/java/lang/reflect/Array.html) | Defines the identifiers for an array of clusters. | - -#### Return Value - -This method returns a [`long`]({{ book.javase }}/api/java/lang/Long.html) instance. It represents the number of records counted in the cluster or clusters. - - - diff --git a/src/java/ref/ODatabaseDocument/createClass.md b/src/java/ref/ODatabaseDocument/createClass.md deleted file mode 100644 index 71af9764..00000000 --- a/src/java/ref/ODatabaseDocument/createClass.md +++ /dev/null @@ -1,26 +0,0 @@ -# ODatabaseDocument - createClass() - -This method creates a database class on the database. - -## Creating Database Class - -OrientDB borrows from the Object Oriented programming paradigm the concept of classes, which in these Reference pages is called a *database class*, to avoid confusion with classes in Java. Internally, each database class is an instance of [`OClass`](../OClass.md). Using this method, you can create new database classes on the database. - -This method is implemented through the superclass `ODatabase`. - -### Syntax - -``` -default OClass ODatabaseDocument().createClass( - String name, - String... superclasses) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | -| **`superclasses`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the superclass to which the new class belongs | - -#### Return Value - -This method returns an [`OClass`](../OClass.md) instance for the new database class. diff --git a/src/java/ref/ODatabaseDocument/createClassIfNotExists.md b/src/java/ref/ODatabaseDocument/createClassIfNotExists.md deleted file mode 100644 index 203d2c87..00000000 --- a/src/java/ref/ODatabaseDocument/createClassIfNotExists.md +++ /dev/null @@ -1,28 +0,0 @@ - -# ODatabaseDocument - createClassIfNotExists() - -This method creates a new database class if the given name does not already exist. - -## Creating Database Classes - -OrientDB borrows from the Object Oriented programming paradigm the concept of classes, which in these Reference pages is called a *database class*, to avoid confusion with classes in Java. Internally, each database class is an instance of [`OClass`](../OClass.md). Using this method, you can create new database classes on the database, when the given name doesn't exist already. - - -### Syntax - -``` -default OClass ODatabaseDocument().createClassIfNotExist( - String name, - String... superclasses) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | -| **`superclasses`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the superclass the new class belongs to | - -#### Return Value - -This method returns an [`OClass`](../OClass.md) instance for the database class. - - diff --git a/src/java/ref/ODatabaseDocument/createEdgeClass.md b/src/java/ref/ODatabaseDocument/createEdgeClass.md deleted file mode 100644 index bcb8eb36..00000000 --- a/src/java/ref/ODatabaseDocument/createEdgeClass.md +++ /dev/null @@ -1,28 +0,0 @@ - -# ODatabaseDocument - createEdgeClass() - -This method creates a database class, which extends the `E` class on the database. - -## Creating Edge Classes - -OrientDB borrows from the Object Oriented programming paradigm the concept of classes, which in these Reference pages is called a *database class*, to avoid confusion with classes in Java. Internally, each database class is an instance of [`OClass`](../OClass.md). Using this method, you can create new database classes on the database, which extend the `E` edge class. - -To create a vertex class instead, see [`createVertexClass()`](createVertexClass.md). - -### Syntax - -``` -default OClass ODatabaseDocument().createEdgeClass(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | - -#### Return Value - -This method returns an [`OClass`](../OClass.md) instance for the new database class. - - - - diff --git a/src/java/ref/ODatabaseDocument/createVertexClass.md b/src/java/ref/ODatabaseDocument/createVertexClass.md deleted file mode 100644 index 68d89176..00000000 --- a/src/java/ref/ODatabaseDocument/createVertexClass.md +++ /dev/null @@ -1,25 +0,0 @@ - -# ODatabaseDocument - createVertexClass() - -This method creates a new database class, which extends the `V` class. - -## Creating Vertex Classes - -OrientDB borrows from the Object Oriented programming paradigm the concept of classes, which in these Reference pages is called a *database class*, to avoid confusion with classes in Java. Internally, each database class is an instance of [`OClass`](../OClass.md). Using this method, you can create new database classes on the database, which extend the `V` edge class. - -To create a edge class instead, see [`createEdgeClass()`](createEdgeClass.md). - -### Syntax - -``` -default OClass ODatabaseDocument().createVertexClass(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | - -#### Return Value - -This method returns an [`OClass`](../OClass.md) instance that represents the new database class. - diff --git a/src/java/ref/ODatabaseDocument/declareIntent.md b/src/java/ref/ODatabaseDocument/declareIntent.md deleted file mode 100644 index 2e906e28..00000000 --- a/src/java/ref/ODatabaseDocument/declareIntent.md +++ /dev/null @@ -1,23 +0,0 @@ - -# ODtabaseDocument - declareIntent() - -Declares an intent for the database. This defines common use-cases in order to optimize execution. - -## Declaring Intents - -OrientDB supports three intents: `OIntentMassiveInsert`, `OIntentMassiveRead`, `OIntentNoCache`. They are all sub-classes of the [`OIntent`](../OIntent.md) class. Using this method, you can activate an intent for the database. - -### Syntax - -``` -boolean ODatabaseDocument().declareIntent(OIntent intent) -``` - -| Argument | Type | Description| -|---|---|---| -| **`intent`** | [`OIntent`](../OIntent.md) | Defines the intent you want to enable. | - -#### Return Type - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, indicating whether the intent was successfully enabled. - diff --git a/src/java/ref/ODatabaseDocument/delete.md b/src/java/ref/ODatabaseDocument/delete.md deleted file mode 100644 index a5a857af..00000000 --- a/src/java/ref/ODatabaseDocument/delete.md +++ /dev/null @@ -1,23 +0,0 @@ - -# ODatabaseDocument - delete() - -This method removes the given record from the database. - -## Removing Records - -Using this method you can remove a record from the database, as defined by its Record ID. - -### Syntax - -``` -ODatabase ODatabaseDocument().delete(ORID rid) -``` - -| Argument | Type | Description | -|---|---|---| -| **`rid`** | [`ORID`](../ORID.md) | Record ID to delete | - -#### Return Type - -The method returns the database instance itself, providing a fluent interface, (which you may find useful when calling multiple methods in a chain). - diff --git a/src/java/ref/ODatabaseDocument/dropCluster.md b/src/java/ref/ODatabaseDocument/dropCluster.md deleted file mode 100644 index d6900392..00000000 --- a/src/java/ref/ODatabaseDocument/dropCluster.md +++ /dev/null @@ -1,26 +0,0 @@ - -# ODatabaseDocument - dropCluster() - -Removes cluster from the database. - -## Removing Clusters - -Clusters represent places on disk or in memory where OrientDB actually stores data. Using this method, you can remove a cluster from the database. With physical clusters this completely deletes the cluster and all its data. - -### Syntax - -``` -boolean ODatabaseDocument().dropCluster(int clusterId, boolean trunc) - -boolean ODatabaseDocument().dropCluster(String name, boolean trunc) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | `Integer` | Defines the Cluster ID | -| **`name`** | `String` | Defines the cluster name | -| **`trunc`** | `boolean` | Defines whether you want to truncate the cluster | - -#### Return Value - -This method returns a `boolean` value, which indicates whether the cluster was successfully removed. diff --git a/src/java/ref/ODatabaseDocument/execute.md b/src/java/ref/ODatabaseDocument/execute.md deleted file mode 100644 index 7042dc2f..00000000 --- a/src/java/ref/ODatabaseDocument/execute.md +++ /dev/null @@ -1,75 +0,0 @@ - -# ODatabaseDocument - execute() - -Runs the given script in the specified query language and returns a result-set. - -## Executing Queries - -Using this method you can execute queries on the OrientDB database. You may find it useful when you need to construct an OrientDB SQL statement based on user input or runtime information. Note that the method returns an [`OResultSet`](../OResultSet.md) instance, which you need to close when done. - -### Syntax - -``` -OResultSet ODatabaseDocument().execute(String lang, String script, Object... args) -OResultSet ODatabaseDocument().execute(String lang, String script, Map args) -``` - -| Argument | Type | Description | -|---|---|---| -| **`lang`** | `String` | Defines the language you want to use. For instance, `sql` for OrientDB SQL | -| **`script`** | `String` | Provides the script you want to execute | -| **`args`** | `Object | Map` | Defines arguments to use in formatting the script | - -#### Return Value - -This method returns an [`OResultSet`](../OResultSet.md) instance, containing the result-set of the query. Note that you need to close the result-set when you're done using it in order to free up resources. - -### Example - -Imagine an application that stores account information on OrientDB. You might create a method to connect to the database and add new client data, rolling the [`INSERT`](../../../sql/SQL-Insert.md) statement with the data provided by the parameters. - -```java -private ODatabaseDocument db; - -// Queries -private String addAccountSql = "INSERT INTO Account SET company = '?', contact = '?', email = '?'"; -... - -// Add New Client to Accounts Task -public void addAccounts(String company, String contact, String email){ - - // Log Operation - System.out.println(String.format("Adding Client: %s", company)); - - // Execute Query - OResultSet results = db.execute("sql", addAccountSql, company, contact, email); - - // Close Result-set - results.close(); -} -``` - -You can also use the alternative syntax, where the data parameters are defined by a `Map` instance. - -```java -private ODatabaseDocument db; - -// Queries -private String addAccountSql = "INSERT INTO Account SET company = ':company', contact = ':contact', email = ':email'"; -... - -// Add New Client to Accounts Task -public void addAccounts(Map params){ - - // Log Operation - System.out.println(String.format("Adding Client: %s", company)); - - // Execute Query - OResultSet results = db.execute("sql", addAccountSql, params); - - // Close Result-set - results.close(); -} -``` - - diff --git a/src/java/ref/ODatabaseDocument/existsCluster.md b/src/java/ref/ODatabaseDocument/existsCluster.md deleted file mode 100644 index 435265a2..00000000 --- a/src/java/ref/ODatabaseDocument/existsCluster.md +++ /dev/null @@ -1,24 +0,0 @@ - -# ODatabaseDocument - existsCluster() - -Determines whether the given cluster exists on the database. - -## Checking Clusters - -Clusters are where OrientDB actually stores data. You can store the data on disk using a physical cluster or you can store it using a volatile in-memory cluster. In the event that you are not sure whether a cluster exists on the database either at the moment or at that point in the execution of your code, you can use this method to get a `boolean` value telling you whether it's available by name. - -### Syntax - -``` -boolean ODatabaseDocument().existsCluster(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | The logical name of the cluster | - - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the cluster exists on the database. - diff --git a/src/java/ref/ODatabaseDocument/getActiveIntent.md b/src/java/ref/ODatabaseDocument/getActiveIntent.md deleted file mode 100644 index dbb6be73..00000000 --- a/src/java/ref/ODatabaseDocument/getActiveIntent.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ODatabaseDocument - getActiveIntent() - -Returns the active Intent for the current session. - -## Retrieving Intents - -OrientDB uses Intents to shift its internal configuration, optimizing the database for particular tasks, like huge reads or write operations. Intents are all subclasses of the [`OIntent`](../OIntent.md) class. Using this method you can retrieve the current Intent, then check it against the operation you plan to perform or change it to another Intent, using the [`declareIntent`](declareIntent.md) method. - -### Syntax - -``` -OIntent ODatabaseDocument().getActiveIntent() -``` - -#### Return Value - -This method returns an [`OIntent`](../OIntent.md) instance, representing the current active Intent for the database. diff --git a/src/java/ref/ODatabaseDocument/getClass.md b/src/java/ref/ODatabaseDocument/getClass.md deleted file mode 100644 index cf9f34ab..00000000 --- a/src/java/ref/ODatabaseDocument/getClass.md +++ /dev/null @@ -1,26 +0,0 @@ - -# ODatabaseDocument - getClass() - -This method retrieves the given class. - -## Retrieving Classes - -OrientDB has the concept of classes used to organize data of similar types. Using this method, you can retrieve a particular [`OClass`](../OClass.md) instance for the given class name. - -### Syntax - -``` -OClass ODatabaseDocument().getClass(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the name of the class | - -#### Return Value - -This method returns the [`OClass`](../OClass.md) instance corresponding to the given name. - - - - diff --git a/src/java/ref/ODatabaseDocument/getClusterIdByName.md b/src/java/ref/ODatabaseDocument/getClusterIdByName.md deleted file mode 100644 index 63cd64d2..00000000 --- a/src/java/ref/ODatabaseDocument/getClusterIdByName.md +++ /dev/null @@ -1,23 +0,0 @@ - -# ODatabaseDocument - getClusterIdByName() - -Retrieves the Cluster ID for the given cluster. - -## Retrieving Cluster ID's - -OrientDB uses two systems to identify clusters. The first is the Cluster ID, which is represented by the first set of digits in a Record ID. The second is the logical cluster name. Using this method, you can retrieve the Cluster ID for the given cluster name. If you have the Cluster ID already and want the cluster name, use the [`getClusterNameById()`](getClusterNameById.md) method. - -### Syntax - -``` -int ODatabaseDocument().getClusterIdByName(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Defines the cluster name | - - -#### Return Value - -This method returns an `int` value, which corresponds to the Cluster ID of the given cluster. diff --git a/src/java/ref/ODatabaseDocument/getClusterNameById.md b/src/java/ref/ODatabaseDocument/getClusterNameById.md deleted file mode 100644 index a73155a4..00000000 --- a/src/java/ref/ODatabaseDocument/getClusterNameById.md +++ /dev/null @@ -1,23 +0,0 @@ - -# ODatabaseDocument - getClusterNameById() - -Retrieves the cluster name for the given ID. - -## Retrieving Cluster ID's - -OrientDB uses two systems to identify clusters. The first is the Cluster ID, which is represented by the first set of digits in a Record ID. The second is the logical cluster name. Using this method, you can retrieve the name for the given ID. In the event that you have the cluster name and need the ID, use the [`getClusterIdByName()`](getClusterIdByName.md) method. - -### Syntax - -``` -String ODatabaseDocument().getClusterNameById(int id) -``` - -| Argument | Type | Description | -|---|---|---| -| **`id`** | `int` | Defines the Cluster ID | - - -#### Return Value - -This method returns a `String` value that corresponds to the logical name of the cluster. diff --git a/src/java/ref/ODatabaseDocument/getClusters.md b/src/java/ref/ODatabaseDocument/getClusters.md deleted file mode 100644 index 996714d9..00000000 --- a/src/java/ref/ODatabaseDocument/getClusters.md +++ /dev/null @@ -1,21 +0,0 @@ - -# ODatabaseDocument - getClusters() - -Returns the number of clusters on the database. - -## Counting Clusters - -OrientDB uses clusters to designate physical or in-memory spaces in which to store your data. Using this method you can retrieve a count of the number of clusters on the database. - -### Syntax - -``` -int ODatabaseDocument().getClusters() -``` - -#### Return Value - -This method returns an `int` value, providing the number of clusters on the database. - - - diff --git a/src/java/ref/ODatabaseDocument/getDefaultClusterId.md b/src/java/ref/ODatabaseDocument/getDefaultClusterId.md deleted file mode 100644 index 0a47cdd6..00000000 --- a/src/java/ref/ODatabaseDocument/getDefaultClusterId.md +++ /dev/null @@ -1,21 +0,0 @@ - -# ODatabaseDocument - getDefaultClusterId() - -Retrieves the default Cluster ID for the database. - -## Default Clusters - -While OrientDB does support the use of a schema, it can also be used without a schema or with a partially enforced schema. In these cases, data that added without a specified class or cluster is stored on the database under the default cluster. Using this method, you can retrieve the Cluster ID for the default cluster. - -### Syntax - -``` -int ODatabaseDocument().getDefaultClusterId() -``` - -#### Return Value - -This method returns an `int` value, which corresponds to the default Cluster ID. - - - diff --git a/src/java/ref/ODatabaseDocument/getMetadata.md b/src/java/ref/ODatabaseDocument/getMetadata.md deleted file mode 100644 index 74d7f2cf..00000000 --- a/src/java/ref/ODatabaseDocument/getMetadata.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ODatabaseDocument - getMetadata() - -Retrieves the database metadata. - -## Retrieving Metadata - -OrientDB stores general information, like the function library, schema and security information on an [`OMetadata`](../OMetadata.md) instance of the database. Using this method, you can retrieve the metadata to read it or operate on it. - -### Syntax - -``` -OMetadata ODatabaseDocument().getMetadata() -``` - -#### Return Value - -This method returns the [`OMetadata`](../OMetadata.md) instance that corresponds to the current database. diff --git a/src/java/ref/ODatabaseDocument/getName.md b/src/java/ref/ODatabaseDocument/getName.md deleted file mode 100644 index ac3c6b62..00000000 --- a/src/java/ref/ODatabaseDocument/getName.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ODatabaseDocument - getName() - -Retrieves the logical name of the database. - -## Database Names - -Each database you create in OrientDB has a logical name under which it can be accessed later. This is the name you passed to the [`CREATE DATABASE`](../../../console/Console-Command-Create-Database.md) statement when you created the database. Using this method you can retrieve the logical name from OrientDB. - -### Syntax - -``` -String ODatabaseDocument().getName() -``` - -#### Return Value - -This method returns a `String` instance, which corresponds to the logical name of the database. - - diff --git a/src/java/ref/ODatabaseDocument/getRecord.md b/src/java/ref/ODatabaseDocument/getRecord.md deleted file mode 100644 index b93f3b4f..00000000 --- a/src/java/ref/ODatabaseDocument/getRecord.md +++ /dev/null @@ -1,50 +0,0 @@ - -# ODatabaseDocument - getRecord() - -This method retrieves a record from the database. - -## Retrieving Records - -This method takes an instance of the `OIdentifiable` interface and returns the corresponding record. - -### Syntax - -``` - RET ODatabaseDocument().getRecord( - OIdentifiable id) -``` - -| Argument | Type | Description | -|---|---|---| -| **`id`** | `OIdentifiable` | Defines the record you want | - - -#### Return Value - -This method returns a record instance, which extends the `ORecord` class. The particular type depends on the record you have stored. Possible types include, - -- `ODocument` -- [`OEdge`](../OEdge.md) -- [`OElement`](../OElement.md) -- `ORecord` -- [`OVertex`](../OVertex.md) - -### Example - -In cases where you find you are frequently retrieving records by Record ID, you might find in convenient to write a method that streamlines the process, making it easier to call. For instance, - -```java -// INITIALIZE VARIABLES -private ODatabaseDocument db; -... - -// FETCH RECORD -public OElement fetchRecord(String rid){ - - // Initialize Record ID - id = ORecordId(rid); - - // Fetch Record - return db.getRecord(id); -} -``` diff --git a/src/java/ref/ODatabaseDocument/getRecordType.md b/src/java/ref/ODatabaseDocument/getRecordType.md deleted file mode 100644 index ab7f8204..00000000 --- a/src/java/ref/ODatabaseDocument/getRecordType.md +++ /dev/null @@ -1,15 +0,0 @@ - -# ODatabaseDocument - getRecordType() - -This method returns the default record type for the database. - -## Retrieving Record Types - -The [`ODatabaseDocument`](../ODatabaseDocument.md) class serves as a generic interface for operating on both Document and Graph databases. Records are stored using different classes depending on which database-type you chose to use. This method tells you which class is being used as the default on your database. - -### Syntax - -``` -public byte ODatabaseDocument().getRecordType() -``` - diff --git a/src/java/ref/ODatabaseDocument/getTransaction.md b/src/java/ref/ODatabaseDocument/getTransaction.md deleted file mode 100644 index f1b966b4..00000000 --- a/src/java/ref/ODatabaseDocument/getTransaction.md +++ /dev/null @@ -1,19 +0,0 @@ - -# ODatabaseDocument - getTransaction() - -Retrieves the current transaction. - -## Fetching Transactions - -OrientDB is ACID compliant and supports the use of transactions. Internally, transactions are tracked using an [`OTransaction`](../OTransaction.md) instance. Using this method, you can retrieve the active [`OTransaction`](../OTransaction.md) instance. In the event that no transaction is currently active on the database, this method returns an `OTransactionNoTx` instance. - -### Syntax - -``` -OTransaction ODatabaseDocument().getTransaction() -``` - -#### Return Value - -This method returns an [`OTransaction`](../OTransaction.md) implementation. - diff --git a/src/java/ref/ODatabaseDocument/getURL.md b/src/java/ref/ODatabaseDocument/getURL.md deleted file mode 100644 index c2495e46..00000000 --- a/src/java/ref/ODatabaseDocument/getURL.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ODatabaseDocument - getURL() - -Retrieves the database URL. - -## Database URL - -Each database in OrientDB has a URL that corresponds to the path needed to access it. Database URL's are relative to the OrientDB home directory. For instance, `plocal:../databases/GratefulDeadConcerts`. Using this method you can retrieve the URL of the current database instance. - -### Syntax - -``` -String ODatabaseDocument().getURL() -``` - -#### Return Value - -This method returns a `String` value, which corresponds to the URL of the current database. diff --git a/src/java/ref/ODatabaseDocument/getUser.md b/src/java/ref/ODatabaseDocument/getUser.md deleted file mode 100644 index 2c088a8a..00000000 --- a/src/java/ref/ODatabaseDocument/getUser.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ODatabaseDocument - getUser() - -Retrieves the current user. - -## Getting Current User - -In order to connect to a database on OrientDB you need to provide specific user credentials. Using this method, you can retrieve the user that's currently logged into the database. You can then further operate on this instance to modify its privileges. - -### Syntax - -``` -OSecurityUser ODatabaseDocument().getUser() -``` - -#### Return Value - -This method returns an [`OSecurityUser`](../OSecurityUser.md) instance that corresponds to the current user. - - diff --git a/src/java/ref/ODatabaseDocument/incrementalBackup.md b/src/java/ref/ODatabaseDocument/incrementalBackup.md deleted file mode 100644 index 8899fe37..00000000 --- a/src/java/ref/ODatabaseDocument/incrementalBackup.md +++ /dev/null @@ -1,25 +0,0 @@ - -# ODatabaseDocument - incrementalBackup() - -Performs an incremental backup to the given path. - -## Incremental Backups - -OrientDB can back up your database using full or incremental operations. A full backup creates a complete copy of the database. An incremental backup checks the backup in the target path and only writes to file the data that has changed since the last backup took place. Using this method you can run an incremental backup on the current database instance. - -This operation is thread safe and can be done in the normal operational mode. When done the first time, OrientDB performs a full backup. Otherwise it only writes the changes. - -### Syntax - -``` -String ODatabaseDocument().incrementalBackup(String path) -``` - -| Argument | Type | Description | -|---|---|---| -| **`path`** | `String` | Path to backup | - - -#### Return Value - -This method returns a `String` instance, which corresponds to the filename of the backup. diff --git a/src/java/ref/ODatabaseDocument/isActiveOnCurrentThread.md b/src/java/ref/ODatabaseDocument/isActiveOnCurrentThread.md deleted file mode 100644 index 5cb87a98..00000000 --- a/src/java/ref/ODatabaseDocument/isActiveOnCurrentThread.md +++ /dev/null @@ -1,19 +0,0 @@ - -# ODatabaseDocument - isActiveOnCurrentThread() - -Determines whether the current database is active on the current thread. - -## Database Thread - -Using this method you can determine whether the current database is active on the current thread in your application. - -### Syntax - -``` -boolean ODatabaseDocument().isActiveOnCurrentThread() -``` - -#### Return Value - -This method returns a `boolean` value indicating whether the current database is active on the current thread. - diff --git a/src/java/ref/ODatabaseDocument/isClosed.md b/src/java/ref/ODatabaseDocument/isClosed.md deleted file mode 100644 index 788b35ef..00000000 --- a/src/java/ref/ODatabaseDocument/isClosed.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ODatabaseDocument - isClosed() - -Determines whether the current database is closed or open. - -## Checking Database - -When you finish with an [`ODatabaseDocument`](../ODatabaseDocument.md) instance, you should close it to free up resources, using the [`close()`](close.md) method. In cases where you are uncertain as to whether the database instance is open or whether it was closed at this particular point in your application, you can check whether it is closed using this method. - - -### Syntax - -``` -boolean ODatabaseDocument().isClosed() -``` - -#### Return Value - -This method returns a `boolean` value, if `true` it indicates that the database is closed. Otherwise, it is currently open. - diff --git a/src/java/ref/ODatabaseDocument/live.md b/src/java/ref/ODatabaseDocument/live.md deleted file mode 100644 index ea8b743d..00000000 --- a/src/java/ref/ODatabaseDocument/live.md +++ /dev/null @@ -1,33 +0,0 @@ - -# ODatabaseDocument - live() - -Subscribes a query as a live query for use with future create and update events. - -## Using Live Queries - -In OrientDB, a [Live Query](../../Live-Query.md) is essentially a [`SELECT`](../../../sql/SQL-Query.md) statement with push functionality. The database identifies the records that the query would return, anytime a record is added that fits the query and anytime the records returned by the query are changed, OrientDB pushes the changes through to the listener. Using this method, you can subscribe a query as a live query then configure how your application receives updates from OrientDB. - -### Syntax - -``` -OLiveQueryMonitor ODatabaseDocument().live( - String query, - OLiveQueryResultListener listener - Map args) -OLiveQueryMonitor ODatabaseDocument().live( - String query, - OLiveQueryResultListener listener - Object... args) -``` - -| Argument | Type | Description | -|---|---|---| -| **`query`** | `String` | Query to define the records you want to monitor | -| **`listener`** | [`OLiveQueryResultListener`](../OLiveQueryResultListener.md) | Provides the listener to receive query results | -| **`args`** | `Map| Object...` | Arguments used in formatting the query | - - -#### Return Value - -This method returns an [`OLiveQueryMonitor`](../OLiveQueryMonitor.md) instance. - diff --git a/src/java/ref/ODatabaseDocument/load.md b/src/java/ref/ODatabaseDocument/load.md deleted file mode 100644 index 99dbbc25..00000000 --- a/src/java/ref/ODatabaseDocument/load.md +++ /dev/null @@ -1,21 +0,0 @@ - -# ODatabaseDocument - load() - -Loads a record by its Record ID. - -## Loading Records - -In situations where you want to access a record on the database and you know its specific Record ID, you may find it more convenient and performant to call the record up directly rather than retrieving it through a query. Using this method you can fetch the record using an [`ORID`](../ORID.md) instance as an identifier. - -You can also optionally define a [fetch plan](../../Fetching-Strategies.md) to define how OrientDB retrieves the record. - -### Syntax - -``` - RET ODatabaseDocument().load(ORID recordId) - RET ODatabaseDocument().load( - ORID recordId, - String fetchPlan) -``` - - diff --git a/src/java/ref/ODatabaseDocument/newBlob.md b/src/java/ref/ODatabaseDocument/newBlob.md deleted file mode 100644 index d4cf6a50..00000000 --- a/src/java/ref/ODatabaseDocument/newBlob.md +++ /dev/null @@ -1,24 +0,0 @@ - -# ODatabaseDocument - newBlob() - -This method creates a new binary blob instance containing the given bytes. - -## Creating Blobs - -In cases where you want to create binary blobs on the database rather than the standard records, edges or vertices, you can do using this method and an `OBlob` instance. - -### Syntax - -There are two versions available to this method. One defines the bytes you want in the blob, the other creates an empty `OBlob` instance. - -``` -// METHOD 1 -public OBlob ODatabaseDocument.newBlob(bytes[] blobBytes) - -// METHOD 2 -public OBlob ODatabaseDocument.newBlob() -``` - -| Argument | Type | Description | -|---|---|---| -| **`blobBytes`** | [`bytes[]`]({{ book.javase }}/api/java/lang/Byte.html) | Defines the bytes to put in the blob | diff --git a/src/java/ref/ODatabaseDocument/newEdge.md b/src/java/ref/ODatabaseDocument/newEdge.md deleted file mode 100644 index f686f53b..00000000 --- a/src/java/ref/ODatabaseDocument/newEdge.md +++ /dev/null @@ -1,56 +0,0 @@ - -# ODatabaseDocument - newEdge() - -This method creates a new edge between the given vertices. - -## Creating Edges - -When using OrientDB as a Graph database, this method allows you to create new edges on the database and connect them to related vertices. To create new vertices on the database, see the [`newVertex()`](newVertex.md) method. - -### Syntax - -There are a few different versions available when using this method: - -``` -// METHOD 1 -default OEdge ODatabaseDocument().newEdge(OVertex fromV, OVertex toV) - -// METHOD 2 -OEdge ODatabaseDocument().newEdge(OVertex fromV, OVertex toV, OClass class) - -// METHOD 3 -OEdge ODatabaseDocument().newEdge(OVertex fromV, OVertex toV, String class-name) -``` - -Edges have their own classes in OrientDB. When using the first method, the edge is created using the default `E` class. The other methods allow you to set the specific edge class that you want to use. - - -| Argument | Type | Description -|---|---|---| -| **`fromV`** | [`OVertex`](../OVertex.md) | Defines the vertex this edge comes from | -| **`toV`** | [`OVertex`](../OVertex.md) | Defines the vertex this edge points to | -| **`class`** | [`OClass`](../OClass.md) | Defines the edge class | -| **`class-name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the edge class | - - -#### Return Value - -This method returns an [`OEdge`](../OEdge.md) instance of the edge it creates. - -### Example - -Imagine an application that makes frequent use a particular edge class. You might find it convenient to write a method that automatically calls that class by default when creating new edges.For instance, in a class handling social network accounts: - -```java -// INITIALIZE VARIABLES -private static String edgeClass = "subscription"; -private ODatabaseDocument db; -... - -// SUBSCRIBE TO USER'S BLOG -public void subscribe(OVertex subscriber, OVertex publisher){ - - db.newEdge(subscriber, publisher, edgeClass); - -} -``` diff --git a/src/java/ref/ODatabaseDocument/newElement.md b/src/java/ref/ODatabaseDocument/newElement.md deleted file mode 100644 index 13c874f4..00000000 --- a/src/java/ref/ODatabaseDocument/newElement.md +++ /dev/null @@ -1,59 +0,0 @@ - -# ODatabaseDocument - newElement() - -This method creates a new record on the database. - -## Creating Elements - -When you use OrientDB to host a Document database, the [`OElement`](../OElement.md) class represents a document in the database. With Graph databases, [`OElement`](../OElement.md) is the superclass to [`OVertex`](../OVertex.md) and [`OEdge`](../OEdge.md). This method allows you to create a new element within your application. You can then set data on the element and save it to the database. - ->**NOTE**: In version 2.2.x and earlier, OrientDB Document databases used the `ODocument` class to represent documents. While it still exists as the main implementation of [`OElement`](../OElement.md), it is recommended that you no longer use it directly. Instead, from now on use the [`OElement`](../OElement.md) class for documents. - -### Syntax - -There are two methods available to you, one creates an empty element and the other creates the new element using a particular OrientDB class. - -``` -// METHOD 1 -OElement ODatabaseDocument().newElement() - -// METHOD 2 -OElement ODatabaseDocument().newElement(String class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class | - -#### Return Value - -This method returns an [`OElement`](../OElement.md) instance. You can then call additional methods on the element to add and configure the data it contains. When you are ready to make the changes persistent on OrientDB, call the [`save()`](../OElement.md#saving-elements) method on the element. - -### Example - -Imagine that you have a web application hosting blogs. You might want a method in the account management class to add new blog entries to OrientDB. - -```java -private ODatabaseDocument db; - -// ADD NEW BLOG ENTRY -public void createBlogEntry(String title, String author, - String text, Boolean publish){ - - // Log Operation - logger.info("Creating New Blog Entry"); - - // Initialize Entry - OElement entry = db.newElement("BlogEntry"); - - // Add Data - entry.setProperty("title", title); - entry.setProperty("author", author); - entry.setProperty("text", text); - entry.setProperty("publish", publish); - - // Update Database - entry.save(); - -} -``` diff --git a/src/java/ref/ODatabaseDocument/newInstance.md b/src/java/ref/ODatabaseDocument/newInstance.md deleted file mode 100644 index 821d8d24..00000000 --- a/src/java/ref/ODatabaseDocument/newInstance.md +++ /dev/null @@ -1,59 +0,0 @@ - -# ODatabaseDocument - newInstance() - -This method creates a new record on the database. - -## Creating Elements - -Whether you are using OrientDB to how a Document or Graph database, this method provides you with a generic way to create new documents, vertices or edges in your application. - -### Syntax - -``` - RET ODatabaseDocument().newElement(String class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`RET`** | | Defines the return value type | -| **`class`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class | - -#### Return Value - -This method returns an instance of the class given as a generic. The particular class you choose depends on whether you're using OrientDB as a Graph or Document databases. The recommended methods are: - -- [**`OElement`**](../OElement.md) To represent documents in a Document database -- [**`OVertex`**](../OVertex.md) To represent vertices in a Graph database -- [**`OEdge`**](../OEdge.md) TO represent edges in a Graph database - -You can then take the return value and call additional methods on it to set data. To make the document, graph or vertex persistent on the database, you must then call the `save()` method. - -### Example - -Imagine that you have a web application hosting blogs. You might want a method in the account management class to add new blog entries to OrientDB. - -```java -private ODatabaseDocument db; - -// ADD NEW BLOG ENTRY -public void createBlogEntry(String title, String author, - String text, Boolean publish){ - - // Log Operation - logger.info("Creating New Blog Entry"); - - // Initialize Entry - OElement entry = db.newInstance("BlogEntry"); - - // Add Data - entry.setProperty("title", title); - entry.setProperty("author", author); - entry.setProperty("text", text); - entry.setProperty("publish", publish); - - // Update Database - entry.save(); - -} - -``` diff --git a/src/java/ref/ODatabaseDocument/newVertex.md b/src/java/ref/ODatabaseDocument/newVertex.md deleted file mode 100644 index db94e5d5..00000000 --- a/src/java/ref/ODatabaseDocument/newVertex.md +++ /dev/null @@ -1,73 +0,0 @@ - -# ODatabaseDocument - newVertex() - -This method creates a new vertex on the database. - -## Creating Vertices - -When using OrientDB to host a Graph database, this method allows you to create vertices on the database. To create new edges, see the [`newEdge()`](newEdge.md) method. - -### Syntax - -This method comes in three forms. The first creates the vertex in the default OrientDB class `V`. The others allow you to manually define what class the new vertex belongs to: - -``` -// METHOD 1 -default OVertex ODatabaseDocument().newVertex() - -// METHOD 2 -OVertex ODatabaseDocument().newVertex(OClass class) - -// METHOD 3 -OVertex ODatabaseDocument().newVertex(String class-name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | [`OClass`](../OClass.md) | Defines the OrientDB class | -| **`class-name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the name of the OrientDBG class | - -#### Return Value - -This method returns an [`OVertex`](../OVertex.md) instance. You can call additional methods on this instance to set data to it, then call `save()` to make that data persistent on OrientDB. - -### Example - -Imagine you have a social networking application. The application stores users under the `User` class on OrientDB and content sources under the `Feed` class. Whenever a new user sets up their account, they're automatically subscribed to a series of content sources, which provides news, popular feeds and sponsored results. - -To accomplish this, you might use a method to create new user accounts and default subscriptions: - -```java -// INITIALIZE DEFAULT VARIABLES -private ODatabaseDocument db; -private List defaultFeeds; -... - -// CREATE NEW USER -public void newUser(String name, String email){ - - // Log Operation - logger.info("Creating New User"); - - // Create New User - OVertex user = db.newVertex("User"); - user.setProperty("name", name); - user.setProperty("email", email); - user.save(); - - // Set Default Subscriptions - for (int i = 0; i < defaultFeeds.size(); i++){ - - // Fetch Record ID - ORID rid = defaultFeeds.get(i); - - // Fetch Feed Vertex - OVertex feed = db.getRecord(rid); - - // Create and Save Edge - OEdge edge = db.newEdge(user, feed); - edge.save(); - - } -} -``` diff --git a/src/java/ref/ODatabaseDocument/query.md b/src/java/ref/ODatabaseDocument/query.md deleted file mode 100644 index 01a6b198..00000000 --- a/src/java/ref/ODatabaseDocument/query.md +++ /dev/null @@ -1,27 +0,0 @@ - -# ODatabaseDocument - query() - -This method executes idempotent OrientDB SQL queries. - -## Querying the Database - -OrientDB makes a distinction between idempotent queries that read data from the database and non-idempotent commands that modify the records. Using this method you can retrieve and operate on result-sets from OrientDB. - -In the event that you need to execute a non-idempotent command on the database, see the [`command()`](command.md) method. - -### Syntax - -``` -OResultSet ODatabaseDocument().query(String query, Map args) -``` - -| Argument | Type | Description | -|---|---|---| -| **`query`** | [`String`]({{ book.javase }}/java/lang/String.html) | Defines the query you want to execute. | -| **`args`** | [`Map`]({{ book.javase }}/java/util/Map.html) | Defines a map of parameters to use in formatting the query. | - -### Return Value - -This method returns an [`OResultSet`](../OResultSet.md) instance, that contains the result-set of your query. Remember that you need to close a result-set when you're done with it, in order to free up resources. - - diff --git a/src/java/ref/ODatabaseDocument/registerListener.md b/src/java/ref/ODatabaseDocument/registerListener.md deleted file mode 100644 index ba35139b..00000000 --- a/src/java/ref/ODatabaseDocument/registerListener.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ODatabaseDocument - registerListener() - -Subscribes the given listener to database events. - -## Using Listeners - -Listeners allow you to monitor the database for particular events. For instance, if you would like certain methods to execute whenever the database closes, initiates or commits a transaction, and so on. Using this method, you can register an [`ODatabaseListener`](../ODatabaseListener.md) instance with the database. - -### Syntax - -``` -void ODatabaseDocument().registerListener(ODatabaseListener listener) -``` - -| Argument | Type | Description | -|---|---|---| -| **`listener`** | [`ODatabaseListener`](../ODatabaseListener.md) | Listener to register | - - diff --git a/src/java/ref/ODatabaseDocument/rollback.md b/src/java/ref/ODatabaseDocument/rollback.md deleted file mode 100644 index 40251344..00000000 --- a/src/java/ref/ODatabaseDocument/rollback.md +++ /dev/null @@ -1,22 +0,0 @@ - -# ODatabaseDocument - rollback() - -This method reverts changes in a transaction, rolling the database back to its previous state. - -## Beginning Transactions - -OrientDB supports the use of ACID transactions. This allows you to isolate database operations into units of work that you can commit or rollback later, depending on whether later conditions are met. Using this method you can revert changes in a transaction. To initiate a transaction or commit the changes, see [`begin()`](begin.md) and [`commit()`](commit.md) methods. - -### Syntax - -``` -ODatabase ODatabaseDocument.rollback() -``` - -#### Exceptions - -In the event of error, such as the transaction encountering a conflict, this method raises an `OTransactionException` exception. - -#### Return Type - -This method returns the database instance itself, providing a fluent interface. This is useful when calling multiple methods in a chain. diff --git a/src/java/ref/ODatabaseDocument/save.md b/src/java/ref/ODatabaseDocument/save.md deleted file mode 100644 index f67a247a..00000000 --- a/src/java/ref/ODatabaseDocument/save.md +++ /dev/null @@ -1,27 +0,0 @@ - -# ODatabaseDocument - save() - -This method saves the given object to the database. - -## Saving Data - -Using this method you can save objects in synchronous to the database. If the given object is not dirty, (that is, changed from the state stored on the database), then OrientDB ignores the operation. When saving records, you can optionally define the cluster in which you want to save it. If the cluster doesn't exist, the method throws an error. - -### Syntax - -``` - RET ODatabaseDocument().save(T obj) - RET ODatabaseDocument().save(T obj, String cluster) -``` - -| Argument | Type | Description | -| **`obj`** | `T` | Defines the object you want to save | -| **`cluster`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the name of the cluster in which to add a record | - - -#### Return Value - -This method returns the saved object. - - - diff --git a/src/java/ref/ODatabaseDocument/truncateCluster.md b/src/java/ref/ODatabaseDocument/truncateCluster.md deleted file mode 100644 index 8859f492..00000000 --- a/src/java/ref/ODatabaseDocument/truncateCluster.md +++ /dev/null @@ -1,21 +0,0 @@ - -# ODatabaseDocument - truncateCluster() - -Removes all data from the given cluster. - -## Truncating Cluster - -On occasion you may find yourself in a situation where you need to remove data from a cluster without removing the cluster itself. This is common in cases where the cluster was loaded with data during testing and now needs to be cleared for use in production. Using this method you can truncate the cluster, deleting data without deleting the cluster. - -### Syntax - -``` -void ODatabaseDocument().truncateCluster(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Logical name of the cluster | - - - diff --git a/src/java/ref/ODatabaseDocument/unregisterListener.md b/src/java/ref/ODatabaseDocument/unregisterListener.md deleted file mode 100644 index 8bbb3fcf..00000000 --- a/src/java/ref/ODatabaseDocument/unregisterListener.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ODatabaseDocument - unregisterListener() - -Unsubscribes the given listener to database events. - -## Using Listeners - -Listeners allow you to monitor the database for particular events. For instance, if you would like certain methods to execute whenever the database closes, initiates or commits a transaction, and so on. Using this method, you can unregister an [`ODatabaseListener`](../ODatabaseListener.md) instance with the database. - -### Syntax - -``` -void ODatabaseDocument().unregisterListener(ODatabaseListener listener) -``` - -| Argument | Type | Description | -|---|---|---| -| **`listener`** | [`ODatabaseListener`](../ODatabaseListener.md) | Listener to unregister | - - diff --git a/src/java/ref/ODatabaseListener.md b/src/java/ref/ODatabaseListener.md deleted file mode 100644 index 713eff5f..00000000 --- a/src/java/ref/ODatabaseListener.md +++ /dev/null @@ -1,4 +0,0 @@ - -# ODatabaseListener - -Listener interface used in monitoring events on a database. diff --git a/src/java/ref/ODatabaseSession.md b/src/java/ref/ODatabaseSession.md deleted file mode 100644 index 085633b2..00000000 --- a/src/java/ref/ODatabaseSession.md +++ /dev/null @@ -1,18 +0,0 @@ - -# ODatabaseSession - -Provides an interface for operating on database sessions. - -## Using Database Sessions - -In order to utilize the database session in your application, you first need to import it. - -```java -import com.orientechnologies.orient.core.db.ODatabaseSession; -``` - -### Methods - -The `ODatabaseSession` class is a subclass of the [`ODatabaseDocument`](ODatabaseDocument.md) class and has the same methods available to it. - - diff --git a/src/java/ref/OEdge.md b/src/java/ref/OEdge.md deleted file mode 100644 index bc5612d5..00000000 --- a/src/java/ref/OEdge.md +++ /dev/null @@ -1,60 +0,0 @@ - -# Java API - OEdge - -This class provides a standard interface for handling edges. - -## Managing Edges - -When using OrientDB as a Graph database, this class represents an edge record. It extends the [`OElement`](OElement.md) class. Methods available to that class are also available to this class. - -This class is available at `com.orientechnologies.orient.core.record`. To import it, use the following line where necessary: - -```java -import com.orientechnologies.orient.core.record.OEdge; -``` - -Once you've imported the class to your application, you can use it to build instances in your code. - ->For more information on vertices, see [`OVertex`](OVertex.md) - - -### Example - -To create a new instance of this class, it is recommended that you use either the [`newInstance()`](ODatabaseDocument/newInstance.md) or [`newEdge()`](ODatabaseDocument/newEdge.md) methods on the [`ODatabaseDocument`](ODatabaseDocument.md) class interface. This allows you to operate on the given record and to easily save it back to the database when you're ready. - -[TBD] - -## Methods - -Once you've created or initialized an `OEdge` instance, you can begin to call methods on it to further define and read data from the edge. This method extends the [`OElement`](OElement.md) class. Methods available to that class are also available to this one. - -For information on methods specific to this class, see the table below. - -| Method | Return Type | Description | -|---|---|---| -| [**`getFrom()`**](OEdge/getFrom.md) | [`OVertex`](OVertex.md) | Retrieves the from vertex | -| [**`getTo()`**](OEdge/getTo.md) | [`OVertex`](OVertex.md) | Retrieves the to vertex | -| [**`isLightweight()`**](OEdge/isLightweight.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the edge is a Lightweight Edge | -| [**`save()`**](#saving-edges) | ` RET` | Saves changes to the database | - -### Saving Edges - -When you create or retrieve an `OEdge` instance, you create a snapshot of the record. Any changes you make to the record remain in your application. In order to make these changes persistent on the database, you need to call the `save()` method on the element. For instance, - -```java -// GLOBAL VARIABLES -private ODatabaseDocument db; - -// CREATE NEW RECORD -public void newEdge(OVertex toPerson, OVertex fromPerson){ - - // Initialize Document - OEdge relationship = db.newEdge("Relationship"); - relationship.setProperty("out", toPerson); - relationship.setProperty("in", fromPerson); - - // Add Relationship to Database - relationship.save(); -} -``` - diff --git a/src/java/ref/OEdge/getFrom.md b/src/java/ref/OEdge/getFrom.md deleted file mode 100644 index 12f80529..00000000 --- a/src/java/ref/OEdge/getFrom.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OEdge - getFrom() - -This method retrieves the vertex that connects from this edge. - - -## Retrieving Vertices - -Edges provide links between vertices. The link connects from one vertex and to another. This method allows you to retrieve the [`OVertex`](../OVertex.md) instance that links from the edge. To access the vertex that links to the edge, see the [`getTo()`](getTo.md) method. - -### Syntax - -``` -OVertex OEdge().getFrom() -``` - -#### Return Value - -This method returns the [`OVertex`](../OVertex.md) instance that links from this edge. - - - diff --git a/src/java/ref/OEdge/getTo.md b/src/java/ref/OEdge/getTo.md deleted file mode 100644 index e6c6c2f0..00000000 --- a/src/java/ref/OEdge/getTo.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OEdge - getTo() - -This method retrieves the vertex that connects to this edge. - -## Retrieving Vertices - -Edges provide links between vertices. The link connects from one vertex to another. This method allows you to retrieve the [`OVertex`](../OVertex.md) instance that links to the edge. To access the vertex that links from the edge, see the [`getFrom()`](getFrom.md) method. - -### Syntax - -``` -OVertex OEdge().getTo() -``` - -#### Return Value - -This method returns the [`OVertex`](../OVertex.md) instance that links to the edge. diff --git a/src/java/ref/OEdge/isLightweight.md b/src/java/ref/OEdge/isLightweight.md deleted file mode 100644 index 9363271b..00000000 --- a/src/java/ref/OEdge/isLightweight.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OEdge - isLightweight() - -This method determines whether an edge is a [lightweight edge](../../Lightweight-Edges.md). - -## Lightweight Edges - -When using OrientDB as a Graph database, there are two types of edges available. The standard edge type is a Regular Edge, which extends the `E` class in the database and is stored as a separate record. The newer edge type is the Lightweight Edge, which has no properties or identity on the database, since they exist only within vertex records. This method allows you to determine whether an [`OEdge`](../OEdge.md) instance is a Lightweight or Regular edge. - -### Syntax - -``` -Boolean OEdge().isLightweight() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance. If the return value is `true`, it indicates that the [`OEdge`](../OEdge.md) instance is a Lightweight Edge. diff --git a/src/java/ref/OElement.md b/src/java/ref/OElement.md deleted file mode 100644 index fd3b4711..00000000 --- a/src/java/ref/OElement.md +++ /dev/null @@ -1,91 +0,0 @@ - -# Java API - OElement - -This class provides a standard interface for handling documents, vertices and edges. - - -## Managing Elements - -When using OrientDB as a Document database, this class represents a document record. When using OrientDB as a Graph database, this is the superclass to the [`OVertex`](OVertex.md) and [`OEdge`](OEdge.md) classes, which represent vertices and edges in the database. - ->**NOTE**: In older versions of OrientDB, documents were represented using the `ODocument` class. While this class is still around and is the primary implementation of `OElement`, it is recommended that you do not use it directly. Instead, moving forward use `OElement` for your documents. - -This class is available at `com.orientechnologies.orient.core.record`. To import it, use the following line where necessary: - -```java -import com.orientechnologies.orient.core.record.OElement; -``` - -Once you've imported the class to your application, you can use it to build particular instances in your code. - -### Example - -In order to create a new instance of this class, it is recommended that you use either [`newInstance()`](ODatabaseDocument/newInstance.md) or [`newElement()`](ODatabaseDocument/newElement.md) methods on the [`ODatabaseDocument`](ODatabaseDocument.md) class interface. This allows you to operate on the given record and easily save it back to the database when you're ready. - -For instance, imagine you have a [`Map`]({{ book.javase }}/api/java/util/Map.html) of variables containing a address book, where the key is the person's name and the value their email address, both as [`string`]({{ book.javase }}/api/java/lang/String.html) values. You might use a method like this to transfer that data into OrientDB documents. - -```java -// INITIALIZE GLOBAL VARIABLES -private ODatabaseDocument db; -... - -// ADD ENTRIES TO ADDRESSBOOK DATABASE -public void initAddressBook(Map addressBook){ - - // Loop Over Map - for (Map.Entry entry : addressBook.entrySet()){ - - // Initialize Variables - String name = entry.getKey(); - String email = entry.getKey(); - - // Create Person - OElement person = db.newElement("Person"); - person.setProperty("name", name); - person.setProperty("email", email); - - // Make Person Persistent - person.save(); - - } -} -``` - -## Methods - -Once you've created or initialized an `OElement` instance, you can begin to call methods on the instance to further define and read data from the record. - -| Method | Return Type | Description | -|---|---|---| -| [**`asEdge()`**](OElement/asEdge.md) | [`Optional`]({{ book.javase }}/api/java/util/Optional.html)[``](OEdge.md) | Returns record as an edge | -| [**`asVertex()`**](OElement/asVertex.md) | [`Optional`]({{ book.javase }}/api/java/util/Optional.html)[``](OVertex.md) | Returns record as a vertex | -| [**`getProperty()`**](OElement/getProperty.md) | ` RET` | Retrieves record data by property name | -| [**`getPropertyNames()`**](OElement/getPropertyNames.md) | [`Set`]({{ book.javase }}/api/java/util/Set.html)[``]({{ book.javase }}/api/java/lang/String.html) | Retrieves defined property names | -| [**`getSchemaType()`**](OElement/getSchemaType.md) | [`Optional`]({{ book.javase }}/api/java/util/Optional.html)[``](OClass.md) | Retrieves the type of the current element, (that is, class in the schema, if any) | -| [**`isEdge()`**](OElement/isEdge.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether record is an edge | -| [**`isVertex()`**](OElement/isVertex.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether record is a vertex | -| [**`removeProperty()`**](OElement/removeProperty.md) | ` RET` | Removes a property from the record | -| [**`save()`**](#saving-elements) | ` RET` | Saves changes to OrientDB record | -| [**`setProperty()`**](OElement/setProperty.md) | `void` | Sets data on record property | - -### Saving Elements - -When you create or retrieve an `OElement` instance, you create a snapshot of the record. Any changes you make to the record remain in your application. In order to make these changes persistent on the database, you need to call the `save()` method on the element. For instance, - -```java -// GLOBAL VARIABLES -private ODatabaseDocument db; - -// CREATE NEW RECORD -public void newRecord(String name, String email){ - - // Initialize Document - OElement person = db.newElement("Person"); - person.setProperty("name", name); - person.setProperty("email", email); - - // Add Person to Database - person.save(); -} -``` - diff --git a/src/java/ref/OElement/asEdge.md b/src/java/ref/OElement/asEdge.md deleted file mode 100644 index e6da3090..00000000 --- a/src/java/ref/OElement/asEdge.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OElement - asEdge() - -This method returns the record as an `OEdge` instance. - -## Creating Edges - -The [`OElement`](../OElement.md) class corresponds to a document record in a Document database. When you use OrientDB as a Graph database, it serves as the superclass to both vertices and edges. In the event that you want a record to serve as an edge, use this method to operate on it an [`OEdge`](../OEdge.md) instance. - -### Syntax - -``` -Optional OElement().asEdge() -``` - -#### Return Value - -When the record corresponding to this [`OElement`](../OElement.md) instance is an edge, this method returns an [`OEdge`](../OEdge.md) instance. In the event that the record is a document or vertex, (that is, not an edge), it returns an empty [`Optional`]({{ book.javase }}/api/java/util/Optional.html) instance. - - diff --git a/src/java/ref/OElement/asVertex.md b/src/java/ref/OElement/asVertex.md deleted file mode 100644 index 589f898f..00000000 --- a/src/java/ref/OElement/asVertex.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OElement - asVertex() - -This method returns the record as an `OVertex` instance. - -## Creating Vertices - -The [`OElement`](../OElement.md) class corresponds to a document record in a Document database. When you use OrientDB as a Graph database, it serves as the superclass to both vertices and edges. In the event that you want a record to serve as a vertex, use this method to operate on it as an [`OVertex`](../OVertex.md) instance. - -### Syntax - -``` -Optional OElement().asVertex() -``` - -#### Return Value - -When the record corresponding to this [`OElement`](../OElement.md) instance is a vertex, this method returns an [`OVertex`](../OVertex.md) instance. In the event that the record is a document or edge, (that is, not a vertex), it returns an empty [`Optional`]({{ book.javase }}/api/java/util/Optional.html) instance. diff --git a/src/java/ref/OElement/getProperty.md b/src/java/ref/OElement/getProperty.md deleted file mode 100644 index 9542e113..00000000 --- a/src/java/ref/OElement/getProperty.md +++ /dev/null @@ -1,38 +0,0 @@ - -# OElement - getProperty() - -This method retrieves the given property from a record. - -## Retrieving Properties - -OrientDB stores the particular data for each record in fields, also called properties. Using this method you can retrieve data from the record to operate on it from within your Java application. The method uses the property name and type to identify the data you want to retrieve. - -### Syntax - -``` - RET OElement().getProperty(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | - -#### Return Value - -OrientDB stores typed data. The return value this method returns is of the type that corresponds to the given property. For more information, see [Supported Data Types](../../../general/Types.md). - -### Example - -Records often contain more data that you need to operate on in a particular instance. For instance, imagine you have a web application that serves blogs. You don't need the entire record when you're only rendering a link. You might use a method like the one below to create a link from an [`OElement`](../OElement.md): - -```java -// GENERATE LINK -public String makeLink(OElement record){ - - String title = record.getProperty("title"); - String url = record.getProperty("URL"); - - return String.format("%s", url, title); - -} -``` diff --git a/src/java/ref/OElement/getPropertyNames.md b/src/java/ref/OElement/getPropertyNames.md deleted file mode 100644 index 61588335..00000000 --- a/src/java/ref/OElement/getPropertyNames.md +++ /dev/null @@ -1,37 +0,0 @@ - -# OElement - getPropertyNames() - -This method returns the property names set for the given record. - -## Retrieving Property Names - -In cases where you have a record and don't know what properties it provides, this method allows you retrieve a set of strings containing the property names. You can then use [`getProperty()`](getProperty.md) to retrieve the data you want. - -### Syntax - -``` -Set OElement().getPropertyNames() -``` - -#### Return Value - -This method returns a [`Set`]({{ book.javase }}/api/java/util/Set.html) containing [`String`]({{ book.javase }}/api/java/lang/String.html) instances of each property name defined in the record. - - -### Example - -Imagine an application in which you sometimes retrieve records with inconsistent data. In the event of an error, you might want a method that reports the properties and contents for a record to use when debugging issues. - -```java -public void errorReadingRecord(OElement record){ - - // Fetch Properties - Set names = record.getPropertyNames(); - - // Report Error - logger.warn( - String.format("Error Reading Record, record keys: %s", - StringUtils.join(names, ", "))); -} -``` - diff --git a/src/java/ref/OElement/getSchemaType.md b/src/java/ref/OElement/getSchemaType.md deleted file mode 100644 index e2f35b6b..00000000 --- a/src/java/ref/OElement/getSchemaType.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OElement - getSchemaType() - -This method retrieves the schema type for the record. - -## Retrieving Schema Types - -OrientDB can run schema-less, schema-full or it can use a schema in some cases and not use one in others. In cases where the record has a schema, that is when it is defined as a particular class on the OrientDB database, this method retrieves the [`OClass`](../OClass.md) instance to which it belongs. - -### Syntax - -``` -Optional OElement.getSchemaType() -``` - -#### Return Value - -When the record corresponding to this [`OElement`](../OElement.md) instance has a schema class, this method returns an [`OClass`](../OClass.md) instance. In the event that the record does not enforce a schema, it returns an empty [`Optional`]({{ book.javase }}/api/java/util/Optional.html) instance. - diff --git a/src/java/ref/OElement/isEdge.md b/src/java/ref/OElement/isEdge.md deleted file mode 100644 index d1f3fc9c..00000000 --- a/src/java/ref/OElement/isEdge.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OElement - isEdge() - -This method determines whether the record is an edge. - -## Checking Edges - -When OrientDB is serving as a Graph database, [`OElement`](../OElement.md) serves as the superclass to both edges and vertices. Using this method you can check whether or not the element is an edge on the database. To determine whether the record is a vertex, see [`isVertex`](isVertex.md). - -### Syntax - -``` -Boolean OElement().isEdge() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance. If the return value is `true`, the element is an edge. diff --git a/src/java/ref/OElement/isVertex.md b/src/java/ref/OElement/isVertex.md deleted file mode 100644 index 2bd15fde..00000000 --- a/src/java/ref/OElement/isVertex.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OElement - isVertex() - -This method determines whether the record is a vertex. - -## Checking Vertices - -When OrientDB is serving as a Graph database, [`OElement`](../OElement.md) serves as the superclass to both edges and vertices. Using this method you can check whether or not the element is a vertex on the database. To determine whether the element is an edge, see [`isEdge()`](isEdge.md). - -### Syntax - -``` -Boolean OElement().isVertex() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance. If the return value is `true`, the element is a vertex. diff --git a/src/java/ref/OElement/removeProperty.md b/src/java/ref/OElement/removeProperty.md deleted file mode 100644 index 6ef75835..00000000 --- a/src/java/ref/OElement/removeProperty.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OElement - removeProperty() - -This method removes a property from the record. - -## Removing Properties - -In the event that you would like to remove a property from a record with the corresponding data, you can do so using this method. If you would like instead to add or retrieve a property to the record, see [`setProperty`](setProperty.md) or [`getProperty()`](getProperty.md). - -### Syntax - -``` - RET OElement().removeProperty(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | - -#### Return Value - -This method returns the property that you removed from the record. The return value is a generic and belongs to whatever type is set for the property. diff --git a/src/java/ref/OElement/setProperty.md b/src/java/ref/OElement/setProperty.md deleted file mode 100644 index 3ceada45..00000000 --- a/src/java/ref/OElement/setProperty.md +++ /dev/null @@ -1,26 +0,0 @@ - -# OElement - setProperty() - -This method sets data on a record property. - -## Setting Properties - -Data in a record is stored in a set of fields called properties. Using this method you can add data to a record by its property name. - -### Syntax - -There are two methods available in setting properties: - -``` -// METHOD 1 -void OElement().setProperty(String name, Object value) - -// METHOD 2 -void OElement().setProperty(String name, Object value, OType field) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the property name | -| **`value`** | [`Object`]({{ book.javase }}/api/java/lang/Object.html) | Defines the data you want to set on the property | -| **`field`** | [`OType`](../OType.md) | Forced type for the property, (not auto-determined) | diff --git a/src/java/ref/OFunction.md b/src/java/ref/OFunction.md deleted file mode 100644 index 1430fcad..00000000 --- a/src/java/ref/OFunction.md +++ /dev/null @@ -1,34 +0,0 @@ - -# OFunction - -Interface that controls a database function, which you can in turn use in OrientDB SQL on the database or within your applications. - -## Using Functions - -Functions in OrientDB are stored operations that you can call from the Console or through any of the database driver methods that use OrientDB SQL. OrientDB provides a number of functions by default and the user can define a series of additional functions as need. They are stored in the database as a series of `OFunction` instances accessible through [`OMetadata`](OMetadata.md) and the [`OFunctionLibrary`](OFunctionLibrary.md). - -In order to work with functions from your application, you first need to import the class into your code. - -```java -import com.orientechnologies.orient.core.metadata.function.OFunction; -``` - -### Methods - -Each function supports the following methods. - - -| Method | Return Type | Description | -|---|---|---| -| [**`getCode()`**](OFunction/getCode.md) | `String` | Retrieves the function code | -| [**`getId()`**](OFunction/getId.md) | [`ORID`](ORID.md) | Retrieves the function Record ID | -| [**`getLanguage()`**](OFunction/getLanguage.md) | `String` | Retrieves the name of the scripting language the function uses | -| [**`getName()`**](OFunction/getName.md) | `String` | Retrieves the logical name of the function | -| [**`getParameters()`**](OFunction/getParameters.md) | `List` | Retrieves the parameters available for use in the function code | -| [**`isIdempotent()`**](OFunction/isIdempotent.md) | `boolean` | Determines whether the function performs idempotent queries or executes non-idempotent commands | -| [**`setCode()`**](OFunction/setCode.md) | `OFunction` | Defines the function code | -| [**`setIdempotent()`**](OFunction/setIdempotent.md) | `OFunction` | Defines whether the function is idempotent or non-idempotent | -| [**`setLanguage()`**](OFunction/setLanguage.md) | `OFunction` | Defines the scripting language the function uses | -| [**`setName()`**](OFunction/setName.md) | `OFunction` | Defines the logical name of the function | -| [**`setParameters()`**](OFunction/setParameters.md) | `OFunction` | Defines the parameters available to the function code | - diff --git a/src/java/ref/OFunction/getCode.md b/src/java/ref/OFunction/getCode.md deleted file mode 100644 index bcdeb18a..00000000 --- a/src/java/ref/OFunction/getCode.md +++ /dev/null @@ -1,21 +0,0 @@ - -:wa -# OFunction - getCode() - -Retrieves the function code. - -## Function Code - -Functions refer to stored operations written in JavaScript or OrientDB SQL that you can use on the Console or as part of an SQL operation from another client program. Using this method, you can retrieve the code that the given function executes when it's called. To check what language it's written in, see the [`getLanguage()`](getLanguage.md) method. To set the code that the function executes, see the [`setCode()`](setCode.md) method. - -### Syntax - -``` -String OFunction().getCode() -``` - -#### Return Value - -This method returns a `String` instance, which contains the JavaScript or OrientDB SQL code that the function executes when called. - - diff --git a/src/java/ref/OFunction/getId.md b/src/java/ref/OFunction/getId.md deleted file mode 100644 index ed12d9f9..00000000 --- a/src/java/ref/OFunction/getId.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OFunction - getId() - -Retrieves Record ID for the function. - -## Function Records - -Internally, OrientDB stores functions as records on the database, which you can in turn query and operate on with normal OrientDB SQL statements, rather than through dedicated syntax like [`CREATE FUNCTION`](../../../sql/SQL-Create-Function.md). This means that each function you create on your database has its own dedicated Record ID. Using this method, you can retrieve this Record ID from the function. - -### Syntax - -``` -ORID OFunction().getId() -``` - -#### Return Value - -This method returns an [`ORID`](../ORID.md) instance that corresponds to the function Record ID. - - - diff --git a/src/java/ref/OFunction/getLanguage.md b/src/java/ref/OFunction/getLanguage.md deleted file mode 100644 index 2491a11a..00000000 --- a/src/java/ref/OFunction/getLanguage.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OFunction - getLanguage() - -Retrieves the language that the function uses. - -## Function Language - -Functions aren't just collections of OrientDB SQL statements. They can also be written in JavaScript, which you may find more convenient for complex operations. Using this method, you can retrieve the language that the function uses when it executes its code. To set the language for the function, see the [`setLanguage()`](setLanguage.md) method. - - -### Syntax - -``` -String OFunction().getLanguage() -``` - -#### Return Type - -This method returns a `String` instance, which contains the language that the function uses when it executes code. - - diff --git a/src/java/ref/OFunction/getName.md b/src/java/ref/OFunction/getName.md deleted file mode 100644 index 1bc91e53..00000000 --- a/src/java/ref/OFunction/getName.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OFunction - getName() - -Retrieves the logical name of the function. - -## Function Names - -Functions are retrieved and operated on from within OrientDB SQL by their logical names. If you query the functions available in a database, this is the name that OrientDB returns. It is also the name used in calling the function within OrientDB SQL statements. Using this method you can retrieve the function's logical name. To set the logical name for the function, see the [`setName()`](setName.md) method. - -### Syntax - -``` -String OFunction().getName() -``` - -#### Return Type - -This method returns a `String` instance, which contains the logical name of the function. - - diff --git a/src/java/ref/OFunction/getParameters.md b/src/java/ref/OFunction/getParameters.md deleted file mode 100644 index 5752c252..00000000 --- a/src/java/ref/OFunction/getParameters.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OFunction - getParameters() - -Retrieves the parameters used by the function. - -## Function Parameters - -Functions can take parameters and perform various operations based on the specific things you pass to them. In order to call an parameter from your function code, you need to have the parameters defined for the [`OFunction`](../OFunction.md) instance. Using this method you can retrieve a list of parameters available to the function. To set the parameters for the function, see the [`setParameters()`](setParameters.md) method. - -### Syntax - -``` -List OFunction().getParameters() -``` - -#### Return Type - -This method returns a `List` that contains a series of `String` instances. Each `String` corresponds to a parameter the function expects to receive when it's called, which you can then use in your function code. - - diff --git a/src/java/ref/OFunction/isIdempotent.md b/src/java/ref/OFunction/isIdempotent.md deleted file mode 100644 index 537df7ef..00000000 --- a/src/java/ref/OFunction/isIdempotent.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OFunction - isIdempotent() - -Determines whether the function is idempotent. - -## Function Idempotence - -OrientDB differentiates between idempotent queries and non-idempotent commands. That is, queries that always return the same results versus commands that write to the database. In functions this is indicated by a simple boolean value set on the [`OFunction`](../OFunction.md) instance. Using this method, you can check whether the function has been designated as idempotent. To set idempotence for the function, see the [`setIdempotent()`](setIdempotent.md) method. - -### Syntax - -``` -boolean OFunction.isIdempotent() -``` - -#### Return Type - -This method returns a `boolean` instance. A value of `true` indicates that the function is idempotent and only reads from the database. A value of `false` indicates that the function is non-idempotent and modifies data on the database. - - - diff --git a/src/java/ref/OFunction/setCode.md b/src/java/ref/OFunction/setCode.md deleted file mode 100644 index befbbdfc..00000000 --- a/src/java/ref/OFunction/setCode.md +++ /dev/null @@ -1,23 +0,0 @@ -# OFunction - getCode() - -Defines the function code. - -## Function Code - -Functions refer to stored operations written in JavaScript or OrientDB SQL that you can use on the Console or as part of an SQL operation from another client program. Using this method, you can set the code that the given function executes when it's called. To set what language it's written in, see the [`setLanguage()`](setLanguage.md) method. To retrieve the code from function, see the [`getCode()`](getCode.md) method. - -### Syntax - -``` -OFunction OFunction().setCode(String code) -``` - -| Argument | Type | Description | -|---|---|---| -| **`code`** | `String` | Defines the code that you want to execute | - -#### Return Value - -This method returns the updated [`OFunction`](../OFunction.md) instance. You may find this useful when stringing several operations together. - - diff --git a/src/java/ref/OFunction/setIdempotent.md b/src/java/ref/OFunction/setIdempotent.md deleted file mode 100644 index 079f8d86..00000000 --- a/src/java/ref/OFunction/setIdempotent.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OFunction - setIdempotent() - -Sets whether the function is idempotent. - -## Function Idempotence - -OrientDB differentiates between idempotent queries and non-idempotent commands. That is, queries that always return the same results versus commands that write to the database. In functions this is indicated by a simple boolean value set on the [`OFunction`](../OFunction.md) instance. Using this method you can set idempotence for the function. To determine whether a function is set as idempotent, see the [`isIdempotent()`](isIdempotent.md) method. - -### Syntax - -``` -OFunction OFunction().setIdempotent(boolean idempotence) -``` - -| Argument | Type | Description | -|---|---|---| -| **`idempotence`** | `boolean` | Indicates whether the function is idempotent | - -#### Return Type - -This method returns the updated [`OFunction`](../OFunction.md) instance, which you may find useful when stringing several operations together. - - - diff --git a/src/java/ref/OFunction/setLanguage.md b/src/java/ref/OFunction/setLanguage.md deleted file mode 100644 index 4dd8b561..00000000 --- a/src/java/ref/OFunction/setLanguage.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OFunction - setLanguage() - -Defines the language that the function uses. - -## Function Language - -Functions aren't just collections of OrientDB SQL statements. They can also be written in JavaScript, which you may find more convenient for complex operations. When not explicitly set, [`OFunction`](../OFunction.md) defaults to JavaScript. Using this method, you can set the language that the function uses when it executes its code. To determine what language the function uses, see the [`getLanguage()`](getLanguage.md) method. - - -### Syntax - -``` -OFunction OFunction().setLanguage(String lang) -``` - -| Argument | Type | Description | -|---|---|---| -| **`lang`** | `String` | Defines the language you want to use. | - -#### Return Type - -This method returns the updated [`OFunction`](../OFunction.md) instance, which you may find useful when stringing several operations together. - - diff --git a/src/java/ref/OFunction/setName.md b/src/java/ref/OFunction/setName.md deleted file mode 100644 index 52c339ec..00000000 --- a/src/java/ref/OFunction/setName.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OFunction - setName() - -Defines the logical name of the function. - -## Function Names - -Functions are retrieved and operated on from within OrientDB SQL by their logical names. If you query the functions available in a database, this is the name that OrientDB returns. It is also the name used in calling the function within OrientDB SQL statements. Using this method you can define the logical name of the function. To retrieve the logical name of the function, see the [`getName()`](getName.md) method. - -### Syntax - -``` -OFunction OFunction().setName(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Logical name to set | - -#### Return Type - -This method returns the updated [`OFunction`](../OFunction.md) instance. You may find this useful when stringing several operations together. - - diff --git a/src/java/ref/OFunction/setParameters.md b/src/java/ref/OFunction/setParameters.md deleted file mode 100644 index 11af73c1..00000000 --- a/src/java/ref/OFunction/setParameters.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OFunction - setParameters() - -Defines the parameters used by the function. - -## Function Parameters - -Functions can take parameters and perform various operations based on the specific things you pass to them. In order to call an parameter from your function code, you need to have the parameters defined for the [`OFunction`](../OFunction.md) instance. Using this method you can define a list of parameters available to the function. To determine what parameters are available to the function, see the [`getParameters()`](getParameters.md) method. - -### Syntax - -``` -OFunction OFunction().setParameters(List params) -``` - -| Argument | Type | Description | -|---|---|---| -| **`params`** | `List` | Defines the parameters the function receives when called | - -#### Return Type - -This method returns the updated [`OFunction`](../OFunction.md) instance, which you may find useful when stringing several operations together. - - diff --git a/src/java/ref/OFunctionLibrary.md b/src/java/ref/OFunctionLibrary.md deleted file mode 100644 index 65959ec4..00000000 --- a/src/java/ref/OFunctionLibrary.md +++ /dev/null @@ -1,26 +0,0 @@ - -# OFunctionLibrary - -Interface used to store the available [`OFunction`](OFunction.md) instances on a database. - -## Function Library - -OrientDB SQL supports the use of functions and user-defined functions, which are typically defined in JavaScript using a [`CREATE FUNCTION`](../../sql/SQL-Create-Function.md) statement. Internally, OrientDB stores functions as a series of [`OFunction`](OFunction.md) instances. When working in a Java, you can define series of new functions internally from your application code. - -You can retrieve the function library from [`ODatabaseSession`](ODatabaseSession.md) or [`ODatabaseDocument`](ODatabaseDocument.md) by first retrieving the metadata with the [`getMetadata()`](ODatabaseDocument/getMetadata.md) method and then retrieving the function library from the metadata with the [`getFunctionLibrary()`](OMetadata/getFunctionLibrary.md) method. In order to operate on the function library, you also need to import it into your code. - -```java -import com.orientechnologies.orient.core.metadata.function.OFunctionLibrary; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`createFunction()`**](OFunctionLibrary/createFunction.md) | [`OFunction`](OFunction.md) | Creates a new function | -| [**`dropFunction()`**](OFunctionLibrary/dropFunction.md) | `void` | Removes function | -| [**`getFunction()`**](OFunctionLibrary/getFunction.md) | [`OFunction`](OFunction.md) | Retrieves the given function | -| [**`getFunctionNames()`**](OFunctionLibrary/getFunctionNames.md) | `Set` | Retrieves the logical names for functions in the library | - - - diff --git a/src/java/ref/OFunctionLibrary/createFunction.md b/src/java/ref/OFunctionLibrary/createFunction.md deleted file mode 100644 index b122880c..00000000 --- a/src/java/ref/OFunctionLibrary/createFunction.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OFunctionLibrary - createFunction() - -Creates a new function on the database. - -## Creating Functions - -OrientDB SQL supports the use of functions and user-defined functions, which are typically defined in JavaScript. Using this method you can create a new function in the database. The method takes the logical name of the function as an argument and then returns an [`OFunction`](../OFunction.md) instance, from which you can further define its operation. - -### Syntax - -``` -OFunction OFunctionLibrary().createFunction(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Defines the logical name of the function | - -#### Return Type - -This method returns an [`OFunction`](../OFunction.md) instance. Note that this method does not configure the function, define arguments or what OrientDB should do in the event of a user calling the function. You need to define that from the [`OFunction`](../OFunction.md) instance. - diff --git a/src/java/ref/OFunctionLibrary/dropFunction.md b/src/java/ref/OFunctionLibrary/dropFunction.md deleted file mode 100644 index 62ab6a58..00000000 --- a/src/java/ref/OFunctionLibrary/dropFunction.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OFunctionLibrary - dropFunction() - -Removes the given function from the database. - -## Removing Functions - -OrientDB SQL supports the use of functions and user-defined functions from the console or application code. Using this method, you can remove the given function from the function library. - -### Syntax - -``` -void OFunctionLibrary().dropFunction(OFunction func) -void OFunctionLibrary().dropFunction(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`func`** | [`OFunction`](../OFunction.md) | Defines the function you want to remove | -| **`name`** | `String` | Defines the logical name of the function | - - - diff --git a/src/java/ref/OFunctionLibrary/getFunction.md b/src/java/ref/OFunctionLibrary/getFunction.md deleted file mode 100644 index cb716161..00000000 --- a/src/java/ref/OFunctionLibrary/getFunction.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OFunctionLibrary - getFunction() - -Retrieves the specified database function from the function library. - -## Retrieving Functions - -OrientDB supports the use of functions and user-defined functions in OrientDB SQL. Internally these functions are stored as a series of [`OFunction`](../OFunction.md) instances on the database in the function library. Using this method, you can retrieve the specified function from the function library, to further operate on it. - -### Syntax - -``` -OFunction OFunctionLibrary().getFunction(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Defines the logical name of the function to retrieve | - -#### Return Type - -This method returns an [`OFunction`](../OFunction.md) instance that corresponds to the logical name requested. diff --git a/src/java/ref/OFunctionLibrary/getFunctionNames.md b/src/java/ref/OFunctionLibrary/getFunctionNames.md deleted file mode 100644 index 35d805cf..00000000 --- a/src/java/ref/OFunctionLibrary/getFunctionNames.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OFunctionLibrary - getFunctionNames() - -Retrieves a set of logical names for the functions available in the function library. - -## Retrieving Logical Names - -OrientDB supports the use of functions and user-defined functions, allowing you to do a little bit more on the database side than the standard OrientDB SQL provides. These functions are stored internally as a series of [`OFunction`](../OFunction.md) instances, but operated on from the Console using their logical names. Using this method, you can retrieve the logical names for all functions defined in the function library. - -### Syntax - -``` -Set OFunctionLibrary().getFunctionNames() -``` - -#### Return Value - -This method returns a `Set` instance that contains a series of `String` instances, corresponding to the logical name for each function in the database function library. diff --git a/src/java/ref/OIntent.md b/src/java/ref/OIntent.md deleted file mode 100644 index 9c8744e6..00000000 --- a/src/java/ref/OIntent.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OIntent - -Declaring an Intent allows you to optimize OrientDB in one call for a specific class of operations. While these declaration won't offer you much benefit under general usage, they can dramatically speed up performance for a specific task, such as a large insert or complex read. - -Currently, OrientDB supports the following intents: - -| Intent | Description | -|---|---| -| **`OIntentMassiveInsert`** | Optimizes OrientDB for a large write operation | -| **`OIntentMassiveRead`** | Optimizes OrientDB for a large read operation | -| **`OIntentNoCache`** | Optimizes OrientDB to operate without a cache | - -Each of these classes is a subclass of `OIntent`. - - - - diff --git a/src/java/ref/OLiveQueryMonitor.md b/src/java/ref/OLiveQueryMonitor.md deleted file mode 100644 index e7159981..00000000 --- a/src/java/ref/OLiveQueryMonitor.md +++ /dev/null @@ -1,4 +0,0 @@ - -# OLiveQueryMonitor - -Provides an interface for monitoring live queries. diff --git a/src/java/ref/OLiveQueryResultListener.md b/src/java/ref/OLiveQueryResultListener.md deleted file mode 100644 index e9d26e50..00000000 --- a/src/java/ref/OLiveQueryResultListener.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OLiveQueryResultListener - -Interface provides a listener interface for live queries. - -## Using Live Query Listeners - -In OrientDB, [Live Queries](../Live-Query.md) allows you to execute code in response to changes on the database. It has two parts, a query that defines the records you want to monitor and a listener that controls what your application does in response to changes in these records. Using this interface, you can implement your own listener with the specific code you want to run in response to changes. - -To use `OLiveQueryListener` in your application, import it into your code: - -```java -import com.orientechnologies.orient.core.db.OLiveQueryResultListener; -``` - -## Methods - -When your Live Query registers an event, such as a user running an [`UPDATE`](../../sql/SQL-Update.md) or [`DELETE`](../../sql/SQL-Delete.md) statement, OrientDB attempts to call methods on the listener. You can define what actions your application takes by overriding the following methods, implementing your own code. - -| Method | Description | -|---|---| -| [**`onCreate()`**](OLiveQueryResultListener/onCreate.md) | Executes on record creation | -| [**`onDelete()`**](OLiveQueryResultListener/onDelete.md) | Executes on record deletion | -| [**`onEnd()`**](OLiveQueryResultListener/onEnd.md) | Executes on unsubscribe | -| [**`onError()`**](OLiveQueryResultListener/onError.md) | Executes on errors | -| [**`onUpdate()`**](OLiveQueryResultListener/onUpdate.md) | Executes on record updates | - - diff --git a/src/java/ref/OLiveQueryResultListener/onCreate.md b/src/java/ref/OLiveQueryResultListener/onCreate.md deleted file mode 100644 index f8327dd9..00000000 --- a/src/java/ref/OLiveQueryResultListener/onCreate.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OLiveQueryResultListener - onCreate() - -Executes when new records are added to a [Live Query](../../Live-Query.md). - -## Live Queries and New Records - -In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method, you can define what happens when an [`INSERT`](../../../sql/SQL-Insert.md) or [`UPDATE`](../../../sql/SQL-Update.md) statement adds a new record to the Live Query result-set. - -### Syntax - -``` -void OLiveQueryResultListener().onCreate( - ODatabaseDocument db, - OResult data) -``` - -| Argument | Type | Description | -|---|---|---| -| **`db`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Provides the database in which the Live Query executes | -| **`data`** | [`OResult`](../OResult.md) | Provides the data added | - - - - diff --git a/src/java/ref/OLiveQueryResultListener/onDelete.md b/src/java/ref/OLiveQueryResultListener/onDelete.md deleted file mode 100644 index 925f961f..00000000 --- a/src/java/ref/OLiveQueryResultListener/onDelete.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OLiveQueryResultListener - onDelete() - -Executes when a record is removed from a [Live Query](../../Live-Query.md). - -## Live Queries and Deleted Records - -In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method, you can define what happens when a record is removed from a Live Query result-set. - -### Syntax - -``` -void OLiveQueryResultListener().onDelete( - ODatabaseDocument db, - OResult data) -``` - -| Argument | Type | Description | -|---|---|---| -| **`db`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Provides the database in which the Live Query executes | -| **`data`** | [`OResult`](../OResult.md) | Provides the data | - diff --git a/src/java/ref/OLiveQueryResultListener/onEnd.md b/src/java/ref/OLiveQueryResultListener/onEnd.md deleted file mode 100644 index e540b1b1..00000000 --- a/src/java/ref/OLiveQueryResultListener/onEnd.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OLiveQueryResultListener - onEnd() - -Executes when the database unsubscribes to a [Live Query](../../Live-Query.md). - -## Live Queries - -In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method you can define what happens when a database unsubscribes to a Live Query result-set. - - -### Syntax - -``` -void OLiveQueryResultListener().onCreate( - ODatabaseDocument db) -``` - -| Argument | Type | Description | -|---|---|---| -| **`db`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Provides the database in which the Live Query executes | - - - - diff --git a/src/java/ref/OLiveQueryResultListener/onError.md b/src/java/ref/OLiveQueryResultListener/onError.md deleted file mode 100644 index 43b84d15..00000000 --- a/src/java/ref/OLiveQueryResultListener/onError.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OLiveQueryResultListener - onError() - -Executes whenever an error is generated by a [Live Query](../../Live-Query.md) - -## Live Queries - -In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method you can define what happens when a Live Query encounters an error. - -### Syntax - -``` -void OLiveQueryResultListener().onError( - ODatabaseDocument db, - OException exception) -``` - -| Argument | Type | Description | -|---|---|---| -| **`db`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Provides the database in which the Live Query executes | -| **`exception`** | `OException` | Provides exception instance | - - - - diff --git a/src/java/ref/OLiveQueryResultListener/onUpdate.md b/src/java/ref/OLiveQueryResultListener/onUpdate.md deleted file mode 100644 index 87696dbb..00000000 --- a/src/java/ref/OLiveQueryResultListener/onUpdate.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OLiveQueryResultListener - onUpdate() - -Executes when records are updated in a [Live Query](../../Live-Query.md). - -## Live Queries - -In OrientDB, a Live Query is composed of a query that defines the records you want to monitor and a listener that controls what your application does in the event of changes to those records. Using this method, you can define what happens when an [`UPDATE`](../../../sql/SQL-Update.md) statement is run affecting the Live Query result-set. - -### Syntax - -``` -void OLiveQueryResultListener().onUpdate( - ODatabaseDocument db, - OResult before, - OResult after) -``` - -| Argument | Type | Description | -|---|---|---| -| **`db`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Provides the database in which the Live Query executes | -| **`before`** | [`OResult`](../OResult.md) | Provides the data as it existed before the change | -| **`after`** | [`OResult`](../OResult.md) | Provides the data as it exists after the change | - - - - diff --git a/src/java/ref/OMetadata.md b/src/java/ref/OMetadata.md deleted file mode 100644 index 3032890d..00000000 --- a/src/java/ref/OMetadata.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OMetadata - -Interface used to store database metadata, such as the function library, schema and security. - -## Using OMetadata - -OrientDB stores metadata on the database. You can retrieve it from [`ODatabaseSession`](ODatabaseSession.md) or [`ODatabaseDocument`](ODatabaseDocument) using the [`getMetadata()`](ODatabaseDocument/getMetadata.md) method. In order to use it in your code, you also need to import the class where relevant. - -```java -import com.orientechnologies.orient.core.metadata.OMetadata; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`getFunctionLibrary()`**](OMetadata/getFunctionLibrary.md) | [`OFunctionLibrary`](OFunctionLibrary.md) | Retrieves the database function library | -| [**`getSchema()`**](OMetadata/getSchema.md) | [`OSchema`](OSchema.md) | Retrieves the database schema | diff --git a/src/java/ref/OMetadata/getFunctionLibrary.md b/src/java/ref/OMetadata/getFunctionLibrary.md deleted file mode 100644 index f8d93e77..00000000 --- a/src/java/ref/OMetadata/getFunctionLibrary.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OMetadata - getFunctionLibrary() - -Retrieves the function library from the database metadata. - -## OrientDB Functions - -OrientDB SQL supports the use of functions and of user-defined functions. These are represented internally as [`OFunction`](../OFunction.md) instances. They are stored at the database level in the function library, that is the [`OFunctionLibrary`](../OFunctionLibrary.md). Using this method you can retrieve the function library from the database metadata, allowing you to operate on the available database functions or add new functions for your application to use. - -### Syntax - -``` -OFunctionLibrary OMetadata().getFunctionLibrary() -``` - -#### Return Type - -This method returns an [`OFunctionLibrary`](../OFunctionLibrary.md) instance, which contains the database functions. - - diff --git a/src/java/ref/OMetadata/getSchema.md b/src/java/ref/OMetadata/getSchema.md deleted file mode 100644 index c6e838c7..00000000 --- a/src/java/ref/OMetadata/getSchema.md +++ /dev/null @@ -1,19 +0,0 @@ -# OMetadata - getSchema() - -Retrieves the database schema from the database metadata. - -## Retrieving Schemas - -OrientDB supports multiple implementations of schemas. A database can strictly enforce schema, not use schema or use a mix of the two. The schema itself is stored in the database metadata as an [`OSchema`](../OSchema.md) instance. Using this method you can retrieve the schema from the database metadata to read or administer. - -### Syntax - -``` -OSchema OMetadata().getSchema() -``` - -#### Return Type - -This method returns an [`OSchema`](../OSchema.md) instance, which represents the schema available on the database. - - diff --git a/src/java/ref/OProperty.md b/src/java/ref/OProperty.md deleted file mode 100644 index c1e04e7f..00000000 --- a/src/java/ref/OProperty.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Java API - OProperty - -This class provides a standard interface for handling properties on database classes. - -## Managing Properties - -Where database classes allow you to organize records on your database, properties organize the data you store on the records. You can manage this through an enforced schema, allowing you to apply constraints to the property. You can also manage it through an implied schema, where you decide at the application level to use certain properties to store certain information on the record. - -Each property you create on a class initializes an `OProperty` instance on OrientDB. You can then retrieve these instances to retrieve information or operate on them further. - -This class is available at `com.orientechnologies.orient.core.metadata.schema`. - -```java -import com.orientechnologies.orient.core.metadata.schema.OProperty; -``` - -## Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`getDefaultValue()`**](OProperty/getDefaultValue.md) | [`String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the default value | -| [**`getLinkedClass()`**](OProperty/getLinkedClass.md) | [`OClass`](OClass.md) | Retrieves the linked class in lazy mode | -| [**`getLinkedType()`**](OProperty/getLinkedType.md) | [`OType`](OType.md) | Retrieves the linked type | -| [**`getMax()`**](OProperty/getMax.md) | [`String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the maximum allowed value | -| [**`getMin()`**](OProperty/getMin.md) | [`String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the minimum allowed value | -| [**`getName()`**](OProperty/getName.md) | [`String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the property name | -| [**`getType()`**](OProperty/getType.md) | [`OType`](OType.md) | Retrieves the property type | -| [**`isMandatory()`**](OProperty/isMandatory.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class requires you to set a value on this property | -| [**`isNotNull()`**](OProperty/isNotNull.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether the class permits `null` values | -| [**`isReadonly()`**](OProperty/isReadonly.md) | [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether you can write data to the property | -| [**`setDefaultValue()`**](OProperty/setDefaultValue.md) | `OProperty` | Defines the default value | -| [**`setLinkedClass()`**](OProperty/setLinkedClass.md) | `OProperty` | Defines the linked class | -| [**`setLinkedType()`**](OProperty/setLinkedType.md) | `OProperty` | Defines the linked type | -| [**`setMax()`**](OProperty/setMax.md) | `OProperty` | Defines the maximum allowed value | -| [**`setMin()`**](OProperty/setMin.md) | `OProperty` | Defines the minimum allowed value | -| [**`setName()`**](OProperty/setName.md) | `OProperty` | Defines the property name | -| [**`setType()`**](OProperty/setType.md) | `OProperty` | Defines the property type | diff --git a/src/java/ref/OProperty/getDefaultValue.md b/src/java/ref/OProperty/getDefaultValue.md deleted file mode 100644 index 8d3baff1..00000000 --- a/src/java/ref/OProperty/getDefaultValue.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OProperty - getDefaultValue() - -This method retrieves the default value for the given property. - -## Retrieving Default Values - -Normally, when you create a new record and save it to OrientDB, you define the values set on each property. In cases where values are not set on each property, the undefined properties defaults to `null` values. While this may be sufficient in most cases, you may at times want to have a default value on some properties. - -For instance, imagine a class that records student information for a school. Since each year the majority of new students are added to a particular class, (that is, the current class of incoming freshmen), you might set and each year update the default class for this property, saving yourself time in the long run. - -Using this method, you can retrieve the current default value set on the property. - -### Syntax - -``` -String OProperty().getDefaultValue() -``` - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) instance, representing the default value for the property. - - - diff --git a/src/java/ref/OProperty/getLinkedClass.md b/src/java/ref/OProperty/getLinkedClass.md deleted file mode 100644 index 1c157900..00000000 --- a/src/java/ref/OProperty/getLinkedClass.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OProperty - getLinkedClass() - -Retrieves the class linked to the property. - -## Retrieving Linked Classes - -Properties are generally created as fields in a database class, (that is, an [`OClass`](../OClass.md) instance). Using this method, you can retrieve the database class to which the given [`OProperty`](../OProperty.md) instance is linked. - -OrientDB retrieves this class in lazy mode, because while unmarshalling, the class could not be loaded. - -### Syntax - -``` -OClass OProperty.getLinkedClass() -``` - -#### Return Value - -This method returns the [`OClass`](../OClass.md) instance linked to the property. diff --git a/src/java/ref/OProperty/getLinkedType.md b/src/java/ref/OProperty/getLinkedType.md deleted file mode 100644 index f966c6ec..00000000 --- a/src/java/ref/OProperty/getLinkedType.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OProperty - getLinkedType() - -Retrieves the property type. - -## Retrieving Types - -OrientDB enforces typing for properties. Each property in a database class is set to a particular type, which provide some constraint on the kinds of data set for the property. Using this method you can retrieve the property type for further operations. - -### Syntax - -``` -OType OProperty.getLinkedType() -``` - -#### Return Type - -This method returns an [`OType`](../OType.md) instance that corresponds to the property type. diff --git a/src/java/ref/OProperty/getMax.md b/src/java/ref/OProperty/getMax.md deleted file mode 100644 index 40245509..00000000 --- a/src/java/ref/OProperty/getMax.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OProperty - getMax() - -This method retrieves the maximum allowed value for the property. - -## Retrieving Constraints - -Properties can enforce constraints on the data you store in them. This can be limited to the data-type of the stored value. It can also extend to constraints on the actual data. - -OrientDB calculates the maximum allowed values in different ways, depending on what [`OType`](../OType.md) you have set for the property: - -- **String** The maximum value is the maximum allowed number of characters. -- **Number** The maximum value is the largest allowed number. -- **Date** The maximum value is the latest allowed date. -- **Time** The maximum value is the latest allowed time, measured in milliseconds. -- **Binary** The maximum value is the largest allowed size for a byte array. -- **List**, **Set** or **Collection** The maximum value is largest size of the collection. - -Using this method, you can retrieve the maximum allowed value for the property. - -### Syntax - -``` -String OProperty().getMax() -``` - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) instance, which provides the maximum value set on the property. In the event that there is no maximum value set on the property, it returns `null`. diff --git a/src/java/ref/OProperty/getMin.md b/src/java/ref/OProperty/getMin.md deleted file mode 100644 index 9482fa9e..00000000 --- a/src/java/ref/OProperty/getMin.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OProperty - getMax() - -This method retrieves the minimum allowed value for the property. - -## Retrieving Constraints - -Properties can enforce constraints on the data you store in them. This can be limited to the data-type of the stored value. It can also extend to constraints on the actual data. - -OrientDB calculates the minimum allowed values in different ways, depending on what [`OType`](../OType.md) you have set for the property: - -- **String** The minimum value is the minimum allowed number of characters. -- **Number** The minimum value is the smallest allowed number. -- **Date** The minimum value is the earliest allowed date. -- **Time** The minimum value is the earliest allowed time, measured in milliseconds. -- **Binary** The minimum value is the smallest allowed size for a byte array. -- **List**, **Set** or **Collection** The minimum value is smallest size of the collection. - -Using this method, you can retrieve the minimum allowed value for the property. - -### Syntax - -``` -String OProperty().getMin() -``` - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) instance, which provides the minimum value set on the property. In the event that there is no minimum value set on the property, it returns `null`. diff --git a/src/java/ref/OProperty/getName.md b/src/java/ref/OProperty/getName.md deleted file mode 100644 index b1a48a26..00000000 --- a/src/java/ref/OProperty/getName.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OProperty - getName() - -This method retrieves the name of the property. - -## Retrieving the Property Name - -OrientDB differentiates between properties by the property name. Using this method you can retrieve the name from an [`OProperty`](../OProperty.md) instance. - -### Syntax - -``` -String OProperty().getName() -``` - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) value that provides the name of the property. diff --git a/src/java/ref/OProperty/getType.md b/src/java/ref/OProperty/getType.md deleted file mode 100644 index c94868ea..00000000 --- a/src/java/ref/OProperty/getType.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OProperty - getType() - -This method retrieves the type for the property. - -## Retrieving Property Types - -Properties on a database class have types and can enforce type-based constraints on the data the class allows for its records. OrientDB uses the [`OType`](../OType.md) class to define the data-types for the property and to provide methods for common operations performed on data-types for the property. - -Using this method, you can retrieve the property type. - -### Syntax - -``` -OType OProperty().getType() -``` - -#### Return Type - -This method returns an [`OType`](../OType.md) instance for the type. diff --git a/src/java/ref/OProperty/isMandatory.md b/src/java/ref/OProperty/isMandatory.md deleted file mode 100644 index 8c5623b3..00000000 --- a/src/java/ref/OProperty/isMandatory.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OProperty - isMandatory() - -This method determines whether records allow this property to be null. - -## Checking Mandatory - -When you want to enforce a schema on your database, setting some or all properties to mandatory forces the class to require values set on them. Using this method, you can check whether the class requires a value set on the property. - -### Syntax - -``` -boolean OProperty().isMandatory() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance. If the value is `true`, it indicates that the property is mandatory and requires all records have a value set on it. diff --git a/src/java/ref/OProperty/isNotNull.md b/src/java/ref/OProperty/isNotNull.md deleted file mode 100644 index a20c43e9..00000000 --- a/src/java/ref/OProperty/isNotNull.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OProperty - isNotNull() - -This method determines whether a property permits `null` values. - -## Checking Constraints - -Properties can enforce a schema on the records you save to OrientDB. This constraint defines whether the class allows `null` values for this property. Using this method, you can determine whether the constraint has been configured for the property. - -### Syntax - -``` -Boolean OProperty().isNotNull() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, which if `true` indicates that the property allows `null` values. diff --git a/src/java/ref/OProperty/isReadonly.md b/src/java/ref/OProperty/isReadonly.md deleted file mode 100644 index 71f329d8..00000000 --- a/src/java/ref/OProperty/isReadonly.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OProperty - isReadonly() - -This method determines whether you can write to the property. - -## Checking Constraints - -You can enforce a schema on a class by applying constraints to some or all of the properties. This constraint indicates whether the property allows you to update data. When it is read only, you can only read data from the property after creating the record. - -### Syntax - -``` -Boolean OProperty().isReadonly() -``` - -#### Return Value - -This method returns a [`Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) instance, which if `true` indicates that the property is currently set to 'read only'. - diff --git a/src/java/ref/OProperty/setDefaultValue.md b/src/java/ref/OProperty/setDefaultValue.md deleted file mode 100644 index aaa86893..00000000 --- a/src/java/ref/OProperty/setDefaultValue.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OProperty - getDefaultValue() - -This method sets the default value for the given property. - -## Retrieving Default Values - -Normally, when you create a new record and save it to OrientDB, you define the values set on each property. In cases where values are not set on each property, the undefined properties defaults to `null` values. While this may be sufficient in most cases, you may at times want to have a default value on some properties. - -For instance, imagine a class that records student information for a school. Since each year the majority of new students are added to a particular class, (that is, the current class of incoming freshmen), you might set and each year update the default class for this property, saving yourself time in the long run. - -Using this method, you can define the default value for the property. - -### Syntax - -``` -OProperty OProperty().setDefaultValue(String value) -``` - -| Argument | Type | Description | -|---|---|---| -| **`value`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the value to set | - -#### Return Value - -This method returns the updated [`OProperty`](../OProperty.md) instance. - - - diff --git a/src/java/ref/OProperty/setLinkedClass.md b/src/java/ref/OProperty/setLinkedClass.md deleted file mode 100644 index b705a96e..00000000 --- a/src/java/ref/OProperty/setLinkedClass.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OProperty - setLinkedClass() - -Defines the database class linked to this property. - -## Setting Linked Classes - -Ideally, new properties are created with their corresponding database classes. For instance, after creating an instance of [`OClass`](../OClass.md) for your database, you would then use the [`createProperty()`](../OClass/createProperty.md) method to instantiate the properties on that class. - -In cases where you create the database class and properties separately, you can use this method to link the property to the given class. - -### Syntax - -``` -OProperty OProperty.setLinkedClass(OClass ) -``` - -- **``** Defines the database class. - -### Return Value - -This method returns the updated [`OProperty`](../OProperty) instance. diff --git a/src/java/ref/OProperty/setLinkedType.md b/src/java/ref/OProperty/setLinkedType.md deleted file mode 100644 index 06308ea6..00000000 --- a/src/java/ref/OProperty/setLinkedType.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OProperty - setLinkedType() - -Defines the property type. - -## Retrieving Types - -OrientDB enforces typing for properties. Each property in a database class is set to a particular type, which provide some constraint on the kinds of data set for the property. Using this method you can set the property type. - -### Syntax - -``` -OProperty OProperty.setLinkedType(OType ) -``` - -- **``** Defines the [`OType`](../OType.md) instance. - -#### Return Type - -This method returns an [`OProperty`](../OProperty.md) instance that corresponds to the property type. diff --git a/src/java/ref/OProperty/setMax.md b/src/java/ref/OProperty/setMax.md deleted file mode 100644 index 380460fc..00000000 --- a/src/java/ref/OProperty/setMax.md +++ /dev/null @@ -1,33 +0,0 @@ - -# OProperty - getMax() - -This method sets the maximum allowed value for the property. - -## Setting Constraints - -Properties can enforce constraints on the data you store in them. This can be limited to the data-type of the stored value. It can also extend to constraints on the actual data. - -OrientDB calculates the maximum allowed values in different ways, depending on what [`OType`](../OType.md) you have set for the property: - -- **String** The maximum value is the maximum allowed number of characters. -- **Number** The maximum value is the largest allowed number. -- **Date** The maximum value is the latest allowed date. -- **Time** The maximum value is the latest allowed time, measured in milliseconds. -- **Binary** The maximum value is the largest allowed size for a byte array. -- **List**, **Set** or **Collection** The maximum value is largest size of the collection. - -Using this method, you can set the maximum allowed value for the property. - -### Syntax - -``` -OProperty OProperty().setMax(String max) -``` - -| Argument | Type | Description | -|---|---|---| -| **`max`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Define the maximum allowed value | - -#### Return Value - -This method returns the updated [`OProperty`](../OProperty.md) instance. diff --git a/src/java/ref/OProperty/setMin.md b/src/java/ref/OProperty/setMin.md deleted file mode 100644 index 45437f8b..00000000 --- a/src/java/ref/OProperty/setMin.md +++ /dev/null @@ -1,33 +0,0 @@ - -# OProperty - getMax() - -This method sets the minimum allowed value for the property. - -## Retrieving Constraints - -Properties can enforce constraints on the data you store in them. This can be limited to the data-type of the stored value. It can also extend to constraints on the actual data. - -OrientDB calculates the minimum allowed values in different ways, depending on what [`OType`](../OType.md) you have set for the property: - -- **String** The minimum value is the minimum allowed number of characters. -- **Number** The minimum value is the smallest allowed number. -- **Date** The minimum value is the earliest allowed date. -- **Time** The minimum value is the earliest allowed time, measured in milliseconds. -- **Binary** The minimum value is the smallest allowed size for a byte array. -- **List**, **Set** or **Collection** The minimum value is smallest size of the collection. - -Using this method, you can set the minimum allowed value for the property. - -### Syntax - -``` -OProperty OProperty().setMin(String min) -``` - -| Argument | Type | Description | -|---|---|---| -| **`min`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the new minimum value | - -#### Return Value - -This method returns the updated [`OProperty`](../OProperty.md) instance. diff --git a/src/java/ref/OProperty/setName.md b/src/java/ref/OProperty/setName.md deleted file mode 100644 index 5cb8c1a2..00000000 --- a/src/java/ref/OProperty/setName.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OProperty - setName() - -This method defines the name of the property. - -## Retrieving the Property Name - -OrientDB differentiates between properties by the property name. Using this method you can set the name from an [`OProperty`](../OProperty.md) instance. - -### Syntax - -``` -OProperty OProperty().setName(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the new property name | - -#### Return Value - -This method returns an updated `OProperty` instance. - diff --git a/src/java/ref/OProperty/setType.md b/src/java/ref/OProperty/setType.md deleted file mode 100644 index 21c9e8a2..00000000 --- a/src/java/ref/OProperty/setType.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OProperty - setType() - -This method sets the type for the property. - -## Retrieving Property Types - -Properties on a database class have types and can enforce type-based constraints on the data the class allows for its records. OrientDB uses the `OType` class to define the data-types for the property and to provide methods for common operations performed on data-types for the property. - -Using this method, you can set the property type. - -### Syntax - -``` -OProperty OProperty().setType(OType type) -``` - -| Argument | Type | Description | -|---|---|---| -| **`type`** | [`OType`](../OType.md) | Defines the new type for the property | - -#### Return Type - -This method returns the updated [`OProperty`](../OProperty.md) instance. diff --git a/src/java/ref/ORID.md b/src/java/ref/ORID.md deleted file mode 100644 index 78260745..00000000 --- a/src/java/ref/ORID.md +++ /dev/null @@ -1,4 +0,0 @@ - -# ORID - -This class provides the Record ID for a particular [`OElement`](OElement.md), [`OVertex`](OVertex.md), or [`OEdge`](OEdge.md) instance. diff --git a/src/java/ref/ORecordOperation.md b/src/java/ref/ORecordOperation.md deleted file mode 100644 index f9174067..00000000 --- a/src/java/ref/ORecordOperation.md +++ /dev/null @@ -1,7 +0,0 @@ - -# ORecordOperation - -Provides an object for interacting with record operations in a transaction. - - - diff --git a/src/java/ref/OResult.md b/src/java/ref/OResult.md deleted file mode 100644 index cc05f1c2..00000000 --- a/src/java/ref/OResult.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OResult - -Provides an interface for interacting with records in a result-set. - -## Managing Results - -Results are the records that OrientDB returns from queries. You typically get them from the [`OResultSet`](OResultSet.md) interface. In order to use `OResult` you need to import the class into your code. - -```java -import com.orientechnologies.orient.core.sql.executor.OResult; -``` - -## Methods - -### Typing Results - -`OResult` provides a series of methods to determine whether the result is of one type or another. All of these methods return `boolean` values. - -| Method | Description | -|---|---| -| **`isBlob()`** | Returns `true` if the result is an `OBlob` instance | -| **`isEdge()`** | Returns `true` if the result is an [`OEdge`](OEdge.md) instance | -| **`isElement()`** | Returns `true` if the result is an [`OElement`](OElement.md) instance | -| **`isRecord()`** | Returns `true` if the result is a record | -| **`isVertex()`** | Returns `true` if the result is an [`OVertex`](OVertex.md) element | - diff --git a/src/java/ref/OResultSet.md b/src/java/ref/OResultSet.md deleted file mode 100644 index 5f6b88bf..00000000 --- a/src/java/ref/OResultSet.md +++ /dev/null @@ -1,48 +0,0 @@ - -# OResultSet - -This class provides an interface for operating on data returned by OrientDB queries and commands. - -## Managing Result-sets - -Whenever you issue a query or command to an OrientDB database, (through the [`ODatabaseDocument`](ODatabaseDocument.md) class, for instance), OrientDB returns results as an `OResultSet` instance. You can then operate on this instance to retrieve data or further process it before returning it to the user. - -To use `OResultSet`, you need to import it to your code. - -```java -import com.orientechnologies.orient.core.sql.executor.OResultSet; -``` - -Once you've imported it, you can set variables with this class and retrieve results. - - -### Example - -```java -private ODatabaseDocument db; -... - -// Return Count of Accounts -public long fetchAccountCount(){ - - // Fetch Data - OResultSet data = db.query("SELECT FROM Accounts"); - - return data.elementStream().count(); -} -``` - -## Methods - -| Method | Return Type | Description | -|---|---|---| -| [`close()`](OResultSet/close.md) | `void` | Closes the result-set | -| [`edgeStream`](OResultSet/edgeStream.md) | [`Stream`]({{ book.javase }}/java/util/Stream.html)[``](OEdge.md) | Returns a stream of edges from the result-set | -| [`elementStream()`](OResultSet/elementStream.md) | [`Stream`]({{ book.javase }}/java/util/Stream.html)[``](OElement.md) | Returns a stream of elements from the result-set | -| [`estimateSize()`](OResultSet/estimateSize.md) | `long` | Estimates the number of records in the result-set | -| [`hasNext()`](OResultSet/hasNext.md) | `boolean` | Determines whether the `Iterator` contains additional values | -| [`next()`](OResultSet/next.md) | [`OResult`](OResult.md) | Returns the next result in the result-set | -| [`remove()`](OResultSet/remove.md) | `void` | Removes the last value returned by the `Iterator` | -| [`stream()`](OResultSet/stream.md) | [`Stream`]({{ book.javase }}/java/util/Stream.html)[``](OResult.md) | Streams the results in the result-set | -| [`vertexStream()`](OResultSet/vertexStream.md) | [`Stream`]({{ book.javase }}/java/util/Stream.html)[``](OVertex.md) | Streams vertices from the result-set | - diff --git a/src/java/ref/OResultSet/close.md b/src/java/ref/OResultSet/close.md deleted file mode 100644 index c645bc6b..00000000 --- a/src/java/ref/OResultSet/close.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OResultSet - close() - -Closes the result-set. - -## Closing Result-sets - -When you're finished using an [`OResultSet`](../OResultSet.md) instance, close it to free up resources for other operations. - -### Syntax - -``` -void OResultSet().close() -``` - - diff --git a/src/java/ref/OResultSet/edgeStream.md b/src/java/ref/OResultSet/edgeStream.md deleted file mode 100644 index 9d111e15..00000000 --- a/src/java/ref/OResultSet/edgeStream.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OResultSet - edgeStream() - -Retrieves a stream of edges from the result-set. - -## Streaming Edges - -In cases where your result-set contains a number of elements, some of which are vertices and some of which are edges, you can use this method to filter [`OResultSet`](../OResultSet.md) to only return those records that are [`OEdge`](../OEdge.md) instances. - -### Syntax - -``` -default Stream OResultSet().edgeStream() -``` - -#### Return Value - -This method returns a [`Stream`]({{ book.javase }}/java/util/Stream.html) of [`OEdge`](../OEdge.md) instances contained in the result-set. - - - - - diff --git a/src/java/ref/OResultSet/elementStream.md b/src/java/ref/OResultSet/elementStream.md deleted file mode 100644 index bbc9aae6..00000000 --- a/src/java/ref/OResultSet/elementStream.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OResultSet - elementStream() - -Retrieves a stream of elements from the result-set. - -## Streaming Edges - -In cases where your result-set contains a number of elements, some of which are vertices and some of which are edges, you can use this method to filter [`OResultSet`](../OResultSet.md) to only return those records that are [`OElement`](../OElement.md) instances. - -### Syntax - -``` -default Stream OResultSet().elementStream() -``` - -#### Return Value - -This method returns a [`Stream`]({{ book.javase }}/java/util/Stream.html) of [`OElement`](../OElement.md) instances contained in the result-set. - - - - - diff --git a/src/java/ref/OResultSet/estimateSize.md b/src/java/ref/OResultSet/estimateSize.md deleted file mode 100644 index aec72672..00000000 --- a/src/java/ref/OResultSet/estimateSize.md +++ /dev/null @@ -1,15 +0,0 @@ - -# OResultSet - estimateSize() - -Estimates the size of the result-set. - -## Size Estimates - -Using this method you can estimate the number of records contained in this instance of [`OResultSet`](../OResultSet.md). - -### Syntax - -``` -default long OResultSet().estimateSize() -``` - diff --git a/src/java/ref/OResultSet/hasNext.md b/src/java/ref/OResultSet/hasNext.md deleted file mode 100644 index a614286d..00000000 --- a/src/java/ref/OResultSet/hasNext.md +++ /dev/null @@ -1,14 +0,0 @@ - -# OResultSet - hasNext() - -Determines whether the result-set contains any additional values. - -## Iterating through Result-sets - -Using this method you can determine whether any results remain in the result-set. It is useful to check before calling operators like [`next()`](next.md) or [`remove()`](remove.md). - -### Syntax - -``` -boolean OResultSet().hasNext() -``` diff --git a/src/java/ref/OResultSet/next.md b/src/java/ref/OResultSet/next.md deleted file mode 100644 index 8af9eba3..00000000 --- a/src/java/ref/OResultSet/next.md +++ /dev/null @@ -1,14 +0,0 @@ - -# OResultSet - next() - -Returns the next result in the result-set. - -## Retrieving Results - -When iterating through an [`OResultSet`](../OResultSet.md) instance, you can use the `next()` method to retrieve the next [`OResult`](../OResult.md) instance in the iterator. - -### Syntax - -``` -OResult OResultSet().next() -``` diff --git a/src/java/ref/OResultSet/remove.md b/src/java/ref/OResultSet/remove.md deleted file mode 100644 index 3dec9285..00000000 --- a/src/java/ref/OResultSet/remove.md +++ /dev/null @@ -1,14 +0,0 @@ - -# OResultSet - remove() - -Removes the next element from the result-set. - -## Removing Elements - -Using this method you can remove a record from the result-set. Specifically, this method calls the `remove()` method on the underlying [`Iterator`]({{ book.javase }}/java/util/Iterator.html)[``](../OResult.md) instance. Doing so removes the last element returned by the iterator from a [`next()`](next.md) call. - -### Syntax - -``` -default void OResultSet().remove() -``` diff --git a/src/java/ref/OResultSet/stream.md b/src/java/ref/OResultSet/stream.md deleted file mode 100644 index 9efc6c47..00000000 --- a/src/java/ref/OResultSet/stream.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OResultSet - stream() - -Streams records in the result-set. - -## Streaming Records - -When you want to operate on all records in the result-set in a [`Stream`]({{ book.javase }}/java/util/stream/Stream.html), you can do so using this method. - -### Syntax - -``` -Stream OResultSet().stream() -``` - -#### Return Value - -This method returns a [`Stream`]({{ book.javase }}/java/util/stream/Stream.html)[``](../OResult.md) instance representing the results in the result-set. diff --git a/src/java/ref/OResultSet/vertexStream.md b/src/java/ref/OResultSet/vertexStream.md deleted file mode 100644 index 02ab20b5..00000000 --- a/src/java/ref/OResultSet/vertexStream.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OResultSet - vertexStream() - -Retrieves a stream of vertices from the result-set. - -## Retrieving Vertices - -When you have a result-set that contains elements, vertices and edges all together and only want the vertices, you can use this method to filter them out. It returns a stream of [`OVertex`](../OVertex.md) instances from the result-set. - -### Syntax - -``` -Stream OResultSet().vertexStream() -``` - -#### Return Value - -This method returns a [`Stream`]({{ book.javase }}/java/util/stream/Stream.html)[``](../OVertex.md) instance representing the results in the result-set. - diff --git a/src/java/ref/ORule.md b/src/java/ref/ORule.md deleted file mode 100644 index ad57ae6f..00000000 --- a/src/java/ref/ORule.md +++ /dev/null @@ -1,37 +0,0 @@ - -# ORule - -Provides an interface for defines resources and account access to them. - -## Using Rules - -To use `ORule`, first import it to your application. - -```java -import com.orientechnologies.orient.core.metadata.security.ORule; -``` - -### Resources - -`ORule` contains a nested subclass `ORule.ResourceGeneric` that defines the specific resource that the rule grants access to. - -- **`BYPASS_RESTRICTED`** -- **`CLASS`** -- **`CLUSTER`** -- **`COMMAND`** -- **`COMMAND_GREMLIN`** -- **`DATABASE`** -- **`DATABASE_COPY`** -- **`DATABASE_CREATE`** -- **`DATABASE_DROP`** -- **`DATABASE_EXISTS`** -- **`DATABASE_FREEZE`** -- **`DATABASE_PASSTHROUGH`** -- **`DATABASE_RELEASE`** -- **`FUNCTION`** -- **`RECORD_HOOK`** -- **`SCHEMA`** -- **`SERVER`** -- **`SYSTEM_CLUSTERS`** - - diff --git a/src/java/ref/OSchema.md b/src/java/ref/OSchema.md deleted file mode 100644 index ec16d677..00000000 --- a/src/java/ref/OSchema.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Java API - OSchema - -Provides an interface for operating on schemas in OrientDB. - -## Working with Schemas - -In order to operate on schemas in your Java application, you first need to import it. - -```java -import com.orientechnologies.orient.core.db.OSchema; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`createClass()`**](OSchema/createClass.md) | `int` | Counts the number of classes associated with the schema | -| [**`createAbstractClass()`**](OSchema/createAbstractClass.md) | [`OClass`](OClass.md) | Creates an abstract class in the schema | -| [**`createClass()`**](OSchema/createClass.md) | [`OClass`](OClass.md) | Creates a class in the schema | -| [**`dropClass()`**](OSchema/dropClass.md) | `void` | Removes a class from the schema | -| [**`existsClass()`**](OSchema/existsClass.md) | `boolean` | Checks whether the class exists in the schema | -| [**`getClass()`**](OSchema/getClass.md) | [`OClass`](OClass.md) | Retrieves class from the schema | -| [**`getClassByClusterId()`**](OSchema/getClassByClusterId.md) | [`OClass`](OClass.md) | Retrieves class by associated Cluster ID | -| [**`getClasses()`**](OSchema/getClasses.md) | [`Set`](OClass.md) | Retrieves all classes associated with schema | -| [**`getClassesRelyOnCluster()`**](OSchema/getClassesRelyOnCluster.md) | [`Set`](OClass.md) | Retrieves all classes associated with the given cluster | -| [**`getOrCreateClass()`**](OSchema/getOrCreateClass.md) | [`OClass`](OClass.md) | Retrieves class from the schema and create the class if it does not already exist | - - diff --git a/src/java/ref/OSchema/countClasses.md b/src/java/ref/OSchema/countClasses.md deleted file mode 100644 index d0b9cc6d..00000000 --- a/src/java/ref/OSchema/countClasses.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OSchema - countClasses() - -Returns the number of classes in the schema. - -## Classes - -OrientDB has the concept of class within the database, as defined by an [`OClass`](../OClass.md) instance. Using this method, you can retrieve the number of classes created in the given schema. - -### Syntax - -``` -int OSchema().countClasses() -``` - -#### Return Type - -This method returns an `int` instance, with a value representing the number of [`OClass`](../OClass.md) instances created on the schema. - diff --git a/src/java/ref/OSchema/createAbstractClass.md b/src/java/ref/OSchema/createAbstractClass.md deleted file mode 100644 index ddae102b..00000000 --- a/src/java/ref/OSchema/createAbstractClass.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSchema - createAbstractClass() - -Creates a new class in the schema. - -## Creating Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can create a new class in the schema. Database classes are also polymorphic, you can assign an existing class as a superclass to the new class. - -### Syntax - -``` -OClass OSchema().createAbstractClass(String class) - -OClass OSchema().createAbstractClass(String class, OClass superClass) - -OClass OSchema().createAbstractClass( - String class, OClass superClass, OClass superclass ...) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines the name of the new database class | -| **`superClass`** | [`OClass`](../OClass.md) | Defines superclass | - -#### Return Type - -This method returns the newly created [`OClass`](../OClass.md) instance. diff --git a/src/java/ref/OSchema/createClass.md b/src/java/ref/OSchema/createClass.md deleted file mode 100644 index a931a60b..00000000 --- a/src/java/ref/OSchema/createClass.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSchema - createClass() - -Creates a new class in the schema. - -## Creating Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can create a new class in the schema. Database classes are also polymorphic, you can assign an existing class as a superclass to the new class. - -### Syntax - -``` -OClass OSchema().createClass(String class) - -OClass OSchema().createClass(String class, OClass... superclasses) - -OClass OSchema().createClass(String class, int[] clusterIds, OClass... superClasses) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines the name of the new database class | -| **`superClasses`** | [`OClass`](../OClass.md) | Defines superclass | -| **`clusterIds`** | `int[]` | Defines the Cluster ID's for clusters you want the class to use | - -#### Return Type - -This method returns the newly created [`OClass`](../OClass.md) instance. diff --git a/src/java/ref/OSchema/dropClass.md b/src/java/ref/OSchema/dropClass.md deleted file mode 100644 index d195b452..00000000 --- a/src/java/ref/OSchema/dropClass.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OSchema - dropClass() - -Removes class from the schema. - -## Removing Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method, you can remove the given class from the schema. - -### Syntax - -``` -void OSchema().dropClass(String class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines name of class you want to remove | - - diff --git a/src/java/ref/OSchema/existsClass.md b/src/java/ref/OSchema/existsClass.md deleted file mode 100644 index 13d66b1a..00000000 --- a/src/java/ref/OSchema/existsClass.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OSchema - existsClass() - -Checks whether the given class exists in the schema. - -## Checking Class Existence - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can check whether the given class exists in the schema. - -### Syntax - -``` -boolean OSchema().existsClass(String class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines name of class you want to check | - -#### Return Type - -This method returns a `boolean` instance. A value of `true` indicates that the given class exists in the schema. - - diff --git a/src/java/ref/OSchema/getClass.md b/src/java/ref/OSchema/getClass.md deleted file mode 100644 index bc73a4fd..00000000 --- a/src/java/ref/OSchema/getClass.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OSchema - getClass() - -Retrieves the class from the schema. - -## Getting Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can retrieve the given class from the schema. - -### Syntax - -``` -OClass OSchema().getClass(String class) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines name of class you want to get | - -#### Return Type - -This method returns the request [`OClass`](../OClass.md) instance. - - diff --git a/src/java/ref/OSchema/getClassByClusterId.md b/src/java/ref/OSchema/getClassByClusterId.md deleted file mode 100644 index 3cc69446..00000000 --- a/src/java/ref/OSchema/getClassByClusterId.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OSchema - getClassByClusterId() - -Retrieves a class from the schema by its associated cluster. - -## Retrieving Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can retrieve a class from the schema by it associated cluster. - -### Syntax - -``` -OClass OSchema().getClassByClusterId(int clusterId) -``` - -| Argument | Type | Description | -|---|---|---| -| **`clusterId`** | `int` | Defines the Cluster ID | - -#### Return Value - -This method returns the [`OClass`](../OClass.md) instance that corresponds to the given Cluster ID. - diff --git a/src/java/ref/OSchema/getClasses.md b/src/java/ref/OSchema/getClasses.md deleted file mode 100644 index a703a66e..00000000 --- a/src/java/ref/OSchema/getClasses.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OSchema - getClasses() - -Retrieves the classes from the schema. - -## Getting Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can retrieve a set of all the classes in the schema. - -### Syntax - -``` -Set OSchema().getClasses() -``` - -#### Return Type - -This method returns a `Set` of the given [`OClass`](../OClass.md) instances in the schema. - - diff --git a/src/java/ref/OSchema/getClassesRelyOnCluster.md b/src/java/ref/OSchema/getClassesRelyOnCluster.md deleted file mode 100644 index 8e49a759..00000000 --- a/src/java/ref/OSchema/getClassesRelyOnCluster.md +++ /dev/null @@ -1,22 +0,0 @@ -# OSchema - getClassesRelyOnCluster() - -Retrieves all the classes that rely on the given cluster. - -## Retrieving Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can retrieve all the classes in the schema that rely on the given cluster. - -### Syntax - -``` -Set OSchema().getCLassesRelyOnCluster(String cluster) -``` - -| Argument | Type | Description | -|---|---|---| -| **`cluster`** | `String` | Defines the cluster name | - -#### Return Value - -This method returns a `Set` of [`OClass`](../OClass.md) instances that rely on the given cluster. - diff --git a/src/java/ref/OSchema/getOrCreateClass.md b/src/java/ref/OSchema/getOrCreateClass.md deleted file mode 100644 index 272e444a..00000000 --- a/src/java/ref/OSchema/getOrCreateClass.md +++ /dev/null @@ -1,26 +0,0 @@ - -# OSchema - getOrCreteClass() - -Retrieves the given class or creates and retrieves it from the schema. - -## Retrieving or Creating Classes - -OrientDB has the concept of class within the database, which represents a broad grouping of records, similar to the table in relational contexts. Internally, OrientDB represents a class as an [`OClass`](../OClass.md) instance. Using this method you can retrieve the given class if exists in the schema, if it does not exist it create the class and returns it. - -### Syntax - -``` -OClass OSchema().getOrCreateClass(String class) - -OClass OSchema().getOrCreateClass(String class, OClass... superClass) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | `String` | Defines the logical name of the class| -| **`superClass`** | [`OClass`](../OClass.md) | Defines the superclass | - -#### Return Type - -This method returns the requested [`OClass`](../OClass.md) instance. It returns an existing class if it already existed in the database and the newly created class if it did not exist in the database. - diff --git a/src/java/ref/OSecurityRole.md b/src/java/ref/OSecurityRole.md deleted file mode 100644 index 49575ca9..00000000 --- a/src/java/ref/OSecurityRole.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OSecurityRole - -Provides an interface for working with and operating on roles. - -## Using Roles - -In OrientDB, roles allow you to assign privileges to a user in bulk rather than individually. For instance, an account that needs to manage a blog would need read and write permissions on certain classes. Roles allow you to give a new account the privileges it needs to function in one command, rather than through a series of individual grants. - -To operate on roles in your application, import the class: - -```java -import com.orientechnologies.orient.core.metadata.security.OSecurityRole; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`addRule()`**](OSecurityRole/addRule.md) | `OSecurityRole` | Grants privilege on the given resource | -| [**`allow()`**](OSecurityRole/allow.md) | `boolean` | Determines whether role can perform the given operation on the given resource | -| [**`getDocument()`**](OSecurityRole/getDocument.md) | `ODocument` | Retrieves the internal document of the role | -| [**`getName()`**](OSecurityRole/getName.md) | `String` | Retrieves the logical name of the role | -| [**`getParentRole()`**](OSecurityRole/getParentRole.md) | `OSecurityRole` | Retrieves the parent role | -| [**`getRuleSet`**](OSecurityRole/getRuleSet.md) | [`Set`](ORule.md) | Retrieves the rules assigned to the role | -| [**`grant()`**](OSecurityRole/grant.md) | `OSecurityRole` | Grants privileges on the given resource | -| [**`hasRule()`**](OSecurityRole/hasRule.md) | `boolean` | Determines whether the role can access the given resource | -| [**`revoke()`**](OSecurityRole/revoke.md) | `OSecurityRole` | Revokes access to the given resource | -| [**`setParentRole()`**](OSecurityRole/setParentRole.md) | `OSecurityRole` | Sets the parent role | diff --git a/src/java/ref/OSecurityRole/addRule.md b/src/java/ref/OSecurityRole/addRule.md deleted file mode 100644 index 5bf37e4f..00000000 --- a/src/java/ref/OSecurityRole/addRule.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OSecurityRole - addRule() - -Grants access to the given resource to the role. - -## Adding Rules - -OrientDB defines resources and the user or role's access to the resource defined using [`ORule`](../ORule.md) instances. Using this method, you can add a rule to the role. - -### Syntax - -``` -OSecurityRole OSecurityRole().addRule( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource | -| **`resourceSpecific`** | `String` | Defines the specific resource | -| **`operation`** | `int` | Defines the allowed operation | - -#### Return Value - -This method returns an [`OSecurityRule`](../OSecurityRole.md) instance. You may find this useful in chaining several operations together. - - diff --git a/src/java/ref/OSecurityRole/allow.md b/src/java/ref/OSecurityRole/allow.md deleted file mode 100644 index f6923bfe..00000000 --- a/src/java/ref/OSecurityRole/allow.md +++ /dev/null @@ -1,31 +0,0 @@ - -# OSecurityRole - allow() - -Determines whether the role is allowed to access the given resource. - -## Checking Access - -OrientDB defines resources and the user or role's access to the resource defined using [`ORule`](../ORule.md) instances. Using this method, you can determine whether the given role is allowed to access the given resource. - -### Syntax - -``` -boolean OSecurityRole().allow( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource | -| **`resourceSpecific`** | `String` | Defines the specific resource | -| **`operation`** | `int` | Defines the operation you want to check | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the role does have permission to operate on the resource. - - - - diff --git a/src/java/ref/OSecurityRole/getDocument.md b/src/java/ref/OSecurityRole/getDocument.md deleted file mode 100644 index 4f85b516..00000000 --- a/src/java/ref/OSecurityRole/getDocument.md +++ /dev/null @@ -1,15 +0,0 @@ -# OSecurityRole - getDocument() - -Retrieves the document of the role. - -## Role Document - -Internally, OrientDB stores the role as a document in the database. Using this method, you can retrieve the document for further operation. - -### Syntax - -``` -ODocument OSecurityRole().getDocument() -``` - - diff --git a/src/java/ref/OSecurityRole/getName.md b/src/java/ref/OSecurityRole/getName.md deleted file mode 100644 index 0db82c9b..00000000 --- a/src/java/ref/OSecurityRole/getName.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OSecurityRole - getName() - -Retrieves the logical name for the role. - -## Logical Names - -OrientDB provides logical names to easily reference roles from the console or in other applications. Using this method, you can retrieve the logical name for the role from the database. - -### Syntax - -``` -String OSecurityRole().getName() -``` - -#### Return Value - -This method returns a `String` instance. It contains the logical name for the role. - diff --git a/src/java/ref/OSecurityRole/getParentRole.md b/src/java/ref/OSecurityRole/getParentRole.md deleted file mode 100644 index 9b8ef2a5..00000000 --- a/src/java/ref/OSecurityRole/getParentRole.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OSecurityRole - getParentRole() - -Retrieves the parent of this role. - -## Roles - -Rather than creating a new role and assigning to it each and every privilege needed, you can instead assign it a parent role with all the privileges that come with it. Using this method, you can retrieve the parent [`OSecurityRole`](../OSecurityRole.md) instance. - -### Syntax - -``` -OSecurityRole OSecurityRole().getParentRole() -``` - -#### Return Value - -This method returns the parent role, an [`OSecurityRole`](../OSecurityRole.md) instance. - - - - - diff --git a/src/java/ref/OSecurityRole/getRuleSet.md b/src/java/ref/OSecurityRole/getRuleSet.md deleted file mode 100644 index 456ab3e8..00000000 --- a/src/java/ref/OSecurityRole/getRuleSet.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OSecurityRole - getRuleSet() - -Retrieves the rules assigned to this role. - -## Rule Sets - -OrientDB defines the role's access to resources using a series of [`ORule`](../ORule.md) instances. Using this method, you can retrieve a set of all rules assigned to this account. - -### Syntax - -``` -Set OSecurityRole().getRuleSet() -``` - -#### Return Value - -This method returns a `Set` instance containing all of the [`ORule`](../ORule.md) instances connected to this role. - diff --git a/src/java/ref/OSecurityRole/grant.md b/src/java/ref/OSecurityRole/grant.md deleted file mode 100644 index 6a0168a2..00000000 --- a/src/java/ref/OSecurityRole/grant.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSecurityRole - grant() - -Grants privileges to users with this role. - -## Granting Privileges - -Privileges in OrientDB are defined as a series of rules set on the user or role. Using this method, you can add privileges to the role. - -### Syntax - -``` -OSecurityRole OSecurityRole().grant( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource | -| **`resourceSpecific`** | `String` | Defines the specific resource | -| **`operation`** | `int` | Defines the operation you want to enable | - -#### Return Value - -This method returns the updated [`OSecurityRole`](../OSecurityRole.md) instance. You may find this useful when chaining several operations together. - diff --git a/src/java/ref/OSecurityRole/hasRule.md b/src/java/ref/OSecurityRole/hasRule.md deleted file mode 100644 index 2afe3a55..00000000 --- a/src/java/ref/OSecurityRole/hasRule.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OSecurityRole - hasRule() - -Determines whether the role can access the given resources. - -## Rules - -OrientDB stores the privileges granted to a given user account or role as a set of rules, granting access to various resources. Using this method, you can determine whether a role can access the given resource. - -### Syntax - -``` -boolean OSecurityRole().hasRule( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource to check | -| **`resourceSpecific`** | `String` | Defines the specific resource to check | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the role can access the given resource. - - diff --git a/src/java/ref/OSecurityRole/revoke.md b/src/java/ref/OSecurityRole/revoke.md deleted file mode 100644 index 394c9733..00000000 --- a/src/java/ref/OSecurityRole/revoke.md +++ /dev/null @@ -1,30 +0,0 @@ - -# OSecurityRole - revoke() - -Removes access to the given resource from the role. - -## Revoking Access - -OrientDB defines the resources that the role can access and what privileges they have on that resource using a set of rules. Using this method, you can remove a rule from the set, effectively revoking the role's access to the resource. - - -### Syntax - -``` -OSecurityRole OSecurityRole().revoke( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource to remove | -| **`resourceSpecific`** | `String` | Defines the specific resource to remove | -| **`operation`** | `int` | Defines the operation to revoke | - -#### Return Value - -This method returns the updated [`OSecurityRole`](../OSecurityRole.md) instance. You may find this useful in chaining several operations together. - - diff --git a/src/java/ref/OSecurityRole/setParentRole.md b/src/java/ref/OSecurityRole/setParentRole.md deleted file mode 100644 index 82968e06..00000000 --- a/src/java/ref/OSecurityRole/setParentRole.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSecurityRole - setParentRole() - -Defines the parent of this role. - -## Roles - -Rather than creating a new role and assigning to it each and every privilege needed, you can instead assign it a parent role with all the privileges that come with it. Using this method, you can set the parent [`OSecurityRole`](../OSecurityRole.md) instance. - -### Syntax - -``` -OSecurityRole OSecurityRole().setParentRole( - OSecurityRole parentRole) -``` - -| Argument | Type | Description | -|---|---|---| -| **`parentRole`** | [`OSecurityRole`](../OSecurityRole.md) | Defines the parent role to set | - -#### Return Value - -This method returns the updated role, an [`OSecurityRole`](../OSecurityRole.md) instance. You may find this useful when chaining several operations together. - - - - - diff --git a/src/java/ref/OSecurityUser.md b/src/java/ref/OSecurityUser.md deleted file mode 100644 index 3c4012e7..00000000 --- a/src/java/ref/OSecurityUser.md +++ /dev/null @@ -1,33 +0,0 @@ - -# OSecurityUser - -Provides an interface for working with or operating on particular users of the OrientDB Server or databases. - -## Working with Users - -OrientDB maintains an internal set of users with various privileges assigned to these users, granting them access to the Server itself or to particular databases on the Server. Using this class you can work with or operate on an individual user. - -To use the `OSecurityUser` interface in your code, you need to import it. - -```java -import com.orientechnologies.orient.core.metadata.security.OSecurityUser; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`addRole()`**](OSecurityUser/addRole.md) | `OSecurityUser` | Adds a role to the user | -| [**`checkPassword()`**](OSecurityUser/checkPassword.md) | `OSecurityUser` | Authenticates user password | -| [**`getAccountStatus()`**](OSecurityUser/getAccountStatus.md) | `OSecurityUser.STATUSES` | Retrieves the status of the user account | -| [**`getName()`**](OSecurityUser/getName.md) | `String` | Retrieves the logical name for the user | -| [**`getPassword()`**](OSecurityUser/getPassword.md) | `String` | Retrieves the user password | -| [**`getRoles`**](OSecurityUser/getRoles.md) | [`Set`](OSecurityRole.md) | Retrieves the roles assigned to this user | -| [**`hasRole()`**](OSecurityUser/hasRole.md) | `boolean` | Determines whether the user has the given role | -| [**`removeRole()`**](OSecurityUser/removeRole.md) | `boolean` | Removes the given role from the user | -| [**`setAccountStatus()`**](OSecurityUser/setAccountStatus.md) | `void` | Defines the status for the user account | -| [**`setName()`**](OSecurityUser/setName.md) | `OSecurityUser` | Defines the logical name for the user | -| [**`setPassword()`**](OSecurityUser/setPassword.md) | `OSecurityUser` | Defines the user password | - - - diff --git a/src/java/ref/OSecurityUser/addRole.md b/src/java/ref/OSecurityUser/addRole.md deleted file mode 100644 index f5ebaa65..00000000 --- a/src/java/ref/OSecurityUser/addRole.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OSecurityUser - addRole() - -Adds the given role to the user account. - -## Roles - -Rather than creating a series of users and apply permissions to those users individually, OrientDB allows you to define roles for the user. A role provides a series of permissions, granting the user access to whatever resources they may require to perform the given action on the database. Using this method, you can add a role to the user account. - -### Syntax - -``` -OSecurityUser OSecurityUser().addRole(OSecurityRole role) -``` - -| Argument | Type | Description | -|---|---|---| -| **`role`** | [`OSecurityRole`](../OSecurityRole.md) | Defines the role you want to add | - - -#### Return Value - -This method returns the updated [`OSecurityUser`](../OSecurityUser.md) instance. You can then use the return value to chain several operations together in preparing a user to operate on the database. - diff --git a/src/java/ref/OSecurityUser/allow.md b/src/java/ref/OSecurityUser/allow.md deleted file mode 100644 index ca166bcc..00000000 --- a/src/java/ref/OSecurityUser/allow.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSecurityUser - allow() - -Determines whether the user is allowed to access the given resource. - -## Checking Access - -OrientDB defines resources and the user or role's access to the resource defined using [`ORule`](../ORule.md) instances. Using this method, you can determine whether the user is allowed to access the given resource. - -### Syntax - -``` -boolean OSecurityUser().allow( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource | -| **`resourceSpecific`** | `String` | Defines the specific resource | -| **`operation`** | `int` | Defines the operation you want to check | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the role does have permission to operate on the resource. - diff --git a/src/java/ref/OSecurityUser/checkIfAllowed.md b/src/java/ref/OSecurityUser/checkIfAllowed.md deleted file mode 100644 index 5acf51bd..00000000 --- a/src/java/ref/OSecurityUser/checkIfAllowed.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OSecurityUser - checkIfAllowed() - -Determines whether the user account has the necessary privileges perform the given operation. - -## Checking Access - -OrientDB defines the degree of access and permitted operations with a set of rules defined for the given user account or role. Using this method, you can check whether the user is allowed to perform the given operation. - -### Syntax - -``` -OSecurityRole OSecurityUser().checkIfAllowed( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific, - int operation) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource to check | -| **`resourceSpecific`** | `String` | Defines the specific resource to check | -| **`operation`** | `int` | Defines the operation to check | - - diff --git a/src/java/ref/OSecurityUser/checkPassword.md b/src/java/ref/OSecurityUser/checkPassword.md deleted file mode 100644 index a6edaa78..00000000 --- a/src/java/ref/OSecurityUser/checkPassword.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OSecurityUser - checkPassword() - -Authenticates the given password. - -## Passwords - -OrientDB allows you to secure users through the use of passwords. Using this method, you can authenticate the password given for this user. - -### Syntax - -``` -boolean OSecurityUser().checkPassword(String password) -``` - -| Argument | Type | Description | -|---|---|---| -| **`password`** | `String` | Provides password for the user | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the password is authentic. A value of `false` indicates that the password is wrong. - - - diff --git a/src/java/ref/OSecurityUser/getAccountStatus.md b/src/java/ref/OSecurityUser/getAccountStatus.md deleted file mode 100644 index a3aae237..00000000 --- a/src/java/ref/OSecurityUser/getAccountStatus.md +++ /dev/null @@ -1,19 +0,0 @@ - -# OSecurityUser - getAccountStatus() - -Retrieves the status of the user account. - -## User Account Status - -OrientDB supports the use of a general status, which is either `ACTIVE` or `SUSPENDED` to determine whether the user can access resources. This makes it relatively straightforward to quickly disable account should the need arise. Using this method, you can retrieve the current account status. To set the account status, see the [`setAccountStatus()`](setAccountStatus.md) method. - - -### Syntax - -``` -OSecurityUser.STATUSES OSecurityUser().getAccountStatus() -``` - -#### Return Value - -This method returns `OSecurityUser.STATUSES` instance, which is either `ACTIVE` or `SUSPENDED`. diff --git a/src/java/ref/OSecurityUser/getDocument.md b/src/java/ref/OSecurityUser/getDocument.md deleted file mode 100644 index 547b2116..00000000 --- a/src/java/ref/OSecurityUser/getDocument.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OSecurityUser - getDocument() - -Retrieves the document of the user. - -## Role Document - -Internally, OrientDB stores the user as a document in the database. Using this method, you can retrieve the document for further operation. - -### Syntax - -``` -ODocument OSecurityUser().getDocument() -``` - - diff --git a/src/java/ref/OSecurityUser/getName.md b/src/java/ref/OSecurityUser/getName.md deleted file mode 100644 index 9a939f80..00000000 --- a/src/java/ref/OSecurityUser/getName.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OSecurityUser - getName() - -Retrieves the logical name of the user. - -## Logical Names - -Where your Java application interacts with users through the [`OSecurityUser`](../OSecurityUser.md) interface, in OrientDB SQL the users are identified by their logical names. Using this method, you can retrieve the logical name for the user, which you may find useful for logging and authentication purposes. - -### Syntax - -``` -String OSecurityUser().getName() -``` - -#### Return Value - -This method returns a `String` value, which provides the logical name of the user. - - - diff --git a/src/java/ref/OSecurityUser/getPassword.md b/src/java/ref/OSecurityUser/getPassword.md deleted file mode 100644 index fdfc6851..00000000 --- a/src/java/ref/OSecurityUser/getPassword.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OSecurityUser - getPassword() - -Retrieves the user password. - - -## Passwords - -Users in OrientDB have passwords, allowing you to authenticate their access to the Server. Using this method you can retrieve the password from the user instance. - -### Syntax - -``` -String OSecurityUser().getPassword() -``` - -#### Return Value - -This method returns a `String` instance, which represents the password for the account. - diff --git a/src/java/ref/OSecurityUser/getRoles.md b/src/java/ref/OSecurityUser/getRoles.md deleted file mode 100644 index c386aa98..00000000 --- a/src/java/ref/OSecurityUser/getRoles.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OSecurityUser - getRoles() - -Returns the set of roles assigned to this user. - -## User Roles - -OrientDB provides a convenient way of granting users access to multiple resources in the form of roles. For instance, in developing a web application to serve blogs, authors would need write privileges on certain parts of the database. Administrators need other kinds of privileges. Developing a role for these users allows you to grant them all the required privileges in one command. - -Using this method, you can retrieve all the roles assigned to the user account. - -### Syntax - -``` -Set OSecurityUser().getRoles() -``` - -#### Return Value - -This method returns a `Set` instance. The set contains the roles assigned to the user. Each role is a class that extends the [`OSecurityRole`](../OSecurityRole.md) class. - - diff --git a/src/java/ref/OSecurityUser/hasRole.md b/src/java/ref/OSecurityUser/hasRole.md deleted file mode 100644 index 0365aa5c..00000000 --- a/src/java/ref/OSecurityUser/hasRole.md +++ /dev/null @@ -1,28 +0,0 @@ - -# OSecurityUser - hasRole() - -Determines whether the user has the given role. - -## Roles - -OrientDB provides a convenient way of granting users access to multiple resources in the form of roles. For instance, in developing a web application to serve blogs, authors would need write privileges on certain parts of the database. Administrators need other kinds of privileges. Developing a role for these users allows you to grant them all the required privileges in one command. - -Using this method you can determine whether the user account has access to the given role. - -### Syntax - -``` -boolean OSecurityUser().hasRole( - String role, - boolean includeInherited) -``` - -| Argument | Type | Description | -|---|---|---| -| **`role`** | `String` | Defines the logical name of the role | -| **`includeInherited`** | Defines whether to include roles that inherit from the given role | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates that the user account has the given role. A value of `false` indicates that it doesn't have the given role. - diff --git a/src/java/ref/OSecurityUser/isRuleDefined.md b/src/java/ref/OSecurityUser/isRuleDefined.md deleted file mode 100644 index 37825f2b..00000000 --- a/src/java/ref/OSecurityUser/isRuleDefined.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OSecurityUser - isRuleDefined() - -Determines whether the given rule is defined for the user. - -## Rules - -OrientDB defines a user's access to various resources through a set of rules, defined as [`ORule`](../ORule.md) instances. Using this method, you can determine if a rule has been defined for a specific resource for this user. - -### Syntax - -``` -boolean OSecurityUser().isRuleDefined( - ORule.ResourceGeneric resourceGeneric, - String resourceSpecific) -``` - -| Argument | Type | Description | -|---|---|---| -| **`resourceGeneric`** | [`ORule.ResourceGeneric`](../ORule.md) | Defines the generic resource for the rule | -| **`resourceSpecific`** | `String` | Defines the specific resource to check | - -#### Return Value - -This method returns a `boolean` instance. A value of `true`, indicates that the user does have a rule to access the given resource. - - diff --git a/src/java/ref/OSecurityUser/removeRole.md b/src/java/ref/OSecurityUser/removeRole.md deleted file mode 100644 index c29368bc..00000000 --- a/src/java/ref/OSecurityUser/removeRole.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OSecurityUser - removeRole() - -Removes the given role from the user account. - -## Roles - -OrientDB provides a convenient way of granting users access to multiple resources in the form of roles. For instance, in developing a web application to serve blogs, authors would need write privileges on certain parts of the database. Administrators need other kinds of privileges. Developing a role for these users allows you to grant them all the required privileges in one command. - -Using this method you can remove the given role from the user account. - -### Syntax - -``` -boolean OSecurityUser().removeRole(String role) -``` - -| Argument | Type | Description | -|---|---|---| -| **`role`** | `String` | Defines the logical name for the role | - -#### Return Value - -This method returns a `boolean` instance. A value of `true` indicates whether the role was successfully removed. - diff --git a/src/java/ref/OSecurityUser/setAccountStatus.md b/src/java/ref/OSecurityUser/setAccountStatus.md deleted file mode 100644 index 253ff248..00000000 --- a/src/java/ref/OSecurityUser/setAccountStatus.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OSecurityUser - setAccountStatus() - -Sets the user account status. - -## Account Status - -OrientDB supports the use of a general status, which is either `ACTIVE` or `SUSPENDED` to determine whether the user can access resources. This makes it relatively straightforward to quickly disable account should the need arise. Using this method, you can set the status account. To retrieve the current status, see the [`getAccountStatus()`](getAccountStatus.md) method. - -### Syntax - -``` -void OSecurityUser().setAccountStatus(OSecurityUser.STATUSES status) -``` - -| Argument | Type | Description | -|---|---|---| -| **`status`** | `OSecurityUser.STATUSES` | Indicates the status that you want to set, which is either `ACTIVE` or `SUSPENDED` | - - diff --git a/src/java/ref/OSecurityUser/setName.md b/src/java/ref/OSecurityUser/setName.md deleted file mode 100644 index 387d3ff0..00000000 --- a/src/java/ref/OSecurityUser/setName.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OSecurityUser - setName() - -Defines the logical name for the user. - -## Logical User Names - -Where your Java application interacts with users through the [`OSecurityUser`](../OSecurityUser.md) interface, in OrientDB SQL the users are identified by their logical names. Using this method, you can set the logical name for the user. - -### Syntax - -``` -OSecurityUser OSecurityUser().setName(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | `String` | Defines the logical name for the user | - -#### Return Value - -This method returns the updated [`OSecurityUser`](../OSecurityUser.md) instance, which you can then use in chaining several operations together. - diff --git a/src/java/ref/OSecurityUser/setPassword.md b/src/java/ref/OSecurityUser/setPassword.md deleted file mode 100644 index 216b467f..00000000 --- a/src/java/ref/OSecurityUser/setPassword.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OSecurityUser - setPassword() - -Defines the password for the user account. - -## Setting Passwords - -Users in OrientDB have passwords, allowing you to authenticate their access to the Server. Using this method you can set the password for the user account. - -### Syntax - -``` -OSecurityUser OSecurityUser().setPassword(String password) -``` - -| Argument | Type | Description | -|---|---|---| -| **`password`** | `String` | Defines the new password | - -#### Return Value - -This method returns the updated [`OSecurityUser`](../OSecurityUser.md) instance. You may find this useful in chaining several user operations together. - diff --git a/src/java/ref/OServer.md b/src/java/ref/OServer.md deleted file mode 100644 index 0629ba73..00000000 --- a/src/java/ref/OServer.md +++ /dev/null @@ -1,149 +0,0 @@ - -# Java API - OServer - -This class allows you to embed and manage a server instance within your application. Once you start the server, you can interact with it and manage data the same as you would standard instances of the OrientDB Server. - ->For more information, see [Embedding the Server](../../internals/Embedded-Server.md). For the complete `OServer` documentation, see the [Javadocs]({{ book.javadoc }}/com/orientechnologies/orient/server/OServer.html). - -## Working with `OServer` - -In order to operate on an OrientDB database, you first need to establish a connection with the server. You have two options in this: you can connect to a running OrientDB Server using [`OrientDB`](OrientDB.md) or you can embed the server within your application using this class. It can be found at `com.orientechnologies.orient.server`. For instance, - - -```java -/* Import OrientDB Classes */ -import com.orientechnologies.orient.server.OServer; -``` - -Once you've imported the class to your application, you can use one of the constructors to build a particular instance in your code. - - -### Constructors - -This class provides two constructors to create instances of `OServer` in your application. The first takes no arguments and the second takes a single boolean argument, which defines whether you want to shut the server down on exit. - -``` -// CONSTRUCTOR 1 -OServer() - -// CONSTRUCTOR 2 -OServer(boolean shutdownEngineOnExit) -``` - -### Exception - -This class throws the following exceptions. - -- [`ClassNotFoundException`]({{ book.javase }}/api/java/lang/ClassNotFoundException.html) -- [`MalformedObjectNameException`]({{ book.javase }}/api/javax/management/MalformedObjectNameException.html) -- [`NullPointerException`]({{ book.javase }}/api/java/lang/NullPointerException.html) -- [`InstanceAlreadyExistsException`]({{ book.javase }}/api/javax/management/InstanceAlreadyExistsException.html) -- [`MBeanRegistrationException`]({{ book.javase }}/api/javax/management/MBeanRegistrationException.html) -- [`NotCompliantMBeanException`]({{ book.javase }}/api/javax/management/NotCompliantMBeanException.html) - -### Methods - -Once you've initialized the class in your application, you can call the following methods on your instance. - -#### Managing Server Instances - -| Method | Return Type | Description | -|---|---|---| -| [**`getInstance()`**](OServer/getInstance.md) | [`OServer`](OServer.md) | Retrieves a server instance by ID. | -| [**`getInstanceByPath()`**](OServer/getInstanceByPath.md) | [`OServer`](OServer.md) | Retrieve a server instance by its path. | -| [**`isActive()`**](OServer/isActive.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Checks whether server is active. | -| [**`restart()`**](OServer/restart.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Restarts the server. | -| [**`shutdown()`**](OServer/shutdown.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Shuts down the server. | -| [**`startup()`**](OServer/startup.md) | [`OServer`](OServer.md) | Starts the server. | - - - -#### Managing Databases - -| Method | Return Type | Description | -|---|---|---| -| [**`getDatabaseDirectory()`**](OServer/getDatabaseDirectory.md) | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the root database directory. | -| [**`openDatabase()`**](OServer/openDatabase.md) | `ODatabase` | Opens the given database. | - - - -#### Managing Storage - -| Method | Return Type | Description | -|---|---|---| -| [**`existsStoragePath()`**](OServer/existsStoragePath.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Determines whether storage path exists. | -| [**`getAvailableStorageNames()`**](OServer/getAvailableStorageNames.md) | [`Map`]({{ book.javase }}/api/java/util/Map.html)[``]({{ book.javase }}/api/java/lang.String.html) | Retrieves a map of available storage types. | -| [**`getStoragePath()`**](OServer/getStoragePath.md) | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Retrieves the storage path. | - - -#### User Management - -| Method | Return Type | Description | -|---|---|---| -| [**`addTemporaryUser()`**](OServer/addTemporaryUser.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Adds a temporary user to the server. | -| [**`addUser()`**](OServer/addUser.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Adds a user to the server. | -| [**`authenticate()`**](OServer/authenticate.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Authenticates a user on the server. | -| [**`dropUser()`**](OServer/dropUser.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Removes user from the server. | -| [**`isAllowed()`**](OServer/isAllowed.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Checks whether user can access a given resource. | - - - - -#### Configuration - -| Method | Return Type | Description | -|---|---|---| -| [**`getConfiguration()`**](OServer/getConfiguration.md) | `OServerConfiguration` | Retrieves the server configuration. | -| [**`saveConfiguration()`**](OServer/saveConfiguration.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Saves the server configuration to disk. | - - - - - - - - diff --git a/src/java/ref/OServer/addTemporaryUser.md b/src/java/ref/OServer/addTemporaryUser.md deleted file mode 100644 index 1cd3eb3b..00000000 --- a/src/java/ref/OServer/addTemporaryUser.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OServer - addTemporaryUser() - -This method adds a temporary user on the OrientDB Server. - -## Adding Temporary Users - -### Syntax - -``` -public void OServer().addTemporaryUser(String user, String passwd, String permission) -``` - -| Argument | Type | Description | -|---|---|---| -| **`user`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user name. | -| **`passwd`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user password. | -| **`permission`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user permissions. | - - diff --git a/src/java/ref/OServer/addUser.md b/src/java/ref/OServer/addUser.md deleted file mode 100644 index 8506f82b..00000000 --- a/src/java/ref/OServer/addUser.md +++ /dev/null @@ -1,58 +0,0 @@ - -# OServer - addUser() - -This method adds a user to the OrientDB Server. - -## Adding Users - -OrientDB differentiates between users with access to the server and users with access to the database. This method relates to adding users to the server. - -### Syntax - -``` -public void OServer().addUser(String user, - String passwd, - String permission) -``` - -| Argument | Type | Description | -|---|---|---| -| **`user`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user name. | -| **`passwd`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the password for the new user. | -| **`permission`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the permission-level for the new user. | - -#### Exception - -This method throws the following exception, - -- [`IOException`]({{ book.javase }}/api/java/io/IOException.html) - - -### Example - -Imagine you have a web application running on a distributed deployment. You may want a method in the class that manages your OrientDB Server instances to use in creating server users. - -```java - -/** - * Create New User - */ -public Boolean createUser(OServer oserver, - String user, String passwd, String permission){ - - // Log Operation - logger.info("Creating New User: " + user); - - try { - // Create User - oserver.addUser(user, passwd, permission); - return true; - - } catch(IOException err){ - logger.warn("Error Creating User: " + - err.getMessage()); - return false; - - } -} -``` diff --git a/src/java/ref/OServer/authenticate.md b/src/java/ref/OServer/authenticate.md deleted file mode 100644 index 87b6bd08..00000000 --- a/src/java/ref/OServer/authenticate.md +++ /dev/null @@ -1,44 +0,0 @@ - -# OServer - authenticate() - -This method authenticates a user on the OrientDB Server. - -## Authenticating Users - -OrientDB differentiates between users that operate on the server and users that operate on the database. This method allows you to authenticate the given user for server operations. - -### Syntax - -``` -public boolean OServer().authenticate(String user, String passwd, String resource) -``` - -| Argument | Type | Description | -|---|---|---| -| **`user`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user to authenticate. | -| **`passwd`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the password for the user. | -| **`resource`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the resource to authenticate on. | - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that you have successfully authenticated the user. - - -### Example - -Imagine you have a web application running on a distributed deployment. You may want a method in the class that manages your OrientDB Server instances to use in authenticating server users. - -```java - -/** - * Authenticate User - */ -public Boolean authUser(OServer oserver, - String user, String passwd, String resource){ - - // Log Operation - logger.info("Authenticating User: " + user); - - return oserver.authenticate(ser, passwd, resource); -} -``` diff --git a/src/java/ref/OServer/dropUser.md b/src/java/ref/OServer/dropUser.md deleted file mode 100644 index 24a586e5..00000000 --- a/src/java/ref/OServer/dropUser.md +++ /dev/null @@ -1,55 +0,0 @@ - -# OServer - dropUser() - -This method removes a user from the OrientDB Server. - -## Removing Users - -OrientDB differentiates between users with access to the server and users with access to the database. Occasionally, you may need to manage users on your server instances. This method allows you to remove them. - -### Syntax - -``` -public void OServer().dropUser(String iUser) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iUser`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user you want to remove | - -#### Exceptions - -This method throws the following exception: - -- [`IOException`]({{ book.javase }}/api/java/io/IOException.html) - -### Example - -Consider the use case of a web application. You may want to provide administrators and scripts access to manage server users, such as remove credentials when an administrator leaves the company. - -In the class that manages your [`OServer`](../OServer.md) instances, you might want a method to streamline this process and log the event for you. - -```java -/** - * Remove OServer User - */ -public Boolean removeUser(OServer oserver, String user){ - - // Log Operation - logger.info("Removing User: " + user); - - try { - - // Remove USer - oserver.dropUser(user); - return true; - - } catch(IOException err){ - - // Report Exception - logger.warn("Unable to Remove User: " + - err.getMessage()); - return false; - } -} -``` diff --git a/src/java/ref/OServer/existsStoragePath.md b/src/java/ref/OServer/existsStoragePath.md deleted file mode 100644 index f2d88106..00000000 --- a/src/java/ref/OServer/existsStoragePath.md +++ /dev/null @@ -1,23 +0,0 @@ - -# OServer - existsStoragePath() - -This method determines whether the given storage path exists. - -## Checking Storage Path - -### Syntax - -``` -public Boolean OServer().existsStoragePath(String iURL) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iURL`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the storage path. | - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that the given storage path exists. - - - diff --git a/src/java/ref/OServer/getAvailableStorageNames.md b/src/java/ref/OServer/getAvailableStorageNames.md deleted file mode 100644 index 678e53e6..00000000 --- a/src/java/ref/OServer/getAvailableStorageNames.md +++ /dev/null @@ -1,45 +0,0 @@ - -# OServer - getAvailableStorageNames() - -This method returns a map of storage types available on the OrientDB Server. - -## Retrieving Storage Names - -OrientDB supports two storage types: in-memory and PLocal. In the event that you want to check for others that might become available or otherwise test the feature, this method allows you to retrieve a map of those available. - -### Syntax - -``` -public Map OServer().getAvailableStorageNames() -``` - -### Example - -In the event that you want to pull the available storage names to operate on in some other method, you might use something like the following: - -```java -/** - * Report Available Storage to Stdout - */ -public void reportStorage(OServer oserver){ - - // Log Operation - logger.info("Reporting Storage"); - - // Initialize Variables - private Map storage; - private Iterator it; - - // Prepare Iterator - storage = oserver.getAvailableStorage(); - it = storage.entrySet().iterator(); - - // Loop Over Storage - System.out.println("OServer Storage:"); - while (it.hasNext()){ - Map.Entry pair = (Map.Entry)it.next(); - System.out.println(pair.getKey() + ": " + pair.getValue()); - it.remove(); - } -} -``` diff --git a/src/java/ref/OServer/getConfiguration.md b/src/java/ref/OServer/getConfiguration.md deleted file mode 100644 index bf82480c..00000000 --- a/src/java/ref/OServer/getConfiguration.md +++ /dev/null @@ -1,35 +0,0 @@ - -# [Server - getConfiguration() - -This method retrieves the OrientDB Server configuration. - -## Retrieving Server Configuration - -On occasion you may need to review or otherwise operation on configuration values of a given [`OServer`](../OServer.md) instance. This method allows you to retrieve the current configuration as an `OServerConfiguration` instance. - -### Syntax - -``` -public OServerConfiguration OServer().getConfiguration() -``` - -#### Return Value - -This method returns an `OServerConfiguration` value, which provides the current configuration of the OrientDB Server. - -### Example - -In cases where you need to operate on an instance of the `OServerConfiguration` class, you can retrieve the current configuration from the OrientDB Server. You might use a method such as this in the class that manages your [`OServer`](../OServer.md) instance. - -```java -/** - * Retrieve OrientDB Server Configuration - */ -public OServerConfiguration fetchConfig(OServer oserver){ - - // Log Operation - logger.info("Retrieving OServer Configuration"); - - return oserver.getConfiguration(); -} -``` diff --git a/src/java/ref/OServer/getDatabaseDirectory.md b/src/java/ref/OServer/getDatabaseDirectory.md deleted file mode 100644 index 25d19183..00000000 --- a/src/java/ref/OServer/getDatabaseDirectory.md +++ /dev/null @@ -1,42 +0,0 @@ - -# OServer - getDatabaseDirectory() - -This method returns the root directory for databases handled by the OrientDB Server. - -## Retrieving Database Directories - -When using the PLocal storage-type, OrientDB writes persistent data to the file system, with one directory for each database. This method returns the root directory that the given [`OServer`](../OServer.md) instance uses in storing databases. - -### Syntax - -``` -public String OServer().getDatabaseDirectory() -``` - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) value. It provides the path to where the OrientDB Server stores its databases. - -### Example - -When OrientDB writes to PLocal storage, it writes the database to the file system in a particular directory. Occasionally, you may need to operate on this directory or otherwise reference it elsewhere in your application. - -```java -/** - * Retrieve and Log the Database Directory - */ -public String fetchDbDir(OServer oserver){ - - // Log Operation - logger.info("Retrieving Database Directory"); - - // Fetch Database Directory - String path = oserver.getDatabaseDirectory(); - - // Report Location for Debugging - logger.debug("Database Directory: " + path); - - // Return Directory Path - return path; -} -``` diff --git a/src/java/ref/OServer/getInstance.md b/src/java/ref/OServer/getInstance.md deleted file mode 100644 index 2c86a062..00000000 --- a/src/java/ref/OServer/getInstance.md +++ /dev/null @@ -1,55 +0,0 @@ - -# OServer - getInstance() - -This method retrieves the given instance of an OrientDB Server by its Server ID. - -## Retrieving `OServer` Instances - -In addition to starting an embedded instance of the OrientDB Server, you can also retrieve a particular [`OServer`](../OServer.md) instance, as identified by its Server ID. If you want to retrieve the server instance by its path, see the [`getInstanceByPath()`](getInstanceByPath.md) method. - -### Syntax - -``` -public static OServer OServer().getInstance(String iServerId) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iServerId`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the Server ID you want to retrieve. | - -#### Return Value - -This method returns an [`OServer`](../OServer.md) instance. - -### Example - -Imagine you have OrientDB running in a distributed deployment and have an operation that you need to run on several servers in sequence. You might use a method such as this to convert a list of Server ID's into one of active [`OServer`](../OServer.md) instances. - -```java -/** - * Retrieve OServer Instances by ID - */ -public List fetchOServers(OServer oserver, List ids){ - - // Log Operation - logger.info("Fetching OrientDB Servers"); - - // Initialize Variables - List oservers; - - // Loop Over Server ID's - for (int i = 0; i < ids.size(); i++){ - - // Retrieve ID - String id = ids.get(i); - - // Retrieve OServer - oservers.add(oserver.getInstance(id)); - - } - - // Return OServer List - return oservers; - -} -``` diff --git a/src/java/ref/OServer/getInstanceByPath.md b/src/java/ref/OServer/getInstanceByPath.md deleted file mode 100644 index 9d7a7c2a..00000000 --- a/src/java/ref/OServer/getInstanceByPath.md +++ /dev/null @@ -1,56 +0,0 @@ - -# OServer - getInstanceByPath() - -This method retrieves the given instance of an OrientDB Server by its path. - -## Retrieving `OServer` Instances - -In addition to starting an embedded instance of the OrientDB Server, you can also retrieve a particular [`OServer`](../OServer.md) instance, as identified by its path. If you want to retrieve the server instance by its ID, see the [`getInstance()`](getInstance.md) method. - -### Syntax - -``` -public static OServer OServer().getInstanceByPath(String iPath) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iPath`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the sever path you want to retrieve. | - -#### Return Value - -This method returns an [`OServer`](../OServer.md) value. It provides you with an instance of the OrientDB Server running on the given path. - - -### Example - -Imagine you have OrientDB running in a distributed deployment and have an operation that you need to run on several servers in sequence. You might use a method such as this to convert a list of server paths into one of active [`OServer`](../OServer.md) instances. - -```java -/** - * Retrieve OServer Instances by Path - */ -public List fetchOServers(OServer oserver, List paths){ - - // Log Operation - logger.info("Fetching OrientDB Servers"); - - // Initialize Variables - List oservers; - - // Loop Over Server ID's - for (int i = 0; i < paths.size(); i++){ - - // Retrieve ID - String path = path.get(i); - - // Retrieve OServer - oservers.add(oserver.getInstanceByPath(path)); - - } - - // Return OServer List - return oservers; - -} -``` diff --git a/src/java/ref/OServer/getStoragePath.md b/src/java/ref/OServer/getStoragePath.md deleted file mode 100644 index 66b64687..00000000 --- a/src/java/ref/OServer/getStoragePath.md +++ /dev/null @@ -1,49 +0,0 @@ - -# OServer - getStoragePath() - -Retrieves the path to the storage-type used by the OrientDB Server. - -## Retrieving Storage Path - -In cases where you need the storage-path used by the OrientDB Server, such as to log it for debugging or as part of a larger operation, this method retrieves it for you. - -### Syntax - -``` -public String OServer().getStoragePath(String iName) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iName`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the name of the storage-type. | - -#### Return Value - -This method returns a [`String`]({{ book.javase }}/api/java/lang/String.html) value. It provides the path to OrientDB storages. - - -### Example - -Consider a use case where you need to retrieve the storage path to pass it to some other method as part of a larger operation. You might use a method like this in the class managing the OrientDB Server to retrieve the storage path and log it for debugging purposes before returning the value. - - -```java -/** - * Retrieve and Log the Storage Path - */ -public String fetchStoragePath(OServer oserver){ - - // Log Operation - logger.info("Retrieving Storage Path"); - - // Fetch Storage Path - String path = oserver.getStoragePath(); - - // Report Location for Debugging - logger.debug("Storage Path" + path); - - // Return Sotrage Path - return path; -} -``` - diff --git a/src/java/ref/OServer/getUser.md b/src/java/ref/OServer/getUser.md deleted file mode 100644 index 05463ddd..00000000 --- a/src/java/ref/OServer/getUser.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Java API - `OServer().getUser()` - -This method retrieves user configuration from the OrientDB Server. - -## Retrieving Users - -In the event that you need to operate on a server user from within your application, this method allows you to retrieve the server user configuration. This is an instance of the `OServerUserConfiguration` class, which you can then read or modify from within your application. - -### Syntax - -``` -public OServerUserConfiguration OServer().getUser(String name) -``` - -| Argument | Type | Description -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user name | - - diff --git a/src/java/ref/OServer/isActive.md b/src/java/ref/OServer/isActive.md deleted file mode 100644 index 35b1215d..00000000 --- a/src/java/ref/OServer/isActive.md +++ /dev/null @@ -1,57 +0,0 @@ - -# OServer - isActive() - -This method tests whether the server instance is currently active. - -## Checking Server Active - -You may find occasions where your application receives an [`OServer`](../OServer.md) instance as a return value from other operations or threads. This method provides you with a simple check to determine whether the server instance is currently active using the boolean return value. - -### Syntax - -``` -public boolean OServer().isActive() -``` - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that the OrientDB Server instance is active. - -### Example - -Imagine you that you have created a basic handler in your application that takes an [`OServer`](../OServer.md) instance as a constructor argument. When it receives the server instance, it checks whether it is active and activates it in the event that it is not. - -```java -// IMPORTS -import com.orientechnologies.orient.server.OServer; -import java.util.logging.Logger; -/* - * Handler class for OrientDB Databases - * @author: Some Dev - * @version: 10.4 - * @since: 1.0 - */ -class DatabaseHandler { - - // INIT LOGGER - private static final Logger logger = Logger.getLogger( - DatabaseHandler.class.getName()); - - /* - * Constructor Method - * @param server: OServer instance - */ - public void DatabaseHandler(OServer server) { - - // CHECK THAT SERVER IS ACTIVE - if !(server.isActive()) { - logger.info("Server inactive, activating"); - - // ACTIVATE SERVER - server.activate(); - - } - - } -} -``` diff --git a/src/java/ref/OServer/isAllowed.md b/src/java/ref/OServer/isAllowed.md deleted file mode 100644 index 1f2e831b..00000000 --- a/src/java/ref/OServer/isAllowed.md +++ /dev/null @@ -1,41 +0,0 @@ - -# OServer - isAllowed() - -This method determines whether a user is allowed to operate the given resource. - -## Checking Users - -Different users have different levels of access to the OrientDB Server. When a user attempts an operation that exceeds their access, it raises an exception. Rather than providing all options and letting the user fail, you can use this method to perform a basic check, determining what they can do before giving the option. - -### Syntax - -``` -public boolean OServer().isAllowed(String user, String resource) -``` - -| Argument | Type | Description | -|---|---|---| -| **`user`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user you want to check. | -| **`resource`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the resource you want to check. | - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that the user has permission to access the given resource. - -### Example - -Consider the use case of an application that needs to perform several operations on various OrientDB Servers. In the class that manages the server, you might want to create a method to streamline these operations into a basic check that can be called wherever you need it in the class. - -```java -private OServer oserver; -private String currentUser; -private String currentResource; -... - -/** - * Check Permission - */ -public Boolean checkResource(){ - return oserver.isAllowed(currentUser, currentResource); -} -``` diff --git a/src/java/ref/OServer/openDatabase.md b/src/java/ref/OServer/openDatabase.md deleted file mode 100644 index 4e1bcf22..00000000 --- a/src/java/ref/OServer/openDatabase.md +++ /dev/null @@ -1,49 +0,0 @@ - -# OServer - openDatabase() - -This method opens a database on the OrientDB Server. - -## Opening Databases - -In order to operate on databases on a given [`OServer`](../OServer.md) instance, you first need to open the database. Databases have separate login credentials from the OrientDB Server. - - -### Syntax - -There are several methods available, depending on which arguments you want to use in opening the given database and what you would like the method to return. - -``` -public ODatabase OServer().openDatabase(String iDbURL, - OToken iToken) - -public ODatabase OServer().openDatabase(String iDbURL, - String user, String passwd) - -public ODatabase OServer().openDatabase(String iDbURL, - String user, String passwd, ONetworkProtocolData data) - -public ODatabaseDocumentTx OServer().openDatabase(String iDbURL, - String user, String passwd, ONetworkProtocolData data, - Boolean iBypassAccess) - -public ODatabaseDocumentTx OServer().openDatabase(ODatabaseDocumentTx database, - String user, String passwd, ONetworkProtocolData data, - Boolean iBypassAccess) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iDbURL`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the URL to the database. | -| **`user`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user to open the database. | -| **`passwd`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the password for the user. | -| **`data`** | `ONetworkProtocolData` | Defines the network protocol for the connection. | -| **`iBypassAccess`** | [`java.lang.Boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Defines whether to bypass authentication in opening the database. | -| **`database`** | [`ODatabaseDocument`](../ODatabaseDocument.md) | Defines the database to open. | - -#### Return Value - -This method returns an `ODatabase` value, where `T` is a generic for any OrientDB database types. - -- `ODatabaseDocumentTx` -- `OrientGraph` -- `OObjectDatabaseTx` diff --git a/src/java/ref/OServer/restart.md b/src/java/ref/OServer/restart.md deleted file mode 100644 index 8b891eff..00000000 --- a/src/java/ref/OServer/restart.md +++ /dev/null @@ -1,67 +0,0 @@ - -# OServer - restart() - -This method restarts the OrientDB Server instance. - -## Restarting the Server - -When you have an instance of [`OServer`](../OServer.md) that's already running, calling this method lets you stop the server and restart it. - -### Syntax - -``` -public void OServer().restart() -``` - -#### Exceptions - -This method throws the following exceptions: - -- [`ClassNotFoundException`]({{ book.javase }}/api/java/lang/ClassNotFoundException.html) -- [`InvocationTargetException`]({{ book.javase }}/api/java/lang/reflect/InvocationTargetException.html) -- [`InstantiationException`]({{ book.javase }}/api/java/lang/InstantiationException.html) -- [`NoSuchMethodException`]({{ book.javase }}/api/java/lang/NoSuchMethodException.html) -- [`IllegalAccessException`]({{ book.javase }}/api/java/lang/IllegalAccessException.html) -- [`IOException`]({{ book.javase }}/api/java/io/IOException.html) - - -### Example - -Imagine you have a handler class for the [`OServer`](../OServer.md) instances that you use in managing common operations with the OrientDB Server. You might want to pass additional information to your logs when restarting the server, like the user or process calling for the restart. - -```java -// IMPORTS -import com.orientechnologies.orient.server.OServer; -import java.util.logging.Logger; - -/* - * Handler Class for OrientDB Database - * @author: Some Dev - * @version: 10.4 - * @since: 1.0 - */ -class DatabaseHandler { - - // INIT LOGGER - private static final Logger logger = Logger.getLogger( - DatabaseHandler.class.getname()); - - // CLASS VARIABLES - private static OServer oserver; - ... - - /* - * Command to restart the OrientDB Server - * @param user: Defines the user requesting the restart - */ - public void restart(String user){ - - // LOG OPERATION - logger.info("OrientDB Server restart, (requested by ", user, ")"); - - // RESTART ORIENTDB SERVER - oserver.restart() - - } -} -``` diff --git a/src/java/ref/OServer/saveConfiguration.md b/src/java/ref/OServer/saveConfiguration.md deleted file mode 100644 index 2ec44e77..00000000 --- a/src/java/ref/OServer/saveConfiguration.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OServer - saveConfiguration() - -This method saves the current server configuration to disk. - -## Saving Configuration - -Occasionally, you may want to operate on the OrientDB Server configuration from within your application. When you modify the configuration, those changes remain volatile until you save them using this method. - -### Syntax - -``` -public void OServer().saveConfiguration() -``` - -#### Exceptions - -This method throws the following exception: - -- [`IOException`]({{ book.javase }}/api/java/io/IOException.html) - - diff --git a/src/java/ref/OServer/shutdown.md b/src/java/ref/OServer/shutdown.md deleted file mode 100644 index 765f3208..00000000 --- a/src/java/ref/OServer/shutdown.md +++ /dev/null @@ -1,63 +0,0 @@ - -# OServer - shutdown() - -This method shuts down the OrientDB Server instance. - -## Shutting Down the Server - -When you finish working with the given [`OServer`](../OServer.md) instance, you need to shut it down in order to free up resources. This method lets you shutdown an embedded server from within your application. - -### Syntax - -``` -public boolean OServer().shutdown() -``` - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the value is `true`, it indicates that the server was successfully shut down. - - -### Example - -Imagine you have a handler class for the [`OServer`](../OServer.md) instances that you use in managing common operations with the OrientDB Server. You might want to pass additional information to your logs when shutting down the server, like the user or process calling for the restart. - - -```java -// IMPORTS -import com.orientechnologies.orient.server.OServer; -import java.util.logging.Logger; - -/* - * Handler Class for OrientDB Database - * @author: Some Dev - * @version: 10.4 - * @since: 1.0 - */ -class DatabaseHandler { - - // INIT LOGGER - private static final Logger logger = Logger.getLogger( - DatabaseHandler.class.getname()); - - // CLASS VARIABLES - private static OServer oserver; - ... - - /* - * Command to shut down the OrientDB Server - * @param user: Defines the user requesting the restart - */ - public void shutdown(String user){ - - // LOG OPERATION - logger.info("OrientDB Server shutting down, (requested by ", user, ")"); - - // SHUTDOWN ORIENTDB SERVER - oserver.shutdown() - - } -} -``` - - diff --git a/src/java/ref/OServer/startup.md b/src/java/ref/OServer/startup.md deleted file mode 100644 index e8541743..00000000 --- a/src/java/ref/OServer/startup.md +++ /dev/null @@ -1,96 +0,0 @@ - -# OServer - startup() - -This method starts the given server instance. - -## Starting the Server - -When you initialize an instance of [`OServer`](../OServer.md), it prepares the server within your application, but does not start it until you tell it you're ready to start. - -### Syntax - -There are several methods available in starting the embedded OrientDB server instance, which you use depends on what information you have available. Bear in mind, that these methods do not all throw the same exceptions. - -``` -public OServer OServer().startup() - -public OServer OServer().startup(File iConfigurationFile) - -public OServer OServer().startup(String iConfiguration) - -public OServer OServer().startup(InputStream iInputStream) -``` - -| Argument | Type | Description | -|---|---|---| -| **`iConfigurationFile`** | [`java.io.File`]({{ book.javase }}/api/java/io/File.html) | Defines the server configuration file, as a file instance. | -| **`iConfiguration`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the server configuration, as a string. | -| **`iInputStream`** | [`java.io.InputStream`]({{ book.javase }}/api/java/io/InputStream.html) | Defines the server configuration, as an input stream. | - -#### Return Value - -This method returns an [`OServer`](../OServer.md) instance, which provides the started OrientDB embedded server. - - -#### Exceptions - -This method throws a number of exceptions. The common exceptions to all methods are, - -- [`InstantiationException`]({{ book.javase }}/api/java/lang/InstantiationException.html) -- [`IllegalAccessException`]({{ book.javase }}/api/java/lang/IllegalAccessException.html) -- [`ClassNotFoundException`]({{ book.javase }}/api/java/lang/ClassNotFoundException.html) -- [`IllegalArgumentException`]({{ book.javase }}/api/java/lang/IllegalArgumentException.html) -- [`SecurityException`]({{ book.javase }}/api/java/lang/SecurityException.html) -- [`InvocationTargetException`]({{ book.javase }}/api/java/lang/reflect/InvocationTargetException.html) -- [`NoSuchMethodException`]({{ book.javase }}/api/java/lang/NoSuchMethodException.html) - -Additionally, when you pass the server configuration as a string or input stream, the following exception can be thrown. - -- [`IOException`]({{ book.javase }}/api/java/io/IOException.html) - -### Example - -Imagine your application has its own configuration file, which among other things contains a parameter in which the user can define the path to the OrientDB Server configuration they want to use. Rather than accepting this value without issue, you may want to catch `IOException` exceptions, starting the server with its default configuration in the event that the given argument fails. This ensures that the OrientDB Server always starts. - -```java -// IMPORTS -import com.orientechnologies.orient.server.OServer; -import java.util.logging.Logger; -import java.io.IOException; - -/* - * Handler Class for OrientDB Database - * @author: Some Dev - * @version: 10.4 - * @since: 1.0 - */ -class DatabaseHandler { - - // INIT LOGGER - private static final Logger logger = Logger.getLogger( - DatabaseHandler.class.getName()); - - /* - * Constructor - * @param server: OServer instance - * @param myConfig: Path to configuration file for OrientDB Server - */ - public void DatabaseHandler(OServer server, String myConfig) { - - // Log Operation - logger.info("Initializing DatabaseHandler class"); - - try { - // TRY GIVEN CONFIG - server.startup(myConfig); - } catch IOException { - logger.warning( - "Unable to start with given configuration, loading default"); - - // START WITH DEFAULT CONFIG - server.startup(); - - } - } -} -``` diff --git a/src/java/ref/OTransaction.md b/src/java/ref/OTransaction.md deleted file mode 100644 index dbb1df1d..00000000 --- a/src/java/ref/OTransaction.md +++ /dev/null @@ -1,34 +0,0 @@ - -# OTransaction - -This method provides an interface for working with transactions. - -## Using Transactions - -In order to operate on the transaction within your application, you need to import it into your application. - -```java -import com.orientechnologies.orient.core.tx.OTransaction; -``` - -### Methods - -| Method | Return Type | Description | -|---|---|---| -| [**`amountOfNestedTxs()`**](OTransaction/amountOfNestedTxs.md) | `int` | Returns the number of transactions attached to this instance | -| [**`begin()`**](OTransaction/begin.md) | `void` | Initiates the transaction | -| [**`close()`**](OTransaction/close.md) | `void` | Closes the transaction | -| [**`commit()`**](OTransaction/commit.md) | `void` | Commits the transaction | -| [**`getDatabase()`**](OTransaction/getDatabase.md) | [`ODatabaseDocument`](ODatabaseDocument.md) | Retrieves the database | -| [**`getEntryCount()`**](OTransaction/getEntryCount.md) | `int` | Retrieves the number of entries in the transaction | -| [**`getInvolvedIndexes()`**](OTransaction/getInvolvedIndexes.md) | `List` | Retrieves indexes used in the transaction | -| [**`getIsolationLevel()`**](OTransaction/getIsolationLevel.md) | `OTransaction.ISOLATION_LEVEL` | Retrieves the transaction Isolation Level | -| [**`getNewRecordEntriesByClass()`**](OTransaction/getNewRecordEntriesByClass.md) | [`List`](ORecordOperation.md) | Retrieves a list of record operations by [`OClass`](OClass.md) from the transaction | -| [**`getNewRecordEntriesByCluster()`**](OTransaction/getNewRecordEntriesByCluster.md) | [`List`](ORecordOperation.md) | Retrieves a list of record operation by [`OCluster`](OCluster.md) from the transaction | -| [**`getRecordEntry()`**](OTransaction/getRecordEntry.md) | [`ORecordOperation`](ORecordOperation.md) | Retrieves a record operation from the transaction | -| [**`getRecordOperations()`**](OTransaction/getRecordOperations.md) | [`Iterable`](ORecordOperation.md) | Retrieves record operations from the transaction | -| [**`getStatus()`**](OTransaction/getStatus.md) | `OTransaction.TXSTATUS` | Retrieves the transaction status | -| [**`hasRecordCreation()`**](OTransaction/hasRecordCreation.md) | `boolean` | Indicates whether any records were created in the transaction | -| [**`rollback()`**](OTransaction/rollback.md) | `void` | Reverts changes from the transaction | -| [**`setIsolationLevel()`**](OTransaction/setIsolationLevel.md) | `OTransaction` | Sets the transaction Isolation Level | - diff --git a/src/java/ref/OTransaction/amountOfNestedTxs.md b/src/java/ref/OTransaction/amountOfNestedTxs.md deleted file mode 100644 index 75f997aa..00000000 --- a/src/java/ref/OTransaction/amountOfNestedTxs.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OTransaction - amountOfNestedTxs() - -Returns the number of transactions nested in the current instance. - -## Nesting Transactions - -OrientDB does not support nested transactions. Instead, further calls to [`begin()`](begin.md) are applied to the current transaction, which keeps track of the call stack to let the final [`commit()`](commit.md) commit the transaction. Using this method, you can see how many transactions have been set on this [`OTransaction`](../OTransaction.md) instance. - -### Syntax - -``` -int OTransaction().amountOfNestedTxs() -``` - -#### Return Value - -This method returns an `int`, which represents the number of nested transactions. diff --git a/src/java/ref/OTransaction/begin.md b/src/java/ref/OTransaction/begin.md deleted file mode 100644 index 0b13262d..00000000 --- a/src/java/ref/OTransaction/begin.md +++ /dev/null @@ -1,16 +0,0 @@ - -# OTransaction - begin() - -Initiates the transaction. - -## Beginning Transactions - -OrientDB supports the use of transactions to isolate database operations and roll back or save changes once the task is complete. Using this method, you can begin a transaction. To roll it back later, see the [`rollback()`](rollback.md) method. To save it to the database, see [`commit()`](commit.md) method. - - -### Syntax - -``` -void OTransaction().begin() -``` - diff --git a/src/java/ref/OTransaction/close.md b/src/java/ref/OTransaction/close.md deleted file mode 100644 index b0467df9..00000000 --- a/src/java/ref/OTransaction/close.md +++ /dev/null @@ -1,14 +0,0 @@ - -# OTransaction - close() - -Closes the transaction. - -## Closing Transactions - -Using this method, you can close the transaction in your application, freeing up resources for other purposes. - -### Syntax - -``` -void OTransaction().close() -``` diff --git a/src/java/ref/OTransaction/commit.md b/src/java/ref/OTransaction/commit.md deleted file mode 100644 index 3e204530..00000000 --- a/src/java/ref/OTransaction/commit.md +++ /dev/null @@ -1,21 +0,0 @@ - -# OTransaction - commit() - -Commits the transaction to the database. - -## Beginning Transactions - -OrientDB supports the use of transactions to isolate database operations and roll back or save changes once the task is complete. Using this method, you can commit a transaction. To roll it back later, see the [`rollback()`](rollback.md) method. To initiate it, see [`begin()`](begin.md) method. - - -### Syntax - -``` -void OTransaction().commit() - -void OTransaction().commit)(boolean force) -``` - -| Argument | Type | Description | -|---|---|---| -| **`force`** | `boolean` | Defines whether to force the commit | diff --git a/src/java/ref/OTransaction/getDatabase.md b/src/java/ref/OTransaction/getDatabase.md deleted file mode 100644 index a53f6597..00000000 --- a/src/java/ref/OTransaction/getDatabase.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OTransaction - getDatabase() - -Retrieves the database on which the transaction is running. - -## Getting Databases - -Transactions run on particular databases, or more specifically within an [`ODatabaseDocument`](../ODatabaseDocument.md) instance. In the event that you need to operate on the database currently running the transaction, you can use this method to retrieve it. - -### Syntax - -``` -ODatabaseDocument OTransaction().getDatabase() -``` - -#### Return Value - -This method returns an [`ODatabaseDocument`](../ODatabaseDocument.md) instance, which represents the database on which the transaction is running. diff --git a/src/java/ref/OTransaction/getEntryCount.md b/src/java/ref/OTransaction/getEntryCount.md deleted file mode 100644 index 7bbad5e5..00000000 --- a/src/java/ref/OTransaction/getEntryCount.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OTransaction - getEntryCount() - -Retrieves the number of entries in the transaction. - -## Counting Entries - -Whenever you execute a statement in a running transaction, the transaction records the entry. Using this method, you can retrieve a count of the number of entries in the given transaction. - -### Syntax - -``` -int OTransaction().getEntryCount() -``` - -#### Return Value - -This method returns an `int` value, which represents the number of entries in the current transaction. - - - - diff --git a/src/java/ref/OTransaction/getInvolvedIndexes.md b/src/java/ref/OTransaction/getInvolvedIndexes.md deleted file mode 100644 index 37e433ca..00000000 --- a/src/java/ref/OTransaction/getInvolvedIndexes.md +++ /dev/null @@ -1,20 +0,0 @@ - -# OTransaction - getInvolvedIndexes() - -Retrieves a list of indexes involved in the transaction. - -## Getting Indexes - -When you add a query or command to a transaction, the transaction keeps a record of the indexes called. Using this method you can retrieve a list of all the indexes involved in the transaction. - -### Syntax - -``` -List OTransaction().getInvolvedIndexes() -``` - -#### Return Value - -This method returns a `List` of `String` values, each `String` representing an involved index. - - diff --git a/src/java/ref/OTransaction/getIsolationLevel.md b/src/java/ref/OTransaction/getIsolationLevel.md deleted file mode 100644 index cc4add79..00000000 --- a/src/java/ref/OTransaction/getIsolationLevel.md +++ /dev/null @@ -1,17 +0,0 @@ - -# OTransaction - getIsolationLevel() - -Retrieves the isolation level of the transaction. - -## Isolation Levels in OrientDB - -OrientDB supports the use of different levels of isolation based on settings and configuration. Using this method you can retrieve the current isolation level on the transaction. - -### Syntax - -``` -OTransaction.ISOLATION_LEVEL OTransaction().getIsolationLevel() -``` - - - diff --git a/src/java/ref/OTransaction/getNewRecordEntriesByClass.md b/src/java/ref/OTransaction/getNewRecordEntriesByClass.md deleted file mode 100644 index a6f80ef3..00000000 --- a/src/java/ref/OTransaction/getNewRecordEntriesByClass.md +++ /dev/null @@ -1,26 +0,0 @@ - -# OTransaction - getNewRecordEntriesByClass() - -Retrieves a list of records of the given class added to the database by this transaction. - -## Retrieving Records - -During transactions you may occasionally or often need to write to the database. Using this method you can retrieve a list of records modified by the current transaction that belong to the given class. - -### Syntax - -``` -List OTransaction().getNewRecordEntriesByClass( - OClass class, - boolean isPolymorphic) -``` - -| Argument | Type | Description | -|---|---|---| -| **`class`** | [`OClass`](../OClass.md) | Defines the class you want to check for new records | -| **`isPolymorphic`** | `boolean` | Defines whether to check subclasses as well as the given class | - -#### Return Value - -This method returns a `List` of [`ORecordOperation`](../ORecordOperation.md) instances. Each instance represents a record updated within the transaction. - diff --git a/src/java/ref/OTransaction/getNewRecordEntriesByCluster.md b/src/java/ref/OTransaction/getNewRecordEntriesByCluster.md deleted file mode 100644 index aaa75586..00000000 --- a/src/java/ref/OTransaction/getNewRecordEntriesByCluster.md +++ /dev/null @@ -1,24 +0,0 @@ - -# OTransaction - getNewRecordEntriesByCluster() - -Retrieves a list of records of the given class added to the database by this transaction. - -## Retrieving Records - -During transactions you may occasionally or often need to write to the database. Using this method you can retrieve a list of records modified by the current transaction that belong to the given cluster. - -### Syntax - -``` -List OTransaction().getNewRecordEntriesByClass( - int[] ids -``` - -| Argument | Type | Description | -|---|---|---| -| **`ids`** | `int[]` | Defines an array of Cluster ID's to check | - -#### Return Value - -This method returns a `List` of [`ORecordOperation`](../ORecordOperation.md) instances. Each instance represents a record updated within the transaction. - diff --git a/src/java/ref/OTransaction/getRecordEntry.md b/src/java/ref/OTransaction/getRecordEntry.md deleted file mode 100644 index 95985282..00000000 --- a/src/java/ref/OTransaction/getRecordEntry.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OTransaction - getRecordEntry() - -Returns a record from the transaction. - -## Retrieving Records - -Using this method you can retrieve records from this transaction to further operate on them. The record you want is identified by the given Record ID. - -### Syntax - -``` -ORecordOperation OTransaction().getRecordEntry(ORID rid) -``` - -| Argument | Type | Description | -|---|---|---| -| **rid** | [`ORID`](../ORID.md) | Defines the record you want. | - -#### Return Type - -This method returns an [`ORecordOperation`](../ORecordOperation.md) instance for the requested record. - - - diff --git a/src/java/ref/OTransaction/getRecordOperations.md b/src/java/ref/OTransaction/getRecordOperations.md deleted file mode 100644 index fdbb5a1e..00000000 --- a/src/java/ref/OTransaction/getRecordOperations.md +++ /dev/null @@ -1,25 +0,0 @@ - -# OTransaction - getRecordOperations() - -Retrieves all the records from the transaction. - -## Retrieving Record Operations - -The transaction keeps track of the operations you perform on database records. Using this method, you can retrieve all the record operations in the given transaction to further operate on them. - -### Syntax - -``` -Iterable OTransaction().getRecordOperations() -``` - -#### Return Value - -This method returns an `Iterable` instance that contains an [`ORecordOperation`](../ORecordOperation.md) for the records modified by the transaction. - - - - - - - diff --git a/src/java/ref/OTransaction/getStatus.md b/src/java/ref/OTransaction/getStatus.md deleted file mode 100644 index e9d0ecb1..00000000 --- a/src/java/ref/OTransaction/getStatus.md +++ /dev/null @@ -1,30 +0,0 @@ - -# OTransaction - getStatus() - -Retrieves the status of the transaction. - -## Transaction Status - -Transactions have status, indicating where they are in the process. That is, started, committing, rolling back, and so on. Using this method, you can retrieve the current status of the transaction. - -### Syntax - -``` -OTransaction.TXSTATUS OTransaction().getStatus() -``` - -#### Return Type - -This method returns an `OTransaction.TXSTATUS` object, which is one of the following: - -| Enum Constants | Description | -|---|---| -| `BEGUN` | The transaction has started | -| `COMMITTING` | The transaction is being committed to the database | -| `COMPLETED` | The transaction is committed | -| `INVALID` | The transaction has encountered an error | -| `ROLLBACKING` | The transaction is being rolled back | -| `ROLLED_BACK` | The transaction has been reverted | - - - diff --git a/src/java/ref/OTransaction/hasRecordCreation.md b/src/java/ref/OTransaction/hasRecordCreation.md deleted file mode 100644 index dd51995e..00000000 --- a/src/java/ref/OTransaction/hasRecordCreation.md +++ /dev/null @@ -1,18 +0,0 @@ - -# OTransaction - hasRecordCreation() - -Determines whether the transaction has created records. - -## Checking Records - -Using this method you can check whether any records have been created as part of the transaction. - -### Syntax - -``` -boolean OTransaction().hasRecordCreation() -``` - -#### Return Value - -This method returns a `boolean` value. A value of `true` indicates that the transaction includes record creation. `false` indicates that no records are created in the transaction. diff --git a/src/java/ref/OTransaction/rollback.md b/src/java/ref/OTransaction/rollback.md deleted file mode 100644 index c9bfce41..00000000 --- a/src/java/ref/OTransaction/rollback.md +++ /dev/null @@ -1,22 +0,0 @@ - -# OTransaction - rollback() - -Reverts the transaction to earlier state. - -## Beginning Transactions - -OrientDB supports the use of transactions to isolate database operations and roll back or save changes once the task is complete. Using this method, you can roll a transaction back. To initiate it, see the [`begin()`](begin.md) method. To save it to the database, see the [`commit()`](commit.md) method. - - -### Syntax - -``` -void OTransaction().rollback() - -void OTransaction().rollback(boolean force) -``` - -| Argument | Type | Description | -|---|---|---| -| **`force`** | `boolean` | Defines whether to force the rollback | - diff --git a/src/java/ref/OTransaction/setIsolationLevel.md b/src/java/ref/OTransaction/setIsolationLevel.md deleted file mode 100644 index 95cd8c0f..00000000 --- a/src/java/ref/OTransaction/setIsolationLevel.md +++ /dev/null @@ -1,29 +0,0 @@ - -# OTransaction - setIsolationLevel() - -Retrieves the isolation level of the transaction. - -## Isolation Levels in OrientDB - -OrientDB supports the use of different levels of isolation based on settings and configuration. Using this method you can set the isolation level for the transaction. - -### Syntax - -``` -OTransaction OTransaction().setIsolationLevel(OTransaction.ISOLATION_LEVEL level) -``` - -| Argument | Type | Description | -|---|---|---| -| **`level`** | `OTransaction.ISOLATION_LEVEL` | Defines the isolation level | - -The given Isolation Level belongs to one of the enumerated constants: `READ_COMMITTED` or `REPEATABLE_READ`. - - -#### Return Value - -This method returns the [`OTransaction`](../OTransaction.md) instance. - - - - diff --git a/src/java/ref/OType.md b/src/java/ref/OType.md deleted file mode 100644 index 0240a4fe..00000000 --- a/src/java/ref/OType.md +++ /dev/null @@ -1,24 +0,0 @@ - -# Java API - OType - -This class provides a standard interface for handling data-types within the database. - -## Managing Types - -Properties on a database class have types and can enforce type-based constraints on the data the class allows for its records. OrientDB uses the `OType` class to define the data-types for the property and to provide methods for common operations performed on data-types for the property. - -This class is available at `com.orientechnologies.orient.core.metadata.schema`: - -```java -import com.orientechnologies.orient.core.metadata.schema.OType; -``` - -For more information on types, see [Types](../../general/Types.md). - - - - - - - - diff --git a/src/java/ref/OVertex.md b/src/java/ref/OVertex.md deleted file mode 100644 index 01f78fd0..00000000 --- a/src/java/ref/OVertex.md +++ /dev/null @@ -1,57 +0,0 @@ - -# Java API - OVertex - -This class provides a standard interface for handling vertices. - -## Managing Vertices - -When using OrientDB as a Graph database, this class represents a vertex record. It extends the [`OElement`](OElement.md) class. Methods available to that class are also available to this class. - -This class is available at `com.orientechnologies.orient.core.record`. To import it, use the following line where necessary: - -```java -import com.orientechnologies.orient.core.record.OVertex; -``` - -Once you've imported the class to your application, you can use it to build instances in your code. - ->For more information on edges, see [`OEdge`](OEdge.md) - -### Example - -To create a new instance of this class, it is recommended that you use either the [`newInstance()`](ODatabaseDocument/newInstance.md) or [`newVertex()`](ODatabaseDocument/newVertex.md) methods on the [`ODatabaseDocument`](ODatabaseDocument.md) class interface. This allows you to operate on the given record and to easily save it back to the database when you're ready. - -[TBD] - -## Methods - -Once you've created or initialized an `OVertex` instance, you can begin to call methods on it to further define and read data from the vertex. This method extends the [`OElement`](OElement.md) class. Methods available to that class are also available to this one. - -| Method | Return Type | Description | -|---|---|---| -| [**`addEdge()`**](OVertex/addEdge.md) | [`OEdge`](OEdge.md) | Adds an edge to the vertex | -| [**`getEdges()`**](OVertex/getEdges.md) | [`Iterable`]({{ book.javase }}/api/java/lang/Iterable.html)[``](OEdge.md) | Retrieve connected edges | -| [**`getVertices()`**](OVertex/getVertices.md) | [`Iterable`]({{ book.javase }}/api/java/lang/Iterable.html)`` | Retrieve connected vertices | -| [**`save()`**](#saving-vertices) | ` RET` | Saves changes to the database | - -### Saving Vertices - -When you create or retrieve an `OVertex` instance, you create a snapshot of the record. Any changes you make to the record remain in your application. In order to make these changes persistent on the database, you need to call the `save()` method on the element. For instance, - -```java -// GLOBAL VARIABLES -private ODatabaseDocument db; - -// CREATE NEW RECORD -public void newRecord(String name, String email){ - - // Initialize Document - OVertex person = db.newVertex("Person"); - person.setProperty("name", name); - person.setProperty("email", email); - - // Add Person to Database - person.save(); -} -``` - diff --git a/src/java/ref/OVertex/addEdge.md b/src/java/ref/OVertex/addEdge.md deleted file mode 100644 index 5519ac06..00000000 --- a/src/java/ref/OVertex/addEdge.md +++ /dev/null @@ -1,33 +0,0 @@ - -# OVertex - addEdge() - -This method adds an edge linking this vertex to another. - -## Adding Edges - -In a Graph database, edges function as relationships linking different vertices together. Using this method, you can link one [`OVertex`](../OVertex.md) instance to another. You can create the edge as either a Lightweight Edge or a Regular Edge. - -### Syntax - -Records in OrientDB have their own classes on the database, which extend the [`OClass`](../OClass.md) class. All edges are extensions of the `E` database class. The first method creates the edge as an instance of the default `E` class. The remaining methods allow you to define the class to which the new edge belongs. - -``` -// METHOD 1 -OEdge OVertex().addEdge(OVertex toVertex) - -// METHOD 2 -OEdge OVertex().addEdge(OVertex toVertex, OClass type) - -// METHOD 3 -OEdge OVertex.addEdge(OVertex toVertex, String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`toVertex`** | [`OVertex`](../OVertex.md) | Defines the vertex the edge connects to | -| **`type`** | [`OClass`](../OClass.md) | Defines the OrientDB database class the edge belongs to | -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the OrientDB database class the edge belongs to | - -#### Return Value - -This method returns an [`OEdge`](../OEdge.md) instance, which represents the edge you've added to the vertex. diff --git a/src/java/ref/OVertex/getEdges.md b/src/java/ref/OVertex/getEdges.md deleted file mode 100644 index 3d0aa041..00000000 --- a/src/java/ref/OVertex/getEdges.md +++ /dev/null @@ -1,35 +0,0 @@ - -# OVertex - getEdges() - -This method retrieves all connected edges to or from this vertex. - -## Retrieving Edges - -In a Graph database, edges represent relationships between vertices. These relationships have a direction, leading from one vertex to another. Using this method, you can retrieve all edges that connect to this vertex or connect from this vertex. - -### Syntax - -Edges in OrientDB have direction and class. In the case of direction, the edge is created pointing from one vertex to another. This direction is implemented as the `ODirection` class. Additionally, edges like all records have classes internal to the database, which are implemented as [`OClass`](../OClass.md) instance. On the database they either belong to the `E` class, or a class that extends the `E` class. - -The first method uses the `E` class, and thus retrieves all edges that connect to or from the vertex. The remaining methods allow you to define which database class of edges you want to retrieve. - -``` -// METHOD 1 -Iterable OVertex().getEdges(ODirection dir) - -// METHOD 2 -Iterable OVertex().getEdges(ODirection dir, OClass... type) - -// METHOD 3 -Iterable OVertex().getEdges(ODirection dir), String... name -``` - -| Argument | Type | Description | -|---|---|---| -| **`dir`** | `ODirection` | Defines the direction | -| **`type`** | [`OClass`](../OClass.md) | Defines the database class | -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database class name | - -#### Return Value - -This method returns an [`Iterable`]({{ book.javase }}/api/java/lang/Iterable.html) instance that contains a series of [`OEdge`](../OEdge.md) instances representing the connected edges. diff --git a/src/java/ref/OVertex/getVertices.md b/src/java/ref/OVertex/getVertices.md deleted file mode 100644 index 36b13fb6..00000000 --- a/src/java/ref/OVertex/getVertices.md +++ /dev/null @@ -1,35 +0,0 @@ - -# OVertex - getVertices() - -This method retrieves all vertices connected by edges to this vertex. - -## Retrieving Vertices - -In a Graph database, a vertex connects to other vertices through edges. Using this method you can follow the given edges to retrieve the connected [`OVertex`](../OVertex.md) instances. - -### Syntax - -Edges in OrientDB have direction and all records are defined by a database class. In the case of direction, the edge is created pointing from one vertex to another. This direction is implemented as the `ODirection` class. Records have classes internal to the database, which are implemented as the [`OClass`](../OClass.md) class. Vertices on the database belong either to the `V` class or as a class that extends the `V` class. - -The first method uses the default `V` class. The other methods allow you to define what database class of vertices you want to retrieve. - -``` -// METHOD 1 -Iterable OVertex().getVertices(ODirection dir) - -// METHOD 2 -Iterable OVertex().getVertices(ODirection dir, OClass... type) - -// METHOD 3 -Iterable OVertex().getVertices(ODirection dir, String... name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`dir`** | `ODirection` | Defines the direction to search | -| **`type`** | [`OClass`](../OClass.md) | Defines the database class | -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the name of the database class | - -#### Return Value - -This method returns an [`Iterable`]({{ book.javase }}/api/java/lang/Iterable.html) instance that contains a series of [`OVertex`](../OVertex.md) instances representing the connected vertices. diff --git a/src/java/ref/OrientDB.md b/src/java/ref/OrientDB.md deleted file mode 100644 index 22358fc1..00000000 --- a/src/java/ref/OrientDB.md +++ /dev/null @@ -1,96 +0,0 @@ - -# Java API - OrientDB - -This class provides a management environment between your application and the OrientDB Server. - - -## Managing Servers - -In order to operate on an OrientDB database, you first need to establish a connection with the server. You have two options in this: you can embed the server within your application using the [`OServer`](OServer.md) class or you can connect to a running server using this class. It can be found at `com.orientechnologies.orient.core.db`. For instance, - -```java -import com.orientechnologies.orient.core.db.OrientDB; -``` - -Once you've imported the class to your application, you can use one of the constructors to build a particular instance in your code. - -### Constructors - -This class provides two constructors to create instances of `OrientDB` in your application. - -``` -// CONSTRUCTOR 1 -OrientDB(String url, OrientDBConfig config) - -// CONSTRUCTOR 2 -OrientDB(String url, String serverUser, - String serverPasswd, OrientDBConfig config) -``` - -- **`url`** Defines the database URL, as a string. It supports embedded and remote URL's. -- **`config`** Defines the database config, as an `OrientDBConfig` instance. -- **`serverUser`** Defines the user name. -- **`serverPasswd`** Defines the user password. - -### Example - -Using this class you can create a new OrientDB instance in your application, which you can then use to operate on multiple databases on the connected server. This class supports two types of connections: embedded and remote. With embedded connections, you're connecting to an instance running on your current machine. With remote connections, you're using the remote port to connect to a server either running on localhost or a remote IP address. - -For instance, creating a database on a remote host: - -```java -OrientDB orientdb = new OrientDB("remote:191.168.1.100", "root", "root_passwd"); -orientdb.create("musicdb", ODatabaseType.PLOCAL); -ODatabaseDocument session = orientdb.open("musicdb", "admin", "admin"); -... - -session.close(); -orientdb.close(); -``` - -Alternatively, you could connect to an embedded host: - -```java -OrientDB orientdb = new OrientDB("embedded:./databases/", null, null); -orientdb.create("musicdb", ODatabaseType.MEMORY); -ODatabaseDocument session = orientdb.open("musicdb", "admin", "admin"); -... - -session.close(); -orientdb.close(); -``` - - -## Methods - -Once you've instantiated the class in your application, you can call the following methods on it to perform further operations. - -| Method | Return Type | Description | -|---|---|---| -| [**`close()`**](#closing-databases) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Closes the current context with all related databases and pools. | -| [**`create()`**](OrientDB/create.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Creates a new database. | -| [**`createIfNotExists()`**](OrientDB/createIfNotExists.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Creates a new database if it doesn't exist. | -| [**`drop()`**](OrientDB/drop.md) | [`void`]({{ book.javase }}/api/java/lang/Void.html) | Removes a database from the server. | -| [**`exists()`**](OrientDB/exists.md) | [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) | Checks whether database exists. | -| [**`list()`**](OrientDB/list.md) | [`List<`]({{ book.javase }}/api/java/util/List.html) [`String>`]({{ book.javase }}/api/java/lang/String.html) | Returns a list of databases on the server | -| [**`open()`**](OrientDB/open.md) | [`ODatabaseDocument`](ODatabaseDocument.md) | Opens and returns a Document database. | - -#### Closing Databases - -When you've finished operating on a database or server, you can close the current context with all related databases and pools using the `close()` method. For instance, - -```java -// OPEN DOCUMENT DATABASE -OrientDB orientdb = new OrientDB("embedded:/tmp/", OrientDBConfig.defaultConfig()); - -try(ODatabaseDocumentTx db = orientdb.open("test", "admin", "admin");) { - - // Enter your code here - ... - -} finally { - - // CLOSE DATABASE - orientdb.close(); -} -``` diff --git a/src/java/ref/OrientDB/create.md b/src/java/ref/OrientDB/create.md deleted file mode 100644 index 90c8f0dd..00000000 --- a/src/java/ref/OrientDB/create.md +++ /dev/null @@ -1,46 +0,0 @@ - -# OrientDB - create() - -This method lets you create a new database on the connected OrientDB Server. - -## Creating Databases - -Using this method, you can create new databases on the OrientDB Server. In the event that you want to connect to an existing database, use the [`open()`](open.md) method. If you want to only create the database if it does not exist already, use the [`createIfNotExists()`](createIfNotExists.md) method. - -### Syntax - -There are two methods available in creating databases (`OrientDB` class): - -``` -// METHOD 1 -public void create(String name, ODatabaseType type) - -// METHOD 2 -public void create(String name, ODatabaseType type, OrientDBConfig config) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database name | -| **`type`** | `ODatabaseType` | Defines the database type, can be PLocal or in-memory | -| **`config`** | `OrientDBConfig` | Defines the database configuration | - -### Example - -Consider the use case of an installation process for your application. The user needs an embedded OrientDB database installed on their system whenever they start a new project in your application. You might use a method like the one below to initialize the database and perform any other routine tasks needed whenever they create a new project. - -```java -private OrientDB orientdb = new OrientDB("embedded:/data", null, null); - -// START NEW PROJECT -public void createNewProject(String name){ - - // Create Project Name - String db = "project-" + name; - - // Create Database - orientdb.create(db, ODatabaseType.PLOCAL); - -} -``` - diff --git a/src/java/ref/OrientDB/createIfNotExists.md b/src/java/ref/OrientDB/createIfNotExists.md deleted file mode 100644 index 48e49686..00000000 --- a/src/java/ref/OrientDB/createIfNotExists.md +++ /dev/null @@ -1,61 +0,0 @@ - -# OrientDB - createIfNotExists() - -This method creates a new database on the OrientDB Server. If the database already exists on the server, it does nothing. - -## Creating Databases - -On occasion you may have several processes operating on a given OrientDB Server and not know for certain whether the given database exists already on the server. This method allows you to ensure that a given database exists before you attempt further operations. - -### Syntax - -There are two methods available in performing this operation: - -``` -// METHOD 1 -public boolean OrientDB().createIfNotExists( - String name, ODatabaseType type) - -// METHOD 2 -public boolean OrientDB().createIfNotExists( - String name, ODatabaseType type, - OrientDBConfig config) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database name | -| **`type`** | `ODatabaseType` | Defines the database type, (PLocal or in-memory) | -| **`config`** | `OrientDBConfig` | defines the database configuration | - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that it has created a new database. If the return value is `false`, it indicates that a database of that name already exists on the server. - - -### Example - -In the event that you need to create a database before attempting further operations, you might want to use this method to avoid conflict in the event that the database already exists on your OrientDB Server. Then, in the event that the database does already exist, you can log the finding for debugging purposes later. - -```java -// INITIALIZE VARIABLES -private static final Logger logger = Logger.getLogger(App.class.getName()); -private OrientDB orientdb; - -// CREATE DATABASE METHOD -public void createDatabase(String name){ - - // Log Operation - logger.info("Creating Database: " + name); - - // Create Database - Boolean dbExists = orientdb.createIfNotExists(name, ODatabaseType.PLOCAL); - - if (dbExists) { - logger.debug("Database Created"); - } else { - logger.debug("Database Already Exists"); - } -} -``` - diff --git a/src/java/ref/OrientDB/drop.md b/src/java/ref/OrientDB/drop.md deleted file mode 100644 index 76b3e41d..00000000 --- a/src/java/ref/OrientDB/drop.md +++ /dev/null @@ -1,44 +0,0 @@ - -# OrientDB - drop() - -This method removes a database from the OrientDB Server. - -## Dropping Databases - -On occasion, you may need to remove databases from within your application. For instance, as part of a maintenance application, or to remove temporary in-memory databases when they're no longer needed. - -### Syntax - -``` -public void OrientDB().drop(String name) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database name | - - -### Example - -Imagine an application that makes use of in-memory databases to perform complex operations. Whenever you need one for a specific task, you create it, run the process, then remove the database once the job is complete. - -```java - -public void runInMemOperation(String name){ - - // Log Operation - logger.info("Creating In-Memory Database"); - - orientdb.create(name, ODatabaseType.MEMORY); - - try { - // Your Code Here - ... - - } finally { - // Remove Database When Done - orientdb.drop(name); - - } -} -``` diff --git a/src/java/ref/OrientDB/exists.md b/src/java/ref/OrientDB/exists.md deleted file mode 100644 index 2d1bb87c..00000000 --- a/src/java/ref/OrientDB/exists.md +++ /dev/null @@ -1,48 +0,0 @@ - -# OrientDB - exists() - -This method determines whether a database exists on the OrientDB Server. - -## Checking Databases - -In situations where your application is one of several connecting to a given OrientDB Server, you may find it useful to check whether a database exists before attempting to open or operate on it. This method checks if the OrientDB Server has a database of the given name available. - -### Syntax - -``` -public boolean OrientDB().exists(String name) -``` - -| Argument | Type | Description -|---|---|---| -| **`name`** | [`java.lang.String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database name | - - -#### Return Value - -This method returns a [`boolean`]({{ book.javase }}/api/java/lang/Boolean.html) value. If the return value is `true`, it indicates that a database of that name exists on the OrientDB Server. If the return value is `false`, it indicates that a database of that name does not exist on the server. - -### Example - -Consider the use case of an application that uses multiple in-memory databases for short-term operations. Whenever you call the method to create the database, you want a new database. If the OrientDB Server already contains a database of that name, you want to increment the name and start fresh. - -```java -private OrientDB orientdb; - -// Create New In-Memory Database -public ODatabaseDocumentTx createDatabase(String name){ - - // Check If Database Exists - if (orientdb.exists(name){ - name = name + "1"; - } - - // Create Database - orientdb.create(name, ODatabaseType.MEMORY); - - // Return Opened Database - return orientdb.open(name, "admin", "admin"); - -} -``` - diff --git a/src/java/ref/OrientDB/list.md b/src/java/ref/OrientDB/list.md deleted file mode 100644 index 3750c08d..00000000 --- a/src/java/ref/OrientDB/list.md +++ /dev/null @@ -1,68 +0,0 @@ - -# OrientDB - list() - -This method returns a list of databases on the OrientDB Server. - -## Listing Databases - -Occasionally, you may want to read or operating on every database in an OrientDB Server. This method returns a list of string values giving the name for each database on the server. You can then log the list for debugging or pass the name to other methods to perform further operations. - -### Syntax - -``` -public List OrientDB().list() -``` - -#### Return Value - -This method returns a [`List`]({{ book.javase }}/api/java/util/List.html) of [`String`]({{ book.javase }}/api/java/lang/String.html) values. Each element in the list provides the name of a database found on the OrientDB Server. - -### Example - -Default login credentials for an OrientDB database uses the user `admin` with the password `admin`. Given that this is not a good security practice for production instance, you might want a method that checks each database on the OrientDB Server for default credentials and reports the issue to logs. - -```java -private OrientDB orientdb; -private Logger logger; -... - -// Check for Default Credentials -public void checkDbCredentials(){ - - // Init Variables - List reportList; - List dbs = orientdb.list(); - - for (int i = 0; i < dbs.size(); i++){ - - // Get Database Name - String name = dbs.get(i); - - // Check Credentials - try { - - // Open Database - ODatabaseDocumentTx db = orientdb.open(name, "admin", "admin"); - - // Check If Open - if (db.isOpen()) { - reportList.add(name); - } - - } finally { - // Close Database - db.close(); - - } - - } - - // Report Default Logins to Log - if (reportList.size() > 0){ - - logger.warn("Databases Found with Default Credentials: " + - String.join(", ", reportList); - - } -} -``` diff --git a/src/java/ref/OrientDB/open.md b/src/java/ref/OrientDB/open.md deleted file mode 100644 index bda2b77d..00000000 --- a/src/java/ref/OrientDB/open.md +++ /dev/null @@ -1,72 +0,0 @@ - -# OrientDB - open() - -This method opens the given database on the OrientDB Server. - -## Opening Databases - -The [`OrientDB`](../OrientDB.md) class allows you to operate on an OrientDB Server, but eventually you're going to want to start working with an actual database. This method allows you to open a Document database on the server. - -### Syntax - -There are two methods available to use in opening databases: - -``` -// METHOD 1 -public ODatabaseDocument OrientDB().open(String name, String user, - String passwd) - -// METHOD 2 -public ODatabaseDocument OrientDB().open(String name, String user, - String passwd, OrientDBConfig config) -``` - -| Argument | Type | Description | -|---|---|---| -| **`name`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database name | -| **`user`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the database user | -| **`passwd`** | [`String`]({{ book.javase }}/api/java/lang/String.html) | Defines the user password | - -#### Return Value - -Both methods return an [`ODatabaseDocument`](../ODatabaseDocument.md) instance. - -### Example - -Imagine the use case of an application to operates on several databases that share common login credentials. You might create a management class to streamline database access within your code. - -```java -// INITIALIZE VARIABLES -private String rootUser; -private String rootPasswd; -private String baseUser; -private String basePasswd; -private OrientDB orientdb; -... - -// OPEN DATABASE -public ODatabaseDocument openDb(String name, Boolean asRoot){ - - // Log Operation - logger.info("Opening Database: " + name); - - // Initialize Variables - String user; - String passwd; - - if (asRoot){ - user = rootUser; - passwd = rootPasswd; - - } else { - user = baseUser; - passwd = basePasswd; - } - - // Open and Return Database - return orientdb.open(name, user, passwd); - -} -``` - - diff --git a/src/java/ref/README.md b/src/java/ref/README.md deleted file mode 100644 index 0a5d179e..00000000 --- a/src/java/ref/README.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Java API - Reference - -OrientDB is written in Java and as such you can utilize the Java API without the need for any additional drivers or adapters. Instead, with the addition of a dependency you can import OrientDB's code directly into your application to either query or manipulate data from a running instance of OrientDB or to embed the OrientDB Server itself within your application. - -This chapter provides reference documentation for the OrientDB Java API. The list of classes and methods documented here is not exhaustive, but rather pragmatic: focusing on those developers are more likely to use in building applications around OrientDB. - -## Classes - -| Class | Description | -|---|---| -| [**`OClass`**](OClass.md) | Manages database classes | -| [**`OCluster`**](OCluster.md) | Manages physical and memory clusters | -| [**`ODatabaseDocument`**](ODatabaseDocument.md) | Manages databases. This is the unified multi-model API. It works with all supported database models (i.e., graph, document, object and so on). | -| [**`ODatabaseSession`**](ODatabaseSession.md) | Subclass of [`ODatabaseDocument`](ODatabaseDocument.md), used to manage database sessions. | -| [**`OEdge`**](OEdge.md) | Handles edge records. It is a subclass of [`OElement`](OElement.md) | -| [**`OElement`**](OElement.md) | Handles document records, superclass to [`OVertex`](OVertex.md) and [`OEdge`](OEdge.md) records | -| [**`OFunctionLibrary`**](OFunctionLibrary.md) | Manages the functions available in OrientDB SQL on the database | -| [**`OIntent`**](OIntent.md) | Manages intents (server optimizations) for particular tasks | -| [**`OLiveQueryResultListener`**](OLiveQueryResultListener.md) | Super class used to manage [Live Queries](../Live-Query.md) | -| [**`OMetadata`**](OMetadata.md) | Interface used to store database metadata, such as the function library, schema and security | -| [**`OProperty`**](OProperty.md) | Manages properties on an [`OClass`](OClass.md) instance | -| [**`OResult`**](OResult.md) | Interface for operating on records in a result-set | -| [**`OResultSet`**](OResultSet.md) | Result-set returned by queries | -| [**`ORID`**](ORID.md) | Record ID for [`OElement`](OElement.md), [`OEdge`](OEdge.md) and [`OVertex`](OVertex.md) instances | -| [**`OrientDB`**](OrientDB.md) | Connects to and interacts with the OrientDB Server | -| [**`ORule`**](ORule.md) | Defines rule for resources that a user or role can access | -| [**`OSchema`**](OSchema.md) | Defines a schema for the database to enforce | -| [**`OSecurityRole`**](OSecurityRole.md) | Controls a role and the access it has to database resources | -| [**`OSecurityUser`**](OSecurityUser.md) | Controls a user and the access it has to database resources | -| [**`OServer`**](OServer.md) | Embeds the OrientDB Server | -| [**`OTransaction`**](OTransaction.md) | Controls a transaction on the database | -| [**`OType`**](OType.md) | Defines the data-types of properties | -| [**`OVertex`**](OVertex.md) | Handles vertex records. It is a subclass of [`OElement`](OElement.md) | - -In the event that you don't find a page for the class or method you're looking for, see the [Javadocs]({{ book.javadoc }}). - - - diff --git a/src/legacy/2011.md b/src/legacy/2011.md index 51fd6291..1b50aeec 100644 --- a/src/legacy/2011.md +++ b/src/legacy/2011.md @@ -10,25 +10,25 @@ The next year, 2012, seems to be THE year for Graph Databases. I bet on OrientDB Thanks a lot to the entire world-wide team and happy new year! -![image](http://www.orientdb.org/images/team/Luca_HappyNewYear_2011.JPG) +![image](http://www.orientdb.dev/images/team/Luca_HappyNewYear_2011.JPG) ## Luca Molino Thanks a lot to all contributors, we really made a huge and wonderful work. Happy New Year, and i'm sure the 2012 will give us more and more! well... at least until 21-12 hihihi -![image](http://www.orientdb.org/images/team/LucaMolino.jpg) +![image](http://www.orientdb.dev/images/team/LucaMolino.jpg) ## Exigen team -![image](http://www.orientdb.org/images/team/ExigenTeam.jpg) +![image](http://www.orientdb.dev/images/team/ExigenTeam.jpg) In the picture from the left: Maxim Fedorov, Andrey Lomakin, Artem Orobets and Artem Loginov ## Sylvain Spinelli ## NuvolaBase team -![image](http://www.orientechnologies.com/images/team/NuvolaBaseTeam.jpg) +![image](http://www.orientdb.dev/images/team/NuvolaBaseTeam.jpg) In the picture from the left: Luca Garulli, Dino Ciuffetti and Alfonso Focareta @@ -43,10 +43,10 @@ Thanks to community and contributors for this awesome project. The 1.0-RELEASE w Green eyes and green tests for OrientDB's groundbreaking new year! -![image](http://www.orientdb.org/images/team/AlessandroNadalin.jpg) +![image](http://www.orientdb.dev/images/team/AlessandroNadalin.jpg) ## Bayoda team -![image](http://www.orientdb.org/images/team/bayoda_happynewyear.jpg) +![image](http://www.orientdb.dev/images/team/bayoda_happynewyear.jpg) ## Nicole diff --git a/src/legacy/Console-Command-Share-Database.md b/src/legacy/Console-Command-Share-Database.md index cc528209..ef6bf9ee 100644 --- a/src/legacy/Console-Command-Share-Database.md +++ b/src/legacy/Console-Command-Share-Database.md @@ -4,7 +4,7 @@ Share a database with another server in the cluster. This command works only inside a cluster of servers up and running. With this operation a database will be shared in another server node. -![image](http://www.orientechnologies.com/images/share-database.png) +![image](http://www.orientdb.dev/images/share-database.png) To execute this command you need to be connected to the remote server instance where the database resides, in the picture the **Server #1**. The server user must to have the permission to the resource "database.share". The *root* user has this privilege. diff --git a/src/legacy/DocumentDB-Comparison.md b/src/legacy/DocumentDB-Comparison.md index a2b192f0..63fba3d4 100644 --- a/src/legacy/DocumentDB-Comparison.md +++ b/src/legacy/DocumentDB-Comparison.md @@ -9,7 +9,7 @@ This is a comparison page between OrientDB and other DocumentDB projects . To kn |Feature|OrientDB|MongoDB|CouchDB| |-------|--------|-------|-------| -|Web Site|http://www.orientdb.org|http://www.mongodb.org|http://www.couchdb.org| +|Web Site|http://www.orientdb.dev|http://www.mongodb.org|http://www.couchdb.org| |Supported models|[Document](http://en.wikipedia.org/wiki/Document-oriented_database) and [Graph](http://en.wikipedia.org/wiki/Graph_database)|[Document](http://en.wikipedia.org/wiki/Document-oriented_database)|[Document](http://en.wikipedia.org/wiki/Document-oriented_database)| |Transactions|Yes, [ACID](http://en.wikipedia.org/wiki/ACID)|No|Yes, [ACID](http://en.wikipedia.org/wiki/ACID)| |Query languages|[Extended SQL](../sql/SQL.md), [Gremlin](https://github.com/tinkerpop/gremlin/wiki)|[Mongo Query Language](http://www.mongodb.org/display/DOCS/Querying)|[Non supported, JS API](http://sitr.us/2009/06/30/database-queries-the-couchdb-way.html)| diff --git a/src/legacy/Download.md b/src/legacy/Download.md index 6ac3fbe0..f192c8db 100644 --- a/src/legacy/Download.md +++ b/src/legacy/Download.md @@ -1,4 +1,4 @@ -The OrientDB development team is very active so if you've started learning OrientDB right now we suggest to clone the source repository and use the "develop" branch (latest SNAPSHOT). Follow these [instructions](https://github.com/orientechnologies/orientdb/wiki/Download#compile-it-by-your-own). Is a snapshot stable enough? All the SNAPSHOTs pass the thousands of test cases, so the answer is YES. However don't worry, we usually create a new stable release from the SNAPSHOT about every 3 months. If however you're afraid of using a SNAPSHOT yet, it's ok: use a [stable one](http://www.orientdb.com/download/) and follow the **[Installation instructions](Installation.md)**. +The OrientDB development team is very active so if you've started learning OrientDB right now we suggest to clone the source repository and use the "develop" branch (latest SNAPSHOT). Follow these [instructions](https://github.com/orientechnologies/orientdb/wiki/Download#compile-it-by-your-own). Is a snapshot stable enough? All the SNAPSHOTs pass the thousands of test cases, so the answer is YES. However don't worry, we usually create a new stable release from the SNAPSHOT about every 3 months. If however you're afraid of using a SNAPSHOT yet, it's ok: use a [stable one](http://www.orientdb.dev/download/) and follow the **[Installation instructions](Installation.md)**. |Release |Status|Suggested for|Maven Repository|GIT branch| @@ -7,14 +7,14 @@ The OrientDB development team is very active so if you've started learning Orien | 1.7.6 | [Production](https://github.com/orientechnologies/orientdb/issues?milestone=23&state=closed) | Production | [pom.xml](https://github.com/orientechnologies/orientdb/wiki/Download#last-stable) | [master](https://github.com/orientechnologies/orientdb) -For older release or more information go to the official [download page](http://orientdb.com/download/). +For older release or more information go to the official [download page](http://orientdb.dev/download/). ------------ ## What distribution should I use ? ## OrientDB comes with 2 distributions: - OrientDB Community Edition, the default Open Source version released with Apache 2 license -- [OrientDB Enterprise Edition](http://www.orientechnologies.com/orientdb-enterprise), based on the Community Edition, adds Enterprise Level features. It's available with [support](http://www.orientechnologies.com/support) by Orient Technologies company and has a commercial version. +- [OrientDB Enterprise Edition](http://www.orientdb.dev/orientdb-enterprise), based on the Community Edition, adds Enterprise Level features. It's available with [support](http://www.orientdb.dev/support) by Orient Technologies company and has a commercial version. # Version numbers # @@ -26,7 +26,7 @@ This system is called "Semantic Versioning." Under this scheme, version numbers # Distributions # -Download **latest official release** at [this page](http://orientdb.com/download/). +Download **latest official release** at [this page](http://orientdb.dev/download/). ## Download binaries from Maven repository ## @@ -161,14 +161,14 @@ Every time you compile a new version, assure to have the permissions to execute # Badges -Below the badges you can use in your web site, application and presentation to say to the world "Hey, I'm using OrientDB!". The best would be linking that button to the web site: +Below the badges you can use in your web site, application and presentation to say to the world "Hey, I'm using OrientDB!". The best would be linking that button to the web site: Once used you can tell us your story to be published between the [Production deployments page](Production-Deployments.md). - - - - + + + +
DescriptionImage normal sizeImage small size
Classic button![image](http://www.orientdb.com/images/powered_by_orientdb_white.png)![image](http://www.orientdb.com/images/powered_by_orientdb_white_small.png)
Reflex button![image](http://www.orientdb.com/images/powered_by_orientdb_reflex.png)![image](http://www.orientdb.com/images/powered_by_orientdb_reflex_small.png)
Blue button![image](http://www.orientdb.com/images/powered_by_orientdb_blue.png)![image](http://www.orientdb.com/images/powered_by_orientdb_blue_small.png)
Green button![image](http://www.orientdb.com/images/powered_by_orientdb_green.png)![image](http://www.orientdb.com/images/powered_by_orientdb_green_small.png)
Classic button![image](http://www.orientdb.dev/images/powered_by_orientdb_white.png)![image](http://www.orientdb.com/images/powered_by_orientdb_white_small.png)
Reflex button![image](http://www.orientdb.dev/images/powered_by_orientdb_reflex.png)![image](http://www.orientdb.com/images/powered_by_orientdb_reflex_small.png)
Blue button![image](http://www.orientdb.dev/images/powered_by_orientdb_blue.png)![image](http://www.orientdb.com/images/powered_by_orientdb_blue_small.png)
Green button![image](http://www.orientdb.dev/images/powered_by_orientdb_green.png)![image](http://www.orientdb.com/images/powered_by_orientdb_green_small.png)
diff --git a/src/legacy/GraphDB-Comparison.md b/src/legacy/GraphDB-Comparison.md index 68eec2b6..51951c98 100644 --- a/src/legacy/GraphDB-Comparison.md +++ b/src/legacy/GraphDB-Comparison.md @@ -10,14 +10,14 @@ We want to keep it always updated with the new products and more features in the | Feature | OrientDB | Neo4j | DEX | InfiniteGraph | |---------|----------|---------|---------|---------------| | Release | 1.0-SNAPSHOT | 1.7M03 | 4.5.1 | 2.1 | -| Product Web Site | http://www.orientdb.org | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | +| Product Web Site | http://www.orientdb.dev | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | | License | [Open Source Apache 2](http://www.apache.org/licenses/LICENSE-2.0.html) | [Open Source GPL](http://www.gnu.org/licenses/gpl-3.0.html), [Open Source AGPL](http://www.gnu.org/licenses/agpl-3.0.html) and Commercial | Commercial | [Commercial](http://objectivity.com/support) | | Query languages | [Extended SQL](../sql/SQL.md), [Gremlin](https://github.com/tinkerpop/gremlin/wiki) | [Cypher](http://docs.neo4j.org/chunked/1.4/cypher-query-lang.html) [Gremlin](https://github.com/tinkerpop/gremlin/wiki) | Not available, only via API | [Gremlin](https://github.com/tinkerpop/gremlin/wiki), Java API | -| Transaction support | ![](http://www.orientdb.org/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | ![](http://www.orientdb.org/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | +| Transaction support | ![](http://www.orientdb.dev/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | ![](http://www.orientdb.org/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/ok.png) [ACID](http://en.wikipedia.org/wiki/ACID) | | Protocols | Embedded via Java API, remote as [Binary](../internals/Network-Binary-Protocol.md) and [REST](../misc/OrientDB-REST.md) | Embedded via Java API and remote via REST | ? | Embedded via Java API, Remote database access via TCP | -| Replication | Multi-Master | Master-Slave | No | ![](http://www.orientdb.org/images/no.png) | -| Custom types | ![](http://www.orientdb.org/images/ok.png) [Supports custom types and polymorphism](../java/Graph-Schema.md) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/ok.png) Supports custom types and polymorphism | -| Self loops | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | +| Replication | Multi-Master | Master-Slave | No | ![](http://www.orientdb.dev/images/no.png) | +| Custom types | ![](http://www.orientdb.dev/images/ok.png) [Supports custom types and polymorphism](../java/Graph-Schema.md) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/ok.png) Supports custom types and polymorphism | +| Self loops | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | # Blueprints support @@ -27,28 +27,28 @@ The products below all support the [TinkerPop Blueprints API](https://github.com | Feature | OrientDB | Neo4j | DEX | InfiniteGraph | |---------|----------|---------|---------|---------------| | Release | 1.0-SNAPSHOT | 1.7M03 | 4.5.1 | 2.1 | -| Product Web Site | http://www.orientdb.org | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | +| Product Web Site | http://www.orientdb.dev | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | | Implementation details | [OrientDB impl](https://github.com/tinkerpop/blueprints/wiki/OrientDB-Implementation) | [Neo4j impl](https://github.com/tinkerpop/blueprints/wiki/Neo4j-Implementation) | [DEX impl](https://github.com/tinkerpop/blueprints/wiki/Dex-Implementation) | [InfiniteGraph impl](https://github.com/tinkerpop/blueprints/wiki/InfiniteGraph-Implementation) [Known limitations](http://wiki.infinitegraph.com/2.1/w/index.php?title=Understanding_InfiniteGraph_Blueprints_Capabilities_and_Limitations) | -| allowsDuplicateEdges | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| allowsSelfLoops | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| isPersistent | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| supportsVertexIteration | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| supportsEdgeIteration | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| supportsVertexIndex | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| supportsEdgeIndex | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| ignoresSuppliedIds | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| supportsTransactions | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowSerializableObjectProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowBooleanProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| allowDoubleProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| allowFloatProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| allowIntegerProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | -| allowPrimitiveArrayProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowUniformListProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowMixedListProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowLongProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowMapProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | -| allowStringProperty | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowsDuplicateEdges | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowsSelfLoops | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| isPersistent | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| supportsVertexIteration | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| supportsEdgeIteration | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| supportsVertexIndex | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| supportsEdgeIndex | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| ignoresSuppliedIds | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| supportsTransactions | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowSerializableObjectProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowBooleanProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowDoubleProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowFloatProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowIntegerProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | +| allowPrimitiveArrayProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowUniformListProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowMixedListProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowLongProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowMapProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/no.png) | ![](http://www.orientdb.org/images/no.png) | ? | +| allowStringProperty | ![](http://www.orientdb.dev/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ![](http://www.orientdb.org/images/ok.png) | ? | # Micro benchmark @@ -61,7 +61,7 @@ Lower means faster. In **bold** the fastest implementation for each module. | Module|OrientDB | Neo4j | DEX | InfiniteGraph | |---------|----------|---------|---------|---------------| | Release | 1.4 | 1.9.M05 | 4.8.0 | 2.1 | -| Product Web Site | http://www.orientdb.org | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | +| Product Web Site | http://www.orientdb.dev | http://www.neo4j.org | http://www.sparsity-technologies.com | http://objectivity.com/INFINITEGRAPH | | VertexTestSuite | **1,524.06** | 1,595.27 | 4,488.28 | ? | | EdgeTestSuite | **1,252.21** | 1,253.73 | 3,865.85 | ? | | GraphTestSuite | **1,664.75** | 2,400.34 | 4,680.80 | ? | diff --git a/src/legacy/Home-Old.md b/src/legacy/Home-Old.md index c3106e7f..2cbfb625 100644 --- a/src/legacy/Home-Old.md +++ b/src/legacy/Home-Old.md @@ -1,4 +1,4 @@ -![image](http://www.orientdb.org/images/orientdb_logo_mid.png) +![image](http://www.orientdb.dev/images/orientdb_logo_mid.png) Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents into one scalable high-performance operational database. @@ -8,48 +8,48 @@ This wiki is the main source of documentation for developers working with (or co |Getting Started |Main Topics |Developers | |-----------------------|---------------|-------------| -|[Introduction to OrientDB](http://www.orientechnologies.com/docs/last/index.html) | [Basic Concepts](http://www.orientechnologies.com/docs/last/orientdb.wiki/Concepts.html) | [SQL](http://www.orientechnologies.com/docs/last/orientdb.wiki/SQL.html)| | -|[Installation](http://www.orientechnologies.com/docs/last/orientdb.wiki/Tutorial-Installation.html) | [Supported Data Types](http://www.orientechnologies.com/docs/last/orientdb.wiki/Types.html) | [Gremlin](http://www.orientechnologies.com/docs/last/orientdb.wiki/Gremlin.html) | -|[First Steps](http://www.orientechnologies.com/docs/last/orientdb.wiki/Tutorial-Introduction-to-the-NoSQL-world.html) | [Inheritance](http://www.orientechnologies.com/docs/last/orientdb.wiki/Inheritance.html) | [HTTP API](http://www.orientechnologies.com/docs/last/orientdb.wiki/OrientDB-REST.html) | -|[Troubleshooting](http://www.orientechnologies.com/docs/last/orientdb.wiki/Troubleshooting.html) |[Security](http://www.orientechnologies.com/docs/last/orientdb.wiki/Security.html)| [Java API](http://www.orientechnologies.com/docs/last/orientdb.wiki/Java-API.html)| -|[Enterprise Edition](http://www.orientechnologies.com/docs/last/orientdb.wiki/Enterprise-Edition.html)| [Indexes](http://www.orientechnologies.com/docs/last/orientdb.wiki/Indexes.html) | [NodeJS](https://github.com/codemix/oriento)| -| | [ACID Transactions](http://www.orientechnologies.com/docs/last/orientdb.wiki/Transactions.html) | [PHP](https://github.com/orientechnologies/PhpOrient) | -| | [Functions](http://www.orientechnologies.com/docs/last/orientdb.wiki/Functions.html) | [Python](https://github.com/orientechnologies/pyorient)| -| | [Caching Levels](http://www.orientechnologies.com/docs/last/orientdb.wiki/Caching.html) | [.NET](https://github.com/orientechnologies/OrientDB-NET.binary) | -| | [Common Use Cases](http://www.orientechnologies.com/docs/last/orientdb.wiki/Use-Cases.html) | [Other Drivers](http://www.orientechnologies.com/docs/last/orientdb.wiki/Programming-Language-Bindings.html) | -| | | [Network Binary Protocol](http://www.orientechnologies.com/docs/last/orientdb.wiki/Network-Binary-Protocol.html) | -| | | [Javadocs](http://www.orientechnologies.com/javadoc/latest/) | +|[Introduction to OrientDB](http://www.orientdb.dev/docs/last/index.html) | [Basic Concepts](http://www.orientdb.dev/docs/last/orientdb.wiki/Concepts.html) | [SQL](http://www.orientdb.dev/docs/last/orientdb.wiki/SQL.html)| | +|[Installation](http://www.orientdb.dev/docs/last/orientdb.wiki/Tutorial-Installation.html) | [Supported Data Types](http://www.orientdb.dev/docs/last/orientdb.wiki/Types.html) | [Gremlin](http://www.orientdb.dev/docs/last/orientdb.wiki/Gremlin.html) | +|[First Steps](http://www.orientdb.dev/docs/last/orientdb.wiki/Tutorial-Introduction-to-the-NoSQL-world.html) | [Inheritance](http://www.orientdb.dev/docs/last/orientdb.wiki/Inheritance.html) | [HTTP API](http://www.orientdb.dev/docs/last/orientdb.wiki/OrientDB-REST.html) | +|[Troubleshooting](http://www.orientdb.dev/docs/last/orientdb.wiki/Troubleshooting.html) |[Security](http://www.orientdb.dev/docs/last/orientdb.wiki/Security.html)| [Java API](http://www.orientdb.dev/docs/last/orientdb.wiki/Java-API.html)| +|[Enterprise Edition](http://www.orientdb.dev/docs/last/orientdb.wiki/Enterprise-Edition.html)| [Indexes](http://www.orientdb.dev/docs/last/orientdb.wiki/Indexes.html) | [NodeJS](https://github.com/codemix/oriento)| +| | [ACID Transactions](http://www.orientdb.dev/docs/last/orientdb.wiki/Transactions.html) | [PHP](https://github.com/orientechnologies/PhpOrient) | +| | [Functions](http://www.orientdb.dev/docs/last/orientdb.wiki/Functions.html) | [Python](https://github.com/orientechnologies/pyorient)| +| | [Caching Levels](http://www.orientdb.dev/docs/last/orientdb.wiki/Caching.html) | [.NET](https://github.com/orientechnologies/OrientDB-NET.binary) | +| | [Common Use Cases](http://www.orientdb.dev/docs/last/orientdb.wiki/Use-Cases.html) | [Other Drivers](http://www.orientdb.dev/docs/last/orientdb.wiki/Programming-Language-Bindings.html) | +| | | [Network Binary Protocol](http://www.orientdb.dev/docs/last/orientdb.wiki/Network-Binary-Protocol.html) | +| | | [Javadocs](http://www.orientdb.dev/javadoc/latest/) | ### Operations -- [Installation](http://www.orientechnologies.com/docs/last/orientdb.wiki/Tutorial-Installation.html) -- [3rdy party Plugins](http://www.orientechnologies.com/docs/last/orientdb.wiki/Plugins.html) -- [Upgrade](http://www.orientechnologies.com/docs/last/orientdb.wiki/Upgrade.html) -- [Configuration](http://www.orientechnologies.com/docs/last/orientdb.wiki/Configuration.html) -- [Distributed Architecture](http://www.orientechnologies.com/docs/last/orientdb.wiki/Distributed-Architecture.html)(replication, sharding and high-availability) -- [Performance Tuning](http://www.orientechnologies.com/docs/last/orientdb.wiki/Performance-tuning.html) -- [ETL to Import any kind of data into OrientDB](http://www.orientechnologies.com/docs/last/orientdb-etl.wiki/Home.html) -- [Import from Relational DB](http://www.orientechnologies.com/docs/last/orientdb.wiki/Import-From-RDBMS.html) -- [Backup and Restore](http://www.orientechnologies.com/docs/last/orientdb.wiki/Backup-and-Restore.html) -- [Export and Import](http://www.orientechnologies.com/docs/last/orientdb.wiki/Export-and-Import.html) +- [Installation](http://www.orientdb.dev/docs/last/orientdb.wiki/Tutorial-Installation.html) +- [3rdy party Plugins](http://www.orientdb.dev/docs/last/orientdb.wiki/Plugins.html) +- [Upgrade](http://www.orientdb.dev/docs/last/orientdb.wiki/Upgrade.html) +- [Configuration](http://www.orientdb.dev/docs/last/orientdb.wiki/Configuration.html) +- [Distributed Architecture](http://www.orientdb.dev/docs/last/orientdb.wiki/Distributed-Architecture.html)(replication, sharding and high-availability) +- [Performance Tuning](http://www.orientdb.dev/docs/last/orientdb.wiki/Performance-tuning.html) +- [ETL to Import any kind of data into OrientDB](http://www.orientdb.dev/docs/last/orientdb-etl.wiki/Home.html) +- [Import from Relational DB](http://www.orientdb.dev/docs/last/orientdb.wiki/Import-From-RDBMS.html) +- [Backup and Restore](http://www.orientdb.dev/docs/last/orientdb.wiki/Backup-and-Restore.html) +- [Export and Import](http://www.orientdb.dev/docs/last/orientdb.wiki/Export-and-Import.html) ### Quick References -- [Console](http://www.orientechnologies.com/docs/last/orientdb.wiki/Console-Commands.html) -- [Studio](http://www.orientechnologies.com/docs/last/orientdb-studio.wiki/Home-page.html) web tool -- [Workbench](http://www.orientechnologies.com/enterprise/1.6.2/userguide.html) (Enterprise Edition) -- [OrientDB Server](http://www.orientechnologies.com/docs/last/orientdb.wiki/DB-Server.html) -- [Network-Binary-Protocol](http://www.orientechnologies.com/docs/last/orientdb.wiki/Network-Binary-Protocol.html) -- [Gephi Graph Analysis Visual tool](http://www.orientechnologies.com/docs/last/orientdb.wiki/Gephi.html) -- [Rexster Support and configuration](http://www.orientechnologies.com/docs/last/orientdb.wiki/Rexster.html) -- [Continuous integration](http://helios.orientechnologies.com/) +- [Console](http://www.orientdb.dev/docs/last/orientdb.wiki/Console-Commands.html) +- [Studio](http://www.orientdb.dev/docs/last/orientdb-studio.wiki/Home-page.html) web tool +- [Workbench](http://www.orientdb.dev/enterprise/1.6.2/userguide.html) (Enterprise Edition) +- [OrientDB Server](http://www.orientdb.dev/docs/last/orientdb.wiki/DB-Server.html) +- [Network-Binary-Protocol](http://www.orientdb.dev/docs/last/orientdb.wiki/Network-Binary-Protocol.html) +- [Gephi Graph Analysis Visual tool](http://www.orientdb.dev/docs/last/orientdb.wiki/Gephi.html) +- [Rexster Support and configuration](http://www.orientdb.dev/docs/last/orientdb.wiki/Rexster.html) +- [Continuous integration](http://helios.orientdb.dev/) ### Resources -- [User Group](http://www.orientechnologies.com/active-user-community) - Have question, troubles, problems? -- [Professional Support](http://orientechnologies.com/support) -- [Training](http://orientechnologies.com/training) - Training and classes. -- [Events](http://www.orientechnologies.com/events) - Follow OrientDB at the next event! -- [Team](http://www.orientechnologies.com/docs/last/orientdb.wiki/Team.html) - Meet the team behind OrientDB -- [Contribute](http://www.orientechnologies.com/docs/last/orientdb.wiki/Contribute-to-OrientDB.html) - Contribute to the project. -- [Who is using OrientDB?](http://www.orientechnologies.com/customers) - Clients using OrientDB in production. +- [User Group](http://www.orientdb.dev/active-user-community) - Have question, troubles, problems? +- [Professional Support](http://orientdb.dev/support) +- [Training](http://orientdb.dev/training) - Training and classes. +- [Events](http://www.orientdb.dev/events) - Follow OrientDB at the next event! +- [Team](http://www.orientdb.dev/docs/last/orientdb.wiki/Team.html) - Meet the team behind OrientDB +- [Contribute](http://www.orientdb.dev/docs/last/orientdb.wiki/Contribute-to-OrientDB.html) - Contribute to the project. +- [Who is using OrientDB?](http://www.orientdb.dev/customers) - Clients using OrientDB in production. ## Questions or Need Help? -Check out our [Get in Touch](http://www.orientechnologies.com/docs/last/orientdb.wiki/Get-in-Touch.html) page for different ways of getting in touch with us. \ No newline at end of file +Check out our [Get in Touch](http://www.orientdb.dev/docs/last/orientdb.wiki/Get-in-Touch.html) page for different ways of getting in touch with us. \ No newline at end of file diff --git a/src/legacy/Home.md b/src/legacy/Home.md index 8e43825f..81af101b 100644 --- a/src/legacy/Home.md +++ b/src/legacy/Home.md @@ -1,6 +1,6 @@ #OrientDB Manual - version 2.0 -![image](http://www.orientdb.com/images/orientdb_logo_mid.png) +![image](http://www.orientdb.dev/images/orientdb_logo_mid.png) ## Quick Navigation @@ -16,7 +16,7 @@ | | [Caching Levels](../internals/Caching.md) | [.NET](https://github.com/orientechnologies/OrientDB-NET.binary) | | | [Common Use Cases](Use-Cases.md) | [Other Drivers](../apis-and-drivers/README.md) | | | | [Network Binary Protocol](../internals/Network-Binary-Protocol.md) | -| | | [Javadocs](http://www.orientechnologies.com/javadoc/latest/) | +| | | [Javadocs](http://www.orientdb.dev/javadoc/latest/) | ### Operations - [Installation](Tutorial-Installation.md) @@ -33,21 +33,21 @@ ### Quick References - [Console](../console/README.md) - [Studio](../studio/Home-page.md) web tool -- [Workbench](http://www.orientechnologies.com/enterprise/1.7.4/userguide.html) (Enterprise Edition) +- [Workbench](http://www.orientdb.dev/enterprise/1.7.4/userguide.html) (Enterprise Edition) - [OrientDB Server](../internals/DB-Server.md) - [Network-Binary-Protocol](../internals/Network-Binary-Protocol.md) - [Gephi Graph Analysis Visual tool](../plugins/Gephi.md) - [Rexster Support and configuration](../plugins/Rexster.md) -- [Continuous integration](http://helios.orientechnologies.com/) +- [Continuous integration](http://helios.orientdb.dev/) ### Resources -- [User Group](http://www.orientechnologies.com/active-user-community) - Have question, troubles, problems? -- [Professional Support](http://orientechnologies.com/support) -- [Training](http://orientechnologies.com/training) - Training and classes. -- [Events](http://www.orientechnologies.com/event) - Follow OrientDB at the next event! +- [User Group](http://www.orientdb.dev/active-user-community) - Have question, troubles, problems? +- [Professional Support](http://orientdb.dev/support) +- [Training](http://orientdb.dev/training) - Training and classes. +- [Events](http://www.orientdb.dev/event) - Follow OrientDB at the next event! - [Team](Team.md) - Meet the team behind OrientDB - [Contribute](../misc/Contribute-to-OrientDB.md) - Contribute to the project. -- [Who is using OrientDB?](http://www.orientechnologies.com/customers) - Clients using OrientDB in production. +- [Who is using OrientDB?](http://www.orientdb.dev/customers) - Clients using OrientDB in production. ## Questions or Need Help? Check out our [Get in Touch](../misc/Get-in-Touch.md) page for different ways of getting in touch with us. @@ -57,7 +57,7 @@ Check out our [Get in Touch](../misc/Get-in-Touch.md) page for different ways of This documentation is also available in [PDF format](OrientDB-Manual.pdf). ## Past releases -- [v1.7.8](http://www.orientechnologies.com/docs/1.7.8/) +- [v1.7.8](http://www.orientdb.dev/docs/1.7.8/) Welcome to **OrientDB** - the first Multi-Model Open Source NoSQL DBMS that brings together the power of graphs and the flexibility of documents into one scalable high-performance operational database. diff --git a/src/legacy/Introduction.md b/src/legacy/Introduction.md index 499d8526..589d942d 100644 --- a/src/legacy/Introduction.md +++ b/src/legacy/Introduction.md @@ -1,4 +1,4 @@ -![image](http://www.orientdb.org/images/orientdb_logo_mid.png) +![image](http://www.orientdb.dev/images/orientdb_logo_mid.png) #OrientDB Manual - version 1.7.8 @@ -15,11 +15,11 @@ Take a look at a few OrientDB [Presentations] (https://github.com/orientechnolog OrientDB is free for any use without restriction. Open source, commercial, embedded. This is possible because of it's truly permissive [Apache 2 Open Source License] (http://www.apache.org/licenses/LICENSE-2.0.html). -Orient Technologies, the company behind OrientDB, offers high quality [Professional Services] (http://orientechnologies.com/support.htm). If you are looking for Developer and Production Support, [Training] (http://orientechnologies.com/training.htm) or [Consultancy] (http://www.orientechnologies.com/consulting/) with transparent and competitive pricing, we have you covered. These options are available to ensure you’re maximizing OrientDB’s capabilities for your particular needs and use case. +Orient Technologies, the company behind OrientDB, offers high quality [Professional Services] (http://orientdb.dev/support.htm). If you are looking for Developer and Production Support, [Training] (http://orientdb.dev/training.htm) or [Consultancy] (http://www.orientdb.dev/consulting/) with transparent and competitive pricing, we have you covered. These options are available to ensure you’re maximizing OrientDB’s capabilities for your particular needs and use case. ## OrientDB Community -Start learning about OrientDB with the [OrientDB Manual](http://orientechnologies.com/docs). For any questions, visit the [OrientDB Community Group](http://www.orientdb.org/community-group.htm). Need help? Go to [Online Support](https://gitter.im/orientechnologies/orientdb). Do you want to hear about OrientDB at a conference or meetup? Take a look at [Events](http://www.orientechnologies.com/events/) or invite us to present to your group! +Start learning about OrientDB with the [OrientDB Manual](http://orientdb.dev/docs). For any questions, visit the [OrientDB Community Group](http://www.orientdb.dev/community-group.htm). Need help? Go to [Online Support](https://gitter.im/orientechnologies/orientdb). Do you want to hear about OrientDB at a conference or meetup? Take a look at [Events](http://www.orientdb.dev/events/) or invite us to present to your group! [![](http://mac.softpedia.com/base_img/softpedia_free_award_f.gif)](http://mac.softpedia.com/get/Developer-Tools/Orient.shtml) diff --git a/src/legacy/Migration-from-1.7.x-to-2.0.x.md b/src/legacy/Migration-from-1.7.x-to-2.0.x.md index 169b76fd..04867596 100644 --- a/src/legacy/Migration-from-1.7.x-to-2.0.x.md +++ b/src/legacy/Migration-from-1.7.x-to-2.0.x.md @@ -105,7 +105,7 @@ Example of configuration with 2 nodes replicated (no sharding): If you execute this command against a node1, OrientDB will assign the cluster-id where node1 is master, i.e. #13:232. With node2 would be different: it couldn't never be #13. -For more information look at: http://www.orientechnologies.com/docs/last/orientdb.wiki/Distributed-Sharding.html. +For more information look at: http://www.orientdb.dev/docs/last/orientdb.wiki/Distributed-Sharding.html. ### Asynchronous replication diff --git a/src/legacy/Presentations.md b/src/legacy/Presentations.md index 648c8721..93a6eaf3 100644 --- a/src/legacy/Presentations.md +++ b/src/legacy/Presentations.md @@ -4,27 +4,27 @@ ## Videos and Presentations in English - Video *Switching from relational to the graph model* by Luca Garulli at [All Your Base conference](http://allyourbaseconf.com) on November, 23rd 2012 - - [![](http://www.orientdb.org/images/video-2012-ayb-oxford.jpg)](http://vimeo.com/56630862) + - [![](http://www.orientdb.dev/images/video-2012-ayb-oxford.jpg)](http://vimeo.com/56630862) - [Slides](http://www.slideshare.net/lvca/switching-from-relational-to-the-graph-model) - Video **Graph databases and PHP: time for serious stuff** by Alessandro Nadalin and David Funaro at [PHPcon Poland](http://www.phpcon.pl/2011/en/agenda) on October 21, 2011 - - [![](http://www.orientdb.org/images/video-2011-phpcon-poland.png)](http://vimeo.com/53451968) + - [![](http://www.orientdb.dev/images/video-2011-phpcon-poland.png)](http://vimeo.com/53451968) - [Slides](http://www.slideshare.net/ingdavidino/graph-db-inphpphpconpl) - Video: **Internet Apps powered by NoSQL and JavaScript** by Luca Garulli at [JS Everywhere](http://jseverywhere.eu/) in Paris (France) on November 17th 2012 - - [![](http://www.orientdb.org/images/video-2012-jseverywhere-par.png)](http://www.youtube.com/watch?v=o_7NCiTLVis) + - [![](http://www.orientdb.dev/images/video-2012-jseverywhere-par.png)](http://www.youtube.com/watch?v=o_7NCiTLVis) - [Slides](http://www.slideshare.net/lvca/a-new-collaborative-way-to-develop-internet-apps-powered-by-nosql-and-javascript) - Video : **Switching from the relational to the graph model** by Luca Garulli at [NoSQL Matters](http://2012.nosql-matters.org/bcn/) in Barcelona (Spain) on October 6th 2012 - - [![](http://www.orientdb.org/images/video-2012-nosqlmatters-bcn.png)](https://vimeo.com/52228068) + - [![](http://www.orientdb.dev/images/video-2012-nosqlmatters-bcn.png)](https://vimeo.com/52228068) - [Slides](http://www.slideshare.net/lvca/switching-from-relational-to-graph-model) - Video : **NoSQL adoption: what's the next step?** by Luca Garulli at [NoSQL Matters](http://2012.nosql-matters.org/cgn/) in Cologne (Germany) on May 30th 2012 - - [![](http://www.orientdb.org/images/video-2012-nosqlmatters-keynote-cgn.png)](https://vimeo.com/46186167) + - [![](http://www.orientdb.dev/images/video-2012-nosqlmatters-keynote-cgn.png)](https://vimeo.com/46186167) - [Slides](http://2012.nosql-matters.org/cgn/wp-content/uploads/2012/06/KeyNote-Luca-Garulli.pdf) - Video : **Design your applications using persistent Graphs and OrientDB** by Luca Garulli at [NoSQL Matters](http://2012.nosql-matters.org/cgn/) in Cologne (Germany) on May 30th 2012 - - [![](http://www.orientdb.org/images/video-2012-nosqlmatters-cgn.png)](http://vimeo.com/47671574) + - [![](http://www.orientdb.dev/images/video-2012-nosqlmatters-cgn.png)](http://vimeo.com/47671574) - [Slides (English)](http://www.slideshare.net/lvca/design-your-application-using-persistent-graphs-and-orientdb) - Video (English): **Works with persistent graphs using OrientDB** by Luca Molino at FOSDEM on February 2012 in Bruxelles (Belgium) on [Video](http://www.youtube.com/watch?v=EDiIS0PH2uY) - [Slides (English)](http://www.slideshare.net/graphdevroom/works-with-persistent-graphs-using-orientdb) - Video (pseudo-English): **Interview to Luca Garulli about OrientDB** by Tim Anglade on 2010 - - [![](http://www.orientdb.org/images/video-2010-interview-tim.png)](http://vimeo.com/47056001) + - [![](http://www.orientdb.dev/images/video-2010-interview-tim.png)](http://vimeo.com/47056001) ## Presentations in English @@ -42,9 +42,9 @@ - [Video](http://www.youtube.com/watch?v=DAT4_GSt9Bc) - [Slides (English)](http://www.slideshare.net/Codemotion/dal-modello-relazionale-al-grafo-cosa-cambia-by-alfonso-focareta) - Video (Italian): **Perché potresti avere bisogno di un database NOSQL anche se non sei Google o Facebook** (Italian only) by Luca Garulli at Codemotion in Rome (Italy) on March 2011 - - http://www.orientdb.org/images/video-2011-codemotion-roma.png + - http://www.orientdb.dev/images/video-2011-codemotion-roma.png - [Slides (English)](http://www.slideshare.net/Codemotion/perch-potresti-aver-bisogno-di-un-database-nosql-anche-se-non-sei-google-o-facebook) - Video (Italian): **OrientDB e lo sviluppo di WebApp** (Italian only) by Luca Garulli at NoSQL Day in Brescia on 2011 - - [![](http://www.orientdb.org/images/video-2010-nosqlday-brescia.png)](https://vimeo.com/21595812) + - [![](http://www.orientdb.dev/images/video-2010-nosqlday-brescia.png)](https://vimeo.com/21595812) - [Slides (English)](http://www.slideshare.net/lvca/orientdb-nosqlday) diff --git a/src/legacy/Quick-Start.md b/src/legacy/Quick-Start.md index 697f87c2..7e24d868 100644 --- a/src/legacy/Quick-Start.md +++ b/src/legacy/Quick-Start.md @@ -2,7 +2,7 @@ # More on Tutorials - +
We decided to provide a Getting Started video course for FREE! This course is designed to help developers become productive and familiar with OrientDB and related tools in the fastest way possible. For our initial launch, we have decided to use the Udemy.com platform to provide the most immersive, wide reaching platform possible.
We decided to provide a Getting Started video course for FREE! This course is designed to help developers become productive and familiar with OrientDB and related tools in the fastest way possible. For our initial launch, we have decided to use the Udemy.com platform to provide the most immersive, wide reaching platform possible.
This is a collection of tutorials about OrientDB. diff --git a/src/legacy/Release-2.2.0.md b/src/legacy/Release-2.2.0.md index 618d83df..9e8d8675 100644 --- a/src/legacy/Release-2.2.0.md +++ b/src/legacy/Release-2.2.0.md @@ -147,7 +147,7 @@ On drop class are dropped all the cluster owned by the class, and not just the d ### Configuration Changes Since 2.2 you can force to not ask for a root password setting `true` inside the `` element in the orientdb-server-config.xml file. -The token is active by default, with the relative deprecation of `com.orientechnologies.orient.server.token.OrientTokenHandler` all the token configuration has been moved to orient global configuration with the properties: [network.token.secretyKey](http://orientdb.com/docs/last/Configuration.html#networktokensecretykey), [network.token.encriptionAlgorithm](http://orientdb.com/docs/last/Configuration.html#networktokenencriptionalgorithm), [network.token.expireTimeout](http://orientdb.com/docs/last/Configuration.html#networktokenexpiretimeout) +The token is active by default, with the relative deprecation of `com.orientechnologies.orient.server.token.OrientTokenHandler` all the token configuration has been moved to orient global configuration with the properties: [network.token.secretyKey](http://orientdb.dev/docs/last/Configuration.html#networktokensecretykey), [network.token.encriptionAlgorithm](http://orientdb.com/docs/last/Configuration.html#networktokenencriptionalgorithm), [network.token.expireTimeout](http://orientdb.com/docs/last/Configuration.html#networktokenexpiretimeout) ### SQL and Console commands Changes Strict SQL parsing is now applied also to statements for **Schema Manipulation** (CREATE CLASS, ALTER CLASS, CREATE PROPERTY, ALTER PROPERTY etc.) diff --git a/src/legacy/Team.md b/src/legacy/Team.md index 9f9395b2..02f7a27c 100644 --- a/src/legacy/Team.md +++ b/src/legacy/Team.md @@ -4,23 +4,23 @@ If you want to contribute to the project, follow the [Contributor rules](https:/ # Committers -Committers have reached the Joda Level OrientDB certification. They coordinates updates, patches, new tasks and answer actively to the [Google Group](http://groups.google.com/group/orient-database). They talk in a private Mailing List to take decision all together. All the committers refer to the Committer's guide. +Committers have reached the Joda Level OrientDB certification. They coordinates updates, patches, new tasks and answer actively to the [Google Group](http://groups.google.com/group/orient-database). They talk in a private Mailing List to take decision all together. All the committers refer to the Committer's guide. ## Luca Garulli - + **Description** Luca is the original author of OrientDB product and the main committer. In order to handle indexes in efficient way Luca has created the new MVRB-Tree algorithm (it was called RB+Tree but another different algorithm already exists with this name) as mix of Red-Black Tree and B+Tree. MVRB stands for Multi Value Red Black because stores multiple values in each tree node instead of just one as RB-Tree does. MVRB-Tree consumes less than half memory of the RB-Tree implementation mantaining the original speed while it balances the tree on insertion/update. Furthermore the MVRB-Tree allows fast retrieving and storing of nodes in persistent way. He is member of the Sun Microsystems [JDO 1.0 Expert Group (JSR#12)](http://www.jcp.org/en/jsr/detail?id=12) and JDO 2.0 Expert Group (JSR#243) for the writing of JDO standard.
-**Company** [OrientDB Ltd](http://orientdb.com)
+**Company** [OrientDB Ltd](http://orientdb.dev)
**Links** [Twitter](http://twitter.com/lgarulli) - [Google+](https://plus.google.com/u/0/111607061083712272202/posts) - [VisualizeMe](http://vizualize.me/luca.garulli) - [LinkedIn](http://www.linkedin.com/in/garulli) - [Blog](http://zion-city.blogspot.it) - [Ohloh](http://www.ohloh.net/accounts/lvca)
**Since** 2009 ## Artem Orobets - + **Description** Committer since 2012 and contributor since 2011. He started diving into indexes, composite indexes and many other was introduced.
He have deep knowledge about the MVRB-Tree algorithm, the optimization of the indexes on queries, Transactions and Binary storage.
**Links** [Twitter](https://twitter.com/#!/Dr_EniSh) [LinkedIn](http://ua.linkedin.com/in/artemorobets)
**Since** 2012 ## Andrey Lomakin - + **Description** Committer since 2012 and contributor since 2011. He started diving into indexes, composite indexes and many other was introduced.
He is: @@ -29,20 +29,20 @@ He is: 3. Author of index system. Both hash and sbtree indexes. 4. Co-author (together with Artem Orobets) modern implementation of graph relationships.
-**Company** [OrientDB Ltd](http://orientdb.com)
+**Company** [OrientDB Ltd](http://orientdb.dev)
**Links** [Twitter](https://twitter.com/#!/Andrey_Lomakin) [LinkedIn](http://ua.linkedin.com/in/andreylomakin)
**Since** 2012 ## Luigi Dell'Aquila - + **Description** 10 years experience as an ICT consultant, passionate software developer and Open Source enthusiast. Luigi managed OrientDB Academy since 2013, and since 2014 he manages Orient Technologies consulting services. He is also one of the main OrientDB core committers, mainly focused on OrientSQL, query execution and optimization.
-**Company** [OrientDB Ltd](http://orientdb.com)
+**Company** [OrientDB Ltd](http://orientdb.dev)
**Links** [Twitter](http://twitter.com/ldellaquila) - [LinkedIn](https://it.linkedin.com/in/luigidellaquila)
**Since** 2013 ## Luca Molino - + **Description** Contributor since 2010 and committer since 2012 Luca is author of various Http commands and the network protocol multipart management; author of the v1.0 ObjectDatabase implementation; author of the centralized Fetching strategy; author of the FIND REFERENCES SQL command; author of the ttl bash orient console; worked on SQL commands, Storage creation\deleting and more.
**Company** [Asset Data](http://www.assetdata.it)
**Links** [Twitter](http://twitter.com/MaDaPHaKa) [GitHub](http://github.com/MaDaPHaKa)
@@ -57,7 +57,7 @@ Contributors are all the people that contribute in any way to the OrientDB devel Contributors (in alphabetic order): ## Anton Terekhov - + **Description** Web developer since 2001, PHP developer since 2002. Developer and maintainer of OrientDB-PHP driver for binary protocol (https://github.com/AntonTerekhov/OrientDB-PHP), bug hunter, binary protocol tester :-) . Speaker on two Russian IT-conferences. Founder, CEO and Lead Developer of own company. Now specialized at high load, distributed web systems.
**Company** [NetMonsters](http://netmonsters.ru)
**Links** [Facebook](http://www.facebook.com/anton.terekhov)
diff --git a/src/misc/About-This-Manual.md b/src/misc/About-This-Manual.md deleted file mode 100644 index 1de49fb2..00000000 --- a/src/misc/About-This-Manual.md +++ /dev/null @@ -1,4 +0,0 @@ -# About this Manual - -This Manual documents version 3.2 of the OrientDB Server and the OrientDB suite of products. - diff --git a/src/misc/Contribute-to-OrientDB.md b/src/misc/Contribute-to-OrientDB.md index 2d033d87..277d1ff8 100644 --- a/src/misc/Contribute-to-OrientDB.md +++ b/src/misc/Contribute-to-OrientDB.md @@ -27,7 +27,7 @@ If you'd like to contribute to OrientDB with a patch follow the following steps: ## Documentation -If you want to contribute to the OrientDB documentation, the right repository is: https://github.com/orientechnologies/orientdb-docs. Every 24-48 hours all the contributions are reviewed and published on the public [documentation](http://orientdb.com/docs/last/). +If you want to contribute to the OrientDB documentation, the right repository is: https://github.com/orientechnologies/orientdb-docs. Every 24-48 hours all the contributions are reviewed and published on the public [documentation](http://orientdb.dev/docs/last/). ## Code formatting diff --git a/src/neo4j-to-orientdb-importer/README.md b/src/neo4j-to-orientdb-importer/README.md deleted file mode 100644 index 16738291..00000000 --- a/src/neo4j-to-orientdb-importer/README.md +++ /dev/null @@ -1,420 +0,0 @@ - -# Neo4j to OrientDB Importer - -The _Neo4j to OrientDB Importer_ is a tool that can help you importing in a quick way a Neo4j graph database into OrientDB. - -Imported Neo4j items are: - -- nodes -- relationships -- unique constraints -- indexes - ->Neo4j and Cypher are registered trademark of Neo Technology, Inc. - - -## Supported Versions - -Currently, the _Neo4j to OrientDB Importer_ supports, and has been tested with, the following versions: - -- OrientDB: 2.2.x, 3.0.x -- Neo4j: 3.x - - -## Limitations - -The following limitations apply: - -* Currently only `local` migrations are allowed. -* Schema limitations: - * In case a node in Neo4j has multiple _Labels_, it will be imported into a single OrientDB `Class` (_"MultipleLabelNeo4jConversion"_). - * Note that the information about the original set of Labels is not lost but stored into an internal property of the imported vertex (_"Neo4jLabelList"_). As a result, it will be possible to query nodes with a specific Neo4j _Label_. Note also that the nodes imported into the single class _"MultipleLabelNeo4jConversion"_ can then be moved to other `Classes`, according to your specific needs, using the [MOVE VERTEX](../sql/SQL-Move-Vertex.md) command. For more information, please refer to [this](README.md#querying-nodes-by-original-neo4j-labels) Section. - * Neo4j Nodes with same _Label_ but different case, e.g. _LABEL_ and _LAbel_ will be aggregated into a single OrientDB vertex `Class`. - * Neo4j Relationship with same name but different case, e.g. _relaTIONship_ and _RELATIONSHIP_ will be aggregated into a single OrientDB edge `Class` - * Migration of Neo4j's _"existence"_ constraints (only available in the Neo4j's Enterprise Edition) is currently not implemented. - - -## Installation - -The _Neo4j to OrientDB Importer_ is provided as an external plugin for the OrientDB Server, and is available as a `zip` or `tar.gz` archive. - -Please download the plugin from maven central: - -
http://central.maven.org/maven2/com/orientechnologies/orientdb-neo4j-importer/{{book.lastGA}}/orientdb-neo4j-importer-{{book.lastGA}}.tar.gz
- -Replace `tar.gz` with `zip` for the `zip` archive. - -To install the plugin, please unpack the archive on your OrientDB server directory (please make sure that the version of your OrientDB server and the version of the Neo4j to OrientDB Importer are the same. Upgrade your OrientDB server, if necessary). On Linux systems, to unpack the archive you can use a command like the following: - -
tar xfv orientdb-neo4j-importer-{{book.lastGA}}.tar.gz -C path_to_orientDB/ --strip-components=1 
- - -## Migration Scenarios - -A typical migration scenario consists of the following steps: - -- A copy of the Neo4j's database graph directory (typically `graph.db`) is created into a safe place -- OrientDB is installed -- The _Neo4j to OrientDB Importer_ is installed -- The migration process is started from the command line, passing to the _Neo4j to OrientDB Importer_ the copy of the Neo4j's database directory created earlier -- OrientDB (embedded or server) is started and the newly imported graph database can be used - -**Notes:** - -* Since currently only exclusive, `local`, connections are allowed, during the migration there must be no running servers on the Neo4j's database directory and on the target OrientDB's import directory. - -* As an alternative of creating a copy of the Neo4j's database directory, and in case you can schedule a Neo4j shutdown, you can: - * Shutdown your Neo4j Server - * Start the migration by passing the original Neo4j's database directory to the _Neo4j to OrientDB Importer_ (a good practice is to create a back-up first) - - -## Usage - -After Installation, the _Neo4j to OrientDB Importer_ can be launched using the provided `orientdb-neo4j-importer.sh` script (or `orientdb-neo4j-importer.bat` for Windows systems). - - -### Syntax - OrientDB-Neo4j-Importer - -neo4jlibdir (mandatory) - -neo4jdbdir (mandatory) - [-odbdir ] - [-o true|false] - [-i true|false] - -Where: - -* **neo4jlibdir** (mandatory option) is the full path to the Neo4j lib directory (e.g. `D:\neo4j\neo4j-community-3.0.7\lib`). On Windows systems, this parameter must be the first passed parameter. - -* **neo4jdbdir** (mandatory option) is the full path to the Neo4j’s graph database directory (e.g. `D:\neo4j\neo4j-community-3.0.7\data\databases\graph.db`). - -* **odbdir** (optional) is the full path to a directory where the Neo4j database will be migrated. The directory will be created by the import tool. In case the directory exists already, the _Neo4j to OrientDB Importer_ will behave accordingly to the value of the option `o` (see below). The default value of `odbdir` is `$ORIENTDB_HOME/databases/neo4j_import`. - -* **o** (optional). If `true` the `odbdir` directory will be overwritten, if it exists. If `false` and the `odbdir` directory exists, a warning will be printed and the program will exit. The default value of `o` is `false`. - -* **i** (optional). If `true` a unique index on the property `Neo4jRelID` will be created, for all migrated edge classes. This allows you to query relationships by original Neo4j relationship Ids. The default value of `i` is `false`. - -If the _Neo4j to OrientDB Importer_ is launched without parameters, it fails because **-neo4jlibdir** and **-neo4jdbdir** are mandatory. - - -### Example - -A typical import command looks like the following (please adapt the value of the `-neo4jlibdir` and `-neo4jdbdir` parameters to your specific case): - -**Windows:** - -``` -orientdb-neo4j-importer.bat -neo4jlibdir="D:\neo4j\neo4j-community-3.0.7\lib" -neo4jdbdir="D:\neo4j\neo4j-community-3.0.7\data\databases\graph.db" -``` - -**Linux / Mac:** - -``` -./orientdb-neo4j-importer.sh -neo4jlibdir /mnt/d/neo4j/neo4j-community-3.0.7/lib -neo4jdbdir /mnt/d/neo4j/neo4j-community-3.0.7/data/databases/graph.db -``` - - -## Migration Details - -Internally, the _Neo4j to OrientDB Importer_ makes use of the Neo4j's `java` API to read the graph database from Neo4j and of the OrientDB's `java` API to store the graph into OrientDB. - -The import consists of four phases: - -* **Phase 1:** Initialization of the Neo4j and OrientDB servers -* **Phase 2:** Migration of nodes and relationships -* **Phase 3:** Schema migration -* **Phase 4:** Shutdown of the servers and summary info - - -### General Migration Details - -The following are some general migration details that is good to keep in mind: - -* During the import, OrientDB's [`WAL`](http://orientdb.com/docs/last/Configuration.html#storageusewal) and [`WAL_SYNC_ON_PAGE_FLUSH`](http://orientdb.com/docs/last/Configuration.html#storagewalsynconpageflush -) are disabled, and OrientDB is prepared for massive inserts (_OIntentMassiveInsert_). - -* In case a node in Neo4j has no _Label_, it will be imported in OrientDB into the Class _"GenericClassNeo4jConversion"_. - -* Starting from version 2.2.14, in case a node in Neo4j has multiple _Labels_, it will be imported into the `Class` _"MultipleLabelNeo4jConversion"_. Before 2.2.14, only the first _Label_ was imported. - -* List of original Neo4j _Labels_ are stored as properties in the imported OrientDB vertices (property: _"Neo4jLabelList"_). - -* During the import, a not unique index is created on the property _"Neo4jLabelList"_. This allows you to query by _Label_ even over nodes migrated into the single `Class` _"MultipleLabelNeo4jConversion"_, using queries like: -`SELECT FROM V WHERE Neo4jLabelList CONTAINS 'your_label_here'` or the equivalent with the [MATCH](../sql/SQL-Match.md) syntax: `MATCH {class: V, as: your_alias, where: (Neo4jLabelList CONTAINS 'your_label'} RETURN your_alias`. - -* Original Neo4j `IDs` are stored as properties in the imported OrientDB vertices and edges (`Neo4jNodeID` for vertices and `Neo4jRelID` for edges). Such properties can be (manually) removed at the end of the import, if not needed. - -* During the import, an OrientDB index is created on the property `Neo4jNodeID` for all imported vertex `classes` (node's _Labels_ in Neo4j). This is to speed up vertices lookup during edge creation. The created indexes can be (manually) removed at the end of the import, if not needed. - -* In case a Neo4j Relationship has the same name of a Neo4j _Label_, e.g. _"RelationshipName"_, the _Neo4j to OrientDB Importer_ will import that relationship into OrientDB in the class `E_RelationshipName` (i.e. prefixing the Neo4j's `RelationshipType` with an `E_`). - -* During the creation of properties in OrientDB, Neo4j `Char` data type is mapped to a `String` data type. - - -### Details on Schema Migration - -The following are some schema-specific migration details that is good to keep in mind: - -* If in Neo4j there are no constraints or indexes, and if we exclude the properties and indexes created for internal purposes (`Neo4jNodeID`, `Neo4jRelID`, `Neo4jLabelList` and corresponding indexes), the imported OrientDB database is schemaless. - -* If in Neo4j there are constraints or indexes, the imported OrientDB database is schema-hybrid (with some properties defined). In particular, for any constraint and index: - - * The Neo4j property where the constraint or index is defined on, is determined. - - * A corresponding property is created in OrientDB (hence the schema-hybrid mode). - -* If a Neo4j unique constraint is found, a corresponding unique index is created in OrientDB - - * In case the creation of the unique index fails, a not unique index will be created. Note: this scenario can happen, by design, when migrating nodes that have multiple _Labels_, as they are imported into a single vertex `Class`). - -* If a Neo4j index is found, a corresponding (not unique) OrientDB index is created. - - -## Migration Best Practices - -Below some migration best practices. - -1. Check if you are using _Labels_ with same name but different case, e.g. _LABEL_ and _LAbel_ and if you really need them. If the correct _Label_ is _Label_, change _LABEL_ and _LAbel_ to _Label_ in the original Neo4j database before the import. If you really cannot change them, be aware that with the current version of the Neo4j to OrientDB Importer such nodes will be aggregated into a single OrientDB vertex `Class`. - -2. Check if you are using relationships with same name but different case, e.g. _relaTIONship_ and _RELATIONSHIP_ and if you really need them. If the correct relationship is _Relationship_, change _relaTIONship_ and _RELATIONSHIP_ to _Relationship_ before the import. If you really cannot change them, be aware that with the current version of the Neo4j to OrientDB Importer such relationships will be aggregated into a single OrientDB edge `Class`. - -3. Check your constraints and indexes before starting the import. Sometime you have more constraints or indexes than needed, e.g. old ones that you created on _Labels_ that you are not using anymore. These constraints will be migrated as well, so a best practice is to check that you have defined, in Neo4j, only those that you really want to import. To check constraints and indexes in Neo4j, you can type `:schema` in the Browser and then click on the "play" icon. Please delete the not needed items. - -4. Check if you are using nodes with multiple _Labels_, and if you really need more than one _Label_ on them. Be aware that with current version of the Neo4j to OrientDB Importer such nodes with multiple _Labels_ will be imported into a single OrientDB `Class` ("_MultipleLabelNeo4jConversion_"). - - -## Migration Log - -During the migration, a log file is created. - -The log can be found at `path_to_orientDB/log/orientdb-neo4j-importer.log`. - - -## Migration Monitoring - -During the migration, for each imported Neo4j items (nodes, relationships, constraints and indexes) a completion percentage is written in the shell from where the import has been started, thus allowing to monitor progresses. - -For large imports, a best practice is to monitor also the produced import log, using a program like `tail`, e.g. - -``` -tail -f -n 100 -f path_to_orientDB/log/orientdb-neo4j-importer.log -``` - -## Migration Troubleshooting - -In case of problems, the details of the occurred errors are written in the migration log file. Please use this file to troubleshoot the migration. - - -## Connecting to the newly imported Database - -After the migration process, you may start an OrientDB server using the `server.sh` or `server.bat` scripts. - -You can connect to the newly imported database through [Studio](../studio/README.md) or the [Console](../console/README.md) using the OrientDB's default database users, e.g. using the user _admin_ and password _admin_. - -Please secure your database by removing the default users, if you don't need them, or by creating new users. - -For further information on using OrientDB, please refer to the [Getting Started Guide](../gettingstarted/Tutorial-Introduction-to-the-NoSQL-world.md). - - -## Query Strategies - -This section includes a few strategies that you can use to query your data after the import. - -As first thing, please be aware that in OrientDB you can query your data using both [SQL](../sql/README.md) or pattern matching. In case you are familiar with Neo4j's Cypher query language, it may be more easy for you to use our pattern matching (see our [MATCH](../sql/SQL-Match.md) syntax for more details). However, keep in mind that depending on your specific use case, our SQL can be of great help. - - -### Counting all nodes - -To count all nodes (vertices): - - - - - - - - - - -
Neo4j's CypherOrientDB's SQL
-
-MATCH (n) RETURN count(n)
-
-
-
-SELECT COUNT(*) FROM V
-
-
- - -### Counting all relationships - -To count all relationships (edges): - - - - - - - - - - -
Neo4j's CypherOrientDB's SQL
-
-MATCH ()-->() RETURN count(*)
-
-
-
-SELECT COUNT(*) FROM E 
-
-
- - -### Querying nodes by original Neo4j ID - -If you would like to query nodes by their original Neo4j Node ID, you can use the property _Neo4jNodeID_, which is created automatically for you during the import, and indexed as well. - -To query a node that belongs to a specific `Class` with name _ClassName_, you can execute a query like: - -``` -SELECT FROM ClassName WHERE Neo4jNodeID = your_id_here -``` - -To query a node regardless of the `Class` where it has been included in, you can use a query like: - -``` -SELECT FROM V WHERE Neo4jNodeID = your_id_here -``` - -### Querying relationships by original Neo4j ID - -The strategy to query relationships by their original Neo4j Relationship ID, will be improved in the next hotfix (see GitHub [Issue #9](https://github.com/orientechnologies/orientdb-neo4j-importer/issues/9), which also includes a workaround). - - -### Querying nodes by original Neo4j Labels - -In case the original nodes have just one _Label_, they will be migrated in OrientDB into a `Class` that has name equals to the Neo4j's _Label_ name. In this simple case, to query nodes by _Label_ you can execute a query like the following: - - - - - - - - - - -
Neo4j's CypherOrientDB's SQL
-
-MATCH (n:LabelName) RETURN n
-
-
-
-SELECT FROM LabelName
-
- -or using our MATCH syntax: - -
-MATCH {class: LabelName, as: n} RETURN n
-
-
- -More generally speaking, since the original Neo4j _Label_ is stored inside the property _Neo4jLabelList_, to query imported nodes (vertices) using their original Neo4j _Label_, you can use queries like the following: - - - - - - - - - - -
Neo4j's CypherOrientDB's SQL
-
-MATCH (n:LabelName) RETURN n
-
-
-
-SELECT * FROM V WHERE Neo4jLabelList CONTAINS 'LabelName'
-
- -or using our MATCH syntax: - -
-MATCH {class: V, as: n, where: (Neo4jLabelList CONTAINS 'LabelName')} RETURN n
-
-
- -This is, in particular, the strategy that must be followed in case the original Neo4j's nodes have multiple _Labels_ (and are hence migrated into the single OrientDB `Class` _MultipleLabelNeo4jConversion_). - -Note that the property _Neo4jLabelList_ has an index on it. - - -## Migration Example - -A complete example of a migration from Neo4j to OrientDB using the _Neo4j to OrientDB Importer_ can be found in the section [Tutorial: Importing the *northwind* Database from Neo4j](../gettingstarted/tutorials/Tutorial-Importing-the-northwind-Database-from-Neo4j.md). - - -## Roadmap - -A list of prioritized enhancements for the Neo4j to OrientDB Importer, along with some other project information can be found [here](https://github.com/orientechnologies/orientdb-neo4j-importer/projects/1). - - -## FAQ - -**1. In case original nodes in Neo4j have multiple _Labels_, they are imported into a single OrientDB vertex Class. Depending on the specific use case, after the migration, it may be useful to manually move vertices to other Classes. How can this be done?** - -First, please note that there is an open [enhancement request](https://github.com/orientechnologies/orientdb-neo4j-importer/issues/8) about having a customized mapping between Neo4j _Labels_ and OrientDB `Classes`. Until it is implemented, a possible strategy to quickly move vertices into other `Classes` is to use the [`MOVE VERTEX`](../sql/SQL-Move-Vertex.md) syntax. - -The following are the steps to follow: - -**A** - Create the `Classes` where you want to move the vertices. - -When creating the `Classes`, please keep in mind the following: - -- Define the following properties: - - _Neo4jNodeID_ of type _LONG_ - - _Neo4jLabelList_ of type _EmbeddedList String_ - -**Example:** - -``` -CREATE CLASS YourNewClassHere EXTENDS V -CREATE PROPERTY YourNewClassHere.Neo4jNodeID LONG -CREATE PROPERTY YourNewClassHere.Neo4jLabelList EMBEDDEDLIST STRING -``` - -**B** - Select all vertices that have a specific Neo4j _Label_, and then move them to your new `Class`. To do this you can use a query like: - -``` -MOVE VERTEX ( - SELECT FROM MultipleLabelNeo4jConversion - WHERE Neo4jLabelList CONTAINS 'Your Neo4j Label here' - ) -TO CLASS:YourNewClassHere BATCH 10000 -``` - -(use a batch size appropriate to your specific case). - -**C** - Create the following indexes in your new `Classes`: - -- A unique index on the property _Neo4jNodeID_ -- A not unique index on the property _Neo4jLabelList_ - -**Important:** creation of the indexes above is crucial in case you will want to query vertices using their original Neo4j node _IDs_ or _Labels_. - -**Example:** - -``` -CREATE INDEX YourNewClassHere.Neo4jNodeID ON YourNewClassHere(Neo4jNodeID) UNIQUE -CREATE INDEX YourNewClassHere.Neo4jLabelList ON YourNewClassHere(Neo4jLabelList) NOTUNIQUE -``` - - -**2. Not all constraints have been imported. Why?** - -By design, there are certain cases where not all the constraints can be imported. It may be that you are in one of these cases. When nodes are aggregated into a single `Class` (either because that node has multiple _Labels_ or because there are _Labels_ with the same name but different case, e.g. _LABEL_ and _LAbel_) not all constraints can be imported: the creation of unique indices in OrientDB will probably fail; as a workaround the Importer will try to create not unique indexes, but when aggregating nodes into a single `Class`, number of created constraints will be probably less than number of constraints in Neo4j, even after the creation of the not unique indexes. This in general may or may not be a problem depending on your specific case. Please feel free to open an [issue](https://github.com/orientechnologies/orientdb-neo4j-importer/issues) if you believe you incurred into a bug. - - diff --git a/src/orientjs/OrientJS.md b/src/orientjs/OrientJS.md index e54b7466..3f63854e 100644 --- a/src/orientjs/OrientJS.md +++ b/src/orientjs/OrientJS.md @@ -1,7 +1,7 @@ # OrientJS - Node.js Driver -Official [orientdb](http://www.orientechnologies.com/orientdb/) driver for node.js. Fast, lightweight, uses the binary protocol. +Official [orientdb](http://www.orientdb.dev/orientdb/) driver for node.js. Fast, lightweight, uses the binary protocol. [![Build Status](https://travis-ci.org/orientechnologies/orientjs.svg?branch=develop)](https://travis-ci.org/orientechnologies/orientjs) [![Coverage Status](https://coveralls.io/repos/github/orientechnologies/orientjs/badge.svg?branch=develop)](https://coveralls.io/github/orientechnologies/orientjs?branch=develop) @@ -33,7 +33,7 @@ OrientJS v3.0 contains backwards compatible APIs for OrientDB 2.2.x and OrientDB ## Resources -- [API Docs](http://orientdb.com/docs/last/orientjs/OrientJS.html) +- [API Docs](http://orientdb.dev/docs/last/orientjs/OrientJS.html) - [Example Projects](https://github.com/orientechnologies/orientjs-example) - [Changelog](https://github.com/orientechnologies/orientjs/blob/master/CHANGELOG.md) diff --git a/src/release/3.2/Available-Packages.md b/src/release/3.2/Available-Packages.md index 021d3bb9..1f2bcee5 100644 --- a/src/release/3.2/Available-Packages.md +++ b/src/release/3.2/Available-Packages.md @@ -8,8 +8,6 @@ The following are the packages available for OrientDB Community Edition: - **CE** ([{{book.CE_name}}-{{book.lastGA}}.tar.gz]({{ book.CE_link }})) - OrientDB Community Edition without Gremlin/TinkerPop support -- **CE-TP2** ([{{book.TP2_name}}-{{book.lastGA}}.tar.gz]({{ book.TP2_link }})) - - OrientDB Community Edition that includes support for Gremlin/TinkerPop 2.6 - **CE-TP3** ([{{book.TP3_name}}-{{book.lastGA}}.tar.gz]({{ book.TP3_link }})) - OrientDB Community Edition that includes support for Gremlin/TinkerPop 3.x diff --git a/src/release/Upgrade.md b/src/release/Upgrade.md index c636e228..9acc6a0e 100644 --- a/src/release/Upgrade.md +++ b/src/release/Upgrade.md @@ -15,11 +15,11 @@ So between PATCH versions, the compatibility is assured (example 2.1.0 -> 2.1.8) |FROM|TO|Guide|Blueprints|Database|Binary Protocol|HTTP Protocol| |-----|-----|------------|----------|--------|--|--| -|3.1.x|3.2.x|[Docs](http://www.orientdb.org/docs/3.2.x/release/3.2/Upgrading-to-OrientDB-3.2.html)|v 3.3.0|[Automatic](../misc/Backward-compatibility.md)|38|10| +|3.1.x|3.2.x|[Docs](http://www.orientdb.dev/docs/3.2.x/release/3.2/Upgrading-to-OrientDB-3.2.html)|v 3.3.0|[Automatic](../misc/Backward-compatibility.md)|38|10| |3.0.x|3.1.x|No need to upgrade the application layer (import/export only)|v 3.3.0|[Automatic](../misc/Backward-compatibility.md)|38|10| -|2.2.x|3.0.x|[Docs](http://www.orientdb.org/docs/3.0.x/release/3.0/Upgrading-to-OrientDB-3.0.html)|v 3.3.0|[Automatic](../misc/Backward-compatibility.md)|37|10| -|2.1.x|2.2.x|[Docs](https://orientdb.org/docs/2.2.x/Upgrade.html)|Final v2.6.0|[Automatic](../misc/Backward-compatibility.md)|34|10| -|2.0.x|2.1.x|[Docs](https://orientdb.org/docs/2.2.x/Release-2.1.0.html)|Final v2.6.0|[Automatic](../misc/Backward-compatibility.md)|30|10| +|2.2.x|3.0.x|[Docs](http://www.orientdb.dev/docs/3.0.x/release/3.0/Upgrading-to-OrientDB-3.0.html)|v 3.3.0|[Automatic](../misc/Backward-compatibility.md)|37|10| +|2.1.x|2.2.x|[Docs](https://orientdb.dev/docs/2.2.x/Upgrade.html)|Final v2.6.0|[Automatic](../misc/Backward-compatibility.md)|34|10| +|2.0.x|2.1.x|[Docs](https://orientdb.dev/docs/2.2.x/Release-2.1.0.html)|Final v2.6.0|[Automatic](../misc/Backward-compatibility.md)|30|10| ## Instructions diff --git a/src/scala/Scala-Language.md b/src/scala/Scala-Language.md index 8bc0af34..8e1fe6e0 100644 --- a/src/scala/Scala-Language.md +++ b/src/scala/Scala-Language.md @@ -3,7 +3,7 @@ There's no specific API written in Scala for OrientDB, but since there's a Java API it's easy to use that one to access OrientDB from Scala, and if needed to write wrappers around it for making a more Scala-like API. -Here we just explain how to start using Scala for doing some basic operations on OrientDB, based on this GitHub repository: [OrientDbScalaExample](https://github.com/andreaiacono/OrientDbScalaExample) that uses the [Graph API](http://orientdb.com/docs/last/Graph-Database-Tinkerpop.html). +Here we just explain how to start using Scala for doing some basic operations on OrientDB, based on this GitHub repository: [OrientDbScalaExample](https://github.com/andreaiacono/OrientDbScalaExample) that uses the [Graph API](http://orientdb.dev/docs/last/Graph-Database-Tinkerpop.html). To fully leverage the features of the API, refer to the Java documentation. @@ -46,7 +46,7 @@ If we need to define new classes, we can use the _createVertexType()_ method of person.createProperty("firstName", OType.STRING) person.createProperty("lastName", OType.STRING) ``` -we can define as many properties we need, each one belonging to a [Type](http://orientdb.com/docs/last/Types.html) (the second parameter of the _createProperty()_ method). +we can define as many properties we need, each one belonging to a [Type](http://orientdb.dev/docs/last/Types.html) (the second parameter of the _createProperty()_ method). In the same way, we can extend edges, like in this example: ``` diff --git a/src/security/Database-Security.md b/src/security/Database-Security.md index cfd267ad..604f6c79 100644 --- a/src/security/Database-Security.md +++ b/src/security/Database-Security.md @@ -3,7 +3,7 @@ OrientDB uses a security model based on the concepts of users and roles. That is, a database has its own users. Each [User](#users) has one or more roles. [Roles](#roles) are a combination of the working mode and a set of permissions and security policies. -![Security overview](http://www.orientdb.org/images/orientdb-dbsecurity.png) +![Security overview](http://www.orientdb.dev/images/orientdb-dbsecurity.png) >For more information on security, see: diff --git a/src/security/OrientDB-Security-Guide.md b/src/security/OrientDB-Security-Guide.md index 1d99aee9..ef79a9d0 100644 --- a/src/security/OrientDB-Security-Guide.md +++ b/src/security/OrientDB-Security-Guide.md @@ -106,9 +106,6 @@ Since OrientDB supports both static and dynamic plug-ins, which have total acces **SECURITY RECOMMENDATION**: Validate installed plug-ins. -## Data Protection and Privacy ## -See [SAP Enterprise OrientDB Data Protection and Privacy Approach for Products](SAP-Enterprise-OrientDB-DPP.md). - ## OrientDB Security Documentation ## More comprehensive information about OrientDB security can be found here: diff --git a/src/security/SAP-Enterprise-OrientDB-DPP.md b/src/security/SAP-Enterprise-OrientDB-DPP.md deleted file mode 100644 index 0ad14f29..00000000 --- a/src/security/SAP-Enterprise-OrientDB-DPP.md +++ /dev/null @@ -1,106 +0,0 @@ -# SAP Enterprise OrientDB Data Protection and Privacy Approach for Products # -The purpose of this document is to describe the approach and capabilities provided by SAP Enterprise OrientDB which can be used by applications and customers to comply with data protection regulations like the EU General Data Protection Regulation (GDPR). - -The document also does not provide how-tos, guidelines, or rules on how to be compliant to data protection and privacy regulations. This needs to be done by the customer based on their own data protection and privacy requirements and applicable regulations. - -Data protection and privacy regulations are applicable to the storage and processing and transfer of data regarded as personal data or even sensitive personal data. Data protection in general is applicable to all types of personal data. - -However, some of the details on how data protection requirements are applied in practice can differ, depending on the type of data. In the context of SAP Enterprise OrientDB we distinguish between two types of data: - -- **Application Data** i.e. data that comes from applications to be stored, processed, and managed by the data-structures (e.g., database classes) and features provided by SAP Enterprise OrientDB. The semantics, content (social security number, product ID, health data) and relation (e.g., which class makes up a business object like customer) of this data or what regulations need to apply (e.g., retention periods) are under the control of the application. SAP Enterprise OrientDB itself is agnostic to the semantics and only sees the technical representation of the data in SAP Enterprise OrientDB technical objects (e.g. classes). Therefore, the application is responsible to ensure that the data is processed in compliance with data protection regulations and the requirements defined by SAP product standards. SAP Enterprise OrientDB enables the applications to comply by providing appropriate capability and features. The details on what SAP Enterprise OrientDB offers for the specific requirements are described later in this document. -- **Operational Data** is the data which is collected with the purpose to ensure correct operation, maintenance, and functioning of the system. Depending on the type of data it may contain personal related data. Operational data in SAP Enterprise OrientDB is stored in different places: - - Audit Log - - Log Files - - System Classes - - Backup Files - - This data is collected for the direct purpose of running and maintaining the operation of the SAP Enterprise OrientDB system. - - -# GDPR principles, SAP requirements, SAP Enterprise OrientDB Implementation # -Based on the data protection regulations SAP created a set of requirements including five corporate requirements. Some of these requirements were primarily defined for business applications. For SAP Enterprise OrientDB as a database platform we had to find our own interpretation of these requirements. - -Processing of Personal Data – Legal Ground -One of the key principles of DPP is that there needs to be an explicit legal ground to process personal data. - -Providing the legal ground is not a technical topic but a process and legal topic that needs to be addressed independently from the technology. Therefore, those requirements do not translate into technical product requirements. - -|Requirement|Content|Comment| -|---|---|---| -|Consent|Where processing is based on the data subject's consent, the controller should be able to demonstrate that the data subject has given consent to the processing operation. (GDPR rec. 42, sentence 1.)|Not Applicable| -|Contract|Processing should be lawful where it is necessary in the context of a contract or the intention to enter into a contract. (GDPR rec. 44)|Not Applicable| -|Legal Obligation|Business software based examples: tax reporting, income tax reporting, reporting for social insurance|Not Applicable| -|Protect Vital Interest|The processing of personal data should also be regarded to be lawful where it is necessary to protect an interest which is essential for the life of the data subject or that of another natural person. (GDPR rec. 46 sentence 1)|Not Applicable| -|Public Interest|Where processing is … necessary for the performance of a task carried out in the public interest or in the exercise of official authority, the processing should have a basis in Union or Member State law. (GDPR rec. 45 sentence 1)|Not Applicable| -|Legitimate Interest|Proofing a legitimate interest is subject to a careful legal consideration whether “fundamental rights and freedoms of the data subject” are not overriding such an interest. (GDPR rec. 47)|Not Applicable| - -## Complements of the General Right - Rights of the Data Subject ## -Data protection regulations define very specific rights to the data subject. Anyone wanting to process data on one of the legal grounds defined above needs to ensure those rights. That means SAP software has to enable customers to run their applications according to those regulations. - -Not all requirements can be translated into technical requirements or by technical means alone. However, some of those requirements need to be technically supported by SAP software and those are translated into explicit requirements in the SAP security product standard. The following table lists those requirements and the following sections define the way SAP Enterprise OrientDB deals with those requirements. - -|Requirement|Content| -|---|---| -|Notification|The ability to inform the data subject if the data is used for a different purpose.| -|Information|The data subject’s right to get information on the data undergoing processing concerning them.| -|Correction|Personal data has to be true and to be corrected (latest after request).| -|Erasure|The ability to delete personal data when all retention periods have passed.

The ability to block personal data as soon as the primary purpose has passed and the residence time has elapsed.| -|Data Portability|The right of the data subject to receive his personal data in a structured, commonly used, and machine-readable format.| -|Automated Decisions|The data subject has the right that any automated decision can become subject to manual interference.| - -### SEC-255: Provide a retrieval function which can be used to inform the data subjects about the personal data stored about them ### -The requirement specifically applies to applications. Personal application data stored inside SAP Enterprise OrientDB classes (user information) can be displayed by using OrientDB SQL queries. Since only applications have the knowledge as to which classes contain personal data, they are responsible for implementing report and display functions using such standard capabilities provided by SAP Enterprise OrientDB. - -The requirement does not apply to operational data. Backups, logs, and trace files at this time are not explicitly listed in the EU GDPR and have an agreed exception in the German Data Protection Regulation. - -### SEC-256: Erase personal data when all applicable retention periods have expired ### -SAP Enterprise OrientDB supports the deletion (erasure) of application data in classes using SQL deletion commands or API commands. After the data has been deleted, this operation cannot be undone. Applications must make use of these commands to implement deletion requirements. - -Retention periods, deletion of data without affecting application functionality (e.g. referential integrity) are dependent on the business context, application architecture, etc., and need to be managed by the application. The application needs to implement these rules using the SQL deletion commands or equivalent OrientDB APIs. - -Applications can implement blocking of data using SAP Enterprise OrientDB methods like record-based security and masking or separating the data using OrientDB SQL Predicate Security. - -Operational data: Deletion of specific records (e.g. all records of a specific person) does not apply to operational data. However, still this data is also subject to deletion/retention requirements. Those timelines usually apply to the complete data set (e.g. all logs older than x days need to be deleted). - -Backup: Following standard practice, deletion of individual personal data is not enforced in backups. Common practice is that deleted data will disappear from backups following typical backup-rotation mechanisms. Explicitly deleting personal data from backups is therefore outside the scope of SAP Enterprise OrientDB’s data protection approach and would need to be managed by the customer dependent on their backup and DPP requirements. - -Physical deletion: After data is deleted using, for example the SQL DELETE statement, the respective storage area is marked as free but is not immediately overwritten. The associated storage area will only be overwritten once new data is stored in the respective cluster. As SAP Enterprise OrientDB writes the page as a whole to the record cluster, the deleted, but not overwritten memory areas are also stored to disk in binary format. It is therefore feasible that fragments of the deleted data could under certain circumstances or for a certain period of time be reconstructed. Prerequisite is direct access to the database files in the file system as well as access to the encryption key in case the encryption-at-rest feature of SAP Enterprise OrientDB is used. - -An analysis has shown that other DB vendors face the same problem and that there are no solutions on the market to address the complete deletion of those remaining data-fragments (in literature referred to as “slack”). Completely deleting those remains is very difficult and dependent on other factors like the storage technology used. Initial recommendation is therefore to reduce such slack. SAP Enterprise OrientDB already has a method to reduce slack by making completely unused old pages unreadable when the encryption feature is used. - -Further extending physical deletion capabilities would depend on customer demand. - -### SEC-254 - SAP software shall log read access to sensitive personal data ### -Applications may store sensitive personal data in SAP Enterprise OrientDB. SAP Enterprise OrientDB provides an audit log that can track which user has accessed data records in SAP Enterprise OrientDB. - -With this mechanism, audit polices can be defined to log access to classes containing sensitive personal data. - -It is recommended for applications built on top of SAP Enterprise OrientDB to document clearly where sensitive information is stored so that customers, if required on SAP Enterprise OrientDB level, can define respective policies. - -This does not apply to operational data. - -### SEC-265 - SAP software shall log changes to personal data ### -Changes to the personal data stored in application data in SAP Enterprise OrientDB can be logged using SAP Enterprise OrientDB’s audit logging functionality. - -SAP Enterprise OrientDB provides the infrastructure to define customer-specific audit log policies which log change access to defined objects in the database (issued UPDATE, DELETE, … statements). - -Audit policies can be defined by the customer (administrator). Applications built on top of SAP Enterprise OrientDB should provide guidelines for customers on how to set-up appropriate log policies, for example by providing information on which classes contain relevant information. - -### General Log Requirements (valid for SEC-265, SEC-254) ### -SAP Enterprise OrientDB provides a common policy-based logging infrastructure that can be used by all applications running on SAP Enterprise OrientDB to log actions on data access as well as administrative or security related events in SAP Enterprise OrientDB. As a target for storing the log trail, SAP Enterprise OrientDB currently supports writing the information to the syslog infrastructure of the underlying operating system or a special log class within the System database (appropriately protected by authorization). - -Syslog integration allows customers to: - -- Implement physical segregation of duty by sending the log data to their existing log infrastructure, which means that the log data cannot be changed by database administrators -- Use their established log infrastructure and tools including the compliance rules already implemented in this infrastructure -- Use their own established tools for analyzing the log entries - -This approach is very well received by customers and meets their expectations on log handling. - -Logging into tables allows customers to: -- Store data within the database itself in specially protected classes -- Use standard SQL tooling for log analysis - -The log table is a specially protected system table. - -Log viewing, deletion, and retention have to be managed by the customer and cannot be provided by SAP Enterprise OrientDB. diff --git a/src/security/Server-Security.md b/src/security/Server-Security.md index 48df8f0f..e208e297 100644 --- a/src/security/Server-Security.md +++ b/src/security/Server-Security.md @@ -92,7 +92,7 @@ In the event that something happens and you drop the class `OUser` or the user `
    $  $ORIENTDB_HOME/bin/console.sh
 
-   OrientDB console v.X.X.X (build 0) www.orientdb.com
+   OrientDB console v.X.X.X (build 0) www.orientdb.dev
    Type 'HELP' to display all the commands supported.
    Installing extensions for GREMLIN language v.X.X.X
 
diff --git a/src/teleporter/Teleporter-Execution-Strategies.md b/src/teleporter/Teleporter-Execution-Strategies.md
deleted file mode 100644
index 7bdca9db..00000000
--- a/src/teleporter/Teleporter-Execution-Strategies.md
+++ /dev/null
@@ -1,61 +0,0 @@
-
-# Execution Strategies
-Teleporter provides two different import strategies:
-- **naive** strategy
-- **naive-aggregate** strategy
-
-Both strategies build a schema in OrientDB starting from the source DB schema: each table (known also as Entity) and each Relationship in the DB is inferred from these metadata, therefore if you didn't defined some constraints, such as foreign keys between the tables on which you usually perform join operations, you will lose this kind of info during the import process.  
-For example if foreign keys are missing, you will not have any edges in your final Graph Database.  
-You can overcome this limit by defining an [Import Configuration](Teleporter-Import-Configuration.md) that allows you to add new relationships or modify those already present in your source database schema.  
-Once built the OrientDB schema, the real import process begins.
-
-Now both strategies will be individually discussed below.
-
-## Naive Strategy
-This strategy follows a basic approach for the import. The source DB schema is directly translated in the OrientDB schema as follows:
-
-1. Each Entity in the source DB is converted into a Vertex Type.
-2. Each Relationship between two Entities in the source DB is converted into an Edge Type (remember, relationships in your DB schema are represented  by the foreign keys).
-
-Thus all records of each table are imported according to this "schemas-mapping": each pair of records on which it's possible to perform a join operation, will correspond to a pair of vertices connected by an edge of a specific Edge Type.
-
-####Example 1 - Without Join Table
-Source DB schema translation in OrientDB schema:      
-
-![](../images/teleporter-naive-strategy-schema1.png)   
-
-Correspondent records import:      
-
-![](../images/teleporter-strategies-example1.png)     
-
-####Example 2 - With Aggregable Join Table
-Source DB schema translation in OrientDB schema:      
-
-![](../images/teleporter-naive-strategy-schema2.png)     
-
-Starting from the following tables    
-
-![](../images/teleporter-strategies-example2-tables.png)       
-
-we will obtain the following graph:     
-
-![](../images/teleporter-strategies-example2-not-aggr.png)     
-
-## Naive-Aggregate Strategy
-Unlike the first strategy, this one performs aggregation on join tables of dimension equals to 2, that is to say those tables which map two tables together by referencing the primary keys of each data table through a foreign key. The join tables of dimension greater than 2 are ignored by the aggregation algorithm.
-Thus each candidate join table is converted into an appropriate edge, and each field not involved in any relationship with other tables (hence not involved in any foreign key in the source DB schema) is aggregated in the properties of the new built edge.
-
-Referring to the scenario of the last example is evident as even if the new DB doesn't reflect the original DB model, the aggregation leads to a great saving in terms of resources and avoids a substantial overhead. The OrientDB schema after the aggregation process comes out simpler, hence also the import result it is.    
-     
-####Example 3 - With Aggregable Join Table
-Source DB schema translation in OrientDB schema:       
-
-![](../images/teleporter-naive-aggr-strategy-schema3.png)    
-
-Through this strategy, starting from the same previous scenario      
-
-![](../images/teleporter-strategies-example2-tables.png)   
-
-this time we will obtain a less complex graph:      
-
-![](../images/teleporter-strategies-example2-aggr.png)
diff --git a/src/teleporter/Teleporter-Home.md b/src/teleporter/Teleporter-Home.md
deleted file mode 100644
index aa7b8715..00000000
--- a/src/teleporter/Teleporter-Home.md
+++ /dev/null
@@ -1,126 +0,0 @@
-
-# Teleporter
-**OrientDB Teleporter** is a tool that synchronizes a RDBMS to OrientDB database. You can use Teleporter to:
-- Import your existing RDBMS to OrientDB
-- Keep your OrientDB database synchronized with changes from the RDBMS. In this case the database on RDBMS remains the primary and the database on OrientDB a synchronized copy. [Synchronization](Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md) is one way, so all the changes in OrientDB database will not be propagated to the RDBMS
-
-Teleporter is fully compatible with several RDBMS that have a JDBC driver: we successfully tested Teleporter with Oracle, SQLServer, MySQL, PostgreSQL and HyperSQL. Teleporter manages all the necessary type conversions between the different DBMSs and imports all your data as Graph in OrientDB.
-
-**NOTE**: This feature is available both for the [OrientDB Enterprise Edition](http://orientdb.com/orientdb-enterprise) and the [OrientDB Community Edition](http://orientdb.com/download/). **But beware**: in **community edition** you can migrate your source relational database but **you cannot enjoy the synchronize feature**, only available in the enterprise edition.
-
-
-## How Teleporter works
-Teleporter looks for the specific DBMS meta-data in order to perform a logical inference of the source DB schema for the building of a corresponding graph model. Eventually the data importing phase is performed.
-
-Teleporter has a pluggable importing strategy. Two strategies are provided out of the box:
-- **naive** strategy, the simplest one
-- **naive-aggregate** strategy. It performs a "naive" import of the data source. The data source schema is translated semi-directly in a correspondent and coherent graph model using an aggregation policy on the junction tables of dimension equals to 2    
-     
-
-To learn more about the two different execution strategies [click here.](Teleporter-Execution-Strategies.md)
-
-## Usage
-Teleporter is a tool written in Java, but can be used as a tool thanks to the teleporter.sh script (or .bat on Windows).
-
-```
-./oteleporter.sh -jdriver  -jurl  -juser  
-                -jpasswd  -ourl  [-s ]
-                [-nr ] [-v ] 
-                ([-include ] | [-exclude ]) 
-                [-inheritance :] 
-                [-conf ]
-```
-
-### Arguments
-- **-jdriver** is the driver name of the DBMS from which you want to execute the import (it's not case sensitive)
-- **-jurl** is the JDBC URL giving the location of the source database to import
-- **-ourl** is the URL for the destination OrientDB graph database
-- **-juser (optional)** is the username to access the source database
-- **-jpasswd (optional)** is the password to access the source database
-- **-s (optional)** is the strategy adopted during the importing phase. If not specified naive-aggregate strategy is adopted. Possible values: 
- - **naive**: performs a "naive" import of the data source. The data source schema is translated semi-directly in a correspondent and coherent graph model
- - **naive-aggregate**: performs a "naive" import of the data source. The data source schema is translated semi-directly in a correspondent and coherent graph model using an aggregation policy on the junction tables of dimension equals to 2
-- **-nr (optional)** is the name of the resolver which transforms the names of all the elements of the source database
-  according to a specific convention (if not specified original convention is adopted). Possible values: 
- - **original**: maintains the original name convention
- - **java**: performs name transformations on all the elements of the data source according to the Java convention
-- **-v (optional)** is the level of verbosity printed to the output during the execution (if not specified INFO level will be adopted). Levels:
- - **0**: NO logging messages will be printed
- - **1**: DEBUG level logging messages
- - **2**: INFO level logging messages (default)
- - **3**: WARNING level logging messages
- - **4**: ERROR level logging messages
-- **-include (optional)** allows you to import only the listed tables
-- **-exclude (optional)** excludes the listed tables from the importing process
-- **-inheritance (optional)** executes the import taking advantage of OrientDB's polymorphism 
-- **-config** allows you to define a custom configuration for your importing job
-
-## Access Credentials
-By convention three users are always created by default each time a new database is built. Passwords are the same as the user name. Default users are:
-
-- `admin`, with default password "`admin`", has access to all functions without limitation.
-- `reader`, with default password "`reader`", is the classic read-only user. The reader can read any records but can't modify or delete them and has no access to internal information such as users and roles, themselves.
-- `writer`, with the default password "`writer`", is like the user reader but can also create, update, and delete records.
-
-For further informations about the Security of the OrientDB database [click here.](https://github.com/orientechnologies/orientdb-docs/blob/master/Database-Security.md)
-
-## Examples
-   
-### Importing "testdb" from PostgreSQL DBMS with default parameters
-
-Using plocal connection:
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/testdb
-```   
-Using remote connection:
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl remote:localhost/testdb
-```   
-
-
-With these parameters it will be performed an import according to the default settings:
-
-- strategy adopted: **naive-aggregate**
-- name resolver: **original name resolver**
-- level of verbosity: **INFO** (2nd level)
-
-### Importing "testdb" from PostgreSQL DBMS with customized optional parameters
-
-Using plocal connection:
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/testdb 
-                -s naive -nr java -v 1
-```             
-Using remote connection:
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl remote:localhost/testdb 
-                -s naive -nr java -v 1
-```  
-
-With these parameters it will be performed an import according to the chosen settings:
-
-- strategy adopted: **naive**
-- name resolver: **java name resolver**
-- level of verbosity: **DEBUG** (1st level)
-
-
-## Teleporter Execution
-Teleporter execution consists of 4 steps:     
-        
-1. **Source DB Schema Building:** the source database schema is built by querying the source DB metadata.      
-2. **Graph Model Building:** a correspondent and coherent Graph Model is built.       
-3. **OrientDB Schema Writing:** the OrientDB schema is written according to the Graph Model in memory.      
-4. **OrientDB importing:** importing data from source database to OrientDB.
-
-Thus the whole workflow is:
-
-![Whole Workflow](../images/teleporter-whole-workflow.png)
-
-
-Below is reported a Teleporter execution dump:             
-
-![Execution Dump](../images/teleporter-execution-dump.png)
diff --git a/src/teleporter/Teleporter-Import-Configuration.md b/src/teleporter/Teleporter-Import-Configuration.md
deleted file mode 100644
index 02bf4737..00000000
--- a/src/teleporter/Teleporter-Import-Configuration.md
+++ /dev/null
@@ -1,552 +0,0 @@
-
-# Import Configuration
-
-It's possible to specify an import configuration by writing down a **configuration file in JSON format** and passing its location to Teleporter through the argument `-conf`:
-
-
-```
-./oteleporter.sh -jdriver  -jurl  -juser  
-                -jpasswd  -ourl  [-s ]
-                [-nr ] [-v ] 
-                ([-include ] | [-exclude ]) 
-                [-inheritance :] 
-                [-conf ]
-
-
-```
-
-For example if you want enrich your migration from Postgresql with a configuration file `migration-config.json` located in the `/tmp` folder you can type:
-
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/testdb 
-                -conf /tmp/migration-config.json
-
-```
-
-After the first migration, the graph database will be built and the configuration you passed as argument to Teleporter **will be copied into the database** folder in a path like that:
-
-```
-$ORIENDB_HOME/databases/testdb/teleporter-config/migration-config.json
-```
-
-In the following executions the new configuration in your database will be processed automatically, making coherent and simpler the synchronization procedure. If you want change any setting you can modify directly that file.  
-In fact Teleporter, at execution time, **sequentially looks for**:
-
-1. the configuration file `migration-config.json` in the database directory **$ORIENDB_HOME/databases/testdb/teleporter-config/**
-2. if no config file will be found, then a **potential input config** will be considered 
-3. if no config file was passed as argument the **migration will be performed without any configuration**
-
-
-## Relationship configuration
-
-The configuration allows you to **manage the relationships of your database domain**.  
-To comprehend the importance of this feature we have to consider that Teleporter builds the schema in OrientDB and carries out the migration starting from the source DB schema: **Vertices and Edges are built starting from Entities (tables) and Relationships (foreign keys)** which are inferred from your database metadata.  
-Therefore if you didn't defined some constraints, such as foreign keys between the tables on which you usually perform join operations, you will lose this kind of info during the importing process.  
-To be clear **if no foreign keys are declared in the schema, you will not have any edges in your final Graph Database**.
-
-So if some constraints are not defined in your schema for performance reasons, submitting a configuration file is essential in order to obtain a complete graph model and perform a good and effective migration to OrientDB.
-
-You can do that by **enriching the basic mapping** of Teleporter between the **E-R model and the Graph Model** to customize your importing. You can add new relationships or modify info about relationships already defined in your database schema, interacting directly on the domains-mapping carried out by Teleporter.  
-Each Relationship expressed in your schema through a foreign key will be transformed into an Edge class in the graph model according to automatic choices that implicate:
-
-- the **name** of the Edge
-- the **direction** of the Edge
-- the **properties** of the Edge
-- the **type** of each property and potential constraints (mandatory, readOnly, notNull)
-
-So you can intervene in this mapping and make your personal choices.
-
-Let's start to analyse the syntax in order to examine the two main actions you can manage during the migration:
-
-- **adding relationships** not declared in your schema
-- **modifying relationships** present in your schema
-
-
-###Adding Relationships
-
-The JSON syntax of the **configuration file** will appear very intuitive if you bear in mind that it **reflects the mapping between the E-R model and the Graph Model**.  
-Let's consider the configuration below:
-
-```
-{
-	"edges": [{
-		"WorksAtProject": {
-			"mapping": {
-				"fromTable": "EMPLOYEE",
-				"fromColumns": ["PROJECT"],
-				"toTable": "PROJECT",
-				"toColumns": ["ID"],
-				"direction": "direct"
-			},
-			"properties": {
-				"updatedOn": {
-					"type": "DATE",
-					"mandatory": true,
-					"readOnly": false,
-					"notNull": false
-				}
-			}
-		}
-	}]
-}
-```
-
-We are defining all the edges we want to map through the key `edges` which contains an array of elements. Each element in the array is an **Edge class definition containing the mapping with a Relationship** in the relational model.  
-Let's suppose we have two entities "Employee" and "Project" in our database with a logical Relationship between them: starting from an Employee you can navigate the Projects he's working at.
-
-
-```
-		  EMPLOYEE                                                     PROJECT
-	      (Foreign Table)                                              (Parent Table)
- ________________________________________________                _____________________________________
-|       |              |             |           |              |       |         |                   |
-|  ID   |  FIRST_NAME  |  LAST_NAME  |  PROJECT  |              |  ID   |  TITLE  |  PROJECT_MANAGER  |
-|_______|______________|_____________|___________|              |_______|_________|___________________|
-|       |              |             |           |              |       |         |                   |
-|       |              |             |           |              |       |         |                   |
-|_______|______________|_____________|___________|              |_______|_________|___________________|
-
-
-```
-
-Without a foreign key definition we lose this Relationship and we obtain a graph model without the correspondent Edge class; consequently no edges between vertices of class "Employee" and vertices of class "Project" will be present.
-
-
-
-Through this mapping we can **overcome the lack of a foreign key** and recover the lost info.  
-Let's take a look closer to the **edge mapping**:
-
-```
-{
-	"WorksAtProject": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "direct"
-		},
-		"properties": {
-			"updatedOn": {
-				"type": "DATE",
-				"mandatory": true,
-				"readOnly": false,
-				"notNull": false
-			}
-		}
-	}
-}
-```
-
-We are mapping the Edge class "WorksAtProject" with a Relationship with cardinality 1-N between "Employee" and "Project" on the basis of 4 essential values:
-
-- **fromTable**: the foreign entity that imports the primary key of the parent table. In the example it's the "EMPLOYEE" table.        
-- **fromColumns**: the attributes involved in the foreign key. In the example it's the "PROJECT" column in the "EMPLOYEE" table.
-- **toTable**: the parent entity whose primary key is imported by the foreign table. In the example it's the "PROJECT" table. 
-- **toColumns**: the attributes involved in the primary key imported. In the example it's the "ID" column in the "PROJECT" table.
-
-As this Relationship is not declared in your database, it will be added and the correspondent Edge will be built according to the other info you can set.
-
-With the key `direction` you can express the direction of the edges between the vertices. You can set this argument with two different values:
-
-- **direct**: the edge will reflect the direction of the relationship.
-- **inverse**: the edge will have opposite direction respect to the relationship.
-
-So if we define in the configuration file a relationship as follows:
-
-```
-"WorksAtProject": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "direct"
-		},
- 		...
-}
-```
-a new Relationship will be added
-
-```
-EMPLOYEE -----------------------------> PROJECT
-	   fromTable    =  EMPOYEE
-	   toTable      =  PROJECT
-	   fromColumns  =  [PROJECT]
-	   TOColumns    =  [ID]
-```
-
-and choosing "direct" direction, or don't declaring anything about that, we will obtain an Edge like that:
-
-```
-Employee ----[WorksAtProject]----> Project
-```
-
-Suppose we want have the **inverse logical navigation** in the graph database that we could not express in the relational model.  
-Here is the configuration we must use:
-
-```
-		"HasCommittedEmployee": {
-			"mapping": {
-				"fromTable": "EMPLOYEE",
-				"fromColumns": ["PROJECT"],
-				"toTable": "PROJECT",
-				"toColumns": ["ID"],
-				"direction": "inverse"
-			},
-			...
-		}
-```
-
-In this case the **same relationship** of the previous example will be built
-
-```
-EMPLOYEE -----------------------------> PROJECT
-	   fromTable    =  EMPOYEE
-	   toTable      =  PROJECT
-	   fromColumns  =  [PROJECT]
-	   TOColumns    =  [ID]
-```
-
-but the correspondent **Edge will have inverse direction**
-
-```
-Employee <----[???]----- Project
-```
-
-and for this reason we have changed the name of the Edge in "HasCommittedEmployee" so that the name of the class makes sense:
-
-```
-Employee <----[HasCommittedEmployee]----- Project
-```
-
-**Remember: direction refers to edges in the graph, not to relationships in your database.** Relationships must be always coherent with the structure of the tables.
-
-As you can see it's possible to **define additional properties** for the final edge:
-
-```
-{
-	"WorksAtProject": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "direct"
-		},
-		"properties": {
-			"updatedOn": {
-				"type": "DATE",
-				"mandatory": true,
-				"readOnly": false,
-				"notNull": false
-			}
-		}
-	}
-}
-
-```
-
-In the example above we added a property named `updatedOn` of type OType.DATE to our Edge class.  
-For each new defined property you can declare the following values:
-
-- **type**: it's the OrientDB type. This value is mandatory, if not declared the property is not added to the Edge.
-- **mandatory**: adds the mandatory constraint to the property and applies to it the specified value (true or false).
-- **readOnly**: adds the readOnly constraint to the property and applies to it the specified value (true or false). 
-- **notNull**: adds the notNull constraint to the property and applies to it the specified value (true or false). 
-
-By omitting a constraint or setting it to false you will have the same result: the constraint is not considered for the specific property.
-
-
-###Modifying existent Relationships
-
-If the relationship you are mapping is already present in your database, it will be overridden with the parameters you defined in the configuration.  
-In this way you can **change the name and the direction of the Edge class correspondent to a relationship already present** in the database schema.  
-Let's suppose we have a foreign key between "Employee" and "Project":
-
-
-```
-		  EMPLOYEE                                                          PROJECT
-	      (Foreign Table)                                                   (Parent Table)
- ________________________________________________                    _____________________________________
-|       |              |             |           |        R         |       |         |                   |
-|  ID   |  FIRST_NAME  |  LAST_NAME  |  PROJECT  |   ----------->   |  ID   |  TITLE  |  PROJECT_MANAGER  |
-|_______|______________|_____________|___________|                  |_______|_________|___________________|
-|       |              |             |           |                  |       |         |                   |
-|       |              |             |           |                  |       |         |                   |
-|_______|______________|_____________|___________|                  |_______|_________|___________________|
-
-
-```
-
-In this case through the automated mapping of Teleporter we will obtain the following graph model:
-
-
-
-```
-Employee ----[HasProject]----> Project
-```
-
-In case we want reach a different result from the migration we can **change the attributes of the relationship** declaring them in the mapping.  
-Teleporter will **recognize the relationship** you want override on the basis of the values:
-
-- **fromTable**        
-- **fromColumns**
-- **toTable**
-- **toColumns**
-
-**These values must to be coherent with the direction of the foreign key representing the above-mentioned Relationship. Otherwise Teleporter will interpret the relationship as a new one**.  
-So if for example we want override the Edge built starting from the relationship
-
-```
-EMPLOYEE -----------------------------> PROJECT
-	   fromTable    =  EMPOYEE
-	   toTable      =  PROJECT
-	   fromColumns  =  [PROJECT]
-	   TOColumns    =  [ID]
-```
-
-but we define the mapping as follows:
-
-```
-	"WorksAtProject": {
-		"mapping": {
-			"fromTable": "PROJECT",
-			"fromColumns": ["ID"],
-			"toTable": "EMPLOYEE",
-			"toColumns": ["PROJECT"],
-			"direction": "direct"
-		},
-		...
-	}
-```
-
-as result we will obtain the adding of a second relationship with inverted direction between the two tables:
-
-```
-PROJECT -----------------------------> EMPLOYEE
-	   fromTable    =  PROJECT
-	   toTable      =  EMPLOYEE
-	   fromColumns  =  [ID]
-	   TOColumns    =  [PROJECT]
-```
-
-So in the graph model we will have two Edge classes (the second one is totally wrong):
-
-```
-Employee ----[HasProject]-------> Project
-Employee <---[WorksAtProject]---- Project
-```
-
-So remember to **be coherent with the underlying physical schema** during the mapping definition:
-
-Mapping:
-```
-	"WorksAtProject": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "direct"
-		},
-		...
-	}
-```
-
-Relationship in the E-R model:
-```
-EMPLOYEE -----------------------------> PROJECT
-	   fromTable    =  EMPOYEE
-	   toTable      =  PROJECT
-	   fromColumns  =  [PROJECT]
-	   TOColumns    =  [ID]
-```
-
-Resulting Graph Model:
-```
-Employee ----[WorksAtProject]-------> Project
-```
-
-If you want **change the direction of the Edge** you can exploit the option `direction` as described in the previous paragraph:
-
-```
-	"HasCommittedEmployee": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "inverse"
-		}
-	}
-```
-
-Relationship in the E-R model:
-
-```
-EMPLOYEE -----------------------------> PROJECT
-	   fromTable    =  EMPOYEE
-	   toTable      =  PROJECT
-	   fromColumns  =  [PROJECT]
-	   TOColumns    =  [ID]
-```
-
-Resulting Graph Model:
-
-```
-Project ----[HasCommittedEmployee]-------> Employee
-```
-
-You can also **add properties** to the Edge class using the syntax already defined in the previous paragraph:
-
-```
-{
-	"WorksAtProject": {
-		"mapping": {
-			"fromTable": "EMPLOYEE",
-			"fromColumns": ["PROJECT"],
-			"toTable": "PROJECT",
-			"toColumns": ["ID"],
-			"direction": "direct"
-		},
-		"properties": {
-			"updatedOn": {
-				"type": "DATE",
-				"mandatory": true,
-				"readOnly": false,
-				"notNull": false
-			}
-		}
-	}
-}
-```
-
-In the example above we added a properties with name "updatedOn" of type OType.DATE to our Edge class and we set only the constraint mandatory.
-
-
-###Configuring aggregation strategy
-
-Teleporter offers two importing strategies as described in the [Execution strategies](Teleporter-Execution-Strategies.md) page:
-
-- **naive** strategy: no aggregations are executed
-- **naive-aggregate** strategy: aggregations can be executed
-
-The aggregation is performed on join tables of dimension equals to 2 (other join tables are ignored), that is to say those tables which allow joins only between two tables.  
-Each candidate join table is converted into an appropriate Edge class, and each field not involved in any relationship with other tables (hence not involved in any foreign key in the source database schema) is aggregated in the properties of the new built Edge.
-
-If no foreign keys are defined for a specific join table the aggregation will not be performed and no edges will represent the N-N relationship.  
-Through the configuration you can overcome this limit and kill two birds with one stone: in fact you can **declare the two relationships with the external tables and define the mapping with an Aggregator-Edge in one shot**.
-
-Let's suppose we have a N-N relationship between two tables "Film" and "Actor" without foreign keys defined in the schema.
-
-```
-                 ACTOR                                    ACTOR_FILM                                FILM
-                                                         (Join Table)
- ____________________________________        ____________________________________        ______________________________
-|       |              |             |      |            |           |           |      |       |         |            |
-|  ID   |  FIRST_NAME  |  LAST_NAME  |      |  ACTOR_ID  |  FILM_ID  |  PAYMENT  |      |  ID   |  TITLE  |  CATEGORY  |   
-|_______|______________|_____________|      |____________|___________|___________|      |_______|_________|____________|
-|       |              |             |      |            |           |           |      |       |         |            |
-|       |              |             |      |            |           |           |      |       |         |            |
-|_______|______________|_____________|      |____________|___________|___________|      |_______|_________|____________|
-
-
-```
-
-We want obtain an aggregated structure as follows:
-
-```
-Actor ----[Performs]-------> Film
-```
-
-In this case we have to use this syntax:
-
-```
-{
-	"Performs": {
-		"mapping": {
-			"fromTable": "ACTOR",
-			"fromColumns": ["ID"],
-			"toTable": "FILM",
-			"toColumns": ["ID"],
-			"joinTable": {
-				"tableName": "ACTOR_FILM",
-				"fromColumns": ["ACTOR_ID"],
-				"toColumns": ["FILM_ID"]
-			},
-			"direction": "direct"
-		},
-		"properties": {
-		 ...
-		}
-	}
-}
-```
-
-We can implicitly define the **direction** of the Edge by choosing:
-
-- the **from-table**
-- the **to-table**
-
-In our example we decided to express the relationship between Actors and Films through a "Performs" Edge starting from Actor vertices and ending into Film vertices. 
-
-Once again we can exploit the semantics of the `direction` key to reverse the final edge:
-
-``` 
-{
-	"HasActor": {
-		"mapping": {
-			"fromTable": "ACTOR",
-			"fromColumns": ["ID"],
-			"toTable": "FILM",
-			"toColumns": ["ID"],
-			"joinTable": {
-				"tableName": "ACTOR_FILM",
-				"fromColumns": ["ACTOR_ID"],
-				"toColumns": ["FILM_ID"]
-			},
-			"direction": "inverse"
-		},
-		"properties": {
-
-		}
-	}
-}
-```
-
-In this way we can have the following schema:
-
-
-```
-Film ------[HasActor]------> Actor
-```	
-
-When you are taking advantage of this aggregating feature you have to define an **additional field** `join table` as shown in the example.
-
-```
-	"joinTable": {
-		"tableName": "ACTOR_FILM",
-		"fromColumns": ["ACTOR_ID"],
-		"toColumns": ["FILM_ID"]
-	}
-```
-
-In this field you have to specify:
-
-- **tableName**: the name of the join table which will be aggregated into the declared Edge.
-- **fromColumns**: the columns of the join table involved in the relationship with the "from-table".
-- **toColumns**: the columns of the join table involved in the relationship with the "to-table".
-
-**This info is essential** for Teleporter to infer all the single relationships between the records of the two external tables "ACTOR" and "FILM" and to build all the edges coherently, so if you don't declare any of these fields an **exception** will be thrown.
-
-Remember that this syntax offers a shortcut to configure relationships and aggregation choices, thus **you can use it only when you are executing the aggregation strategy**.  
-Performing your migration with a naive strategy using this syntax makes no sense, and here again an exception will be thrown.
-
-
-
-
-
-
-
diff --git a/src/teleporter/Teleporter-Import-Filters.md b/src/teleporter/Teleporter-Import-Filters.md
deleted file mode 100644
index 2138af1a..00000000
--- a/src/teleporter/Teleporter-Import-Filters.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-# Import Filters
-
-It's possible to apply filters to the import process through the **include** and **exclude** arguments.     
-With the **include** argument you'll import the listed tables according to the following syntax:
-
-```
--include ,,...,
-
-```
-
-
-With the **exclude** argument you'll import all the tables except for the listed ones  according to the following syntax:
-
-```
--exclude ,,...,
-
-```
-            
-For both arguments recognizing tables is **case sensitive.**         
-These arguments are **mutually exclusive,** thus you can use just one of them during the same execution.
-
-####Example 1: include usage 
-
-Importing only the "actor" and "film" tables from the source DB.
-
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/dvdrental
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/dvdrental
-                -include actor,film
-```
-
-####Example 2: exclude usage 
-
-Importing all tables from the source DB except for the "actor" table.
-
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/dvdrental
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/dvdrental
-                -exclude actor
-```
diff --git a/src/teleporter/Teleporter-Index.md b/src/teleporter/Teleporter-Index.md
deleted file mode 100644
index 5e22fe48..00000000
--- a/src/teleporter/Teleporter-Index.md
+++ /dev/null
@@ -1,15 +0,0 @@
-#Teleporter
-
-## Quick Navigation
-
-### Index of contents
-- [What is Teleporter - Quick start](Teleporter-Home.md)
-- [Installation and configuration](Teleporter-Installation-and-Configuration.md)
-- [Execution strategies](Teleporter-Execution-Strategies.md)
-- [Sequential executions and One-Way Synchronizer](Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md)
-- [Import filters](Teleporter-Import-Filters.md)
-- [Inheritance](Teleporter-Inheritance.md)
-  - [Single Table Inheritance](Teleporter-Single-Table-Inheritance.md)
-  - [Table Per Class Inheritance](Teleporter-Table-Per-Class-Inheritance.md)
-  - [Table Per Concrete Class Inheritance](Teleporter-Table-Per-Concrete-Class-Inheritance.md)
-- [Import Configuration](Teleporter-Import-Configuration.md)
diff --git a/src/teleporter/Teleporter-Inheritance.md b/src/teleporter/Teleporter-Inheritance.md
deleted file mode 100644
index dbc18ef9..00000000
--- a/src/teleporter/Teleporter-Inheritance.md
+++ /dev/null
@@ -1,47 +0,0 @@
-
-# Inheritance
-Teleporter allows you to take advantage of OrientDB's polymorphism. In fact you can enrich the import phase via an ORM file which describes the inheritance relationships being between different tables (or Entities) of your source DB. 
-
-At the moment **Hibernate's syntax** is supported, and you can exploit this feature even if you don't use the Hibernate framework, which can automatically build the requested file for you. In fact the ORM file is simply interpreted as a "mapping file" between Relational and Object-Oriented models. Thus you can also write the file by yourself and give it as input to Teleporter, this is all you need.
-
-## Inheritance Patterns in Relational Databases
-Because relational databases have no concept of inheritance, there isn't a standard way of implementing inheritance in a database, so the hardest part of persisting inheritance is choosing how to represent the inheritance in the database. There are three main patterns commonly used:
-- [**Single Table Inheritance**](Teleporter-Single-Table-Inheritance.md)
-- [**Table Per Class Inheritance**](Teleporter-Table-Per-Class-Inheritance.md)
-- [**Table Per Concrete Class Inheritance**](Teleporter-Table-Per-Concrete-Class-Inheritance.md)
-
-Teleporter can faithfully reproduce all inheritance relationships present in your source DB using the argument **'-inheritance'** and the following the syntax:
-```
-./oteleporter.sh -jdriver  -jurl  -juser  
-                -jpasswd  -ourl  -s 
-                -inheritance hibernate:
-```
-
-Example:
-```
-./oteleporter.sh -jdriver  -jurl  -juser  
-                -jpasswd  -ourl  -s 
-                -inheritance hibernate:/home/orientdb-user/mapping.xml
-```
-
-The resulting hierarchy in OrientDB is the same for each adopted pattern, as shown in the specific pattern descriptions.
-
-## Hibernate Syntax
-
-The mapping file is an XML document having \ as the root element which contains all the  elements.
-Now we analyze some details about the Hibernate syntax used for the mapping file definition:
-
-- The **\** elements are used to define the correspondence between Java classes and the database tables. The **name** attribute of the class element specifies the Java class name and the **table** attribute specifies the database table name.
-- The **\** element is an optional element which can contain a class description.
-- The **\** element maps the unique ID attribute of the Java class to the primary key of the  correspondent database table. This element can have a **name** attribute and a **column** attribute  which manage the correspondence between the Object Model and the Relational Model as previously described: here the column attribute refers to the column in the table corresponding to that name. The **type** attribute holds the hibernate mapping type, this mapping types will convert from Java to SQL data type. If you write this file by yourself you should know that this element with its three attributes are superfluous for Teleporter.
-- The **\** element within the **id** element is used to automatically generate the primary key values. Also this element is superfluous for Teleport.
-- The **\** element maps a Java class property to a column in the database table. The **name** attribute and the **column** have the same role in the Object and the Relational models mapping. The **type** attribute holds the hibernate mapping type.
-
-There are other attributes and elements available among which:
-
-- **\** element, used in the Single Table Inheritance pattern.
-- **\** with a nested **\** element, used in the Table Per Class Inheritance pattern.
-- **\** element, used in the Table Per Class Inheritance pattern.
-- **\** element, used in the Table Per Concrete Class Inheritance pattern.
-
-Their usage will be explained specifically in the description of each individual pattern.
diff --git a/src/teleporter/Teleporter-Installation-and-Configuration.md b/src/teleporter/Teleporter-Installation-and-Configuration.md
deleted file mode 100644
index 1deccc12..00000000
--- a/src/teleporter/Teleporter-Installation-and-Configuration.md
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# Installation and Configuration
-
-## Installation
-
-Teleporter is out-of-the-box both in Community and Enterprise Edition, so you don't need any configuration or modification.
-**But beware**: in **Community Edition** you can migrate your source relational database but **you cannot enjoy the synchronize feature**, only available in the **Enterprise Edition**.
-
-You can run the tool through the script as described in the [Home page](Teleporter-Home.md) or just execute it via OrientDB Studio as described [here.](../studio/backups-imports-exports/Studio-Teleporter.md)
-
-## Driver Configuration.
-
-### Automatic Driver Configuration
-Teleporter provides an automaic driver configuration: when the application starts, it looks for the required driver. If the driver is not found the application will download it and it will automatically configure the classpath, not delegating anything to the end user.   
-So when you run Teleporter you just have to indicate the name of the DBMS you want to connect. Teleporter is compatible with Oracle, MySQL, PostgreSQL and HyperSQL products, thus you have to type one of the following parameters **(not case sensitive)**:
-
-- **Oracle**
-- **SQLServer**
-- **MySQL**
-- **PostgreSQL**
-- **HyperSQL**
-
-Teleporter will search for the correspondent driver in the $ORIENTDB_HOME/lib folder and if it's not present, it will download the latest available driver version. If a driver is already present in the folder, then it will be used for the connection to the source DB.
-Therefore if you want use a new driver version, you just have to delete the older version and run Teleporter which will download and configure for you the latest available version.
-
-```
-./oteleporter.sh -jdriver postgresql -jurl jdbc:postgresql://localhost:5432/testdb 
-                -juser username -jpasswd password -ourl plocal:$ORIENTDB_HOME/databases/testdb 
-                -s naive -nr java -v 2
-``` 
-
-### Manual Driver configuration
-It's possible to perform a manual configuration downloading own favourite driver version and properly defining the classpath in the application. 
-Below are reported the last driver tested versions with some useful information for download, configuration and use.     
-       
-| Driver     | Last Tested Version |  Path pattern | Path Example | Link for download |
-|------------|---------------------|--------------|--------------|-------------------|
-| Oracle     | 12c | jdbc:oracle:thin:@HOST:PORT:SID | jdbc:oracle:thin:@localhost:1521:orcl | http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html |
-| SQLServer  | SQLServer 2014 | jdbc:sqlserver://HOST:PORT;databaseName=DB | jdbc:sqlserver://localhost:1433;databaseName=testdb; **(\*)**| http://www.java2s.com/Code/JarDownload/sqljdbc4/sqljdbc4-2.0.jar.zip |
-| MySQL      | 5.1.35   | jdbc:mysql://HOST:PORT/DB | jdbc:mysql://localhost:3306/testdb | http://dev.mysql.com/downloads/connector/j/ |
-| PostgreSQL | 9.4-1201 | jdbc:postgresql://HOST:PORT/DB | jdbc:postgresql://localhost:5432/testdb | https://jdbc.postgresql.org/download.html |
-| HyperSQL   | 2.3.2 | jdbc:hsqldb:hsql://HOST:PORT/DB OR jdbc:hsqldb:file:FILEPATH | jdbc:hsqldb:hsql://localhost:9500/testdb OR jdbc:hsqldb:file:testdb | http://central.maven.org/maven2/org/hsqldb/hsqldb/2.3.3/hsqldb-2.3.3.jar |
-
-**(\*)**  If the source database contains spaces in the name you have to use a URL like this:
-
-“Source DB” →  -jurl “jdbc:sqlserver://localhost:1433;databaseName={Source DB};”
diff --git a/src/teleporter/Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md b/src/teleporter/Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md
deleted file mode 100644
index 8eb94a12..00000000
--- a/src/teleporter/Teleporter-Sequential-Executions-and-One-Way-Synchronizer.md
+++ /dev/null
@@ -1,31 +0,0 @@
-
-# Sequential Executions and One-Way Synchronizer
-Teleporter is conceived to support many sequential executions from the same source DB to the same graph DB of OrientDB, in this way you can:
-
-- **personalize your import,** combining the different strategies and settings by including or excluding the chosen tables and by running Teleport more times in order to obtain a more complex and customized import strategy
-- **use it as a one-way synchronizer** and maintain a copy of your DB: all the changes applied to the source DB (primary DB) are propagated to the imported graph DB, but not vice versa.
-
-A sample migration scenario is reported below:
-
-![Migration Scenario1](../images/teleporter-migration1.png)
-![Migration Scenario2](../images/teleporter-migration2.png)
-
-##Synchronization policy
-Teleporter propagates the applied changes of the source DB both for the schema and for the records following the policy described below:       
-
-**1. SCHEMA SYNCHRONIZATION (Full Synchronization)**      
-
-| SOURCE DB SCHEMA |         | TARGET ORIENTDB SCHEMA | SYNCH |
-|------------------|---------|------------------------|-------|       
-| Add Operation    |   -->   | Add Operation          |  YES  |  
-| Delete Operation |   -->   | Delete Operation       |  YES  |
-| Update Operation |   -->   | Update Operation       |  YES  |    
-****
-**2. RECORDS SYNCHRONIZATION (Delete-less Synchronization)**   
-
-| SOURCE DB        |         | TARGET ORIENTDB GRAPHDB | SYNCH |
-|------------------|---------|-------------------------|-------|        
-| Add Operation    |   -->   | Add Operation           |  YES  |       
-| Delete Operation |   -->   | No Operation            |  NO  |
-| Update Operation |   -->   | Update Operation        |  YES  |   
-
diff --git a/src/teleporter/Teleporter-Single-Table-Inheritance.md b/src/teleporter/Teleporter-Single-Table-Inheritance.md
deleted file mode 100644
index a31b78da..00000000
--- a/src/teleporter/Teleporter-Single-Table-Inheritance.md
+++ /dev/null
@@ -1,49 +0,0 @@
-
-# Single Table Inheritance
-
-Single Table strategy is the simplest and typically the best performing solution. By this inheritance strategy, we can map the whole hierarchy through a single table. The table will have a column for every attribute of every class in the hierarchy and an extra column (also known as **discriminator** column) is created in the table to identify the class.    
-
-## Example
-     
-Now suppose you want to map the whole hierarchy given below into a coherent relational database schema. The **Employee** class is a superclass both for **Regular_Employee** and **Contract_Employee** classes. The **type** attribute acts as discriminator column.  
-The application of the above described pattern leads to the DB schema shown in the following diagram:       
-
-![](../images/teleporter-inheritance-single-table.png)       
-
-The correspondent mapping file for this hierarchy should be:
-```
-  
-
-
-
-	
-		
-			
-		
-
-		
-		
-
-		
-			
-			
-		
-
-		
-			
-			
-		
-	
-  
-```     
-
-Taking advantage of this inheritance-feature on the proposed model above, you will get the following schema in OrientDB:      
-
-![](../images/teleporter-inheritance-orientdb-schema.png)    
-
-If you deal with a multi-level inheritance relationships in the DB, you have to represent them in the ORM file by recursively nesting each definition according to the hierarchical dependencies being between the Entities of the model.
diff --git a/src/teleporter/Teleporter-Table-Per-Class-Inheritance.md b/src/teleporter/Teleporter-Table-Per-Class-Inheritance.md
deleted file mode 100644
index f148d93c..00000000
--- a/src/teleporter/Teleporter-Table-Per-Class-Inheritance.md
+++ /dev/null
@@ -1,85 +0,0 @@
-
-# Table Per Class Inheritance
-Table Per Class strategy is the most logical inheritance solution because it mirrors the object model in the data model. In this pattern a table is defined for each class in the inheritance hierarchy to store only the local attributes of that class. 
-All classes in the hierarchy must share the same id attribute.  
-
-Some JPA providers support Table Per Class Inheritance with or without a discriminator column, some required the discriminator column, and some don't support the discriminator column. This pattern doesn't seem to be fully standardized yet. On Hibernate a discriminator column is supported but not required.
-     
-## Example
-
-Now suppose you want to map the whole hierarchy given below into a coherent relational database schema. The **Employee** class is a superclass both for **Regular_Employee** and **Contract_Employee** classes.    
-The application of the above described pattern leads to the DB schema shown in the following diagram:  
-
-![](../images/teleporter-inheritance-table-class.png)       
-
-There are two equivalent mapping file to represent this hierarchy:     
-1.
-```
-  
-
-
-
-	
-		
-			
-		
-
-		
-
-		
-			
-			
-			
-		
-
-		
-			
-			
-			
-		
-	
-      
-```     
-2.
-```
-  
-
-
-
-	
-		
-			
-		
-        
-		
-
-		
-			
-				
-				
-				
-			
-		
-
-		
-			
-				
-				
-				
-			
-		
-	
-  
-```     
-
-Taking advantage of this inheritance-feature on the proposed model above, you will get the following schema in OrientDB:      
-
-![](../images/teleporter-inheritance-orientdb-schema.png)     
-
-If you deal with a multi-level inheritance relationships in the DB, you have to represent them in the ORM file by recursively nesting each definition according to the hierarchical dependencies being between the Entities of the model.
diff --git a/src/teleporter/Teleporter-Table-Per-Concrete-Class-Inheritance.md b/src/teleporter/Teleporter-Table-Per-Concrete-Class-Inheritance.md
deleted file mode 100644
index 99f014ef..00000000
--- a/src/teleporter/Teleporter-Table-Per-Concrete-Class-Inheritance.md
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# Table Per Concrete Class Inheritance
-In Table Per Concrete Class strategy a table is defined for each concrete class in the inheritance hierarchy to store all the attributes of that class and all of its superclasses. This strategy is optional in several ORM technologies (e.g. JPA), and querying root or branch classes can be very difficult and inefficient.      
-      
-## Example
-      
-Now suppose you want to map the whole hierarchy given below into a coherent relational database schema. The **Employee** class is a superclass both for **Regular_Employee** and **Contract_Employee** classes.    
-The application of the above described pattern leads to the DB schema shown in the following diagram:    
-
-![](../images/teleporter-inheritance-table-concrete-class.png)       
-
-The correspondent mapping file for this hierarchy should be:   
-```
-  
-
-
-
-	
-		
-			
-		
-
-		
-
-		
-			
-			
-		
-
-		
-			
-			
-		
-	
-      
-```     
-
-Taking advantage of this inheritance-feature on the proposed model above, you will get the following schema in OrientDB:      
-
-![](../images/teleporter-inheritance-orientdb-schema.png)     
-
-If you deal with a multi-level inheritance relationships in the DB, you have to represent them in the ORM file by recursively nesting each definition according to the hierarchical dependencies being between the Entities of the model.
diff --git a/src/tinkerpop3/OrientDB-TinkerPop3.md b/src/tinkerpop3/OrientDB-TinkerPop3.md
index e6e738cf..740be793 100644
--- a/src/tinkerpop3/OrientDB-TinkerPop3.md
+++ b/src/tinkerpop3/OrientDB-TinkerPop3.md
@@ -21,7 +21,7 @@ The OrientDB TinkerPop development happens [here](https://github.com/orientechno
 
 ## Installation
 
-Since TinkerPop stack has been removed as a dependency from the OrientDB Community Edition, starting with version 3.0 it will be available for [download](http://orientdb.com/download) as an Apache TinkerPop 3 enabled edition of OrientDB based on the Community Edition.
+Since TinkerPop stack has been removed as a dependency from the OrientDB Community Edition, starting with version 3.0 it will be available for [download](http://orientdb.dev/download) as an Apache TinkerPop 3 enabled edition of OrientDB based on the Community Edition.
 
 It contains all the features of the OrientDB Community Edition plus the integration with the Tinkerpop stack:
 
@@ -386,7 +386,7 @@ There are two ways to use OrientDB inside the Gremlin Server
 
 ### OrientDB-TP3
 
-Download the latest version of OrientDB-TP3 [here](https://orientdb.com/download-2/).
+Download the latest version of OrientDB-TP3 [here](https://orientdb.dev/download-2/).
 and start OrientDB to automatically start the embedded Gremlin Server.
 The configuration of the Gremlin Server is in `$ORIENTDB_HOME/config`.
 
diff --git a/theme/book.js b/theme/book.js
new file mode 100644
index 00000000..62d7c4cc
--- /dev/null
+++ b/theme/book.js
@@ -0,0 +1,843 @@
+'use strict';
+
+/* global default_theme, default_dark_theme, default_light_theme, hljs, ClipboardJS */
+
+// Fix back button cache problem
+window.onunload = function() { };
+
+// Global variable, shared between modules
+function playground_text(playground, hidden = true) {
+    const code_block = playground.querySelector('code');
+
+    if (window.ace && code_block.classList.contains('editable')) {
+        const editor = window.ace.edit(code_block);
+        return editor.getValue();
+    } else if (hidden) {
+        return code_block.textContent;
+    } else {
+        return code_block.innerText;
+    }
+}
+
+(function codeSnippets() {
+    function fetch_with_timeout(url, options, timeout = 6000) {
+        return Promise.race([
+            fetch(url, options),
+            new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), timeout)),
+        ]);
+    }
+
+    const playgrounds = Array.from(document.querySelectorAll('.playground'));
+    if (playgrounds.length > 0) {
+        fetch_with_timeout('https://play.rust-lang.org/meta/crates', {
+            headers: {
+                'Content-Type': 'application/json',
+            },
+            method: 'POST',
+            mode: 'cors',
+        })
+            .then(response => response.json())
+            .then(response => {
+            // get list of crates available in the rust playground
+                const playground_crates = response.crates.map(item => item['id']);
+                playgrounds.forEach(block => handle_crate_list_update(block, playground_crates));
+            });
+    }
+
+    function handle_crate_list_update(playground_block, playground_crates) {
+        // update the play buttons after receiving the response
+        update_play_button(playground_block, playground_crates);
+
+        // and install on change listener to dynamically update ACE editors
+        if (window.ace) {
+            const code_block = playground_block.querySelector('code');
+            if (code_block.classList.contains('editable')) {
+                const editor = window.ace.edit(code_block);
+                editor.addEventListener('change', () => {
+                    update_play_button(playground_block, playground_crates);
+                });
+                // add Ctrl-Enter command to execute rust code
+                editor.commands.addCommand({
+                    name: 'run',
+                    bindKey: {
+                        win: 'Ctrl-Enter',
+                        mac: 'Ctrl-Enter',
+                    },
+                    exec: _editor => run_rust_code(playground_block),
+                });
+            }
+        }
+    }
+
+    // updates the visibility of play button based on `no_run` class and
+    // used crates vs ones available on https://play.rust-lang.org
+    function update_play_button(pre_block, playground_crates) {
+        const play_button = pre_block.querySelector('.play-button');
+
+        // skip if code is `no_run`
+        if (pre_block.querySelector('code').classList.contains('no_run')) {
+            play_button.classList.add('hidden');
+            return;
+        }
+
+        // get list of `extern crate`'s from snippet
+        const txt = playground_text(pre_block);
+        const re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g;
+        const snippet_crates = [];
+        let item;
+        while (item = re.exec(txt)) {
+            snippet_crates.push(item[1]);
+        }
+
+        // check if all used crates are available on play.rust-lang.org
+        const all_available = snippet_crates.every(function(elem) {
+            return playground_crates.indexOf(elem) > -1;
+        });
+
+        if (all_available) {
+            play_button.classList.remove('hidden');
+            play_button.hidden = false;
+        } else {
+            play_button.classList.add('hidden');
+        }
+    }
+
+    function run_rust_code(code_block) {
+        let result_block = code_block.querySelector('.result');
+        if (!result_block) {
+            result_block = document.createElement('code');
+            result_block.className = 'result hljs language-bash';
+
+            code_block.append(result_block);
+        }
+
+        const text = playground_text(code_block);
+        const classes = code_block.querySelector('code').classList;
+        let edition = '2015';
+        classes.forEach(className => {
+            if (className.startsWith('edition')) {
+                edition = className.slice(7);
+            }
+        });
+        const params = {
+            version: 'stable',
+            optimize: '0',
+            code: text,
+            edition: edition,
+        };
+
+        if (text.indexOf('#![feature') !== -1) {
+            params.version = 'nightly';
+        }
+
+        result_block.innerText = 'Running...';
+
+        fetch_with_timeout('https://play.rust-lang.org/evaluate.json', {
+            headers: {
+                'Content-Type': 'application/json',
+            },
+            method: 'POST',
+            mode: 'cors',
+            body: JSON.stringify(params),
+        })
+            .then(response => response.json())
+            .then(response => {
+                if (response.result.trim() === '') {
+                    result_block.innerText = 'No output';
+                    result_block.classList.add('result-no-output');
+                } else {
+                    result_block.innerText = response.result;
+                    result_block.classList.remove('result-no-output');
+                }
+            })
+            .catch(error => result_block.innerText = 'Playground Communication: ' + error.message);
+    }
+
+    // Syntax highlighting Configuration
+    hljs.configure({
+        tabReplace: '    ', // 4 spaces
+        languages: [], // Languages used for auto-detection
+    });
+
+    const code_nodes = Array
+        .from(document.querySelectorAll('code'))
+        // Don't highlight `inline code` blocks in headers.
+        .filter(function(node) {
+            return !node.parentElement.classList.contains('header');
+        });
+
+    if (window.ace) {
+        // language-rust class needs to be removed for editable
+        // blocks or highlightjs will capture events
+        code_nodes
+            .filter(function(node) {
+                return node.classList.contains('editable');
+            })
+            .forEach(function(block) {
+                block.classList.remove('language-rust');
+            });
+
+        code_nodes
+            .filter(function(node) {
+                return !node.classList.contains('editable');
+            })
+            .forEach(function(block) {
+                hljs.highlightBlock(block);
+            });
+    } else {
+        code_nodes.forEach(function(block) {
+            hljs.highlightBlock(block);
+        });
+    }
+
+    // Adding the hljs class gives code blocks the color css
+    // even if highlighting doesn't apply
+    code_nodes.forEach(function(block) {
+        block.classList.add('hljs');
+    });
+
+    Array.from(document.querySelectorAll('code.hljs')).forEach(function(block) {
+
+        const lines = Array.from(block.querySelectorAll('.boring'));
+        // If no lines were hidden, return
+        if (!lines.length) {
+            return;
+        }
+        block.classList.add('hide-boring');
+
+        const buttons = document.createElement('div');
+        buttons.className = 'buttons';
+        buttons.innerHTML = '';
+        buttons.firstChild.innerHTML = document.getElementById('fa-eye').innerHTML;
+
+        // add expand button
+        const pre_block = block.parentNode;
+        pre_block.insertBefore(buttons, pre_block.firstChild);
+
+        buttons.firstChild.addEventListener('click', function(e) {
+            if (this.title === 'Show hidden lines') {
+                this.innerHTML = document.getElementById('fa-eye-slash').innerHTML;
+                this.title = 'Hide lines';
+                this.setAttribute('aria-label', e.target.title);
+
+                block.classList.remove('hide-boring');
+            } else if (this.title === 'Hide lines') {
+                this.innerHTML = document.getElementById('fa-eye').innerHTML;
+                this.title = 'Show hidden lines';
+                this.setAttribute('aria-label', e.target.title);
+
+                block.classList.add('hide-boring');
+            }
+        });
+    });
+
+    if (window.playground_copyable) {
+        Array.from(document.querySelectorAll('pre code')).forEach(function(block) {
+            const pre_block = block.parentNode;
+            if (!pre_block.classList.contains('playground')) {
+                let buttons = pre_block.querySelector('.buttons');
+                if (!buttons) {
+                    buttons = document.createElement('div');
+                    buttons.className = 'buttons';
+                    pre_block.insertBefore(buttons, pre_block.firstChild);
+                }
+
+                const clipButton = document.createElement('button');
+                clipButton.className = 'clip-button';
+                clipButton.title = 'Copy to clipboard';
+                clipButton.setAttribute('aria-label', clipButton.title);
+                clipButton.innerHTML = '';
+
+                buttons.insertBefore(clipButton, buttons.firstChild);
+            }
+        });
+    }
+
+    // Process playground code blocks
+    Array.from(document.querySelectorAll('.playground')).forEach(function(pre_block) {
+        // Add play button
+        let buttons = pre_block.querySelector('.buttons');
+        if (!buttons) {
+            buttons = document.createElement('div');
+            buttons.className = 'buttons';
+            pre_block.insertBefore(buttons, pre_block.firstChild);
+        }
+
+        const runCodeButton = document.createElement('button');
+        runCodeButton.className = 'play-button';
+        runCodeButton.hidden = true;
+        runCodeButton.title = 'Run this code';
+        runCodeButton.setAttribute('aria-label', runCodeButton.title);
+        runCodeButton.innerHTML = document.getElementById('fa-play').innerHTML;
+
+        buttons.insertBefore(runCodeButton, buttons.firstChild);
+        runCodeButton.addEventListener('click', () => {
+            run_rust_code(pre_block);
+        });
+
+        if (window.playground_copyable) {
+            const copyCodeClipboardButton = document.createElement('button');
+            copyCodeClipboardButton.className = 'clip-button';
+            copyCodeClipboardButton.innerHTML = '';
+            copyCodeClipboardButton.title = 'Copy to clipboard';
+            copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title);
+
+            buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild);
+        }
+
+        const code_block = pre_block.querySelector('code');
+        if (window.ace && code_block.classList.contains('editable')) {
+            const undoChangesButton = document.createElement('button');
+            undoChangesButton.className = 'reset-button';
+            undoChangesButton.title = 'Undo changes';
+            undoChangesButton.setAttribute('aria-label', undoChangesButton.title);
+            undoChangesButton.innerHTML +=
+                document.getElementById('fa-clock-rotate-left').innerHTML;
+
+            buttons.insertBefore(undoChangesButton, buttons.firstChild);
+
+            undoChangesButton.addEventListener('click', function() {
+                const editor = window.ace.edit(code_block);
+                editor.setValue(editor.originalCode);
+                editor.clearSelection();
+            });
+        }
+    });
+})();
+
+(function themes() {
+    const html = document.querySelector('html');
+    const themeToggleButton = document.getElementById('mdbook-theme-toggle');
+    const themePopup = document.getElementById('mdbook-theme-list');
+    const themeColorMetaTag = document.querySelector('meta[name="theme-color"]');
+    const themeIds = [];
+    themePopup.querySelectorAll('button.theme').forEach(function(el) {
+        themeIds.push(el.id);
+    });
+    const stylesheets = {
+        ayuHighlight: document.querySelector('#mdbook-ayu-highlight-css'),
+        tomorrowNight: document.querySelector('#mdbook-tomorrow-night-css'),
+        highlight: document.querySelector('#mdbook-highlight-css'),
+    };
+
+    function showThemes() {
+        themePopup.style.display = 'block';
+        themeToggleButton.setAttribute('aria-expanded', true);
+        themePopup.querySelector('button#mdbook-theme-' + get_theme()).focus();
+    }
+
+    function updateThemeSelected() {
+        themePopup.querySelectorAll('.theme-selected').forEach(function(el) {
+            el.classList.remove('theme-selected');
+        });
+        const selected = get_saved_theme() ?? 'default_theme';
+        let element = themePopup.querySelector('button#mdbook-theme-' + selected);
+        if (element === null) {
+            // Fall back in case there is no "Default" item.
+            element = themePopup.querySelector('button#mdbook-theme-' + get_theme());
+        }
+        element.classList.add('theme-selected');
+    }
+
+    function hideThemes() {
+        themePopup.style.display = 'none';
+        themeToggleButton.setAttribute('aria-expanded', false);
+        themeToggleButton.focus();
+    }
+
+    function get_saved_theme() {
+        let theme = null;
+        try {
+            theme = localStorage.getItem('mdbook-theme');
+        } catch {
+            // ignore error.
+        }
+        return theme;
+    }
+
+    function delete_saved_theme() {
+        localStorage.removeItem('mdbook-theme');
+    }
+
+    function get_theme() {
+        const theme = get_saved_theme();
+        if (theme === null || theme === undefined || !themeIds.includes('mdbook-theme-' + theme)) {
+            if (typeof default_dark_theme === 'undefined') {
+                // A customized index.hbs might not define this, so fall back to
+                // old behavior of determining the default on page load.
+                return default_theme;
+            }
+            return window.matchMedia('(prefers-color-scheme: dark)').matches
+                ? default_dark_theme
+                : default_light_theme;
+        } else {
+            return theme;
+        }
+    }
+
+    let previousTheme = default_theme;
+    function set_theme(theme, store = true) {
+        let ace_theme;
+
+        if (theme === 'coal' || theme === 'navy') {
+            stylesheets.ayuHighlight.disabled = true;
+            stylesheets.tomorrowNight.disabled = false;
+            stylesheets.highlight.disabled = true;
+
+            ace_theme = 'ace/theme/tomorrow_night';
+        } else if (theme === 'ayu') {
+            stylesheets.ayuHighlight.disabled = false;
+            stylesheets.tomorrowNight.disabled = true;
+            stylesheets.highlight.disabled = true;
+            ace_theme = 'ace/theme/tomorrow_night';
+        } else {
+            stylesheets.ayuHighlight.disabled = true;
+            stylesheets.tomorrowNight.disabled = true;
+            stylesheets.highlight.disabled = false;
+            ace_theme = 'ace/theme/dawn';
+        }
+
+        setTimeout(function() {
+            themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor;
+        }, 1);
+
+        if (window.ace && window.editors) {
+            window.editors.forEach(function(editor) {
+                editor.setTheme(ace_theme);
+            });
+        }
+
+        if (store) {
+            try {
+                localStorage.setItem('mdbook-theme', theme);
+            } catch {
+                // ignore error.
+            }
+        }
+
+        html.classList.remove(previousTheme);
+        html.classList.add(theme);
+        previousTheme = theme;
+        updateThemeSelected();
+    }
+
+    const query = window.matchMedia('(prefers-color-scheme: dark)');
+    query.onchange = function() {
+        set_theme(get_theme(), false);
+    };
+
+    // Set theme.
+    set_theme(get_theme(), false);
+
+    themeToggleButton.addEventListener('click', function() {
+        if (themePopup.style.display === 'block') {
+            hideThemes();
+        } else {
+            showThemes();
+        }
+    });
+
+    themePopup.addEventListener('click', function(e) {
+        let theme;
+        if (e.target.className === 'theme') {
+            theme = e.target.id;
+        } else if (e.target.parentElement.className === 'theme') {
+            theme = e.target.parentElement.id;
+        } else {
+            return;
+        }
+        theme = theme.replace(/^mdbook-theme-/, '');
+
+        if (theme === 'default_theme' || theme === null) {
+            delete_saved_theme();
+            set_theme(get_theme(), false);
+        } else {
+            set_theme(theme);
+        }
+    });
+
+    themePopup.addEventListener('focusout', function(e) {
+        // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below)
+        if (!!e.relatedTarget &&
+            !themeToggleButton.contains(e.relatedTarget) &&
+            !themePopup.contains(e.relatedTarget)
+        ) {
+            hideThemes();
+        }
+    });
+
+    // Should not be needed, but it works around an issue on macOS & iOS:
+    // https://github.com/rust-lang/mdBook/issues/628
+    document.addEventListener('click', function(e) {
+        if (themePopup.style.display === 'block' &&
+            !themeToggleButton.contains(e.target) &&
+            !themePopup.contains(e.target)
+        ) {
+            hideThemes();
+        }
+    });
+
+    document.addEventListener('keydown', function(e) {
+        if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) {
+            return;
+        }
+        if (!themePopup.contains(e.target)) {
+            return;
+        }
+
+        let li;
+        switch (e.key) {
+        case 'Escape':
+            e.preventDefault();
+            hideThemes();
+            break;
+        case 'ArrowUp':
+            e.preventDefault();
+            li = document.activeElement.parentElement;
+            if (li && li.previousElementSibling) {
+                li.previousElementSibling.querySelector('button').focus();
+            }
+            break;
+        case 'ArrowDown':
+            e.preventDefault();
+            li = document.activeElement.parentElement;
+            if (li && li.nextElementSibling) {
+                li.nextElementSibling.querySelector('button').focus();
+            }
+            break;
+        case 'Home':
+            e.preventDefault();
+            themePopup.querySelector('li:first-child button').focus();
+            break;
+        case 'End':
+            e.preventDefault();
+            themePopup.querySelector('li:last-child button').focus();
+            break;
+        }
+    });
+})();
+
+(function sidebar() {
+    const sidebar = document.getElementById('mdbook-sidebar');
+    const sidebarLinks = document.querySelectorAll('#mdbook-sidebar a');
+    const sidebarToggleButton = document.getElementById('mdbook-sidebar-toggle');
+    const sidebarResizeHandle = document.getElementById('mdbook-sidebar-resize-handle');
+    const sidebarCheckbox = document.getElementById('mdbook-sidebar-toggle-anchor');
+    let firstContact = null;
+
+
+    /* Because we cannot change the `display` using only CSS after/before the transition, we
+       need JS to do it. We change the display to prevent the browsers search to find text inside
+       the collapsed sidebar. */
+    if (!document.documentElement.classList.contains('sidebar-visible')) {
+        sidebar.style.display = 'none';
+    }
+    sidebar.addEventListener('transitionend', () => {
+        /* We only change the display to "none" if we're collapsing the sidebar. */
+        if (!sidebarCheckbox.checked) {
+            sidebar.style.display = 'none';
+        }
+    });
+    sidebarToggleButton.addEventListener('click', () => {
+        /* To allow the sidebar expansion animation, we first need to put back the display. */
+        if (!sidebarCheckbox.checked) {
+            sidebar.style.display = '';
+            // Workaround for Safari skipping the animation when changing
+            // `display` and a transform in the same event loop. This forces a
+            // reflow after updating the display.
+            sidebar.offsetHeight;
+        }
+    });
+
+    function showSidebar() {
+        document.documentElement.classList.add('sidebar-visible');
+        Array.from(sidebarLinks).forEach(function(link) {
+            link.setAttribute('tabIndex', 0);
+        });
+        sidebarToggleButton.setAttribute('aria-expanded', true);
+        sidebar.setAttribute('aria-hidden', false);
+        try {
+            localStorage.setItem('mdbook-sidebar', 'visible');
+        } catch {
+            // Ignore error.
+        }
+    }
+
+    function hideSidebar() {
+        document.documentElement.classList.remove('sidebar-visible');
+        Array.from(sidebarLinks).forEach(function(link) {
+            link.setAttribute('tabIndex', -1);
+        });
+        sidebarToggleButton.setAttribute('aria-expanded', false);
+        sidebar.setAttribute('aria-hidden', true);
+        try {
+            localStorage.setItem('mdbook-sidebar', 'hidden');
+        } catch {
+            // Ignore error.
+        }
+    }
+
+    // Toggle sidebar
+    sidebarCheckbox.addEventListener('change', function sidebarToggle() {
+        if (sidebarCheckbox.checked) {
+            const current_width = parseInt(
+                document.documentElement.style.getPropertyValue('--sidebar-target-width'), 10);
+            if (current_width < 150) {
+                document.documentElement.style.setProperty('--sidebar-target-width', '150px');
+            }
+            showSidebar();
+        } else {
+            hideSidebar();
+        }
+    });
+
+    sidebarResizeHandle.addEventListener('mousedown', initResize, false);
+
+    function initResize() {
+        window.addEventListener('mousemove', resize, false);
+        window.addEventListener('mouseup', stopResize, false);
+        document.documentElement.classList.add('sidebar-resizing');
+    }
+    function resize(e) {
+        let pos = e.clientX - sidebar.offsetLeft;
+        if (pos < 20) {
+            hideSidebar();
+        } else {
+            if (!document.documentElement.classList.contains('sidebar-visible')) {
+                showSidebar();
+            }
+            pos = Math.min(pos, window.innerWidth - 100);
+            document.documentElement.style.setProperty('--sidebar-target-width', pos + 'px');
+        }
+    }
+    //on mouseup remove windows functions mousemove & mouseup
+    function stopResize() {
+        document.documentElement.classList.remove('sidebar-resizing');
+        window.removeEventListener('mousemove', resize, false);
+        window.removeEventListener('mouseup', stopResize, false);
+    }
+
+    document.addEventListener('touchstart', function(e) {
+        firstContact = {
+            x: e.touches[0].clientX,
+            time: Date.now(),
+        };
+    }, { passive: true });
+
+    document.addEventListener('touchmove', function(e) {
+        if (!firstContact) {
+            return;
+        }
+
+        const curX = e.touches[0].clientX;
+        const xDiff = curX - firstContact.x,
+            tDiff = Date.now() - firstContact.time;
+
+        if (tDiff < 250 && Math.abs(xDiff) >= 150) {
+            if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300)) {
+                showSidebar();
+            } else if (xDiff < 0 && curX < 300) {
+                hideSidebar();
+            }
+
+            firstContact = null;
+        }
+    }, { passive: true });
+})();
+
+(function chapterNavigation() {
+    document.addEventListener('keydown', function(e) {
+        if (e.altKey || e.ctrlKey || e.metaKey) {
+            return;
+        }
+        if (window.search && window.search.hasFocus()) {
+            return;
+        }
+        const html = document.querySelector('html');
+
+        function next() {
+            const nextButton = document.querySelector('.nav-chapters.next');
+            if (nextButton) {
+                window.location.href = nextButton.href;
+            }
+        }
+        function prev() {
+            const previousButton = document.querySelector('.nav-chapters.previous');
+            if (previousButton) {
+                window.location.href = previousButton.href;
+            }
+        }
+        function showHelp() {
+            const container = document.getElementById('mdbook-help-container');
+            const overlay = document.getElementById('mdbook-help-popup');
+            container.style.display = 'flex';
+
+            // Clicking outside the popup will dismiss it.
+            const mouseHandler = event => {
+                if (overlay.contains(event.target)) {
+                    return;
+                }
+                if (event.button !== 0) {
+                    return;
+                }
+                event.preventDefault();
+                event.stopPropagation();
+                document.removeEventListener('mousedown', mouseHandler);
+                hideHelp();
+            };
+
+            // Pressing esc will dismiss the popup.
+            const escapeKeyHandler = event => {
+                if (event.key === 'Escape') {
+                    event.preventDefault();
+                    event.stopPropagation();
+                    document.removeEventListener('keydown', escapeKeyHandler, true);
+                    hideHelp();
+                }
+            };
+            document.addEventListener('keydown', escapeKeyHandler, true);
+            document.getElementById('mdbook-help-container')
+                .addEventListener('mousedown', mouseHandler);
+        }
+        function hideHelp() {
+            document.getElementById('mdbook-help-container').style.display = 'none';
+        }
+
+        // Usually needs the Shift key to be pressed
+        switch (e.key) {
+        case '?':
+            e.preventDefault();
+            showHelp();
+            break;
+        }
+
+        // Rest of the keys are only active when the Shift key is not pressed
+        if (e.shiftKey) {
+            return;
+        }
+
+        switch (e.key) {
+        case 'ArrowRight':
+            e.preventDefault();
+            if (html.dir === 'rtl') {
+                prev();
+            } else {
+                next();
+            }
+            break;
+        case 'ArrowLeft':
+            e.preventDefault();
+            if (html.dir === 'rtl') {
+                next();
+            } else {
+                prev();
+            }
+            break;
+        }
+    });
+})();
+
+(function clipboard() {
+    const clipButtons = document.querySelectorAll('.clip-button');
+
+    function hideTooltip(elem) {
+        elem.firstChild.innerText = '';
+        elem.className = 'clip-button';
+    }
+
+    function showTooltip(elem, msg) {
+        elem.firstChild.innerText = msg;
+        elem.className = 'clip-button tooltipped';
+    }
+
+    const clipboardSnippets = new ClipboardJS('.clip-button', {
+        text: function(trigger) {
+            hideTooltip(trigger);
+            const playground = trigger.closest('pre');
+            return playground_text(playground, false);
+        },
+    });
+
+    Array.from(clipButtons).forEach(function(clipButton) {
+        clipButton.addEventListener('mouseout', function(e) {
+            hideTooltip(e.currentTarget);
+        });
+    });
+
+    clipboardSnippets.on('success', function(e) {
+        e.clearSelection();
+        showTooltip(e.trigger, 'Copied!');
+    });
+
+    clipboardSnippets.on('error', function(e) {
+        showTooltip(e.trigger, 'Clipboard error!');
+    });
+})();
+
+(function scrollToTop() {
+    const menuTitle = document.querySelector('.menu-title');
+
+    menuTitle.addEventListener('click', function() {
+        document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' });
+    });
+})();
+
+(function controllMenu() {
+    const menu = document.getElementById('mdbook-menu-bar');
+
+    (function controllPosition() {
+        let scrollTop = document.scrollingElement.scrollTop;
+        let prevScrollTop = scrollTop;
+        const minMenuY = -menu.clientHeight - 50;
+        // When the script loads, the page can be at any scroll (e.g. if you refresh it).
+        menu.style.top = scrollTop + 'px';
+        // Same as parseInt(menu.style.top.slice(0, -2), but faster
+        let topCache = menu.style.top.slice(0, -2);
+        menu.classList.remove('sticky');
+        let stickyCache = false; // Same as menu.classList.contains('sticky'), but faster
+        document.addEventListener('scroll', function() {
+            scrollTop = Math.max(document.scrollingElement.scrollTop, 0);
+            // `null` means that it doesn't need to be updated
+            let nextSticky = null;
+            let nextTop = null;
+            const scrollDown = scrollTop > prevScrollTop;
+            const menuPosAbsoluteY = topCache - scrollTop;
+            if (scrollDown) {
+                nextSticky = false;
+                if (menuPosAbsoluteY > 0) {
+                    nextTop = prevScrollTop;
+                }
+            } else {
+                if (menuPosAbsoluteY > 0) {
+                    nextSticky = true;
+                } else if (menuPosAbsoluteY < minMenuY) {
+                    nextTop = prevScrollTop + minMenuY;
+                }
+            }
+            if (nextSticky === true && stickyCache === false) {
+                menu.classList.add('sticky');
+                stickyCache = true;
+            } else if (nextSticky === false && stickyCache === true) {
+                menu.classList.remove('sticky');
+                stickyCache = false;
+            }
+            if (nextTop !== null) {
+                menu.style.top = nextTop + 'px';
+                topCache = nextTop;
+            }
+            prevScrollTop = scrollTop;
+        }, { passive: true });
+    })();
+    (function controllBorder() {
+        function updateBorder() {
+            if (menu.offsetTop === 0) {
+                menu.classList.remove('bordered');
+            } else {
+                menu.classList.add('bordered');
+            }
+        }
+        updateBorder();
+        document.addEventListener('scroll', updateBorder, { passive: true });
+    })();
+})();
diff --git a/theme/css/chrome.css b/theme/css/chrome.css
new file mode 100644
index 00000000..bab38894
--- /dev/null
+++ b/theme/css/chrome.css
@@ -0,0 +1,756 @@
+/* CSS for UI elements (a.k.a. chrome) */
+
+html {
+    scrollbar-color: var(--scrollbar) transparent;
+}
+#mdbook-searchresults a,
+.content a:link,
+a:visited,
+a > .hljs {
+    color: var(--links);
+}
+
+/*
+    mdbook-body-container is necessary because mobile browsers don't seem to like
+    overflow-x on the body tag when there is a  tag.
+*/
+#mdbook-body-container {
+    /*
+        This is used when the sidebar pushes the body content off the side of
+        the screen on small screens. Without it, dragging on mobile Safari
+        will want to reposition the viewport in a weird way.
+    */
+    overflow-x: clip;
+}
+
+/* Menu Bar */
+
+#mdbook-menu-bar,
+#mdbook-menu-bar-hover-placeholder {
+    z-index: 101;
+    margin: auto calc(0px - var(--page-padding));
+}
+#mdbook-menu-bar {
+    position: relative;
+    display: flex;
+    flex-wrap: wrap;
+    background-color: var(--bg);
+    border-block-end-color: var(--bg);
+    border-block-end-width: 1px;
+    border-block-end-style: solid;
+}
+#mdbook-menu-bar.sticky,
+#mdbook-menu-bar-hover-placeholder:hover + #mdbook-menu-bar,
+#mdbook-menu-bar:hover,
+html.sidebar-visible #mdbook-menu-bar {
+    position: -webkit-sticky;
+    position: sticky;
+    top: 0 !important;
+}
+#mdbook-menu-bar-hover-placeholder {
+    position: sticky;
+    position: -webkit-sticky;
+    top: 0;
+    height: var(--menu-bar-height);
+}
+#mdbook-menu-bar.bordered {
+    border-block-end-color: var(--table-border-color);
+}
+#mdbook-menu-bar .fa-svg, #mdbook-menu-bar .icon-button {
+    position: relative;
+    padding: 0 8px;
+    z-index: 10;
+    line-height: var(--menu-bar-height);
+    cursor: pointer;
+    transition: color 0.5s;
+}
+@media only screen and (max-width: 420px) {
+    #mdbook-menu-bar .fa-svg, #mdbook-menu-bar .icon-button {
+        padding: 0 5px;
+    }
+}
+
+.icon-button {
+    border: none;
+    background: none;
+    padding: 0;
+    color: inherit;
+}
+.icon-button .fa-svg {
+    margin: 0;
+}
+
+.right-buttons {
+    margin: 0 15px;
+}
+.right-buttons a {
+    text-decoration: none;
+}
+
+.left-buttons {
+    display: flex;
+    margin: 0 5px;
+}
+html:not(.js) .left-buttons button {
+    display: none;
+}
+
+.menu-title {
+    display: inline-block;
+    font-weight: 200;
+    font-size: 2.4rem;
+    line-height: var(--menu-bar-height);
+    text-align: center;
+    margin: 0;
+    flex: 1;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+.menu-title {
+    cursor: pointer;
+}
+
+.menu-bar,
+.menu-bar:visited,
+.nav-chapters,
+.nav-chapters:visited,
+.mobile-nav-chapters,
+.mobile-nav-chapters:visited,
+.menu-bar .icon-button,
+.menu-bar a .fa-svg {
+    color: var(--icons);
+}
+
+.menu-bar .fa-svg:hover,
+.menu-bar .icon-button:hover,
+.nav-chapters:hover,
+.mobile-nav-chapters .fa-svg:hover {
+    color: var(--icons-hover);
+}
+
+/* Nav Icons */
+
+.nav-chapters {
+    font-size: 2.5em;
+    text-align: center;
+    text-decoration: none;
+
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    margin: 0;
+    max-width: 150px;
+    min-width: 90px;
+
+    display: flex;
+    justify-content: center;
+    align-content: center;
+    flex-direction: column;
+
+    transition: color 0.5s, background-color 0.5s;
+}
+
+.nav-chapters:hover {
+    text-decoration: none;
+    background-color: var(--theme-hover);
+    transition: background-color 0.15s, color 0.15s;
+}
+
+.nav-wrapper {
+    margin-block-start: 50px;
+    display: none;
+}
+
+.mobile-nav-chapters {
+    font-size: 2.5em;
+    text-align: center;
+    text-decoration: none;
+    width: 90px;
+    border-radius: 5px;
+    background-color: var(--sidebar-bg);
+}
+
+/* Only Firefox supports flow-relative values */
+.previous { float: left; }
+[dir=rtl] .previous { float: right; }
+
+/* Only Firefox supports flow-relative values */
+.next {
+    float: right;
+    right: var(--page-padding);
+}
+[dir=rtl] .next {
+    float: left;
+    right: unset;
+    left: var(--page-padding);
+}
+
+@media only screen and (max-width: 1080px) {
+    .nav-wide-wrapper { display: none; }
+    .nav-wrapper { display: block; }
+}
+
+/* sidebar-visible */
+@media only screen and (max-width: 1380px) {
+    #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wide-wrapper { display: none; }
+    #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wrapper { display: block; }
+}
+
+/* Inline code */
+
+:not(pre) > .hljs {
+    display: inline;
+    padding: 0.1em 0.3em;
+    border-radius: 3px;
+}
+
+:not(pre):not(a) > .hljs {
+    color: var(--inline-code-color);
+    overflow-x: initial;
+}
+
+a:hover > .hljs {
+    text-decoration: underline;
+}
+
+pre {
+    position: relative;
+}
+pre > .buttons {
+    position: absolute;
+    z-index: 100;
+    right: 0px;
+    top: 2px;
+    margin: 0px;
+    padding: 2px 0px;
+
+    color: var(--sidebar-fg);
+    cursor: pointer;
+    visibility: hidden;
+    opacity: 0;
+    transition: visibility 0.1s linear, opacity 0.1s linear;
+}
+pre:hover > .buttons {
+    visibility: visible;
+    opacity: 1
+}
+pre > .buttons :hover {
+    color: var(--sidebar-active);
+    border-color: var(--icons-hover);
+    background-color: var(--theme-hover);
+}
+pre > .buttons button {
+    cursor: inherit;
+    margin: 0px 5px;
+    padding: 2px 3px 0px 4px;
+    font-size: 23px;
+
+    border-style: solid;
+    border-width: 1px;
+    border-radius: 4px;
+    border-color: var(--icons);
+    background-color: var(--theme-popup-bg);
+    transition: 100ms;
+    transition-property: color,border-color,background-color;
+    color: var(--icons);
+}
+
+pre > .buttons button.clip-button {
+    padding: 2px 4px 0px 6px;
+}
+pre > .buttons button.clip-button::before {
+    /* clipboard image from octicons (https://github.com/primer/octicons/tree/v2.0.0) MIT license
+     */
+    content: url('data:image/svg+xml,\
+\
+\
+');
+    filter: var(--copy-button-filter);
+}
+pre > .buttons button.clip-button:hover::before {
+    filter: var(--copy-button-filter-hover);
+}
+
+@media (pointer: coarse) {
+    pre > .buttons button {
+        /* On mobile, make it easier to tap buttons. */
+        padding: 0.3rem 1rem;
+    }
+
+    .sidebar-resize-indicator {
+        /* Hide resize indicator on devices with limited accuracy */
+        display: none;
+    }
+}
+pre > code {
+    display: block;
+    padding: 1rem;
+}
+
+/* FIXME: ACE editors overlap their buttons because ACE does absolute
+   positioning within the code block which breaks padding. The only solution I
+   can think of is to move the padding to the outer pre tag (or insert a div
+   wrapper), but that would require fixing a whole bunch of CSS rules.
+*/
+.hljs.ace_editor {
+  padding: 0rem 0rem;
+}
+
+pre > .result {
+    margin-block-start: 10px;
+}
+
+/* Search */
+
+#mdbook-searchresults a {
+    text-decoration: none;
+}
+
+mark {
+    border-radius: 2px;
+    padding-block-start: 0;
+    padding-block-end: 1px;
+    padding-inline-start: 3px;
+    padding-inline-end: 3px;
+    margin-block-start: 0;
+    margin-block-end: -1px;
+    margin-inline-start: -3px;
+    margin-inline-end: -3px;
+    background-color: var(--search-mark-bg);
+    transition: background-color 300ms linear;
+    cursor: pointer;
+}
+
+mark.fade-out {
+    background-color: rgba(0,0,0,0) !important;
+    cursor: auto;
+}
+
+.searchbar-outer {
+    margin-inline-start: auto;
+    margin-inline-end: auto;
+    max-width: var(--content-max-width);
+}
+
+#mdbook-searchbar-outer.searching #mdbook-searchbar {
+    padding-right: 30px;
+}
+#mdbook-searchbar-outer .spinner-wrapper {
+    display: none;
+}
+#mdbook-searchbar-outer.searching .spinner-wrapper {
+    display: block;
+}
+
+.search-wrapper {
+    position: relative;
+}
+
+.spinner-wrapper {
+    --spinner-margin: 2px;
+    position: absolute;
+    margin-block-start: calc(var(--searchbar-margin-block-start) + var(--spinner-margin));
+    right: var(--spinner-margin);
+    top: 0;
+    bottom: var(--spinner-margin);
+    padding: 6px;
+    background-color: var(--bg);
+}
+
+#fa-spin {
+    animation: rotating 2s linear infinite;
+    display: inline-block;
+}
+
+@keyframes rotating {
+    from {
+        transform: rotate(0deg);
+    }
+    to {
+        transform: rotate(360deg);
+    }
+}
+
+#mdbook-searchbar {
+    width: 100%;
+    margin-block-start: var(--searchbar-margin-block-start);
+    margin-block-end: 0;
+    margin-inline-start: auto;
+    margin-inline-end: auto;
+    padding: 10px 16px;
+    transition: box-shadow 300ms ease-in-out;
+    border: 1px solid var(--searchbar-border-color);
+    border-radius: 3px;
+    background-color: var(--searchbar-bg);
+    color: var(--searchbar-fg);
+}
+#mdbook-searchbar:focus,
+#mdbook-searchbar.active {
+    box-shadow: 0 0 3px var(--searchbar-shadow-color);
+}
+
+.searchresults-header {
+    font-weight: bold;
+    font-size: 1em;
+    padding-block-start: 18px;
+    padding-block-end: 0;
+    padding-inline-start: 5px;
+    padding-inline-end: 0;
+    color: var(--searchresults-header-fg);
+}
+
+.searchresults-outer {
+    margin-inline-start: auto;
+    margin-inline-end: auto;
+    max-width: var(--content-max-width);
+    border-block-end: 1px dashed var(--searchresults-border-color);
+}
+
+ul#mdbook-searchresults {
+    list-style: none;
+    padding-inline-start: 20px;
+}
+ul#mdbook-searchresults li {
+    margin: 10px 0px;
+    padding: 2px;
+    border-radius: 2px;
+}
+ul#mdbook-searchresults li.focus {
+    background-color: var(--searchresults-li-bg);
+}
+ul#mdbook-searchresults span.teaser {
+    display: block;
+    clear: both;
+    margin-block-start: 5px;
+    margin-block-end: 0;
+    margin-inline-start: 20px;
+    margin-inline-end: 0;
+    font-size: 0.8em;
+}
+ul#mdbook-searchresults span.teaser em {
+    font-weight: bold;
+    font-style: normal;
+}
+
+/* Sidebar */
+
+.sidebar {
+    position: fixed;
+    left: 0;
+    top: 0;
+    bottom: 0;
+    width: var(--sidebar-width);
+    font-size: 0.875em;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+    overscroll-behavior-y: contain;
+    background-color: var(--sidebar-bg);
+    color: var(--sidebar-fg);
+}
+.sidebar-iframe-inner {
+    --padding: 10px;
+
+    background-color: var(--sidebar-bg);
+    padding: var(--padding);
+    margin: 0;
+    font-size: 1.4rem;
+    color: var(--sidebar-fg);
+    min-height: calc(100vh - var(--padding) * 2);
+}
+.sidebar-iframe-outer {
+    border: none;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+}
+[dir=rtl] .sidebar { left: unset; right: 0; }
+.sidebar-resizing {
+    -moz-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+html:not(.sidebar-resizing) .sidebar {
+    transition: transform 0.3s; /* Animation: slide away */
+}
+.sidebar code {
+    line-height: 2em;
+}
+.sidebar .sidebar-scrollbox {
+    overflow-y: auto;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    padding: 10px 10px;
+}
+.sidebar .sidebar-resize-handle {
+    position: absolute;
+    cursor: col-resize;
+    width: 0;
+    right: calc(var(--sidebar-resize-indicator-width) * -1);
+    top: 0;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+}
+
+.sidebar-resize-handle .sidebar-resize-indicator {
+    width: 100%;
+    height: 16px;
+    color: var(--icons);
+    margin-inline-start: var(--sidebar-resize-indicator-space);
+    display: flex;
+    align-items: center;
+    justify-content: flex-start;
+}
+.sidebar-resize-handle .sidebar-resize-indicator::before {
+    content: "";
+    width: 2px;
+    height: 12px;
+    border-left: dotted 2px currentColor;
+}
+.sidebar-resize-handle .sidebar-resize-indicator::after {
+    content: "";
+    width: 2px;
+    height: 16px;
+    border-left: dotted 2px currentColor;
+}
+
+[dir=rtl] .sidebar .sidebar-resize-handle {
+    left: calc(var(--sidebar-resize-indicator-width) * -1);
+    right: unset;
+}
+.js .sidebar .sidebar-resize-handle {
+    cursor: col-resize;
+    width: calc(var(--sidebar-resize-indicator-width) - var(--sidebar-resize-indicator-space));
+}
+
+html:not(.js) .sidebar-resize-handle {
+    display: none;
+}
+
+/* sidebar-hidden */
+#mdbook-sidebar-toggle-anchor:not(:checked) ~ .sidebar {
+    transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width)));
+}
+[dir=rtl] #mdbook-sidebar-toggle-anchor:not(:checked) ~ .sidebar {
+    transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width)));
+}
+.sidebar::-webkit-scrollbar {
+    background: var(--sidebar-bg);
+}
+.sidebar::-webkit-scrollbar-thumb {
+    background: var(--scrollbar);
+}
+
+/* sidebar-visible */
+#mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper {
+    transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width)));
+}
+[dir=rtl] #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper {
+    transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width)));
+}
+@media only screen and (min-width: 620px) {
+    #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper {
+        transform: none;
+        margin-inline-start: calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width));
+    }
+    [dir=rtl] #mdbook-sidebar-toggle-anchor:checked ~ .page-wrapper {
+        transform: none;
+    }
+}
+
+.chapter {
+    list-style: none outside none;
+    padding-inline-start: 0;
+    line-height: 2.2em;
+}
+
+.chapter li {
+    color: var(--sidebar-non-existant);
+}
+
+/* This is a span wrapping the chapter link and the fold chevron. */
+.chapter-link-wrapper {
+    /* Used to position the chevron to the right, allowing the text to wrap before it. */
+    display: flex;
+}
+
+.chapter li a {
+    /* Remove underlines. */
+    text-decoration: none;
+    color: var(--sidebar-fg);
+}
+
+.chapter li a:hover {
+    color: var(--sidebar-active);
+}
+
+.chapter li a.active {
+    color: var(--sidebar-active);
+}
+
+/* This is the toggle chevron. */
+.chapter-fold-toggle {
+    cursor: pointer;
+    /* Positions the chevron to the side. */
+    margin-inline-start: auto;
+    padding: 0 10px;
+    user-select: none;
+    opacity: 0.68;
+}
+
+.chapter-fold-toggle div {
+    transition: transform 0.5s;
+}
+
+/* collapse the section */
+.chapter li:not(.expanded) > ol {
+    display: none;
+}
+
+.chapter li.chapter-item {
+    line-height: 1.5em;
+    margin-block-start: 0.6em;
+}
+
+/* When expanded, rotate the chevron to point down. */
+.chapter li.expanded > span > .chapter-fold-toggle div {
+    transform: rotate(90deg);
+}
+
+.chapter a.current-header {
+    color: var(--sidebar-active);
+}
+
+.on-this-page {
+    margin-left: 22px;
+    border-inline-start: 4px solid var(--sidebar-header-border-color);
+    padding-left: 8px;
+}
+
+.on-this-page > ol {
+    padding-left: 0;
+}
+
+/* Horizontal line in chapter list. */
+.spacer {
+    width: 100%;
+    height: 3px;
+    margin: 5px 0px;
+}
+.chapter .spacer {
+    background-color: var(--sidebar-spacer);
+}
+
+/* On touch devices, add more vertical spacing to make it easier to tap links. */
+@media (-moz-touch-enabled: 1), (pointer: coarse) {
+    .chapter li a { padding: 5px 0; }
+    .spacer { margin: 10px 0; }
+}
+
+.section {
+    list-style: none outside none;
+    padding-inline-start: 20px;
+    line-height: 1.9em;
+}
+
+/* Theme Menu Popup */
+
+.theme-popup {
+    position: absolute;
+    left: 10px;
+    top: var(--menu-bar-height);
+    z-index: 1000;
+    border-radius: 4px;
+    font-size: 0.7em;
+    color: var(--fg);
+    background: var(--theme-popup-bg);
+    border: 1px solid var(--theme-popup-border);
+    margin: 0;
+    padding: 0;
+    list-style: none;
+    display: none;
+    /* Don't let the children's background extend past the rounded corners. */
+    overflow: hidden;
+}
+[dir=rtl] .theme-popup { left: unset;  right: 10px; }
+.theme-popup .default {
+    color: var(--icons);
+}
+.theme-popup .theme {
+    width: 100%;
+    border: 0;
+    margin: 0;
+    padding: 2px 20px;
+    line-height: 25px;
+    white-space: nowrap;
+    text-align: start;
+    cursor: pointer;
+    color: inherit;
+    background: inherit;
+    font-size: inherit;
+}
+.theme-popup .theme:hover {
+    background-color: var(--theme-hover);
+}
+
+.theme-selected::before {
+    display: inline-block;
+    content: "✓";
+    margin-inline-start: -14px;
+    width: 14px;
+}
+
+/* The container for the help popup that covers the whole window. */
+#mdbook-help-container {
+    /* Position and size for the whole window. */
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    /* This uses flex layout (which is set in book.js), and centers the popup
+       in the window.*/
+    display: none;
+    align-items: center;
+    justify-content: center;
+    z-index: 1000;
+    /* Dim out the book while the popup is visible. */
+    background: var(--overlay-bg);
+}
+
+/* The popup help box. */
+#mdbook-help-popup {
+    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
+    min-width: 300px;
+    max-width: 500px;
+    width: 100%;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    background-color: var(--bg);
+    color: var(--fg);
+    border-width: 1px;
+    border-color: var(--theme-popup-border);
+    border-style: solid;
+    border-radius: 8px;
+    padding: 10px;
+}
+
+.mdbook-help-title {
+    text-align: center;
+    /* mdbook's margin for h2 is way too large. */
+    margin: 10px;
+}
diff --git a/theme/css/general.css b/theme/css/general.css
new file mode 100644
index 00000000..df8a3efe
--- /dev/null
+++ b/theme/css/general.css
@@ -0,0 +1,408 @@
+/* Base styles and content styles */
+
+:root {
+    /* Browser default font-size is 16px, this way 1 rem = 10px */
+    font-size: 62.5%;
+    color-scheme: var(--color-scheme);
+}
+
+html {
+    font-family: "Open Sans", sans-serif;
+    color: var(--fg);
+    background-color: var(--bg);
+    text-size-adjust: none;
+    -webkit-text-size-adjust: none;
+}
+
+body {
+    margin: 0;
+    font-size: 1.6rem;
+    overflow-x: hidden;
+}
+
+code {
+    font-family: var(--mono-font) !important;
+    font-size: var(--code-font-size);
+    direction: ltr !important;
+}
+
+/* make long words/inline code not x overflow */
+main {
+    overflow-wrap: break-word;
+}
+
+/* make wide tables scroll if they overflow */
+.table-wrapper {
+    overflow-x: auto;
+}
+
+/* Don't change font size in headers. */
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    font-size: unset;
+}
+
+.left { float: left; }
+.right { float: right; }
+.boring { opacity: 0.6; }
+.hide-boring .boring { display: none; }
+.hidden { display: none !important; }
+
+h2, h3 { margin-block-start: 2.5em; }
+h4, h5 { margin-block-start: 2em; }
+
+.header + .header h3,
+.header + .header h4,
+.header + .header h5 {
+    margin-block-start: 1em;
+}
+
+h1:target::before,
+h2:target::before,
+h3:target::before,
+h4:target::before,
+h5:target::before,
+h6:target::before,
+dt:target::before {
+    display: inline-block;
+    content: "»";
+    margin-inline-start: -30px;
+    width: 30px;
+}
+
+/* This is broken on Safari as of version 14, but is fixed
+   in Safari Technology Preview 117 which I think will be Safari 14.2.
+   https://bugs.webkit.org/show_bug.cgi?id=218076
+*/
+:target {
+    /* Safari does not support logical properties */
+    scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
+}
+
+.page {
+    outline: 0;
+    padding: 0 var(--page-padding);
+    margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #mdbook-menu-bar-hover-placeholder */
+}
+.page-wrapper {
+    box-sizing: border-box;
+    background-color: var(--bg);
+}
+html:not(.js) .page-wrapper,
+.js:not(.sidebar-resizing) .page-wrapper {
+    transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
+}
+[dir=rtl]:not(.js) .page-wrapper,
+[dir=rtl].js:not(.sidebar-resizing) .page-wrapper {
+    transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */
+}
+
+.content {
+    overflow-y: auto;
+    padding: 0 5px 50px 5px;
+}
+.content main {
+    margin-inline-start: auto;
+    margin-inline-end: auto;
+    max-width: var(--content-max-width);
+}
+.content p { line-height: 1.45em; }
+.content ol { line-height: 1.45em; }
+.content ul { line-height: 1.45em; }
+.content a { text-decoration: none; }
+.content a:hover { text-decoration: underline; }
+.content img, .content video { max-width: 100%; }
+.content .header:link,
+.content .header:visited {
+    color: var(--fg);
+}
+.content .header:link,
+.content .header:visited:hover {
+    text-decoration: none;
+}
+
+table {
+    margin: 0 auto;
+    border-collapse: collapse;
+}
+table td {
+    padding: 3px 20px;
+    border: 1px var(--table-border-color) solid;
+}
+table thead {
+    background: var(--table-header-bg);
+}
+table thead td {
+    font-weight: 700;
+    border: none;
+}
+table thead th {
+    padding: 3px 20px;
+}
+table thead tr {
+    border: 1px var(--table-header-bg) solid;
+}
+/* Alternate background colors for rows */
+table tbody tr:nth-child(2n) {
+    background: var(--table-alternate-bg);
+}
+
+
+blockquote {
+    margin: 20px 0;
+    padding: 0 20px;
+    color: var(--fg);
+    background-color: var(--quote-bg);
+    border-block-start: .1em solid var(--quote-border);
+    border-block-end: .1em solid var(--quote-border);
+}
+
+/* TODO: Remove .warning in a future version of mdbook, it is replaced by
+blockquote tags. */
+.warning {
+    margin: 20px;
+    padding: 0 20px;
+    border-inline-start: 2px solid var(--warning-border);
+}
+
+.warning:before {
+    position: absolute;
+    width: 3rem;
+    height: 3rem;
+    margin-inline-start: calc(-1.5rem - 21px);
+    content: "ⓘ";
+    text-align: center;
+    background-color: var(--bg);
+    color: var(--warning-border);
+    font-weight: bold;
+    font-size: 2rem;
+}
+
+blockquote .warning:before {
+    background-color: var(--quote-bg);
+}
+
+kbd {
+    background-color: var(--table-border-color);
+    border-radius: 4px;
+    border: solid 1px var(--theme-popup-border);
+    box-shadow: inset 0 -1px 0 var(--theme-hover);
+    display: inline-block;
+    font-size: var(--code-font-size);
+    font-family: var(--mono-font);
+    line-height: 10px;
+    padding: 4px 5px;
+    vertical-align: middle;
+}
+
+sup {
+    /* Set the line-height for superscript and footnote references so that there
+       isn't an awkward space appearing above lines that contain the footnote.
+
+       See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583
+       for an explanation.
+    */
+    line-height: 0;
+}
+
+.footnote-definition {
+    font-size: 0.9em;
+}
+/* The default spacing for a list is a little too large. */
+.footnote-definition ul,
+.footnote-definition ol {
+    padding-left: 20px;
+}
+.footnote-definition > li {
+    /* Required to position the ::before target */
+    position: relative;
+}
+.footnote-definition > li:target {
+    scroll-margin-top: 50vh;
+}
+.footnote-reference:target {
+    scroll-margin-top: 50vh;
+}
+/* Draws a border around the footnote (including the marker) when it is selected.
+   TODO: If there are multiple linkbacks, highlight which one you just came
+   from so you know which one to click.
+*/
+.footnote-definition > li:target::before {
+    border: 2px solid var(--footnote-highlight);
+    border-radius: 6px;
+    position: absolute;
+    top: -8px;
+    right: -8px;
+    bottom: -8px;
+    left: -32px;
+    pointer-events: none;
+    content: "";
+}
+/* Pulses the footnote reference so you can quickly see where you left off reading.
+   This could use some improvement.
+*/
+@media not (prefers-reduced-motion) {
+    .footnote-reference:target  {
+        animation: fn-highlight 0.8s;
+        border-radius: 2px;
+    }
+
+    @keyframes fn-highlight {
+        from {
+            background-color: var(--footnote-highlight);
+        }
+    }
+}
+
+.tooltiptext {
+    position: absolute;
+    visibility: hidden;
+    color: #fff;
+    background-color: #333;
+    transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
+    left: -8px; /* Half of the width of the icon */
+    top: -35px;
+    font-size: 0.8em;
+    text-align: center;
+    border-radius: 6px;
+    padding: 5px 8px;
+    margin: 5px;
+    z-index: 1000;
+}
+.tooltipped .tooltiptext {
+    visibility: visible;
+}
+
+.chapter li.part-title {
+    color: var(--sidebar-fg);
+    margin: 5px 0px;
+    font-weight: bold;
+}
+
+.result-no-output {
+    font-style: italic;
+}
+
+.fa-svg svg {
+    width: 1em;
+    height: 1em;
+    fill: currentColor;
+    margin-bottom: -0.1em;
+}
+
+dt {
+    font-weight: bold;
+    margin-top: 0.5em;
+    margin-bottom: 0.1em;
+}
+
+/* This uses a CSS counter to add numbers to definitions, but only if there is
+ more than one definition. */
+dl, dt {
+    counter-reset: dd-counter;
+}
+
+/* When there is more than one definition, increment the counter. The first
+selector selects the first definition, and the second one selects definitions
+2 and beyond.*/
+dd:has(+ dd), dd + dd {
+    counter-increment: dd-counter;
+    /* Use flex display to help with positioning the numbers when there is a p
+    tag inside the definition. */
+    display: flex;
+    align-items: flex-start;
+}
+
+/* Shows the counter for definitions. The first selector selects the first
+definition, and the second one selections definitions 2 and beyond.*/
+dd:has(+ dd)::before, dd + dd::before  {
+    content: counter(dd-counter) ". ";
+    font-weight: 600;
+    display: inline-block;
+    margin-right: 0.5em;
+}
+
+dd > p {
+    /* For loose definitions that have a p tag inside, don't add a bunch of
+    space before the definition. */
+    margin-top: 0;
+}
+
+/* Remove some excess space from the bottom. */
+.blockquote-tag p:last-child {
+    margin-bottom: 2px;
+}
+
+.blockquote-tag {
+    /* Add some padding to make the vertical bar a little taller than the text.*/
+    padding: 2px 0px 2px 20px;
+    /* Add a solid color bar on the left side. */
+    border-inline-start-style: solid;
+    border-inline-start-width: 4px;
+    /* Disable the background color from normal blockquotes . */
+    background-color: inherit;
+    /* Disable border blocks from blockquotes. */
+    border-block-start: none;
+    border-block-end: none;
+}
+
+.blockquote-tag-title svg {
+    fill: currentColor;
+    /* Add space between the icon and the title. */
+    margin-right: 8px;
+}
+
+.blockquote-tag-note {
+    border-inline-start-color: var(--blockquote-note-color);
+}
+
+.blockquote-tag-tip {
+    border-inline-start-color: var(--blockquote-tip-color);
+}
+
+.blockquote-tag-important {
+    border-inline-start-color: var(--blockquote-important-color);
+}
+
+.blockquote-tag-warning {
+    border-inline-start-color: var(--blockquote-warning-color);
+}
+
+.blockquote-tag-caution {
+    border-inline-start-color: var(--blockquote-caution-color);
+}
+
+.blockquote-tag-note .blockquote-tag-title {
+    color: var(--blockquote-note-color);
+}
+
+.blockquote-tag-tip .blockquote-tag-title {
+    color: var(--blockquote-tip-color);
+}
+
+.blockquote-tag-important .blockquote-tag-title {
+    color: var(--blockquote-important-color);
+}
+
+.blockquote-tag-warning .blockquote-tag-title {
+    color: var(--blockquote-warning-color);
+}
+
+.blockquote-tag-caution .blockquote-tag-title {
+    color: var(--blockquote-caution-color);
+}
+
+.blockquote-tag-title {
+    /* Slightly increase the weight for more emphasis. */
+    font-weight: 600;
+    /* Vertically center the icon with the text. */
+    display: flex;
+    align-items: center;
+    /* Remove default large margins for a more compact display. */
+    margin: 2px 0 8px 0;
+}
+
+.blockquote-tag-title .fa-svg {
+    fill: currentColor;
+    /* Add some space between the icon and the text. */
+    margin-right: 8px;
+}
diff --git a/theme/css/print.css b/theme/css/print.css
new file mode 100644
index 00000000..2004384d
--- /dev/null
+++ b/theme/css/print.css
@@ -0,0 +1,50 @@
+
+#mdbook-sidebar,
+#mdbook-menu-bar,
+.nav-chapters,
+.mobile-nav-chapters {
+    display: none;
+}
+
+#mdbook-page-wrapper.page-wrapper {
+    transform: none !important;
+    margin-inline-start: 0px;
+    overflow-y: initial;
+}
+
+#mdbook-content {
+    max-width: none;
+    margin: 0;
+    padding: 0;
+}
+
+.page {
+    overflow-y: initial;
+}
+
+code {
+    direction: ltr !important;
+}
+
+pre > .buttons {
+    z-index: 2;
+}
+
+a, a:visited, a:active, a:hover {
+    color: #4183c4;
+    text-decoration: none;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    page-break-inside: avoid;
+    page-break-after: avoid;
+}
+
+pre, code {
+    page-break-inside: avoid;
+    white-space: pre-wrap;
+}
+
+.fa {
+    display: none !important;
+}
diff --git a/theme/css/variables.css b/theme/css/variables.css
new file mode 100644
index 00000000..af5023bc
--- /dev/null
+++ b/theme/css/variables.css
@@ -0,0 +1,383 @@
+
+/* Globals */
+
+:root {
+    --sidebar-target-width: 300px;
+    --sidebar-width: min(var(--sidebar-target-width), 80vw);
+    --sidebar-resize-indicator-width: 8px;
+    --sidebar-resize-indicator-space: 2px;
+    --page-padding: 15px;
+    --content-max-width: 750px;
+    --menu-bar-height: 50px;
+    --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
+    --code-font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
+    --searchbar-margin-block-start: 5px;
+}
+
+/* Themes */
+
+.ayu {
+    --bg: hsl(210, 25%, 8%);
+    --fg: #c5c5c5;
+
+    --sidebar-bg: #14191f;
+    --sidebar-fg: #c8c9db;
+    --sidebar-non-existant: #5c6773;
+    --sidebar-active: #ffb454;
+    --sidebar-spacer: #2d334f;
+
+    --scrollbar: var(--sidebar-fg);
+
+    --icons: #737480;
+    --icons-hover: #b7b9cc;
+
+    --links: #0096cf;
+
+    --inline-code-color: #ffb454;
+
+    --theme-popup-bg: #14191f;
+    --theme-popup-border: #5c6773;
+    --theme-hover: #191f26;
+
+    --quote-bg: hsl(226, 15%, 17%);
+    --quote-border: hsl(226, 15%, 22%);
+
+    --warning-border: #ff8e00;
+
+    --table-border-color: hsl(210, 25%, 13%);
+    --table-header-bg: hsl(210, 25%, 28%);
+    --table-alternate-bg: hsl(210, 25%, 11%);
+
+    --searchbar-border-color: #848484;
+    --searchbar-bg: #424242;
+    --searchbar-fg: #fff;
+    --searchbar-shadow-color: #d4c89f;
+    --searchresults-header-fg: #666;
+    --searchresults-border-color: #888;
+    --searchresults-li-bg: #252932;
+    --search-mark-bg: #e3b171;
+
+    --color-scheme: dark;
+
+    /* Same as `--icons` */
+    --copy-button-filter: invert(45%) sepia(6%) saturate(621%) hue-rotate(198deg) brightness(99%) contrast(85%);
+    /* Same as `--sidebar-active` */
+    --copy-button-filter-hover: invert(68%) sepia(55%) saturate(531%) hue-rotate(341deg) brightness(104%) contrast(101%);
+
+    --footnote-highlight: #2668a6;
+
+    --overlay-bg: rgba(33, 40, 48, 0.4);
+
+    --blockquote-note-color: #74b9ff;
+    --blockquote-tip-color: #09ca09;
+    --blockquote-important-color: #d3abff;
+    --blockquote-warning-color: #f0b72f;
+    --blockquote-caution-color: #f21424;
+
+    --sidebar-header-border-color: #c18639;
+}
+
+.coal {
+    --bg: hsl(200, 7%, 8%);
+    --fg: #98a3ad;
+
+    --sidebar-bg: #292c2f;
+    --sidebar-fg: #a1adb8;
+    --sidebar-non-existant: #505254;
+    --sidebar-active: #3473ad;
+    --sidebar-spacer: #393939;
+
+    --scrollbar: var(--sidebar-fg);
+
+    --icons: #43484d;
+    --icons-hover: #b3c0cc;
+
+    --links: #2b79a2;
+
+    --inline-code-color: #c5c8c6;
+
+    --theme-popup-bg: #141617;
+    --theme-popup-border: #43484d;
+    --theme-hover: #1f2124;
+
+    --quote-bg: hsl(234, 21%, 18%);
+    --quote-border: hsl(234, 21%, 23%);
+
+    --warning-border: #ff8e00;
+
+    --table-border-color: hsl(200, 7%, 13%);
+    --table-header-bg: hsl(200, 7%, 28%);
+    --table-alternate-bg: hsl(200, 7%, 11%);
+
+    --searchbar-border-color: #aaa;
+    --searchbar-bg: #b7b7b7;
+    --searchbar-fg: #000;
+    --searchbar-shadow-color: #aaa;
+    --searchresults-header-fg: #666;
+    --searchresults-border-color: #98a3ad;
+    --searchresults-li-bg: #2b2b2f;
+    --search-mark-bg: #355c7d;
+
+    --color-scheme: dark;
+
+    /* Same as `--icons` */
+    --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%);
+    /* Same as `--sidebar-active` */
+    --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%);
+
+    --footnote-highlight: #4079ae;
+
+    --overlay-bg: rgba(33, 40, 48, 0.4);
+
+    --blockquote-note-color: #4493f8;
+    --blockquote-tip-color: #08ae08;
+    --blockquote-important-color: #ab7df8;
+    --blockquote-warning-color: #d29922;
+    --blockquote-caution-color: #d91b29;
+
+    --sidebar-header-border-color: #3473ad;
+}
+
+.light, html:not(.js) {
+    --bg: hsl(0, 0%, 100%);
+    --fg: hsl(0, 0%, 0%);
+
+    --sidebar-bg: #fafafa;
+    --sidebar-fg: hsl(0, 0%, 0%);
+    --sidebar-non-existant: #aaaaaa;
+    --sidebar-active: #1f1fff;
+    --sidebar-spacer: #f4f4f4;
+
+    --scrollbar: #8F8F8F;
+
+    --icons: #747474;
+    --icons-hover: #000000;
+
+    --links: #20609f;
+
+    --inline-code-color: #301900;
+
+    --theme-popup-bg: #fafafa;
+    --theme-popup-border: #cccccc;
+    --theme-hover: #e6e6e6;
+
+    --quote-bg: hsl(197, 37%, 96%);
+    --quote-border: hsl(197, 37%, 91%);
+
+    --warning-border: #ff8e00;
+
+    --table-border-color: hsl(0, 0%, 95%);
+    --table-header-bg: hsl(0, 0%, 80%);
+    --table-alternate-bg: hsl(0, 0%, 97%);
+
+    --searchbar-border-color: #aaa;
+    --searchbar-bg: #fafafa;
+    --searchbar-fg: #000;
+    --searchbar-shadow-color: #aaa;
+    --searchresults-header-fg: #666;
+    --searchresults-border-color: #888;
+    --searchresults-li-bg: #e4f2fe;
+    --search-mark-bg: #a2cff5;
+
+    --color-scheme: light;
+
+    /* Same as `--icons` */
+    --copy-button-filter: invert(45.49%);
+    /* Same as `--sidebar-active` */
+    --copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%);
+
+    --footnote-highlight: #7e7eff;
+
+    --overlay-bg: rgba(200, 200, 205, 0.4);
+
+    --blockquote-note-color: #0969da;
+    --blockquote-tip-color: #008000;
+    --blockquote-important-color: #8250df;
+    --blockquote-warning-color: #9a6700;
+    --blockquote-caution-color: #b52731;
+
+    --sidebar-header-border-color: #6e6edb;
+}
+
+.navy {
+    --bg: hsl(226, 23%, 11%);
+    --fg: #bcbdd0;
+
+    --sidebar-bg: #282d3f;
+    --sidebar-fg: #c8c9db;
+    --sidebar-non-existant: #505274;
+    --sidebar-active: #2b79a2;
+    --sidebar-spacer: #2d334f;
+
+    --scrollbar: var(--sidebar-fg);
+
+    --icons: #737480;
+    --icons-hover: #b7b9cc;
+
+    --links: #2b79a2;
+
+    --inline-code-color: #c5c8c6;
+
+    --theme-popup-bg: #161923;
+    --theme-popup-border: #737480;
+    --theme-hover: #282e40;
+
+    --quote-bg: hsl(226, 15%, 17%);
+    --quote-border: hsl(226, 15%, 22%);
+
+    --warning-border: #ff8e00;
+
+    --table-border-color: hsl(226, 23%, 16%);
+    --table-header-bg: hsl(226, 23%, 31%);
+    --table-alternate-bg: hsl(226, 23%, 14%);
+
+    --searchbar-border-color: #aaa;
+    --searchbar-bg: #aeaec6;
+    --searchbar-fg: #000;
+    --searchbar-shadow-color: #aaa;
+    --searchresults-header-fg: #5f5f71;
+    --searchresults-border-color: #5c5c68;
+    --searchresults-li-bg: #242430;
+    --search-mark-bg: #a2cff5;
+
+    --color-scheme: dark;
+
+    /* Same as `--icons` */
+    --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%);
+    /* Same as `--sidebar-active` */
+    --copy-button-filter-hover: invert(46%) sepia(20%) saturate(1537%) hue-rotate(156deg) brightness(85%) contrast(90%);
+
+    --footnote-highlight: #4079ae;
+
+    --overlay-bg: rgba(33, 40, 48, 0.4);
+
+    --blockquote-note-color: #4493f8;
+    --blockquote-tip-color: #09ca09;
+    --blockquote-important-color: #ab7df8;
+    --blockquote-warning-color: #d29922;
+    --blockquote-caution-color: #f21424;
+
+    --sidebar-header-border-color: #2f6ab5;
+}
+
+.rust {
+    --bg: hsl(60, 9%, 87%);
+    --fg: #262625;
+
+    --sidebar-bg: #3b2e2a;
+    --sidebar-fg: #c8c9db;
+    --sidebar-non-existant: #505254;
+    --sidebar-active: #e69f67;
+    --sidebar-spacer: #45373a;
+
+    --scrollbar: var(--sidebar-fg);
+
+    --icons: #737480;
+    --icons-hover: #262625;
+
+    --links: #2b79a2;
+
+    --inline-code-color: #6e6b5e;
+
+    --theme-popup-bg: #e1e1db;
+    --theme-popup-border: #b38f6b;
+    --theme-hover: #99908a;
+
+    --quote-bg: hsl(60, 5%, 75%);
+    --quote-border: hsl(60, 5%, 70%);
+
+    --warning-border: #ff8e00;
+
+    --table-border-color: hsl(60, 9%, 82%);
+    --table-header-bg: #b3a497;
+    --table-alternate-bg: hsl(60, 9%, 84%);
+
+    --searchbar-border-color: #aaa;
+    --searchbar-bg: #fafafa;
+    --searchbar-fg: #000;
+    --searchbar-shadow-color: #aaa;
+    --searchresults-header-fg: #666;
+    --searchresults-border-color: #888;
+    --searchresults-li-bg: #dec2a2;
+    --search-mark-bg: #e69f67;
+
+    /* Same as `--icons` */
+    --copy-button-filter: invert(51%) sepia(10%) saturate(393%) hue-rotate(198deg) brightness(86%) contrast(87%);
+    /* Same as `--sidebar-active` */
+    --copy-button-filter-hover: invert(77%) sepia(16%) saturate(1798%) hue-rotate(328deg) brightness(98%) contrast(83%);
+
+    --footnote-highlight: #d3a17a;
+
+    --overlay-bg: rgba(150, 150, 150, 0.25);
+
+    --blockquote-note-color: #023b95;
+    --blockquote-tip-color: #007700;
+    --blockquote-important-color: #8250df;
+    --blockquote-warning-color: #603700;
+    --blockquote-caution-color: #aa1721;
+
+    --sidebar-header-border-color: #8c391f;
+}
+
+@media (prefers-color-scheme: dark) {
+    html:not(.js) {
+        --bg: hsl(200, 7%, 8%);
+        --fg: #98a3ad;
+
+        --sidebar-bg: #292c2f;
+        --sidebar-fg: #a1adb8;
+        --sidebar-non-existant: #505254;
+        --sidebar-active: #3473ad;
+        --sidebar-spacer: #393939;
+
+        --scrollbar: var(--sidebar-fg);
+
+        --icons: #43484d;
+        --icons-hover: #b3c0cc;
+
+        --links: #2b79a2;
+
+        --inline-code-color: #c5c8c6;
+
+        --theme-popup-bg: #141617;
+        --theme-popup-border: #43484d;
+        --theme-hover: #1f2124;
+
+        --quote-bg: hsl(234, 21%, 18%);
+        --quote-border: hsl(234, 21%, 23%);
+
+        --warning-border: #ff8e00;
+
+        --table-border-color: hsl(200, 7%, 13%);
+        --table-header-bg: hsl(200, 7%, 28%);
+        --table-alternate-bg: hsl(200, 7%, 11%);
+
+        --searchbar-border-color: #aaa;
+        --searchbar-bg: #b7b7b7;
+        --searchbar-fg: #000;
+        --searchbar-shadow-color: #aaa;
+        --searchresults-header-fg: #666;
+        --searchresults-border-color: #98a3ad;
+        --searchresults-li-bg: #2b2b2f;
+        --search-mark-bg: #355c7d;
+
+        --color-scheme: dark;
+
+        /* Same as `--icons` */
+        --copy-button-filter: invert(26%) sepia(8%) saturate(575%) hue-rotate(169deg) brightness(87%) contrast(82%);
+        /* Same as `--sidebar-active` */
+        --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%);
+
+        --footnote-highlight: #4079ae;
+
+        --overlay-bg: rgba(33, 40, 48, 0.4);
+
+        --blockquote-note-color: #4493f8;
+        --blockquote-tip-color: #08ae08;
+        --blockquote-important-color: #ab7df8;
+        --blockquote-warning-color: #d29922;
+        --blockquote-caution-color: #d91b29;
+
+        --sidebar-header-border-color: #3473ad;
+    }
+}
diff --git a/theme/favicon.png b/theme/favicon.png
new file mode 100644
index 00000000..a5b1aa16
Binary files /dev/null and b/theme/favicon.png differ
diff --git a/theme/favicon.svg b/theme/favicon.svg
new file mode 100644
index 00000000..90e0ea58
--- /dev/null
+++ b/theme/favicon.svg
@@ -0,0 +1,22 @@
+
+  
+
+
+
diff --git a/theme/fonts/OPEN-SANS-LICENSE.txt b/theme/fonts/OPEN-SANS-LICENSE.txt
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/theme/fonts/OPEN-SANS-LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt b/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt
new file mode 100644
index 00000000..366206f5
--- /dev/null
+++ b/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt
@@ -0,0 +1,93 @@
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded, 
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/theme/fonts/fonts.css b/theme/fonts/fonts.css
new file mode 100644
index 00000000..a6b12b3b
--- /dev/null
+++ b/theme/fonts/fonts.css
@@ -0,0 +1,100 @@
+/* Open Sans is licensed under the Apache License, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 */
+/* Source Code Pro is under the Open Font License. See https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL */
+
+/* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 300;
+  src: local('Open Sans Light'), local('OpenSans-Light'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-300.woff2" }}') format('woff2');
+}
+
+/* open-sans-300italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 300;
+  src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-300italic.woff2" }}') format('woff2');
+}
+
+/* open-sans-regular - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans Regular'), local('OpenSans-Regular'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-regular.woff2" }}') format('woff2');
+}
+
+/* open-sans-italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 400;
+  src: local('Open Sans Italic'), local('OpenSans-Italic'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-italic.woff2" }}') format('woff2');
+}
+
+/* open-sans-600 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 600;
+  src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-600.woff2" }}') format('woff2');
+}
+
+/* open-sans-600italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 600;
+  src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-600italic.woff2" }}') format('woff2');
+}
+
+/* open-sans-700 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 700;
+  src: local('Open Sans Bold'), local('OpenSans-Bold'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-700.woff2" }}') format('woff2');
+}
+
+/* open-sans-700italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 700;
+  src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-700italic.woff2" }}') format('woff2');
+}
+
+/* open-sans-800 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 800;
+  src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-800.woff2" }}') format('woff2');
+}
+
+/* open-sans-800italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Open Sans';
+  font-style: italic;
+  font-weight: 800;
+  src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'),
+       url('{{ resource "fonts/open-sans-v17-all-charsets-800italic.woff2" }}') format('woff2');
+}
+
+/* source-code-pro-500 - latin_vietnamese_latin-ext_greek_cyrillic-ext_cyrillic */
+@font-face {
+  font-family: 'Source Code Pro';
+  font-style: normal;
+  font-weight: 500;
+  src: url('{{ resource "fonts/source-code-pro-v11-all-charsets-500.woff2" }}') format('woff2');
+}
diff --git a/theme/fonts/open-sans-v17-all-charsets-300.woff2 b/theme/fonts/open-sans-v17-all-charsets-300.woff2
new file mode 100644
index 00000000..9f51be37
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-300.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-300italic.woff2
new file mode 100644
index 00000000..2f545448
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-300italic.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-600.woff2 b/theme/fonts/open-sans-v17-all-charsets-600.woff2
new file mode 100644
index 00000000..f503d558
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-600.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-600italic.woff2
new file mode 100644
index 00000000..c99aabe8
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-600italic.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-700.woff2 b/theme/fonts/open-sans-v17-all-charsets-700.woff2
new file mode 100644
index 00000000..421a1ab2
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-700.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-700italic.woff2
new file mode 100644
index 00000000..12ce3d20
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-700italic.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-800.woff2 b/theme/fonts/open-sans-v17-all-charsets-800.woff2
new file mode 100644
index 00000000..c94a223b
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-800.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-800italic.woff2
new file mode 100644
index 00000000..eed7d3c6
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-800italic.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-italic.woff2 b/theme/fonts/open-sans-v17-all-charsets-italic.woff2
new file mode 100644
index 00000000..398b68a0
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-italic.woff2 differ
diff --git a/theme/fonts/open-sans-v17-all-charsets-regular.woff2 b/theme/fonts/open-sans-v17-all-charsets-regular.woff2
new file mode 100644
index 00000000..8383e94c
Binary files /dev/null and b/theme/fonts/open-sans-v17-all-charsets-regular.woff2 differ
diff --git a/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 b/theme/fonts/source-code-pro-v11-all-charsets-500.woff2
new file mode 100644
index 00000000..72224568
Binary files /dev/null and b/theme/fonts/source-code-pro-v11-all-charsets-500.woff2 differ
diff --git a/theme/highlight.css b/theme/highlight.css
new file mode 100644
index 00000000..352c79b9
--- /dev/null
+++ b/theme/highlight.css
@@ -0,0 +1,83 @@
+/*
+ * An increased contrast highlighting scheme loosely based on the
+ * "Base16 Atelier Dune Light" theme by Bram de Haan
+ * (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
+ * Original Base16 color scheme by Chris Kempson
+ * (https://github.com/chriskempson/base16)
+ */
+
+/* Comment */
+.hljs-comment,
+.hljs-quote {
+  color: #575757;
+}
+
+/* Red */
+.hljs-variable,
+.hljs-template-variable,
+.hljs-attribute,
+.hljs-attr,
+.hljs-tag,
+.hljs-name,
+.hljs-regexp,
+.hljs-link,
+.hljs-name,
+.hljs-selector-id,
+.hljs-selector-class {
+  color: #d70025;
+}
+
+/* Orange */
+.hljs-number,
+.hljs-meta,
+.hljs-built_in,
+.hljs-builtin-name,
+.hljs-literal,
+.hljs-type,
+.hljs-params {
+  color: #b21e00;
+}
+
+/* Green */
+.hljs-string,
+.hljs-symbol,
+.hljs-bullet {
+  color: #008200;
+}
+
+/* Blue */
+.hljs-title,
+.hljs-section {
+  color: #0030f2;
+}
+
+/* Purple */
+.hljs-keyword,
+.hljs-selector-tag {
+  color: #9d00ec;
+}
+
+.hljs {
+  display: block;
+  overflow-x: auto;
+  background: #f6f7f6;
+  color: #000;
+}
+
+.hljs-emphasis {
+  font-style: italic;
+}
+
+.hljs-strong {
+  font-weight: bold;
+}
+
+.hljs-addition {
+  color: #22863a;
+  background-color: #f0fff4;
+}
+
+.hljs-deletion {
+  color: #b31d28;
+  background-color: #ffeef0;
+}
diff --git a/theme/highlight.js b/theme/highlight.js
new file mode 100644
index 00000000..18d24345
--- /dev/null
+++ b/theme/highlight.js
@@ -0,0 +1,54 @@
+/*
+  Highlight.js 10.1.1 (93fd0d73)
+  License: BSD-3-Clause
+  Copyright (c) 2006-2020, Ivan Sagalaev
+*/
+var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset"}function u(e){s+=""}function d(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var g=l();if(s+=t(r.substring(i,g[0].offset)),i=g[0].offset,g===e){o.reverse().forEach(u);do{d(g.splice(0,1)[0]),g=l()}while(g===e&&g.length&&g[0].offset===i);o.reverse().forEach(c)}else"start"===g[0].event?o.push(g[0].node):o.pop(),d(g.splice(0,1)[0])}return s+t(r.substr(i))}});const s="",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=``}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(e){return e?"string"==typeof e?e:e.source:null}const g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},b={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(b),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=m("//","$"),x=m("/\\*","\\*/"),E=m("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:g,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>d(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:b,COMMENT:m,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:g,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[h,{begin:/\[/,end:/\]/,relevance:0,contains:[h]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}}),N="of and for in not or if then".split(" ");function w(e,n){return n?+n:function(e){return N.includes(e.toLowerCase())}(e)?0:1}const R=t,y=r,{nodeStream:k,mergeStreams:O}=i,M=Symbol("nomatch");return function(t){var a=[],i={},s={},o=[],l=!0,c=/(^(<[^>]+>|\t|)+|\n)/gm,g="Could not find the language '{}', did you forget to load/include a language module?";const h={disableAutodetect:!0,name:"Plain text",contains:[]};var f={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:u};function p(e){return f.noHighlightRe.test(e)}function b(e,n,t,r){var a={code:n,language:e};S("before:highlight",a);var i=a.result?a.result:m(a.language,a.code,t,r);return i.code=a.code,S("after:highlight",i),i}function m(e,t,a,s){var o=t;function c(e,n){var t=E.case_insensitive?n[0].toLowerCase():n[0];return Object.prototype.hasOwnProperty.call(e.keywords,t)&&e.keywords[t]}function u(){null!=y.subLanguage?function(){if(""!==A){var e=null;if("string"==typeof y.subLanguage){if(!i[y.subLanguage])return void O.addText(A);e=m(y.subLanguage,A,!0,k[y.subLanguage]),k[y.subLanguage]=e.top}else e=v(A,y.subLanguage.length?y.subLanguage:null);y.relevance>0&&(I+=e.relevance),O.addSublanguage(e.emitter,e.language)}}():function(){if(!y.keywords)return void O.addText(A);let e=0;y.keywordPatternRe.lastIndex=0;let n=y.keywordPatternRe.exec(A),t="";for(;n;){t+=A.substring(e,n.index);const r=c(y,n);if(r){const[e,a]=r;O.addText(t),t="",I+=a,O.addKeyword(n[0],e)}else t+=n[0];e=y.keywordPatternRe.lastIndex,n=y.keywordPatternRe.exec(A)}t+=A.substr(e),O.addText(t)}(),A=""}function h(e){return e.className&&O.openNode(e.className),y=Object.create(e,{parent:{value:y}})}function p(e){return 0===y.matcher.regexIndex?(A+=e[0],1):(L=!0,0)}var b={};function x(t,r){var i=r&&r[0];if(A+=t,null==i)return u(),0;if("begin"===b.type&&"end"===r.type&&b.index===r.index&&""===i){if(A+=o.slice(r.index,r.index+1),!l){const n=Error("0 width match regex");throw n.languageName=e,n.badRule=b.rule,n}return 1}if(b=r,"begin"===r.type)return function(e){var t=e[0],r=e.rule;const a=new n(r),i=[r.__beforeBegin,r["on:begin"]];for(const n of i)if(n&&(n(e,a),a.ignore))return p(t);return r&&r.endSameAsBegin&&(r.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),r.skip?A+=t:(r.excludeBegin&&(A+=t),u(),r.returnBegin||r.excludeBegin||(A=t)),h(r),r.returnBegin?0:t.length}(r);if("illegal"===r.type&&!a){const e=Error('Illegal lexeme "'+i+'" for mode "'+(y.className||"")+'"');throw e.mode=y,e}if("end"===r.type){var s=function(e){var t=e[0],r=o.substr(e.index),a=function e(t,r,a){let i=function(e,n){var t=e&&e.exec(n);return t&&0===t.index}(t.endRe,a);if(i){if(t["on:end"]){const e=new n(t);t["on:end"](r,e),e.ignore&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return e(t.parent,r,a)}(y,e,r);if(!a)return M;var i=y;i.skip?A+=t:(i.returnEnd||i.excludeEnd||(A+=t),u(),i.excludeEnd&&(A=t));do{y.className&&O.closeNode(),y.skip||y.subLanguage||(I+=y.relevance),y=y.parent}while(y!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),h(a.starts)),i.returnEnd?0:t.length}(r);if(s!==M)return s}if("illegal"===r.type&&""===i)return 1;if(B>1e5&&B>3*r.index)throw Error("potential infinite loop, way more iterations than matches");return A+=i,i.length}var E=T(e);if(!E)throw console.error(g.replace("{}",e)),Error('Unknown language: "'+e+'"');var _=function(e){function n(n,t){return RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=function(e){return RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=n(function(e,n="|"){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i0&&(a+=n),a+="(";o.length>0;){var l=t.exec(o);if(null==l){a+=o;break}a+=o.substring(0,l.index),o=o.substring(l.index+l[0].length),"\\"===l[0][0]&&l[1]?a+="\\"+(+l[1]+s):(a+=l[0],"("===l[0]&&r++)}a+=")"}return a}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex((e,n)=>n>0&&void 0!==e),r=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,r)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach(([e,t])=>n.addRule(e,t)),n.compile(),this.multiRegexes[e]=n,n}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;const t=n.exec(e);return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&(this.regexIndex=0)),t}}function i(e,n){const t=e.input[e.index-1],r=e.input[e.index+e[0].length];"."!==t&&"."!==r||n.ignoreMatch()}if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return function t(s,o){const l=s;if(s.compiled)return l;s.compiled=!0,s.__beforeBegin=null,s.keywords=s.keywords||s.beginKeywords;let c=null;if("object"==typeof s.keywords&&(c=s.keywords.$pattern,delete s.keywords.$pattern),s.keywords&&(s.keywords=function(e,n){var t={};return"string"==typeof e?r("keyword",e):Object.keys(e).forEach((function(n){r(n,e[n])})),t;function r(e,r){n&&(r=r.toLowerCase()),r.split(" ").forEach((function(n){var r=n.split("|");t[r[0]]=[e,w(r[0],r[1])]}))}}(s.keywords,e.case_insensitive)),s.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l.keywordPatternRe=n(s.lexemes||c||/\w+/,!0),o&&(s.beginKeywords&&(s.begin="\\b("+s.beginKeywords.split(" ").join("|")+")(?=\\b|\\s)",s.__beforeBegin=i),s.begin||(s.begin=/\B|\b/),l.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),s.end&&(l.endRe=n(s.end)),l.terminator_end=d(s.end)||"",s.endsWithParent&&o.terminator_end&&(l.terminator_end+=(s.end?"|":"")+o.terminator_end)),s.illegal&&(l.illegalRe=n(s.illegal)),void 0===s.relevance&&(s.relevance=1),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(n){return r(e,{variants:null},n)}))),e.cached_variants?e.cached_variants:function e(n){return!!n&&(n.endsWithParent||e(n.starts))}(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?s:e)}))),s.contains.forEach((function(e){t(e,l)})),s.starts&&t(s.starts,o),l.matcher=function(e){const n=new a;return e.contains.forEach(e=>n.addRule(e.begin,{rule:e,type:"begin"})),e.terminator_end&&n.addRule(e.terminator_end,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(l),l}(e)}(E),N="",y=s||_,k={},O=new f.__emitter(f);!function(){for(var e=[],n=y;n!==E;n=n.parent)n.className&&e.unshift(n.className);e.forEach(e=>O.openNode(e))}();var A="",I=0,S=0,B=0,L=!1;try{for(y.matcher.considerAll();;){B++,L?L=!1:(y.matcher.lastIndex=S,y.matcher.considerAll());const e=y.matcher.exec(o);if(!e)break;const n=x(o.substring(S,e.index),e);S=e.index+n}return x(o.substr(S)),O.closeAllNodes(),O.finalize(),N=O.toHTML(),{relevance:I,value:N,language:e,illegal:!1,emitter:O,top:y}}catch(n){if(n.message&&n.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:n.message,context:o.slice(S-100,S+100),mode:n.mode},sofar:N,relevance:0,value:R(o),emitter:O};if(l)return{illegal:!1,relevance:0,value:R(o),emitter:O,language:e,top:y,errorRaised:n};throw n}}function v(e,n){n=n||f.languages||Object.keys(i);var t=function(e){const n={relevance:0,emitter:new f.__emitter(f),value:R(e),illegal:!1,top:h};return n.emitter.addText(e),n}(e),r=t;return n.filter(T).filter(I).forEach((function(n){var a=m(n,e,!1);a.language=n,a.relevance>r.relevance&&(r=a),a.relevance>t.relevance&&(r=t,t=a)})),r.language&&(t.second_best=r),t}function x(e){return f.tabReplace||f.useBR?e.replace(c,e=>"\n"===e?f.useBR?"
":e:f.tabReplace?e.replace(/\t/g,f.tabReplace):e):e}function E(e){let n=null;const t=function(e){var n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=f.languageDetectRe.exec(n);if(t){var r=T(t[1]);return r||(console.warn(g.replace("{}",t[1])),console.warn("Falling back to no-highlight mode for this block.",e)),r?t[1]:"no-highlight"}return n.split(/\s+/).find(e=>p(e)||T(e))}(e);if(p(t))return;S("before:highlightBlock",{block:e,language:t}),f.useBR?(n=document.createElement("div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n"):n=e;const r=n.textContent,a=t?b(t,r,!0):v(r),i=k(n);if(i.length){const e=document.createElement("div");e.innerHTML=a.value,a.value=O(i,k(e),r)}a.value=x(a.value),S("after:highlightBlock",{block:e,result:a}),e.innerHTML=a.value,e.className=function(e,n,t){var r=n?s[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),e.includes(r)||a.push(r),a.join(" ").trim()}(e.className,t,a.language),e.result={language:a.language,re:a.relevance,relavance:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance,relavance:a.second_best.relevance})}const N=()=>{if(!N.called){N.called=!0;var e=document.querySelectorAll("pre code");a.forEach.call(e,E)}};function T(e){return e=(e||"").toLowerCase(),i[e]||i[s[e]]}function A(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach(e=>{s[e]=n})}function I(e){var n=T(e);return n&&!n.disableAutodetect}function S(e,n){var t=e;o.forEach((function(e){e[t]&&e[t](n)}))}Object.assign(t,{highlight:b,highlightAuto:v,fixMarkup:x,highlightBlock:E,configure:function(e){f=y(f,e)},initHighlighting:N,initHighlightingOnLoad:function(){window.addEventListener("DOMContentLoaded",N,!1)},registerLanguage:function(e,n){var r=null;try{r=n(t)}catch(n){if(console.error("Language definition for '{}' could not be registered.".replace("{}",e)),!l)throw n;console.error(n),r=h}r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&A(r.aliases,{languageName:e})},listLanguages:function(){return Object.keys(i)},getLanguage:T,registerAliases:A,requireLanguage:function(e){var n=T(e);if(n)return n;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:I,inherit:y,addPlugin:function(e){o.push(e)}}),t.debugMode=function(){l=!1},t.safeMode=function(){l=!0},t.versionString="10.1.1";for(const n in _)"object"==typeof _[n]&&e(_[n]);return Object.assign(t,_),t}({})}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); +hljs.registerLanguage("apache",function(){"use strict";return function(e){var n={className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?"};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"",contains:[n,{className:"number",begin:":\\d{1,5}"},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number",begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}()); +hljs.registerLanguage("bash",function(){"use strict";return function(e){const s={};Object.assign(s,{className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{/,end:/\}/,contains:[{begin:/:-/,contains:[s]}]}]});const t={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,t]};t.contains.push(n);const a={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,s]},i=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b-?[a-z\._]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[i,e.SHEBANG(),c,a,e.HASH_COMMENT_MODE,n,{className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},s]}}}()); +hljs.registerLanguage("c-like",function(){"use strict";return function(e){function t(e){return"(?:"+e+")?"}var n="(decltype\\(auto\\)|"+t("[a-zA-Z_]\\w*::")+"[a-zA-Z_]\\w*"+t("<.*?>")+")",r={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"meta-string"}),{className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},o={className:"title",begin:t("[a-zA-Z_]\\w*::")+e.IDENT_RE,relevance:0},c=t("[a-zA-Z_]\\w*::")+e.IDENT_RE+"\\s*\\(",l={keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary",literal:"true false nullptr NULL"},d=[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:l,contains:d.concat([{begin:/\(/,end:/\)/,keywords:l,contains:d.concat(["self"]),relevance:0}]),relevance:0},u={className:"function",begin:"("+n+"[\\*&\\s]+)+"+c,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:l,illegal:/[^\w\s\*&:<>]/,contains:[{begin:"decltype\\(auto\\)",keywords:l,relevance:0},{begin:c,returnBegin:!0,contains:[o],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r,{begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,i,r]}]},r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s]};return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:l,disableAutodetect:!0,illegal:"",keywords:l,contains:["self",r]},{begin:e.IDENT_RE+"::",keywords:l},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin://,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:s,strings:a,keywords:l}}}}()); +hljs.registerLanguage("c",function(){"use strict";return function(e){var n=e.getLanguage("c-like").rawDefinition();return n.name="C",n.aliases=["c","h"],n}}()); +hljs.registerLanguage("coffeescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((e=>n=>!e.includes(n))(["var","const","let","function","static"])).join(" "),literal:n.concat(["yes","no","on","off"]).join(" "),built_in:a.concat(["npm","print"]).join(" ")},i="[A-Za-z$_][0-9A-Za-z$_]*",s={className:"subst",begin:/#\{/,end:/}/,keywords:t},o=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,s]},{begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,s]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[s,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+i},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];s.contains=o;var c=r.inherit(r.TITLE_MODE,{begin:i}),l={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:o.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+i+"\\s*=\\s*(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[c,l]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:"(\\(.*\\))?\\s*\\B[-=]>",end:"[-=]>",returnBegin:!0,contains:[l]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[c]},c]},{begin:i+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}()); +hljs.registerLanguage("cpp",function(){"use strict";return function(e){var t=e.getLanguage("c-like").rawDefinition();return t.disableAutodetect=!1,t.name="C++",t.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],t}}()); +hljs.registerLanguage("csharp",function(){"use strict";return function(e){var n={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let nameof on orderby partial remove select set value var when where yield",literal:"null false true"},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},t=e.inherit(s,{illegal:/\n/}),l={className:"subst",begin:"{",end:"}",keywords:n},r=e.inherit(l,{illegal:/\n/}),c={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,r]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},l]},g=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]});l.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],r.contains=[g,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var d={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},d,a,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.IDENT_RE+"\\s*(\\<.+\\>)?\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0,contains:[d,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}}()); +hljs.registerLanguage("css",function(){"use strict";return function(e){var n={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",illegal:/:/,returnBegin:!0,contains:[{className:"keyword",begin:/@\-?\w[\w]*(\-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/,className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("diff",function(){"use strict";return function(e){return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}()); +hljs.registerLanguage("go",function(){"use strict";return function(e){var n={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{name:"Go",aliases:["golang"],keywords:n,illegal:"e(n)).join("")}return function(a){var s={className:"number",relevance:0,variants:[{begin:/([\+\-]+)?[\d]+_[\d_]+/},{begin:a.NUMBER_RE}]},i=a.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];var t={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,s,"self"],relevance:0},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map(n=>e(n)).join("|")+")";return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr",starts:{end:/$/,contains:[i,c,r,t,l,s]}}]}}}()); +hljs.registerLanguage("java",function(){"use strict";function e(e){return e?"string"==typeof e?e:e.source:null}function n(e){return a("(",e,")?")}function a(...n){return n.map(n=>e(n)).join("")}function s(...n){return"("+n.map(n=>e(n)).join("|")+")"}return function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",i={className:"meta",begin:"@[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},r=e=>a("[",e,"]+([",e,"_]*[",e,"]+)?"),c={className:"number",variants:[{begin:`\\b(0[bB]${r("01")})[lL]?`},{begin:`\\b(0${r("0-7")})[dDfFlL]?`},{begin:a(/\b0[xX]/,s(a(r("a-fA-F0-9"),/\./,r("a-fA-F0-9")),a(r("a-fA-F0-9"),/\.?/),a(/\./,r("a-fA-F0-9"))),/([pP][+-]?(\d+))?/,/[fFdDlL]?/)},{begin:a(/\b/,s(a(/\d*\./,r("\\d")),r("\\d")),/[eE][+-]?[\d]+[dDfF]?/)},{begin:a(/\b/,r(/\d/),n(/\.?/),n(r(/\d/)),/[dDfFlL]?/)}],relevance:0};return{name:"Java",aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},c,i]}}}()); +hljs.registerLanguage("javascript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function s(e){return r("(?=",e,")")}function r(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(t){var i="[A-Za-z$_][0-9A-Za-z$_]*",c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/},o={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.join(" "),literal:n.join(" "),built_in:a.join(" ")},l={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:t.C_NUMBER_RE+"n?"}],relevance:0},E={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},d={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},g={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,E],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,E]};E.contains=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,l,t.REGEXP_MODE];var b=E.contains.concat([{begin:/\(/,end:/\)/,contains:["self"].concat(E.contains,[t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE])},t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]),_={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:b};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,contains:[t.SHEBANG({binary:"node",relevance:5}),{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,d,g,u,t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,l,{begin:r(/[{,\n]\s*/,s(r(/(((\/\/.*)|(\/\*(.|\n)*\*\/))\s*)*/,i+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:i+s("\\s*:"),relevance:0}]},{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:b}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:""},{begin:c.begin,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:i}),_],illegal:/\[|%/},{begin:/\$[(.]/},t.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:"(get|set)\\s+(?="+i+"\\()",end:/{/,keywords:"get set",contains:[t.inherit(t.TITLE_MODE,{begin:i}),{begin:/\(\)/},_]}],illegal:/#(?!!)/}}}()); +hljs.registerLanguage("json",function(){"use strict";return function(n){var e={literal:"true false null"},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],t=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:t,keywords:e},l={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(a,{begin:/:/})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(a)],illegal:"\\S"};return t.push(l,s),i.forEach((function(n){t.push(n)})),{name:"JSON",contains:t,keywords:e,illegal:"\\S"}}}()); +hljs.registerLanguage("kotlin",function(){"use strict";return function(e){var n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:"\\${",end:"}",contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},t={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(t);var r={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(t,{className:"meta-string"})]}]},c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),o={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},d=o;return d.variants[1].contains=[o],o.variants[1].contains=[d],{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a,r,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[o,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,r,l,t,e.C_NUMBER_MODE]},c]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},r,l]},t,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},{className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0}]}}}()); +hljs.registerLanguage("less",function(){"use strict";return function(e){var n="([\\w-]+|@{[\\w-]+})",a=[],s=[],t=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},r=function(e,n,a){return{className:e,begin:n,relevance:a}},i={begin:"\\(",end:"\\)",contains:s,relevance:0};s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@{[\\w-]+}"),r("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var c=s.concat({begin:"{",end:"}",contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},o={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@{[\\w-]+}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:c},{begin:"!important"}]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,d,o,b),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}}()); +hljs.registerLanguage("lua",function(){"use strict";return function(e){var t={begin:"\\[=*\\[",end:"\\]=*\\]",contains:["self"]},a=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[","\\]=*\\]",{contains:[t],relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\[=*\\[",end:"\\]=*\\]",contains:[t],relevance:5}])}}}()); +hljs.registerLanguage("makefile",function(){"use strict";return function(e){var i={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[a,i,t,s,{begin:"\\[",end:"\\]",contains:[{className:"meta",begin:"",contains:[a,s,i,t]}]}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:")",end:">",keywords:{name:"style"},contains:[c],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">",keywords:{name:"script"},contains:[c],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},c]}]}}}()); +hljs.registerLanguage("markdown",function(){"use strict";return function(n){const e={begin:"<",end:">",subLanguage:"xml",relevance:0},a={begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},i={className:"strong",contains:[],variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},s={className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{begin:/_(?!_)/,end:/_/,relevance:0}]};i.contains.push(s),s.contains.push(i);var c=[e,a];return i.contains=i.contains.concat(c),s.contains=s.contains.concat(c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:c=c.concat(i,s)},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:c}]}]},e,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:c,end:"$"},{className:"code",variants:[{begin:"(`{3,})(.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})(.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}()); +hljs.registerLanguage("nginx",function(){"use strict";return function(e){var n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{$pattern:"[a-z/_]+",literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}],illegal:"[^\\s\\}]"}}}()); +hljs.registerLanguage("objectivec",function(){"use strict";return function(e){var n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n,keyword:"@interface @class @protocol @implementation"};return{name:"Objective-C",aliases:["mm","objc","obj-c"],keywords:{$pattern:n,keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}()); +hljs.registerLanguage("perl",function(){"use strict";return function(e){var n={$pattern:/[\w.]+/,keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"},t={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:n},s={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,t,r],a=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),s,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return t.contains=a,s.contains=a,{name:"Perl",aliases:["pl","pm"],keywords:n,contains:a}}}()); +hljs.registerLanguage("php",function(){"use strict";return function(e){var r={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},t={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},i={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:i,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},t,{className:"keyword",begin:/\$this\b/},r,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",r,e.C_BLOCK_COMMENT_MODE,a,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},a,n]}}}()); +hljs.registerLanguage("php-template",function(){"use strict";return function(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}}()); +hljs.registerLanguage("plaintext",function(){"use strict";return function(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}}()); +hljs.registerLanguage("properties",function(){"use strict";return function(e){var n="[ \\t\\f]*",t="("+n+"[:=]"+n+"|[ \\t\\f]+)",a="([^\\\\:= \\t\\f\\n]|\\\\.)+",s={end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+"+t,returnBegin:!0,contains:[{className:"attr",begin:"([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",endsParent:!0,relevance:0}],starts:s},{begin:a+t,returnBegin:!0,relevance:0,contains:[{className:"meta",begin:a,endsParent:!0,relevance:0}],starts:s},{className:"attr",relevance:0,begin:a+n+"$"}]}}}()); +hljs.registerLanguage("python",function(){"use strict";return function(e){var n={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},a={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:n,illegal:/#/},s={begin:/\{\{/,relevance:0},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},t={className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:["self",a,l,r,e.HASH_COMMENT_MODE]}]};return i.contains=[r,l,a],{name:"Python",aliases:["py","gyp","ipython"],keywords:n,illegal:/(<\/|->|\?)|=>/,contains:[a,l,{beginKeywords:"if",relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,t,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}()); +hljs.registerLanguage("python-repl",function(){"use strict";return function(n){return{aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}}()); +hljs.registerLanguage("ruby",function(){"use strict";return function(e){var n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",a={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},s={className:"doctag",begin:"@[A-Za-z]+"},i={begin:"#<",end:">"},r=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^\\=begin","^\\=end",{contains:[s],relevance:10}),e.COMMENT("^__END__","\\n$")],c={className:"subst",begin:"#\\{",end:"}",keywords:a},t={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<[-~]?'?(\w+)(?:.|\n)*?\n\s*\1\b/,returnBegin:!0,contains:[{begin:/<<[-~]?'?/},e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},b={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:a},d=[t,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(r)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:n}),b].concat(r)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[t,{begin:n}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(r),relevance:0}].concat(r);c.contains=d,b.contains=d;var g=[{begin:/^\s*=>/,starts:{end:"$",contains:d}},{className:"meta",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:d}}];return{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:r.concat(g).concat(d)}}}()); +hljs.registerLanguage("rust",function(){"use strict";return function(e){var n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}}()); +hljs.registerLanguage("scss",function(){"use strict";return function(e){var t={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"selector-pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"selector-pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},t,{className:"attribute",begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[t,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0,keywords:"and or not only",contains:[{begin:"@[a-z-]+",className:"keyword"},t,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE]}]}}}()); +hljs.registerLanguage("shell",function(){"use strict";return function(s){return{name:"Shell Session",aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[/\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}}()); +hljs.registerLanguage("sql",function(){"use strict";return function(e){var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0,illegal:/[<>{}*]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/,keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:"`",end:"`"},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}}()); +hljs.registerLanguage("swift",function(){"use strict";return function(e){var i={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst",begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/,end:/"/}]},r={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0};return t.contains=[r],{name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},r,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,contains:["self",r,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper)\\b"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}}()); +hljs.registerLanguage("typescript",function(){"use strict";const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);return function(r){var t={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:e.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "),literal:n.join(" "),built_in:a.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ")},s={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)n?"},{begin:"\\b(0[oO][0-7]+)n?"},{begin:r.C_NUMBER_RE+"n?"}],relevance:0},o={className:"subst",begin:"\\$\\{",end:"\\}",keywords:t,contains:[]},c={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"xml"}},l={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[r.BACKSLASH_ESCAPE,o],subLanguage:"css"}},E={className:"string",begin:"`",end:"`",contains:[r.BACKSLASH_ESCAPE,o]};o.contains=[r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,i,r.REGEXP_MODE];var d={begin:"\\(",end:/\)/,keywords:t,contains:["self",r.QUOTE_STRING_MODE,r.APOS_STRING_MODE,r.NUMBER_MODE]},u={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,s,d]};return{name:"TypeScript",aliases:["ts"],keywords:t,contains:[r.SHEBANG(),{className:"meta",begin:/^\s*['"]use strict['"]/},r.APOS_STRING_MODE,r.QUOTE_STRING_MODE,c,l,E,r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,i,{begin:"("+r.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,r.REGEXP_MODE,{className:"function",begin:"(\\([^(]*(\\([^(]*(\\([^(]*\\))?\\))?\\)|"+r.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:r.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:d.contains}]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",r.inherit(r.TITLE_MODE,{begin:"[A-Za-z$_][0-9A-Za-z$_]*"}),u],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/[\{;]/,excludeEnd:!0,contains:["self",u]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+r.IDENT_RE,relevance:0},s,d]}}}()); +hljs.registerLanguage("yaml",function(){"use strict";return function(e){var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*\\'()[\\]]+",s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]}]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={begin:"{",end:"}",contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type",begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"\\-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},{className:"number",begin:e.C_NUMBER_RE+"\\b"},t,g,s],c=[...b];return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml","YAML"],contains:b}}}()); +hljs.registerLanguage("armasm",function(){"use strict";return function(s){const e={variants:[s.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),s.COMMENT("[;@]","$",{relevance:0}),s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+s.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},e,s.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}}()); +hljs.registerLanguage("d",function(){"use strict";return function(e){var a={$pattern:e.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},d="((0|[1-9][\\d_]*)|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",n="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",t={className:"number",begin:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},_={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},r={className:"string",begin:"'("+n+"|.)",end:"'",illegal:"."},i={className:"string",begin:'"',contains:[{begin:n,relevance:0}],end:'"[cwd]?'},s=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:a,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},i,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},_,t,r,{className:"meta",begin:"^#!",end:"$",relevance:5},{className:"meta",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}}()); +hljs.registerLanguage("handlebars",function(){"use strict";function e(...e){return e.map(e=>(function(e){return e?"string"==typeof e?e:e.source:null})(e)).join("")}return function(n){const a={"builtin-name":"action bindattr collection component concat debugger each each-in get hash if in input link-to loc log lookup mut outlet partial query-params render template textarea unbound unless view with yield"},t=/\[.*?\]/,s=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,i=e("(",/'.*?'/,"|",/".*?"/,"|",t,"|",s,"|",/\.|\//,")+"),r=e("(",t,"|",s,")(?==)"),l={begin:i,lexemes:/[\w.\/]+/},c=n.inherit(l,{keywords:{literal:"true false undefined null"}}),o={begin:/\(/,end:/\)/},m={className:"attr",begin:r,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,c,o]}}},d={contains:[n.NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},m,c,o],returnEnd:!0},g=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/\)/})});o.contains=[g];const u=n.inherit(l,{keywords:a,className:"name",starts:n.inherit(d,{end:/}}/})}),b=n.inherit(l,{keywords:a,className:"name"}),h=n.inherit(l,{className:"name",keywords:a,starts:n.inherit(d,{end:/}}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},n.COMMENT(/\{\{!--/,/--\}\}/),n.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[u],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[b]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[u]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[b]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}}}()); +hljs.registerLanguage("haskell",function(){"use strict";return function(e){var n={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},i={className:"meta",begin:"{-#",end:"#-}"},a={className:"meta",begin:"^#",end:"$"},s={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},l={begin:"\\(",end:"\\)",illegal:'"',contains:[i,a,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),n]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[l,n],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[l,n],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[s,l,n]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[i,s,l,{begin:"{",end:"}",contains:l.contains},n]},{beginKeywords:"default",end:"$",contains:[s,l,n]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,n]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[s,e.QUOTE_STRING_MODE,n]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},i,a,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,s,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),n,{begin:"->|<-"}]}}}()); +hljs.registerLanguage("julia",function(){"use strict";return function(e){var r="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",t={$pattern:r,keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},a={keywords:t,illegal:/<\//},n={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},o={className:"variable",begin:"\\$"+r},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},l={className:"string",contains:[e.BACKSLASH_ESCAPE,n,o],begin:"`",end:"`"},s={className:"meta",begin:"@"+r};return a.name="Julia",a.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i,l,s,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],n.contains=a.contains,a}}()); +hljs.registerLanguage("nim",function(){"use strict";return function(e){return{name:"Nim",aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from func generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}}()); +hljs.registerLanguage("nix",function(){"use strict";return function(e){var n={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},i={className:"subst",begin:/\$\{/,end:/}/,keywords:n},t={className:"string",contains:[i],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},s=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,{begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]}];return i.contains=s,{name:"Nix",aliases:["nixos"],keywords:n,contains:s}}}()); +hljs.registerLanguage("r",function(){"use strict";return function(e){var n="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{name:"R",contains:[e.HASH_COMMENT_MODE,{begin:n,keywords:{$pattern:n,keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}}()); +hljs.registerLanguage("scala",function(){"use strict";return function(e){var n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},a={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},s={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},t={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},i={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[s]},t]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[t]};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},s,l,i,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}}()); +hljs.registerLanguage("x86asm",function(){"use strict";return function(s){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+s.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[s.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},s.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}}()); \ No newline at end of file diff --git a/theme/index.hbs b/theme/index.hbs new file mode 100644 index 00000000..840361c8 --- /dev/null +++ b/theme/index.hbs @@ -0,0 +1,367 @@ + + + + + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + + + + + + +
+
+

Keyboard shortcuts

+
+

Press or to navigate between chapters

+ {{#if search_enabled}} +

Press S or / to search in the book

+ {{/if}} +

Press ? to show this help

+

Press Esc to hide this help

+
+
+
+
+ + + + + + + + + + + + + +
+ +
+ {{> header}} +
+ + + {{#if search_enabled}} + + {{/if}} + + + + + +
+ + + +
+ + + + + + + + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + + {{#if fragment_map}} + + {{/if}} + +
+ +