Interface EdgeLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Edge objects. The
Edge represents a connection between two Nodes .
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated graph view: All edge methods in this session operate,
retrieve and pertain to edges defined explicitly in the current graph.
Using an isolated view is useful for managing
Edgeswith theEdgeAdminSession. - federated graph view: All edge methods in this session operate, retrieve and pertain to all edges defined in this graph and any other edges implicitly available in this graph through graph inheritence.
- effective edge view: All edge lookup methods return edges where the current dates falls in between the effective dates inclusive.
- any effective edge view: Edges of any effective date are returned.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedGraphView() and useIsolatedGraphView()
behave as a radio group and one should be selected before invoking any
lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performEdgelookups.Gets theEdgespecified by itsId.getEdges()Gets allEdges.getEdgesByGenusType(Type edgeGenusType) Gets anEdgeListcorresponding to the given edge genusTypewhich does not include edges of genus types derived from the specifiedType.getEdgesByGenusTypeForDestinationNode(Id destinationNodeId, Type edgeGenusType) Gets anEdgeListcorresponding to the given destination nodeIdand edge genusTypeand includes any genus types derived from the given genus type.getEdgesByGenusTypeForDestinationNodeOnDate(Id destinationNodeId, Type edgeGenusType, DateTime from, DateTime to) Gets anEdgeListwith the given genus type and effective during the entire given date range inclusive but not confined to the date range.getEdgesByGenusTypeForNodes(Id sourceNodeId, Id destinationNodeId, Type edgeGenusType) Gets an EdgeList corresponding to the given peerIdsand edge genus type and includes and genus types derived from the given genus type.getEdgesByGenusTypeForNodesOnDate(Id sourceNodeId, Id destinationNodeId, Type edgeGenusType, DateTime from, DateTime to) Gets anEdgeListof the given genus type effective during the entire given date range inclusive but not confined to the date range.getEdgesByGenusTypeForSourceNode(Id sourceNodeId, Type edgeGenusType) Gets anEdgeListcorresponding to the given source nodeIdand edge genusTypeand includes any genus types derived from the given genus type.getEdgesByGenusTypeForSourceNodeOnDate(Id nodeId, Type edgeGenusType, DateTime from, DateTime to) Gets anEdgeListwith the given genus type and effective during the entire given date range inclusive but not confined to the date range.getEdgesByGenusTypeOnDate(Type edgeGenusType, DateTime from, DateTime to) Gets anEdgeListof a genus type effective during the entire given date range inclusive but not confined to the date range.getEdgesByIds(IdList edgeIds) Gets anEdgeListcorresponding to the givenIdList.getEdgesByParentGenusType(Type edgeGenusType) Gets anEdgeListcorresponding to the given edge genusTypeand include any additional edges with genus types derived from the specifiedType.getEdgesByRecordType(Type edgeRecordType) Gets anEdgeListcontaining the given edge recordType.getEdgesForDestinationNode(Id destinationNodeId) Gets anEdgeListcorresponding to the given destination nodeId.getEdgesForDestinationNodeOnDate(Id destinationNodeId, DateTime from, DateTime to) Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range.getEdgesForNodes(Id sourceNodeId, Id destinationNodeId) Gets an EdgeList corresponding to the given nodeIds.getEdgesForNodesOnDate(Id sourceNodeId, Id destinationNodeId, DateTime from, DateTime to) Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range.getEdgesForSourceNode(Id sourceNodeId) Gets anEdgeListcorresponding to the given source nodeId.getEdgesForSourceNodeOnDate(Id sourceNodeId, DateTime from, DateTime to) Gets anEdgeListwith effective during the entire given date range inclusive but not confined to the date range.getEdgesOnDate(DateTime from, DateTime to) Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range.getGraph()Gets theGraphassociated with this session.Gets theGraphIdassociated with this session.voidAll edges of any effective dates are returned by all methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly edges whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theEdgereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getGraphId
Id getGraphId()Gets theGraphIdassociated with this session.- Returns:
- the
Graph Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getGraph
Gets theGraphassociated with this session.- Returns:
- the graph
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupEdges
boolean canLookupEdges()Tests if this user can performEdgelookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeEdgeView
void useComparativeEdgeView()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryEdgeView
void usePlenaryEdgeView()A complete view of theEdgereturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedGraphView
void useFederatedGraphView()Federates the view for methods in this session. A federated view will include edges in graphs which are children of this graph in the graph hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedGraphView
void useIsolatedGraphView()Isolates the view for methods in this session. An isolated view restricts lookups to this graph only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveEdgeView
void useEffectiveEdgeView()Only edges whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveEdgeView
void useAnyEffectiveEdgeView()All edges of any effective dates are returned by all methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getEdge
Edge getEdge(Id edgeId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theEdgespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedEdgemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anEdgeand retained for compatibility. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeId-Idof theEdge- Returns:
- the edge
- Throws:
NotFoundException-edgeIdnot foundNullArgumentException-edgeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getEdgesByIds
EdgeList getEdgesByIds(IdList edgeIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the edges specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeIds- the list ofIdsto retrieve- Returns:
- the returned
Edgelist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-edgeIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusType
EdgeList getEdgesByGenusType(Type edgeGenusType) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given edge genusTypewhich does not include edges of genus types derived from the specifiedType. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeGenusType- an edge genus type- Returns:
- the returned
Edgelist - Throws:
NullArgumentException-edgeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByParentGenusType
EdgeList getEdgesByParentGenusType(Type edgeGenusType) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given edge genusTypeand include any additional edges with genus types derived from the specifiedType. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeGenusType- an edge genus type- Returns:
- the returned
Edgelist - Throws:
NullArgumentException-edgeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByRecordType
EdgeList getEdgesByRecordType(Type edgeRecordType) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcontaining the given edge recordType. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeRecordType- an edge record type- Returns:
- the returned
Edgelist - Throws:
NullArgumentException-edgeRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesOnDate
EdgeList getEdgesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the returned
Edgelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeOnDate
EdgeList getEdgesByGenusTypeOnDate(Type edgeGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListof a genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
edgeGenusType- an edge genus typefrom- starting dateto- ending date- Returns:
- the returned
Edgelist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-edgeGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForSourceNode
EdgeList getEdgesForSourceNode(Id sourceNodeId) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given source nodeId. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeId- Returns:
- a list of edges
- Throws:
NullArgumentException-sourceNodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForSourceNodeOnDate
EdgeList getEdgesForSourceNodeOnDate(Id sourceNodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListwith effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIdfrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceNodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForSourceNode
EdgeList getEdgesByGenusTypeForSourceNode(Id sourceNodeId, Type edgeGenusType) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given source nodeIdand edge genusTypeand includes any genus types derived from the given genus type. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIdedgeGenusType- an edge genus type- Returns:
- a list of edges
- Throws:
NullArgumentException-sourceNodeIdoredgeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForSourceNodeOnDate
EdgeList getEdgesByGenusTypeForSourceNodeOnDate(Id nodeId, Type edgeGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListwith the given genus type and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
nodeId- a nodeIdedgeGenusType- an edge genus typefrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceNodeId, edgeGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForDestinationNode
EdgeList getEdgesForDestinationNode(Id destinationNodeId) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given destination nodeId. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
destinationNodeId- a nodeId- Returns:
- a list of edges
- Throws:
NullArgumentException-destinationNodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForDestinationNodeOnDate
EdgeList getEdgesForDestinationNodeOnDate(Id destinationNodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
destinationNodeId- a nodeIdfrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-destinationNodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForDestinationNode
EdgeList getEdgesByGenusTypeForDestinationNode(Id destinationNodeId, Type edgeGenusType) throws OperationFailedException, PermissionDeniedException Gets anEdgeListcorresponding to the given destination nodeIdand edge genusTypeand includes any genus types derived from the given genus type. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
destinationNodeId- a nodeIdedgeGenusType- an edge genus type- Returns:
- a list of edges
- Throws:
NullArgumentException-destinationNodeIdoredgeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForDestinationNodeOnDate
EdgeList getEdgesByGenusTypeForDestinationNodeOnDate(Id destinationNodeId, Type edgeGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListwith the given genus type and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
destinationNodeId- a nodeIdedgeGenusType- an edge genus typefrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-destinationNodeId, edgeGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForNodes
EdgeList getEdgesForNodes(Id sourceNodeId, Id destinationNodeId) throws OperationFailedException, PermissionDeniedException Gets an EdgeList corresponding to the given nodeIds. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIddestinationNodeId- a nodeId- Returns:
- a list of edges
- Throws:
NullArgumentException-sourceNodeIdordestinationNodeIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesForNodesOnDate
EdgeList getEdgesForNodesOnDate(Id sourceNodeId, Id destinationNodeId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIddestinationNodeId- a nodeIdfrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceNodeId, destinationNodeId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForNodes
EdgeList getEdgesByGenusTypeForNodes(Id sourceNodeId, Id destinationNodeId, Type edgeGenusType) throws OperationFailedException, PermissionDeniedException Gets an EdgeList corresponding to the given peerIdsand edge genus type and includes and genus types derived from the given genus type. In plenary mode, the returned list contains all of the edges corresponding to the given peer, including duplicates, or an error results if an edge is inaccessible. Otherwise, inaccessibleEdgesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIddestinationNodeId- a nodeIdedgeGenusType- an edge genus type- Returns:
- the edges
- Throws:
NullArgumentException-sourceNodeId, destinationNodeId, oredgeGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdgesByGenusTypeForNodesOnDate
EdgeList getEdgesByGenusTypeForNodesOnDate(Id sourceNodeId, Id destinationNodeId, Type edgeGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets anEdgeListof the given genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Parameters:
sourceNodeId- a nodeIddestinationNodeId- a nodeIdedgeGenusType- an edge genus typefrom- starting dateto- ending date- Returns:
- a list of edges
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceNodeId, destinationNodeId, edgeGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getEdges
Gets allEdges. In plenary mode, the returned list contains all known edges or an error results. Otherwise, the returned list may contain only those edges that are accessible through this session. In effective mode, edges are returned that are currently effective. In any effective mode, effective edges and those currently expired are returned.- Returns:
- a list of
Edges - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-