Spring Data Graph

org.springframework.data.neo4j.rest
Class RestGraphDatabase

java.lang.Object
  extended by org.springframework.data.neo4j.rest.RestGraphDatabase
All Implemented Interfaces:
org.neo4j.graphdb.GraphDatabaseService, GraphDatabase

public class RestGraphDatabase
extends Object
implements org.neo4j.graphdb.GraphDatabaseService, GraphDatabase


Constructor Summary
RestGraphDatabase(URI uri)
           
RestGraphDatabase(URI uri, String user, String password)
           
 
Method Summary
 org.neo4j.graphdb.Transaction beginTx()
           
<T extends org.neo4j.graphdb.PropertyContainer>
org.neo4j.graphdb.index.Index<T>
createIndex(Class<T> type, String indexName, boolean fullText)
          creates a index
 org.neo4j.graphdb.Node createNode()
           
 org.neo4j.graphdb.Node createNode(Map<String,Object> props)
          Transactionally creates the node, sets the properties (if any).
 org.neo4j.graphdb.Relationship createRelationship(org.neo4j.graphdb.Node startNode, org.neo4j.graphdb.Node endNode, org.neo4j.graphdb.RelationshipType type, Map<String,Object> props)
          Transactionally creates the relationship, sets the properties (if any) and indexes the given fielss (if any) Two shortcut means of providing the properties (very short with static imports) graphDatabase.createRelationship(from,to,TYPE, PropertyMap.
 org.neo4j.graphdb.traversal.TraversalDescription createTraversalDescription()
           
 Iterable<org.neo4j.graphdb.Node> getAllNodes()
           
<T extends org.neo4j.graphdb.PropertyContainer>
org.neo4j.graphdb.index.Index<T>
getIndex(String indexName)
           
 org.neo4j.graphdb.Node getNodeById(long id)
           
 long getPropertyRefetchTimeInMillis()
           
 org.neo4j.graphdb.Node getReferenceNode()
           
 org.neo4j.graphdb.Relationship getRelationshipById(long id)
           
 Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes()
           
 RestRequest getRestRequest()
           
 RestIndexManager index()
           
 QueryEngine queryEngineFor(QueryType type)
           
 org.neo4j.graphdb.event.KernelEventHandler registerKernelEventHandler(org.neo4j.graphdb.event.KernelEventHandler handler)
           
<T> org.neo4j.graphdb.event.TransactionEventHandler<T>
registerTransactionEventHandler(org.neo4j.graphdb.event.TransactionEventHandler<T> handler)
           
 void setConversionService(ConversionService conversionService)
           
 void shutdown()
           
 org.neo4j.graphdb.event.KernelEventHandler unregisterKernelEventHandler(org.neo4j.graphdb.event.KernelEventHandler handler)
           
<T> org.neo4j.graphdb.event.TransactionEventHandler<T>
unregisterTransactionEventHandler(org.neo4j.graphdb.event.TransactionEventHandler<T> handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestGraphDatabase

public RestGraphDatabase(URI uri)

RestGraphDatabase

public RestGraphDatabase(URI uri,
                         String user,
                         String password)
Method Detail

getNodeById

public org.neo4j.graphdb.Node getNodeById(long id)
Specified by:
getNodeById in interface org.neo4j.graphdb.GraphDatabaseService
Specified by:
getNodeById in interface GraphDatabase
Parameters:
id - node id
Returns:
the requested node of the underlying graph database

createNode

public org.neo4j.graphdb.Node createNode(Map<String,Object> props)
Description copied from interface: GraphDatabase
Transactionally creates the node, sets the properties (if any). Two shortcut means of providing the properties (very short with static imports) graphDatabase.createNode(PropertyMap._("name","value")); graphDatabase.createNode(PropertyMap.props().set("name","value").set("prop","anotherValue").toMap(), "name", "prop");

Specified by:
createNode in interface GraphDatabase
Parameters:
props - properties to be set at node creation might be null
Returns:
the newly created node

getRelationshipById

public org.neo4j.graphdb.Relationship getRelationshipById(long id)
Specified by:
getRelationshipById in interface org.neo4j.graphdb.GraphDatabaseService
Specified by:
getRelationshipById in interface GraphDatabase
Parameters:
id - relationship id
Returns:
the requested relationship of the underlying graph database

createRelationship

public org.neo4j.graphdb.Relationship createRelationship(org.neo4j.graphdb.Node startNode,
                                                         org.neo4j.graphdb.Node endNode,
                                                         org.neo4j.graphdb.RelationshipType type,
                                                         Map<String,Object> props)
Description copied from interface: GraphDatabase
Transactionally creates the relationship, sets the properties (if any) and indexes the given fielss (if any) Two shortcut means of providing the properties (very short with static imports) graphDatabase.createRelationship(from,to,TYPE, PropertyMap._("name","value")); graphDatabase.createRelationship(from,to,TYPE, PropertyMap.props().set("name","value").set("prop","anotherValue").toMap(), "name", "prop");

Specified by:
createRelationship in interface GraphDatabase
Parameters:
startNode - start-node of relationship
endNode - end-node of relationship
type - relationship type, might by an enum implementing RelationshipType or a DynamicRelationshipType.withName("name")
props - optional initial properties
Returns:
the newly created relationship

getIndex

public <T extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.Index<T> getIndex(String indexName)
Specified by:
getIndex in interface GraphDatabase
Parameters:
indexName - existing index name, not null
Returns:
existing index Index

createIndex

public <T extends org.neo4j.graphdb.PropertyContainer> org.neo4j.graphdb.index.Index<T> createIndex(Class<T> type,
                                                                                                    String indexName,
                                                                                                    boolean fullText)
Description copied from interface: GraphDatabase
creates a index

Specified by:
createIndex in interface GraphDatabase
Parameters:
type - type of index requested - either Node.class or Relationship.class
fullText - true if a fulltext queryable index is needed, false for exact match
Returns:
node index Index

createTraversalDescription

public org.neo4j.graphdb.traversal.TraversalDescription createTraversalDescription()
Specified by:
createTraversalDescription in interface GraphDatabase
Returns:
a TraversalDescription as starting point for defining a traversal

queryEngineFor

public QueryEngine queryEngineFor(QueryType type)
Specified by:
queryEngineFor in interface GraphDatabase

setConversionService

public void setConversionService(ConversionService conversionService)
Specified by:
setConversionService in interface GraphDatabase

index

public RestIndexManager index()
Specified by:
index in interface org.neo4j.graphdb.GraphDatabaseService

getReferenceNode

public org.neo4j.graphdb.Node getReferenceNode()
Specified by:
getReferenceNode in interface org.neo4j.graphdb.GraphDatabaseService
Specified by:
getReferenceNode in interface GraphDatabase
Returns:
the reference node of the underlying graph database

getRestRequest

public RestRequest getRestRequest()

getPropertyRefetchTimeInMillis

public long getPropertyRefetchTimeInMillis()

createNode

public org.neo4j.graphdb.Node createNode()
Specified by:
createNode in interface org.neo4j.graphdb.GraphDatabaseService

getAllNodes

public Iterable<org.neo4j.graphdb.Node> getAllNodes()
Specified by:
getAllNodes in interface org.neo4j.graphdb.GraphDatabaseService

getRelationshipTypes

public Iterable<org.neo4j.graphdb.RelationshipType> getRelationshipTypes()
Specified by:
getRelationshipTypes in interface org.neo4j.graphdb.GraphDatabaseService

shutdown

public void shutdown()
Specified by:
shutdown in interface org.neo4j.graphdb.GraphDatabaseService

beginTx

public org.neo4j.graphdb.Transaction beginTx()
Specified by:
beginTx in interface org.neo4j.graphdb.GraphDatabaseService

registerTransactionEventHandler

public <T> org.neo4j.graphdb.event.TransactionEventHandler<T> registerTransactionEventHandler(org.neo4j.graphdb.event.TransactionEventHandler<T> handler)
Specified by:
registerTransactionEventHandler in interface org.neo4j.graphdb.GraphDatabaseService

unregisterTransactionEventHandler

public <T> org.neo4j.graphdb.event.TransactionEventHandler<T> unregisterTransactionEventHandler(org.neo4j.graphdb.event.TransactionEventHandler<T> handler)
Specified by:
unregisterTransactionEventHandler in interface org.neo4j.graphdb.GraphDatabaseService

registerKernelEventHandler

public org.neo4j.graphdb.event.KernelEventHandler registerKernelEventHandler(org.neo4j.graphdb.event.KernelEventHandler handler)
Specified by:
registerKernelEventHandler in interface org.neo4j.graphdb.GraphDatabaseService

unregisterKernelEventHandler

public org.neo4j.graphdb.event.KernelEventHandler unregisterKernelEventHandler(org.neo4j.graphdb.event.KernelEventHandler handler)
Specified by:
unregisterKernelEventHandler in interface org.neo4j.graphdb.GraphDatabaseService

Spring Data Graph

Copyright © 2011 SpringSource. All Rights Reserved.