Interface RelationManager
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
RelationService
public interface RelationManager extends Serializable
RelationService common interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<Resource>
getAllResources(Serializable object, Map<String,Object> context)
Computes all resources corresponding to the given object.Graph
getGraph(String name, CoreSession session)
Gets a registered graph by name.Graph
getGraphByName(String name)
Gets a registered graph by name.List<String>
getGraphNames()
Gets the list containing the graph names.Resource
getResource(String namespace, Serializable object, Map<String,Object> context)
Gets a resource given a namespace and a serializable object.Serializable
getResourceRepresentation(String namespace, Resource resource, Map<String,Object> context)
Gets an object representing this resource given a namespace.Graph
getTransientGraph(String type)
Gets a transient graph.
-
-
-
Method Detail
-
getGraph
Graph getGraph(String name, CoreSession session)
Gets a registered graph by name.A
CoreSession
should be passed to provide a context in which to store relations when using a "core" graph.- Parameters:
name
- string name of the graph used at registrationsession
- the core session- Returns:
- the graph
- Throws:
RuntimeException
- if the graph is not found- Since:
- 5.5
-
getGraphByName
Graph getGraphByName(String name)
Gets a registered graph by name.- Parameters:
name
- string name of the graph used at registration- Returns:
- the graph
- Throws:
RuntimeException
- if the graph is not found
-
getTransientGraph
Graph getTransientGraph(String type)
Gets a transient graph.- Parameters:
type
- The graph type.- Returns:
- the graph.
-
getResource
Resource getResource(String namespace, Serializable object, Map<String,Object> context)
Gets a resource given a namespace and a serializable object.There can be several resources with different namespaces associated to an incoming object. A document can for instance be used to refer to itself as a precise version as well as to the set of all versions.
Context can hold any object useful for the adapters, like a
CoreSession
.- Since:
- 5.2-M1
-
getAllResources
Set<Resource> getAllResources(Serializable object, Map<String,Object> context)
Computes all resources corresponding to the given object.Context can hold any object useful for the adapters, like a
CoreSession
.- Returns:
- the resources as a set
- Since:
- 5.2-M1
-
getResourceRepresentation
Serializable getResourceRepresentation(String namespace, Resource resource, Map<String,Object> context)
Gets an object representing this resource given a namespace.Context can hold any object useful for the adapters, like a
CoreSession
.- Since:
- 5.2-M1
-
-