Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph
Class Graph

    java.lang.Object
      org.modeshape.graph.Graph

    @NotThreadSafe
    public class Graph

extends Object

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
`protected class` | `Graph.AbstractAction<T>`
`protected static class` | `Graph.AccessQueryProcessor`
`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.ApplyFunction<Next>` Interface for defining the application of a function.
`class` | `Graph.ApplyFunctionAction<T>`
`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.BuildQuery` The interface used to complete a query submission.
`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.
`protected class` | `Graph.CopyAction<T>`
`static interface` | `Graph.CopyTarget<Next>`
`static interface` | `Graph.Create<Next>` The interface for defining additional properties on a new node.
`protected class` | `Graph.CreateAction<T>`
`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.
`protected class` | `Graph.CreateNodeNamedAction<T>`
`static interface` | `Graph.CreateWorkspace` The interface used to create a new workspace.
`static interface` | `Graph.DestroyWorkspace` The interface used to destroy a 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>`
`protected class` | `Graph.GraphNode`
`protected class` | `Graph.GraphQueryContext`
`protected static class` | `Graph.GraphWorkspace`
`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.
`protected class` | `Graph.LockAction<T>`
`static interface` | `Graph.LockScope<Next>` Interface for specifying whether a lock should be deep in scope
`static interface` | `Graph.LockTimeout<Next>` Interface for specifying whether the maximum length of the lock
`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.
`protected class` | `Graph.MoveAction<T>`
`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.OnMultiple<Next>` The interface for defining the node upon which a request operates, including a method that accepts multiple locations.
`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.WithInput<Next>` The interface for defining input parameters for a function.
`static interface` | `Graph.WithScope<Next>` The interface for defining the content scope of a function.
`static interface` | `Graph.WithUuids<Next>` The interface for specifying how UUID conflicts should be handled.

Field Summary
`protected ExecutionContext` | `context`
`protected static Iterator<Property>` | `EMPTY_PROPERTIES`
`protected Graph.Conjunction<Graph>` | `nextGraph`
`protected static List<Location>` | `NO_CHILDREN`
`protected static Iterable<Property>` | `NO_PROPERTIES`
`protected RequestBuilder` | `requests`

Constructor Summary
`protected` | `Graph(String sourceName, RepositoryConnectionFactory connectionFactory, ExecutionContext context)`

Method Summary
`Graph.AddValue<Graph>` | `addValue(Object value)`
`Graph.WithInput<Map<String,Serializable>>` | `applyFunction(Function function)`
`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(...)`
`protected static DateTime` | `computeExpirationTime(CacheableRequest request)`
`protected Object` | `convertReferenceValue(Object value)` Utility method for checking a property value.
`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(...)`
`static Graph` | `create(ExecutionContext context)` Create a graph instance that uses a transient, in-memory source and the supplied `context`.
`protected Graph.CreateAction<Graph>` | `create(Location parent, Name child)`
`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.
`protected Name` | `createName(String name)`
`protected Path` | `createPath(String path)`
`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.DestroyWorkspace` | `destroyWorkspace()` Destroy an existing workspace in the source used by this graph.
`protected void` | `execute(Request request)` Obtain a connection to the source, execute the supplied request, and check the request for `errors`.
`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.OnMultiple<Map<Name,Property>>` | `getProperties(Name... names)` Request that the properties with the given names 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.OnMultiple<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(...)`
`protected QueryEngine` | `getQueryEngine()`
`protected QueryEngine` | `getQueryEngine(Optimizer optimizer)`
`protected List<Path.Segment>` | `getSegments(List<Location> locations)`
`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(String resourceName, ClassLoader classLoader)` 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.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(Location at)` Request to lock the node at the given location.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(Node at)` Request to lock the specified node.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(Path at)` Request to lock the node at the given path.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(Property idProperty)` Request to lock the node with the given unique identification property.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(Property firstIdProperty, Property... additionalIdProperties)` Request to lock the node with the given identification properties.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(String atPath)` Request to lock the node at the given path.
`Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>>` | `lock(UUID at)` Request to lock the node with the given UUID.
`Graph.Conjunction<Graph>` | `merge(Graph otherContent)` Merge the content in the supplied graph with the content in this graph, ensuring that all of the content in the supplied graph exists in this graph.
`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.BuildQuery` | `query(QueryCommand query, Schemata schemata)` Query the current workspace using the supplied `Schemata`.
`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.
`QueryResults` | `search(String fullTextSearchExpression, int maxResults, int offset)` Search the current workspace using the supplied full-text search expression.
`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.
`protected Workspace` | `setWorkspace(String workspaceName, Location actualRootLocation)` Utility method to set the workspace that will be used by this graph.
`Graph.Conjunction<Graph>` | `unlock(Location at)` Request to unlock the node at the given location.
`Graph.Conjunction<Graph>` | `unlock(Node at)` Request to unlock the specified node.
`Graph.Conjunction<Graph>` | `unlock(Path at)` Request to unlock the node at the given path.
`Graph.Conjunction<Graph>` | `unlock(Property idProperty)` Request to unlock the node with the given unique identification property.
`Graph.Conjunction<Graph>` | `unlock(Property firstIdProperty, Property... additionalIdProperties)` Request to unlock the node with the given identification properties.
`Graph.Conjunction<Graph>` | `unlock(String atPath)` Request to unlock the node at the given path.
`Graph.Conjunction<Graph>` | `unlock(UUID at)` Request to unlock the node with the given UUID.
`Workspace` | `useWorkspace(String workspaceName)` Switch this graph to use another existing workspace in the same source.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMPTY_PROPERTIES

    protected static final Iterator<Property> EMPTY_PROPERTIES

### NO_PROPERTIES

    protected static final Iterable<Property> NO_PROPERTIES

### context

    protected final ExecutionContext context

### requests

    protected final RequestBuilder requests

### nextGraph

    protected final Graph.Conjunction<Graph> nextGraph

### NO_CHILDREN

    protected static final List<Location> NO_CHILDREN

Constructor Detail

### Graph

    protected Graph(String sourceName,
                    RepositoryConnectionFactory connectionFactory,
                    ExecutionContext context)

Method Detail

### create

    public static Graph create(String sourceName,
                               RepositoryConnectionFactory connectionFactory,
                               ExecutionContext context)

  Create a graph instance that uses the supplied repository and `context`.

  Parameters:
    `sourceName` - the name of the source that should be used
    `connectionFactory` - the factory of repository connections
    `context` - the context in which all executions should be performed
  Returns:
    the new graph
  Throws:
    `IllegalArgumentException` - if the source or context parameters are null
    `RepositorySourceException` - if a source with the supplied name does not exist

### create

    public static Graph create(RepositoryConnection connection,
                               ExecutionContext context)

  Create a graph instance that uses the supplied `RepositoryConnection` and `context`.

  Parameters:
    `connection` - the connection that should be used
    `context` - the context in which all executions should be performed
  Returns:
    the new graph
  Throws:
    `IllegalArgumentException` - if the connection or context parameters are null

### create

    public static Graph create(RepositorySource source,
                               ExecutionContext context)

  Create a graph instance that uses the supplied `RepositoryConnection` and `context`.

  Parameters:
    `source` - the source that should be used
    `context` - the context in which all executions should be performed
  Returns:
    the new graph
  Throws:
    `IllegalArgumentException` - if the connection or context parameters are null

### create

    public static Graph create(ExecutionContext context)

  Create a graph instance that uses a transient, in-memory source and the supplied `context`.

  Parameters:
    `context` - the context in which all executions should be performed
  Returns:
    the new graph
  Throws:
    `IllegalArgumentException` - if the context parameter is null

### getConnectionFactory

    public RepositoryConnectionFactory getConnectionFactory()

  Get the RepositoryConnectionFactory that this graph uses to create `repository connections`.

  Returns:
    the factory repository connections used by this graph; never null

### getSourceName

    public String getSourceName()

  The name of the repository that will be used by this graph. This name is passed to the `connection factory` when this graph needs to `obtain` a `repository connection`.

  Returns:
    the name of the source

### getContext

    public ExecutionContext getContext()

  Get the context of execution within which operations on this graph are performed.

  Returns:
    the execution context; never null

### execute

    protected void execute(Request request)

  Obtain a connection to the source, execute the supplied request, and check the request for `errors`. If an error is found, then it is thrown (or wrapped by a `RepositorySourceException` if the error is not a `RuntimeException`.

  This method is called automatically when the `request builder` creates each request.

  Parameters:
    `request` - the request to be executed (may be a `CompositeRequest`.
  Throws:
    `PathNotFoundException` - if the request used a node that did not exist
    `InvalidRequestException` - if the request was not valid
    `InvalidWorkspaceException` - if the workspace used in the request was not valid
    `UnsupportedRequestException` - if the request was not supported by the source
    `RepositorySourceException` - if an error occurs during execution
    `RuntimeException` - if a runtime error occurs during execution

### getDefaultCachePolicy

    public CachePolicy getDefaultCachePolicy()

  Get the default cache policy for this graph. May be null if such a policy has not been defined for thie `source`.

  Returns:
    the default cache policy, or null if no such policy has been defined for the source
  Throws:
    `RepositorySourceException` - if no repository source with the `name` could be found

### setWorkspace

    protected Workspace setWorkspace(String workspaceName,
                                     Location actualRootLocation)

  Utility method to set the workspace that will be used by this graph.

  Parameters:
    `workspaceName` - the name of the workspace; may not be null
    `actualRootLocation` - the actual location of the root node in the workspace; may not be null
  Returns:
    the workspace; never null

### getCurrentWorkspaceName

    public String getCurrentWorkspaceName()

  Get the name of the current workspace being used by this graph. If the graph has not yet been instructed to `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.

  Returns:
    the name of the current workspace; never null
  See Also:
    `getCurrentWorkspace()`

### getCurrentWorkspace

    public Workspace getCurrentWorkspace()

  Get the name of the current workspace being used by this graph. If the graph has not yet been instructed to `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`.

  Returns:
    the name of the current workspace; never null
  Throws:
    `InvalidWorkspaceException` - if there is no current workspace
  See Also:
    `getCurrentWorkspaceName()`

### getWorkspaces

    public Set<String> getWorkspaces()

  Get the set of workspace names that are known to this source and accessible by this `context`.

  Returns:
    the set of workspace names; never null

### useWorkspace

    public Workspace useWorkspace(String workspaceName)

  Switch this graph to use another existing workspace in the same source.

  Parameters:
    `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)
  Returns:
    the workspace; never null
  Throws:
    `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 workspace

### createWorkspace

    public Graph.CreateWorkspace createWorkspace()

  Create a new workspace in the source used by this graph. This graph's workspace will be set as soon as the new workspace is created, and all subsequent operations will use the new workspace (until it is changed again by `using another workspace` or `creating another`.

  Returns:
    the interface used to complete the request to create a new workspace; never null

### destroyWorkspace

    public Graph.DestroyWorkspace destroyWorkspace()

  Destroy an existing workspace in the source used by this graph. It is not possible to destroy the workspace that this graph is `currently using`.

  Returns:
    the interface used to complete the request to create a new workspace; never null

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(Node at)

  Request to lock the specified node. This request is submitted to the repository immediately.

  Parameters:
    `at` - the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(String atPath)

  Request to lock the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `atPath` - the path of the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(Path at)

  Request to lock the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `at` - the path of the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(UUID at)

  Request to lock the node with the given UUID. This request is submitted to the repository immediately.

  Parameters:
    `at` - the UUID of the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(Property idProperty)

  Request to lock the node with the given unique identification property. This request is submitted to the repository immediately.

  Parameters:
    `idProperty` - the unique identifying property of the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(Property firstIdProperty,
                                                                             Property... additionalIdProperties)

  Request to lock the node with the given identification properties. The identification properties should uniquely identify a single node. This request is submitted to the repository immediately.

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be copied
    `additionalIdProperties` - the remaining identification properties of the node that is to be copied
  Returns:
    an object that allows the scope of the lock to be defined

### lock

    public Graph.LockScope<Graph.LockTimeout<Graph.Conjunction<Graph>>> lock(Location at)

  Request to lock the node at the given location. This request is submitted to the repository immediately.

  Parameters:
    `at` - the location of the node that is to be locked
  Returns:
    an object that allows the scope of the lock to be defined

### unlock

    public Graph.Conjunction<Graph> unlock(Node at)

  Request to unlock the specified node. This request is submitted to the repository immediately.

  Parameters:
    `at` - the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(String atPath)

  Request to unlock the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `atPath` - the path of the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(Path at)

  Request to unlock the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `at` - the path of the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(UUID at)

  Request to unlock the node with the given UUID. This request is submitted to the repository immediately.

  Parameters:
    `at` - the UUID of the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(Property idProperty)

  Request to unlock the node with the given unique identification property. This request is submitted to the repository immediately.

  Parameters:
    `idProperty` - the unique identifying property of the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(Property firstIdProperty,
                                           Property... additionalIdProperties)

  Request to unlock the node with the given identification properties. The identification properties should uniquely identify a single node. This request is submitted to the repository immediately.

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be copied
    `additionalIdProperties` - the remaining identification properties of the node that is to be copied
  Returns:
    an object that may be used to start another request

### unlock

    public Graph.Conjunction<Graph> unlock(Location at)

  Request to unlock the node at the given location. This request is submitted to the repository immediately.

  Parameters:
    `at` - the location of the node that is to be unlocked
  Returns:
    an object that may be used to start another request

### move

    public 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(...)` 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.

  Parameters:
    `from` - the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `from` - the location of the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `fromPath` - the path to the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `from` - the path to the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `from` - the UUID of the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `idProperty` - the unique identification property of the node that is to be moved.
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### move

    public 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(...)` 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.

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be moved
    `additionalIdProperties` - the remaining identification properties of the node that is to be moved
  Returns:
    the object that can be used to specify addition nodes to be moved or the location of the node where the node is to be moved

### clone

    public 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(...)` 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).

  Parameters:
    `from` - the location of the node that is to be cloned.
  Returns:
    the object that can be used to specify the location of the node where the node is to be cloned

### clone

    public 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(...)` 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).

  Parameters:
    `from` - the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### clone

    public 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(...)` 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).

  Parameters:
    `fromPath` - the path to the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### clone

    public 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(...)` 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).

  Parameters:
    `from` - the path to the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### clone

    public 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(...)` 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).

  Parameters:
    `from` - the UUID of the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### clone

    public 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(...)` 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).

  Parameters:
    `idProperty` - the unique identification property of the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### clone

    public 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(...)` 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).

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be copied
    `additionalIdProperties` - the remaining identification properties of the node that is to be copied
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `from` - the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `from` - the location of the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `fromPath` - the path to the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `from` - the path to the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `from` - the UUID of the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `idProperty` - the unique identification property of the node that is to be copied.
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### copy

    public 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(...)` 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.

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be copied
    `additionalIdProperties` - the remaining identification properties of the node that is to be copied
  Returns:
    the object that can be used to specify addition nodes to be copied or the location of the node where the node is to be copied

### delete

    public Graph.Conjunction<Graph> delete(Node at)

  Request to delete the specified node. This request is submitted to the repository immediately.

  Parameters:
    `at` - the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(Location at)

  Request to delete the node at the given location. This request is submitted to the repository immediately.

  Parameters:
    `at` - the location of the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(String atPath)

  Request to delete the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `atPath` - the path of the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(Path at)

  Request to delete the node at the given path. This request is submitted to the repository immediately.

  Parameters:
    `at` - the path of the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(UUID at)

  Request to delete the node with the given UUID. This request is submitted to the repository immediately.

  Parameters:
    `at` - the UUID of the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(Property idProperty)

  Request to delete the node with the given unique identification property. This request is submitted to the repository immediately.

  Parameters:
    `idProperty` - the unique identifying property of the node that is to be deleted
  Returns:
    an object that may be used to start another request

### delete

    public Graph.Conjunction<Graph> delete(Property firstIdProperty,
                                           Property... additionalIdProperties)

  Request to delete the node with the given identification properties. The identification properties should uniquely identify a single node. This request is submitted to the repository immediately.

  Parameters:
    `firstIdProperty` - the first identification property of the node that is to be copied
    `additionalIdProperties` - the remaining identification properties of the node that is to be copied
  Returns:
    an object that may be used to start another request

### createAt

    public 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.

  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.

  Parameters:
    `atPath` - the path to the node that is to be created.
  Returns:
    an object that may be used to start another request

### createAt

    public 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.

  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.

  Parameters:
    `at` - the path to the node that is to be created.
  Returns:
    an object that may be used to start another request

### create

    public Graph.Create<Graph> create(String atPath)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `atPath` - the path to the node that is to be created.
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    public Graph.Create<Graph> create(String atPath,
                                      Property property)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `atPath` - the path to the node that is to be created.
    `property` - a property for the new node
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    public Graph.Create<Graph> create(String atPath,
                                      Property firstProperty,
                                      Property... additionalProperties)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `atPath` - the path to the node that is to be created.
    `firstProperty` - a property for the new node
    `additionalProperties` - additional properties for the new node
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    public final Graph.Create<Graph> create(Path at)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `at` - the path to the node that is to be created.
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    protected final Graph.CreateAction<Graph> create(Location parent,
                                                     Name child)

### create

    public Graph.Create<Graph> create(Path at,
                                      Iterable<Property> properties)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `at` - the path to the node that is to be created.
    `properties` - the iterator over the properties for the new node
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    public Graph.Create<Graph> create(Path at,
                                      Property property)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `at` - the path to the node that is to be created.
    `property` - a property for the new node
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### create

    public Graph.Create<Graph> create(Path at,
                                      Property firstProperty,
                                      Property... additionalProperties)

  Begin the request to create a node located at the supplied path.

  Like all other methods on the `Graph`, the request will be performed when the no-argument `Graph.Conjunction.and()` method is called.

  Parameters:
    `at` - the path to the node that is to be created.
    `firstProperty` - a property for the new node
    `additionalProperties` - additional properties for the new node
  Returns:
    the object that can be used to specify addition properties for the new node to be copied or the location of the node where the node is to be created

### createUnder

    public Graph.CreateNode<Graph.Conjunction<Graph>> createUnder(Location parent)

  Begin the request to create a node under the existing parent node at the supplied location. Use this method if you are creating a node when you have the `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

  Parameters:
    `parent` - the location of the parent
  Returns:
    the object used to start creating a node

### addValue

    public Graph.AddValue<Graph> addValue(Object value)

### removeValue

    public Graph.RemoveValue<Graph> removeValue(Object value)

### set

    public Graph.On<Graph.Conjunction<Graph>> set(Property... properties)

  Set the properties on a node.

  Parameters:
    `properties` - the properties to set
  Returns:
    the remove request object that should be used to specify the node on which the properties are to be set.

### set

    public Graph.SetValues<Graph.Conjunction<Graph>> set(String propertyName)

  Set a property on a node, starting with the name. The interface returned from this method should be used to specify the value(s) and the location of the node onto which the property should be set.

  Parameters:
    `propertyName` - the property name
  Returns:
    the interface used to specify the values

### set

    public Graph.SetValues<Graph.Conjunction<Graph>> set(Name propertyName)

  Set a property on a node, starting with the name. The interface returned from this method should be used to specify the value(s) and the location of the node onto which the property should be set.

  Parameters:
    `propertyName` - the property name
  Returns:
    the interface used to specify the values

### remove

    public Graph.On<Graph.Conjunction<Graph>> remove(Name... propertyNames)

  Remove properties from the node at the given location.

  Parameters:
    `propertyNames` - the names of the properties to be removed
  Returns:
    the remove request object that should be used to specify the node from which the properties are to be removed.

### remove

    public Graph.On<Graph.Conjunction<Graph>> remove(String... propertyNames)

  Remove properties from the node at the given location.

  Parameters:
    `propertyNames` - the names of the properties to be removed
  Returns:
    the remove request object that should be used to specify the node from which the properties are to be removed.

### getProperties

    public Graph.On<Collection<Property>> getProperties()

  Request that the properties be read on the node defined via the `on(...)` method on the returned `Graph.On` object. Once the location is specified, the `collection of properties` are read and then returned.

  Returns:
    the object that is used to specified the node whose properties are to be read, and which will return the properties

### getPropertiesByName

    public Graph.On<Map<Name,Property>> getPropertiesByName()

  Request that the properties be read on the node defined via the `on(...)` method on the returned `Graph.On` object. Once the location is specified, the `map of properties` are read and then returned.

  Returns:
    the object that is used to specified the node whose properties are to be read, and which will return the properties as a map keyed by their name

### getChildren

    public Graph.Children<List<Location>> getChildren()

  Request that the children be read on the node defined via the `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`.

  Returns:
    the object that is used to specify the remaining inputs for the request, and which will return the children

### getProperty

    public Graph.On<Property> getProperty(String name)

  Request that the property with the given name be read on the node defined via the `on(...)` method on the returned `Graph.On` object. Once the location is specified, the `property` is read and then returned.

  Parameters:
    `name` - the name of the property that is to be read
  Returns:
    the object that is used to specified the node whose property is to be read, and which will return the property

### getProperty

    public Graph.OnMultiple<Property> getProperty(Name name)

  Request that the property with the given name be read on the node defined via the `on(...)` method on the returned `Graph.On` object. Once the location is specified, the `property` is read and then returned.

  Parameters:
    `name` - the name of the property that is to be read
  Returns:
    the object that is used to specified the node whose property is to be read, and which will return the property

### getProperties

    public Graph.OnMultiple<Map<Name,Property>> getProperties(Name... names)

  Request that the properties with the given names be read on the node defined via the `on(...)` method on the returned `Graph.On` object. Once the location is specified, the `property` is read and then returned.

  Parameters:
    `names` - the name of the property that are to be read
  Returns:
    the object that is used to specified the node whose properties are to be read, and which will return the map of properties keyed by their name; never null

### getNodeAt

    public Node getNodeAt(UUID uuid)

  Request to read the node with the supplied UUID.

  Parameters:
    `uuid` - the UUID of the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(Location location)

  Request to read the node at the supplied location.

  Parameters:
    `location` - the location of the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(String path)

  Request to read the node at the supplied path.

  Parameters:
    `path` - the path of the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(Path path)

  Request to read the node at the supplied path.

  Parameters:
    `path` - the path of the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(Property idProperty)

  Request to read the node with the supplied unique identifier property.

  Parameters:
    `idProperty` - the identification property that is unique to the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(Property firstIdProperty,
                          Property... additionalIdProperties)

  Request to read the node with the supplied unique identifier properties.

  Parameters:
    `firstIdProperty` - the first of the identification properties that uniquely identify the node that is to be read
    `additionalIdProperties` - the remaining identification properties that uniquely identify the node that is to be read
  Returns:
    the node that is read from the repository

### getNodeAt

    public Node getNodeAt(Iterable<Property> idProperties)

  Request to read the node with the supplied unique identifier properties.

  Parameters:
    `idProperties` - the identification properties that uniquely identify the node that is to be read
  Returns:
    the node that is read from the repository

### resolve

    public Node resolve(Reference reference)

  Request to read the node given by the supplied reference value.

  Parameters:
    `reference` - the reference property value that is to be resolved into a node
  Returns:
    the node that is read from the repository
  Throws:
    `ValueFormatException` - if the supplied reference could not be converted to an identifier property value

### applyFunction

    public Graph.WithInput<Map<String,Serializable>> applyFunction(Function function)

### getSubgraphOfDepth

    public 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(...)` 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.

  Parameters:
    `depth` - the maximum depth of the subgraph that should be read
  Returns:
    the component that should be used to specify the location of the node that is the top of the subgraph, and which will return the `Subgraph` containing the results

### search

    public QueryResults search(String fullTextSearchExpression,
                               int maxResults,
                               int offset)

  Search the current workspace using the supplied full-text search expression.

  Parameters:
    `fullTextSearchExpression` - the full-text search expression
    `maxResults` - the maximum number of results that are to be returned; always positive
    `offset` - the number of initial results to skip, or 0 if the first results are to be returned
  Returns:
    the results of the search; never null
  Throws:
    `IllegalArgumentException` - if the expression is null

### query

    public Graph.BuildQuery query(QueryCommand query,
                                  Schemata schemata)

  Query the current workspace using the supplied `Schemata`.

  Parameters:
    `query` - the query that is to be executed against the current workspace
    `schemata` - the schemata defining the structure of the tables that are being queried
  Returns:
    the interface used to continue specifying the options for the query and to obtain the results
  Throws:
    `IllegalArgumentException` - if the query or schemata references are null

### getQueryEngine

    protected QueryEngine getQueryEngine()

### getQueryEngine

    protected QueryEngine getQueryEngine(Optimizer optimizer)

### importXmlFrom

    public 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.

  Parameters:
    `stream` - the open stream of XML data that the importer can read the content that is to be imported
  Returns:
    the object that should be used to specify into which the content is to be imported
  Throws:
    `IllegalArgumentException` - if the `stream` or destination path are null

### importXmlFrom

    public 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.

  Parameters:
    `uri` - the URI where the importer can read the content that is to be imported
  Returns:
    the object that should be used to specify into which the content is to be imported
  Throws:
    `IllegalArgumentException` - if the `uri` or destination path are null

### importXmlFrom

    public 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.

  Parameters:
    `pathToFile` - the path to the XML file that should be imported.
  Returns:
    the object that should be used to specify into which the content is to be imported
  Throws:
    `IllegalArgumentException` - if the `uri` or destination path are null

### importXmlFrom

    public Graph.ImportInto<Graph.Conjunction<Graph>> importXmlFrom(String resourceName,
                                                                    ClassLoader classLoader)

  Import the content from the XML file at the supplied file location, specifying via the returned `object` where the content is to be imported.

  Parameters:
    `resourceName` - the name of the resource file on the classpath
    `classLoader` - the classloader that should be used to load the resource; may be null if the class' current classloader should be used
  Returns:
    the object that should be used to specify into which the content is to be imported
  Throws:
    `IllegalArgumentException` - if the `uri` or destination path are null

### importXmlFrom

    public 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.

  Parameters:
    `file` - the XML file that should be imported.
  Returns:
    the object that should be used to specify into which the content is to be imported
  Throws:
    `IllegalArgumentException` - if the `uri` or destination path are null

### merge

    public Graph.Conjunction<Graph> merge(Graph otherContent)

  Merge the content in the supplied graph with the content in this graph, ensuring that all of the content in the supplied graph exists in this graph. Note that any extra content is this graph but not in the supplied graph will not be affected.

  Parameters:
    `otherContent` - the content that should exist within this graph or, if it does not exist, added to this graph
  Returns:
    the interface for additional requests or actions

### createPath

    protected Path createPath(String path)

### createName

    protected Name createName(String name)

### getSegments

    protected List<Path.Segment> getSegments(List<Location> locations)

### batch

    public Graph.Batch batch()

  Begin a batch of requests to perform various operations. Use this approach when multiple operations are to be built and then executed with one submission to the underlying `repository source`. The `results` are not available until the `Graph.Batch.execute()` method is invoked.

  Returns:
    the batch object used to build and accumulate multiple requests and to submit them all for processing at once.
  See Also:
    `Graph.Batch.execute()`, `Results`

### batch

    public 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. Use this approach when multiple operations are to be built and then executed with one submission to the underlying `repository source`. The `results` are not available until the `Graph.Batch.execute()` method is invoked.

  Parameters:
    `builder` - the request builder that should be used; may not be null
  Returns:
    the batch object used to build and accumulate multiple requests and to submit them all for processing at once.
  See Also:
    `Graph.Batch.execute()`, `Results`

### convertReferenceValue

    protected Object convertReferenceValue(Object value)

  Utility method for checking a property value. If the value is a `Node` or `Location`, a `Reference` value is created (if the node/location has a UUID); otherwise, the value is returned as is.

  Parameters:
    `value` - the property value
  Returns:
    the property value, which may be a `Reference` if the input value is a Node or Location

### computeExpirationTime

    protected static DateTime computeExpirationTime(CacheableRequest request)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.