|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.graph.Graph
@NotThreadSafe public class Graph
A graph representation of the content within a RepositorySource
, including mechanisms to interact and manipulate that
content. The graph is designed to be an embedded domain
specific language, meaning calls to it are designed to read like sentences even though they are really just Java
methods. And to be more readable, methods can be chained together.
Nested Class Summary | |
---|---|
static interface |
Graph.AddValue<Next>
The interface for defining the node on which an addValue(Object) operation applies and what additional values
(if any) should be added. |
class |
Graph.AddValueAction<T>
|
static interface |
Graph.And<Next>
A interface that is used to add more locations that are to be copied/moved. |
static interface |
Graph.AsChild<Next>
A component that defines a new child name for a node. |
static interface |
Graph.AsName<Next>
A component that defines a new name for a node. |
static interface |
Graph.At<Next>
The interface for defining the node upon which which a request operates. |
static interface |
Graph.BaseResults<NodeType extends Node>
A set of nodes returned from a graph , with methods to access the properties and children of the nodes in the
result. |
class |
Graph.Batch
Interface for creating multiple requests to perform various operations. |
static interface |
Graph.BatchConjunction
|
static interface |
Graph.Before<Next>
A component that defines the location before which a node should be copied or moved. |
static interface |
Graph.BlockOfChildren<Next>
A component used to specify a block of children starting either at a particular index or
after a previous sibling . |
static interface |
Graph.Children<Next>
A component used to supply the details for getting children of another node. |
static interface |
Graph.Clone<Next>
The interface for defining a branch of nodes to be cloned and the location where the clone is to be placed. |
class |
Graph.CloneAction<T>
|
class |
Graph.CloneTargetAction<T>
|
static interface |
Graph.Conjunction<Next>
A interface that can be used to finish the current request and start another. |
static interface |
Graph.Copy<Next>
The interface for defining additional nodes to be copied and the locations where the copy is to be placed. |
static interface |
Graph.CopyTarget<Next>
|
static interface |
Graph.Create<Next>
The interface for defining additional properties on a new node. |
static interface |
Graph.CreateAt<Next>
The interface for defining additional properties on a new node. |
static interface |
Graph.CreateNode<Next>
A component that defines a node that is to be created. |
static interface |
Graph.CreateNodeNamed<Next>
A component that defines a node that is to be created. |
static interface |
Graph.CreateWorkspace
The interface used to create a new workspace. |
static interface |
Graph.Executable<NodeType extends Node>
A interface used to execute the accumulated requests . |
static interface |
Graph.FromName<Next>
A component that defines the name of a property from which a value should be removed. |
static interface |
Graph.FromWorkspace<Next>
The interface for specifying that a node should come from a workspace other than the current workspace. |
static interface |
Graph.GetNodeConjunction<Next>
|
static interface |
Graph.ImportInto<Next>
A component that defines the location into which a node should be copied or moved. |
static interface |
Graph.Into<Next>
A component that defines the location into which a node should be copied or moved. |
static interface |
Graph.Move<Next>
The interface for defining additional nodes to be moved and the parent into which the node(s) are to be moved. |
static interface |
Graph.NameWorkspace
The interface used to specify the name of a new workspace. |
static interface |
Graph.Of<Next>
The interface for defining the node upon which a request operates. |
static interface |
Graph.On<Next>
The interface for defining the node upon which a request operates. |
static interface |
Graph.RemoveValue<Next>
The interface for defining the node on which an removeValue(Object) operation applies and what additional
values (if any) should be removed. |
class |
Graph.RemoveValueAction<T>
|
static interface |
Graph.SetValues<Next>
A component used to set the values on a property. |
static interface |
Graph.SetValuesTo<Next>
A component used to set the values on a property. |
static interface |
Graph.To<Next>
A component that defines the location to which a node should be copied or moved. |
static interface |
Graph.ToName<Next>
A component that defines the name of a property to which a value should be added. |
static interface |
Graph.Under<Next>
The interface for defining the node under which which a request operates. |
static interface |
Graph.WithUuids<Next>
The interface for specifying how UUID conflicts should be handled. |
Method Summary | |
---|---|
Graph.AddValue<Graph> |
addValue(Object value)
|
Graph.Batch |
batch()
Begin a batch of requests to perform various operations. |
Graph.Batch |
batch(BatchRequestBuilder builder)
Begin a batch of requests to perform various operations, but specify the queue where all accumulated requests should be placed. |
Graph.Clone<Graph> |
clone(Location from)
Begin the request to clone a node at the specified location into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(Node from)
Begin the request to clone the specified node into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(Path from)
Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(Property idProperty)
Begin the request to clone a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(Property firstIdProperty,
Property... additionalIdProperties)
Begin the request to clone a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(String fromPath)
Begin the request to clone a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Clone<Graph> |
clone(UUID from)
Begin the request to clone a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(Location from)
Begin the request to copy a node at the specified location into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(Node from)
Begin the request to copy the specified node into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(Path from)
Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(Property idProperty)
Begin the request to copy a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(Property firstIdProperty,
Property... additionalIdProperties)
Begin the request to copy a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(String fromPath)
Begin the request to copy a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Copy<Graph> |
copy(UUID from)
Begin the request to copy a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) |
Graph.Create<Graph> |
create(Path at)
Begin the request to create a node located at the supplied path. |
Graph.Create<Graph> |
create(Path at,
Iterable<Property> properties)
Begin the request to create a node located at the supplied path. |
Graph.Create<Graph> |
create(Path at,
Property property)
Begin the request to create a node located at the supplied path. |
Graph.Create<Graph> |
create(Path at,
Property firstProperty,
Property... additionalProperties)
Begin the request to create a node located at the supplied path. |
static Graph |
create(RepositoryConnection connection,
ExecutionContext context)
Create a graph instance that uses the supplied RepositoryConnection and context . |
static Graph |
create(RepositorySource source,
ExecutionContext context)
Create a graph instance that uses the supplied RepositoryConnection and context . |
Graph.Create<Graph> |
create(String atPath)
Begin the request to create a node located at the supplied path. |
Graph.Create<Graph> |
create(String atPath,
Property property)
Begin the request to create a node located at the supplied path. |
Graph.Create<Graph> |
create(String atPath,
Property firstProperty,
Property... additionalProperties)
Begin the request to create a node located at the supplied path. |
static Graph |
create(String sourceName,
RepositoryConnectionFactory connectionFactory,
ExecutionContext context)
Create a graph instance that uses the supplied repository and context . |
Graph.CreateAt<Graph> |
createAt(Path at)
Begin the request to create a node located at the supplied path, and return an interface used to either add properties for the new node, or complete/submit the request and return the location, node, or graph. |
Graph.CreateAt<Graph> |
createAt(String atPath)
Begin the request to create a node located at the supplied path, and return an interface used to either add properties for the new node, or complete/submit the request and return the location, node, or graph. |
Graph.CreateNode<Graph.Conjunction<Graph>> |
createUnder(Location parent)
Begin the request to create a node under the existing parent node at the supplied location. |
Graph.CreateWorkspace |
createWorkspace()
Create a new workspace in the source used by this graph. |
Graph.Conjunction<Graph> |
delete(Location at)
Request to delete the node at the given location. |
Graph.Conjunction<Graph> |
delete(Node at)
Request to delete the specified node. |
Graph.Conjunction<Graph> |
delete(Path at)
Request to delete the node at the given path. |
Graph.Conjunction<Graph> |
delete(Property idProperty)
Request to delete the node with the given unique identification property. |
Graph.Conjunction<Graph> |
delete(Property firstIdProperty,
Property... additionalIdProperties)
Request to delete the node with the given identification properties. |
Graph.Conjunction<Graph> |
delete(String atPath)
Request to delete the node at the given path. |
Graph.Conjunction<Graph> |
delete(UUID at)
Request to delete the node with the given UUID. |
Graph.Children<List<Location>> |
getChildren()
Request that the children be read on the node defined via the of(...) |
RepositoryConnectionFactory |
getConnectionFactory()
Get the RepositoryConnectionFactory that this graph uses to create repository connections . |
ExecutionContext |
getContext()
Get the context of execution within which operations on this graph are performed. |
Workspace |
getCurrentWorkspace()
Get the name of the current workspace being used by this graph. |
String |
getCurrentWorkspaceName()
Get the name of the current workspace being used by this graph. |
CachePolicy |
getDefaultCachePolicy()
Get the default cache policy for this graph. |
Node |
getNodeAt(Iterable<Property> idProperties)
Request to read the node with the supplied unique identifier properties. |
Node |
getNodeAt(Location location)
Request to read the node at the supplied location. |
Node |
getNodeAt(Path path)
Request to read the node at the supplied path. |
Node |
getNodeAt(Property idProperty)
Request to read the node with the supplied unique identifier property. |
Node |
getNodeAt(Property firstIdProperty,
Property... additionalIdProperties)
Request to read the node with the supplied unique identifier properties. |
Node |
getNodeAt(String path)
Request to read the node at the supplied path. |
Node |
getNodeAt(UUID uuid)
Request to read the node with the supplied UUID. |
Graph.On<Collection<Property>> |
getProperties()
Request that the properties be read on the node defined via the on(...) |
Graph.On<Map<Name,Property>> |
getPropertiesByName()
Request that the properties be read on the node defined via the on(...) |
Graph.On<Property> |
getProperty(Name name)
Request that the property with the given name be read on the node defined via the on(...) |
Graph.On<Property> |
getProperty(String name)
Request that the property with the given name be read on the node defined via the on(...) |
String |
getSourceName()
The name of the repository that will be used by this graph. |
Graph.At<Subgraph> |
getSubgraphOfDepth(int depth)
Request to read a subgraph of the specified depth, rooted at a location that will be specified via at(...) |
Set<String> |
getWorkspaces()
Get the set of workspace names that are known to this source and accessible by this context . |
Graph.ImportInto<Graph.Conjunction<Graph>> |
importXmlFrom(File file)
Import the content from the XML file at the supplied file, specifying via the returned object where the
content is to be imported. |
Graph.ImportInto<Graph.Conjunction<Graph>> |
importXmlFrom(InputStream stream)
Import the content from the provided stream of XML data, specifying via the returned object where the
content is to be imported. |
Graph.ImportInto<Graph.Conjunction<Graph>> |
importXmlFrom(String pathToFile)
Import the content from the XML file at the supplied file location, specifying via the returned object
where the content is to be imported. |
Graph.ImportInto<Graph.Conjunction<Graph>> |
importXmlFrom(URI uri)
Import the content from the XML file at the supplied URI, specifying via the returned object where the
content is to be imported. |
Graph.Move<Graph.Conjunction<Graph>> |
move(Location from)
Begin the request to move a node at the specified location into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(Node from)
Begin the request to move the specified node into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(Path from)
Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(Property idProperty)
Begin the request to move a node with the specified unique identification property into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(Property firstIdProperty,
Property... additionalIdProperties)
Begin the request to move a node with the specified identification properties into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(String fromPath)
Begin the request to move a node located at the supplied path into a parent node at a different location, which is specified via the into(...) |
Graph.Move<Graph.Conjunction<Graph>> |
move(UUID from)
Begin the request to move a node with the specified unique identifier into a parent node at a different location, which is specified via the into(...) |
Graph.On<Graph.Conjunction<Graph>> |
remove(Name... propertyNames)
Remove properties from the node at the given location. |
Graph.On<Graph.Conjunction<Graph>> |
remove(String... propertyNames)
Remove properties from the node at the given location. |
Graph.RemoveValue<Graph> |
removeValue(Object value)
|
Node |
resolve(Reference reference)
Request to read the node given by the supplied reference value. |
Graph.SetValues<Graph.Conjunction<Graph>> |
set(Name propertyName)
Set a property on a node, starting with the name. |
Graph.On<Graph.Conjunction<Graph>> |
set(Property... properties)
Set the properties on a node. |
Graph.SetValues<Graph.Conjunction<Graph>> |
set(String propertyName)
Set a property on a node, starting with the name. |
Workspace |
useWorkspace(String workspaceName)
Switch this graph to use another existing workspace in the same source. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Graph create(String sourceName, RepositoryConnectionFactory connectionFactory, ExecutionContext context)
context
.
sourceName
- the name of the source that should be usedconnectionFactory
- the factory of repository connectionscontext
- the context in which all executions should be performed
IllegalArgumentException
- if the source or context parameters are null
RepositorySourceException
- if a source with the supplied name does not existpublic static Graph create(RepositoryConnection connection, ExecutionContext context)
RepositoryConnection
and context
.
connection
- the connection that should be usedcontext
- the context in which all executions should be performed
IllegalArgumentException
- if the connection or context parameters are nullpublic static Graph create(RepositorySource source, ExecutionContext context)
RepositoryConnection
and context
.
source
- the source that should be usedcontext
- the context in which all executions should be performed
IllegalArgumentException
- if the connection or context parameters are nullpublic RepositoryConnectionFactory getConnectionFactory()
repository connections
.
public String getSourceName()
connection factory
when this graph needs to obtain
a
repository connection
.
public ExecutionContext getContext()
public CachePolicy getDefaultCachePolicy()
source
.
RepositorySourceException
- if no repository source with the name
could be foundpublic String getCurrentWorkspaceName()
use
or create
a workspace, this method will assume that the
source's default workspace is to be used and will obtain from the source the name of that default workspace.
getCurrentWorkspace()
public Workspace getCurrentWorkspace()
use
or create
a workspace, this method will assume that the
source's default workspace is to be used and will obtain from the source the name of that default workspace. If the source
does not have a default workspace, this method will fail with an InvalidWorkspaceException
.
InvalidWorkspaceException
- if there is no current workspacegetCurrentWorkspaceName()
public Set<String> getWorkspaces()
context
.
public Workspace useWorkspace(String workspaceName)
workspaceName
- the name of the existing workspace that this graph should begin using, or null if the graph should use
the "default" workspace in the source (if there is one)
InvalidWorkspaceException
- if the workspace with the supplied name does not exist, or if null is supplied as the
workspace name but the source does not have a default workspacepublic Graph.CreateWorkspace createWorkspace()
using another workspace
or creating another
.
public Graph.Move<Graph.Conjunction<Graph>> move(Node from)
into(...)
method on the returned Graph.Move
object.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
from
- the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(Location from)
into(...)
method on the returned Graph.Move
object.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
from
- the location of the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(String fromPath)
into(...)
method on the returned Graph.Move
object.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
fromPath
- the path to the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(Path from)
into(...)
method on the returned Graph.Move
object.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
from
- the path to the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(UUID from)
into(...)
method on the returned Graph.Move
object.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
from
- the UUID of the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(Property idProperty)
into(...)
method on the returned Graph.Move
object. The identification
property should uniquely identify a single node.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
idProperty
- the unique identification property of the node that is to be moved.
public Graph.Move<Graph.Conjunction<Graph>> move(Property firstIdProperty, Property... additionalIdProperties)
into(...)
method on the returned Graph.Move
object. The identification properties
should uniquely identify a single node.
Like all other methods on the Graph
, the move request will be performed immediately when the into(...)
method is called.
firstIdProperty
- the first identification property of the node that is to be movedadditionalIdProperties
- the remaining identification properties of the node that is to be moved
public Graph.Clone<Graph> clone(Location from)
into(...)
method on the returned Graph.Clone
object.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
from
- the location of the node that is to be cloned.
public Graph.Clone<Graph> clone(Node from)
into(...)
method on the returned Graph.Clone
object.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
from
- the node that is to be copied.
public Graph.Clone<Graph> clone(String fromPath)
into(...)
method on the returned Graph.Clone
object.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
fromPath
- the path to the node that is to be copied.
public Graph.Clone<Graph> clone(Path from)
into(...)
method on the returned Graph.Clone
object.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
from
- the path to the node that is to be copied.
public Graph.Clone<Graph> clone(UUID from)
into(...)
method on the returned Graph.Clone
object.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
from
- the UUID of the node that is to be copied.
public Graph.Clone<Graph> clone(Property idProperty)
into(...)
method on the returned Graph.Clone
object. The identification
property should uniquely identify a single node.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
idProperty
- the unique identification property of the node that is to be copied.
public Graph.Clone<Graph> clone(Property firstIdProperty, Property... additionalIdProperties)
into(...)
method on the returned Graph.Clone
object. The identification
properties should uniquely identify a single node.
Like all other methods on the Graph
, the clone request will be performed immediately when the UUID
behavior
is specified.
The clone operation differs from the copy operation in that it must replicate nodes from one workspace to another (the copy operations supports replicating nodes within a workspace as well as across workspaces) and that it preserves UUIDs (the copy operation always generates new UUIDs).
firstIdProperty
- the first identification property of the node that is to be copiedadditionalIdProperties
- the remaining identification properties of the node that is to be copied
public Graph.Copy<Graph> copy(Node from)
into(...)
method on the returned Graph.Copy
object.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
from
- the node that is to be copied.
public Graph.Copy<Graph> copy(Location from)
into(...)
method on the returned Graph.Copy
object.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
from
- the location of the node that is to be copied.
public Graph.Copy<Graph> copy(String fromPath)
into(...)
method on the returned Graph.Copy
object.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
fromPath
- the path to the node that is to be copied.
public Graph.Copy<Graph> copy(Path from)
into(...)
method on the returned Graph.Copy
object.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
from
- the path to the node that is to be copied.
public Graph.Copy<Graph> copy(UUID from)
into(...)
method on the returned Graph.Copy
object.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
from
- the UUID of the node that is to be copied.
public Graph.Copy<Graph> copy(Property idProperty)
into(...)
method on the returned Graph.Copy
object. The identification
property should uniquely identify a single node.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
idProperty
- the unique identification property of the node that is to be copied.
public Graph.Copy<Graph> copy(Property firstIdProperty, Property... additionalIdProperties)
into(...)
method on the returned Graph.Copy
object. The identification properties
should uniquely identify a single node.
Like all other methods on the Graph
, the copy request will be performed immediately when the into(...)
method is called.
firstIdProperty
- the first identification property of the node that is to be copiedadditionalIdProperties
- the remaining identification properties of the node that is to be copied
public Graph.Conjunction<Graph> delete(Node at)
at
- the node that is to be deleted
public Graph.Conjunction<Graph> delete(Location at)
at
- the location of the node that is to be deleted
public Graph.Conjunction<Graph> delete(String atPath)
atPath
- the path of the node that is to be deleted
public Graph.Conjunction<Graph> delete(Path at)
at
- the path of the node that is to be deleted
public Graph.Conjunction<Graph> delete(UUID at)
at
- the UUID of the node that is to be deleted
public Graph.Conjunction<Graph> delete(Property idProperty)
idProperty
- the unique identifying property of the node that is to be deleted
public Graph.Conjunction<Graph> delete(Property firstIdProperty, Property... additionalIdProperties)
firstIdProperty
- the first identification property of the node that is to be copiedadditionalIdProperties
- the remaining identification properties of the node that is to be copied
public Graph.CreateAt<Graph> createAt(String atPath)
If you have the Location
of the parent (for the new node) from a previous request, it is better and more efficient
to use createUnder(Location)
. However, this method work just as well if all you have is the Path
to the
parent or new node.
atPath
- the path to the node that is to be created.
public Graph.CreateAt<Graph> createAt(Path at)
If you have the Location
of the parent (for the new node) from a previous request, it is better and more efficient
to use createUnder(Location)
. However, this method work just as well if all you have is the Path
to the
parent or new node.
at
- the path to the node that is to be created.
public Graph.Create<Graph> create(String atPath)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
atPath
- the path to the node that is to be created.
public Graph.Create<Graph> create(String atPath, Property property)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
atPath
- the path to the node that is to be created.property
- a property for the new node
public Graph.Create<Graph> create(String atPath, Property firstProperty, Property... additionalProperties)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
atPath
- the path to the node that is to be created.firstProperty
- a property for the new nodeadditionalProperties
- additional properties for the new node
public final Graph.Create<Graph> create(Path at)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
at
- the path to the node that is to be created.
public Graph.Create<Graph> create(Path at, Iterable<Property> properties)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
at
- the path to the node that is to be created.properties
- the iterator over the properties for the new node
public Graph.Create<Graph> create(Path at, Property property)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
at
- the path to the node that is to be created.property
- a property for the new node
public Graph.Create<Graph> create(Path at, Property firstProperty, Property... additionalProperties)
Like all other methods on the Graph
, the request will be performed when the no-argument Graph.Conjunction.and()
method
is called.
at
- the path to the node that is to be created.firstProperty
- a property for the new nodeadditionalProperties
- additional properties for the new node
public Graph.CreateNode<Graph.Conjunction<Graph>> createUnder(Location parent)
Location
of a parent from a previous request.
Like all other methods on the Graph
, the copy request will be performed immediately when the node(...)
method is called on the returned object
parent
- the location of the parent
public Graph.AddValue<Graph> addValue(Object value)
public Graph.RemoveValue<Graph> removeValue(Object value)
public Graph.On<Graph.Conjunction<Graph>> set(Property... properties)
properties
- the properties to set
public Graph.SetValues<Graph.Conjunction<Graph>> set(String propertyName)
propertyName
- the property name
public Graph.SetValues<Graph.Conjunction<Graph>> set(Name propertyName)
propertyName
- the property name
public Graph.On<Graph.Conjunction<Graph>> remove(Name... propertyNames)
propertyNames
- the names of the properties to be removed
public Graph.On<Graph.Conjunction<Graph>> remove(String... propertyNames)
propertyNames
- the names of the properties to be removed
public Graph.On<Collection<Property>> getProperties()
on(...)
method on the returned Graph.On
object. Once the location is specified, the collection of properties
are read and then returned.
public Graph.On<Map<Name,Property>> getPropertiesByName()
on(...)
method on the returned Graph.On
object. Once the location is specified, the map of properties
are read and then returned.
public Graph.Children<List<Location>> getChildren()
of(...)
method on the returned Graph.Of
object. The returned object is used to supply the remaining information, including either the location of the parent
, or that a subset of the children should be retrieved in a block
.
public Graph.On<Property> getProperty(String name)
on(...)
method on the
returned Graph.On
object. Once the location is specified, the property
is read and then returned.
name
- the name of the property that is to be read
public Graph.On<Property> getProperty(Name name)
on(...)
method on the
returned Graph.On
object. Once the location is specified, the property
is read and then returned.
name
- the name of the property that is to be read
public Node getNodeAt(UUID uuid)
uuid
- the UUID of the node that is to be read
public Node getNodeAt(Location location)
location
- the location of the node that is to be read
public Node getNodeAt(String path)
path
- the path of the node that is to be read
public Node getNodeAt(Path path)
path
- the path of the node that is to be read
public Node getNodeAt(Property idProperty)
idProperty
- the identification property that is unique to the node that is to be read
public Node getNodeAt(Property firstIdProperty, Property... additionalIdProperties)
firstIdProperty
- the first of the identification properties that uniquely identify the node that is to be readadditionalIdProperties
- the remaining identification properties that uniquely identify the node that is to be read
public Node getNodeAt(Iterable<Property> idProperties)
idProperties
- the identification properties that uniquely identify the node that is to be read
public Node resolve(Reference reference)
reference
- the reference property value that is to be resolved into a node
ValueFormatException
- if the supplied reference could not be converted to an identifier property valuepublic Graph.At<Subgraph> getSubgraphOfDepth(int depth)
at(...)
in
the resulting Graph.CreateAt
object. All properties and children of every node in the subgraph will be read and returned in the
Subgraph
object returned from the at(...)
methods.
depth
- the maximum depth of the subgraph that should be read
Subgraph
containing the resultspublic Graph.ImportInto<Graph.Conjunction<Graph>> importXmlFrom(InputStream stream)
object
where the
content is to be imported.
stream
- the open stream of XML data that the importer can read the content that is to be imported
IllegalArgumentException
- if the stream
or destination path are nullpublic Graph.ImportInto<Graph.Conjunction<Graph>> importXmlFrom(URI uri)
object
where the
content is to be imported.
uri
- the URI where the importer can read the content that is to be imported
IllegalArgumentException
- if the uri
or destination path are nullpublic Graph.ImportInto<Graph.Conjunction<Graph>> importXmlFrom(String pathToFile)
object
where the content is to be imported.
pathToFile
- the path to the XML file that should be imported.
IllegalArgumentException
- if the uri
or destination path are nullpublic Graph.ImportInto<Graph.Conjunction<Graph>> importXmlFrom(File file)
object
where the
content is to be imported.
file
- the XML file that should be imported.
IllegalArgumentException
- if the uri
or destination path are nullpublic Graph.Batch batch()
repository source
. The results
are not available until the Graph.Batch.execute()
method is invoked.
Graph.Batch.execute()
,
Results
public Graph.Batch batch(BatchRequestBuilder builder)
repository source
. The results
are not available until the Graph.Batch.execute()
method is invoked.
builder
- the request builder that should be used; may not be null
Graph.Batch.execute()
,
Results
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |