|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface NeoService
The main access point to a running Neo instance. The only implementation
today is the EmbeddedNeo class, which is used to
embed Neo intra-VM in an application. Typically, you would create an
EmbeddedNeo once and from then on access it through the
NeoService interface. For more information, see the class
documentation of EmbeddedNeo.
| Method Summary | |
|---|---|
RelationshipType |
createAndRegisterRelationshipType(java.lang.String name)
|
Node |
createNode()
Creates a Node. |
boolean |
enableRemoteShell()
Enables remote shell access to this Neo instance, if the Neo4j shell project is available on the classpath. |
boolean |
enableRemoteShell(java.util.Map<java.lang.String,java.io.Serializable> initialProperties)
Enables remote shell access to this Neo instance, if the Neo4j shell project is available on the classpath. |
Node |
getNodeById(long id)
Looks up a node by id. |
Node |
getReferenceNode()
Returns the reference node. |
RelationshipType |
getRelationshipType(java.lang.String name)
|
java.lang.Iterable<RelationshipType> |
getRelationshipTypes()
|
boolean |
hasRelationshipType(java.lang.String name)
|
void |
registerEnumRelationshipTypes(java.lang.Class<? extends RelationshipType> relationshipTypes)
|
RelationshipType |
registerRelationshipType(java.lang.String name)
|
void |
registerRelationshipTypes(java.lang.Iterable<RelationshipType> types)
|
void |
registerRelationshipTypes(RelationshipType[] types)
|
void |
shutdown()
Shuts down Neo. |
| Method Detail |
|---|
Node createNode()
Node.
Node getNodeById(long id)
id - the id of the node
id if found
java.lang.RuntimeException - if not foundNode getReferenceNode()
java.lang.RuntimeException - if unable to get the reference nodevoid shutdown()
boolean enableRemoteShell()
shell project is available on the classpath. This method
passed no configuration parameters and is identical to invoking
enableRemoteShell( null ).
true if the shell has been enabled,
false otherwise (false usually indicates that
the shell jar dependency is not on the classpath)boolean enableRemoteShell(java.util.Map<java.lang.String,java.io.Serializable> initialProperties)
shell project is available on the classpath. This will
publish a shell access interface on an RMI registry on localhost (with
configurable port and RMI binding name). It can be accessed by a
client that implements org.neo4j.util.shell.ShellClient
from the Neo4J shell project. Typically, the
neoshell binary package is used (see
neo4j.org/download).
The shell is parameterized by a map of properties passed in to this method. Currently, two properties are used:
port, an Integer describing the port of the RMI
registry where the Neo shell will be bound, defaults to 1337
name, the String under which the Neo shell will
be bound in the RMI registry, defaults to neoshell
initialProperties - a set of properties that will be used to
configure the remote shell, or null if the default
properties should be used
true if the shell has been enabled,
false otherwise (false usually indicates that
the shell jar dependency is not on the classpath)
java.lang.ClassCastException - if the shell library is available, but one
(or more) of the configuration properties have an unexpected type
java.lang.IllegalStateException - if the shell library is available, but
the remote shell can't be enabled anywayvoid registerEnumRelationshipTypes(java.lang.Class<? extends RelationshipType> relationshipTypes)
java.lang.Iterable<RelationshipType> getRelationshipTypes()
RelationshipType getRelationshipType(java.lang.String name)
boolean hasRelationshipType(java.lang.String name)
RelationshipType createAndRegisterRelationshipType(java.lang.String name)
RelationshipType registerRelationshipType(java.lang.String name)
void registerRelationshipTypes(java.lang.Iterable<RelationshipType> types)
void registerRelationshipTypes(RelationshipType[] types)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||