public interface NodeGraphSession extends OsidSession
This session provides methods to retrieve Node
to
Graph
mappings. A Node
may appear in multiple
Graph
objects. Each graph may have its own authorizations
governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupNodeGraphMappings()
Tests if this user can perform lookups of node/graph mappings.
|
IdList |
getGraphIdsByNode(Id nodeId)
Gets the
Graph Ids mapped to a
Node. |
GraphList |
getGraphsByNode(Id nodeId)
Gets the
Graphs mapped to a Node. |
IdList |
getNodeIdsByGraph(Id graphId)
Gets the list of
Node Ids associated with a
Graph. |
IdList |
getNodeIdsByGraphs(IdList graphIds)
Gets the list of
Node Ids corresponding to a list of
Graphs. |
NodeList |
getNodesByGraph(Id graphId)
Gets the list of
Nodes associated with a Graph. |
NodeList |
getNodesByGraphs(IdList graphIds)
Gets the list of
Nodes corresponding to a list of
Graphs. |
void |
useComparativeNodeGraphView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryNodeGraphView()
A complete view of the
Node and Graph
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupNodeGraphMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeNodeGraphView()
mandatory
- This method is must be implemented. void usePlenaryNodeGraphView()
Node
and Graph
returns is desired. Methods will return what is requested or result in
an error. This view is used when greater precision is desired at the
expense of interoperability.mandatory
- This method is must be implemented. IdList getNodeIdsByGraph(Id graphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Node Ids
associated with a
Graph.
graphId
- Id
of the Graph
Ids
NotFoundException
- graphId
is not foundNullArgumentException
- graphId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. NodeList getNodesByGraph(Id graphId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Nodes
associated with a Graph.
graphId
- Id
of the Graph
NotFoundException
- graphId
is not foundNullArgumentException
- graphId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getNodeIdsByGraphs(IdList graphIds) throws OperationFailedException, PermissionDeniedException
Node Ids
corresponding to a list of
Graphs.
graphIds
- list of graph Ids
Ids
NullArgumentException
- graphIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. NodeList getNodesByGraphs(IdList graphIds) throws OperationFailedException, PermissionDeniedException
Nodes
corresponding to a list of
Graphs.
graphIds
- list of graph Ids
NullArgumentException
- graphIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getGraphIdsByNode(Id nodeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Graph
Ids
mapped to a
Node.
nodeId
- Id
of a Node
NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. GraphList getGraphsByNode(Id nodeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Graphs
mapped to a Node.
nodeId
- Id
of a Node
NotFoundException
- nodeId
is not foundNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.