Interface IntersectionLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Intersections .
The Intersection represents a crossing of two Paths .
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 map view: All intersection methods in this session
operate, retrieve and pertain to intersections defined explicitly in
the current map. Using an isolated view is useful for managing
Intersectionswith theIntersectionAdminSession. - federated map view: All intersections methods in this session operate, retrieve and pertain to all intersections defined in this map and any other paths implicitly available in this map through map inheritence.
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 useFederatedMapView() and useIsolatedMapView()
behave as a radio group and one should be selected before invoking any
lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performIntersectionlookups.getIntersection(Id intersectionId) Gets theIntersectionspecified by itsId.Gets allIntersection.getIntersectionsByGenusType(Type pathGenusType) Gets anIntersectionListcorresponding to the given intersection genusTypewhich does not include intersections of genus types derived from the specifiedType.getIntersectionsByIds(IdList intersectionIds) Gets anIntersectionListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the intersections 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.getIntersectionsByParentGenusType(Type intersectionGenusType) Gets anIntersectionListcorresponding to the given intersection genusTypeand include any additional intersections with genus types derived from the specifiedType.getIntersectionsByRecordType(Type intersectionRecordType) Gets anIntersectionListcontaining the given intersection recordType.In plenary mode, the returned list contains all known intersections or an error results.getIntersectionsForPath(Id pathId) Gets anIntersectionListconnected to the givenPath.getIntersectionsForPathAtCoordinate(Id pathId, Coordinate coordinate, Distance distance) Gets anIntersectionListconnected to the givenPathwithin a distance of a given coordinate.getIntersectionsForPaths(Id pathId, Id crossingPathId) Gets theIntersectionsof both given paths.getMap()Gets theMapassociated with this session.getMapId()Gets theMapIdassociated with 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.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theIntersectionreturns 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
-
getMapId
Id getMapId()Gets theMapIdassociated with this session.- Returns:
- the
Map Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMap
Gets theMapassociated with this session.- Returns:
- the map
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupIntersections
boolean canLookupIntersections()Tests if this user can performIntersectionlookups. 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.
-
useComparativeIntersectionView
void useComparativeIntersectionView()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.
-
usePlenaryIntersectionView
void usePlenaryIntersectionView()A complete view of theIntersectionreturns 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.
-
useFederatedMapView
void useFederatedMapView()Federates the view for methods in this session. A federated view will include intersections in maps which are children of this map in the map hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedMapView
void useIsolatedMapView()Isolates the view for methods in this session. An isolated view restricts lookups to this map only.- Compliance:
mandatory- This method is must be implemented.
-
getIntersection
Intersection getIntersection(Id intersectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theIntersectionspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedIntersectionmay have a differentIdthan requested.- Parameters:
intersectionId-Idof theIntersection- Returns:
- the intersection
- Throws:
NotFoundException-intersectionIdnot foundNullArgumentException-intersectionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getIntersectionsByIds
IntersectionList getIntersectionsByIds(IdList intersectionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anIntersectionListcorresponding to the givenIdList.In plenary mode, the returned list contains all of the intersections 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, inaccessibleIntersectionsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
intersectionIds- the list ofIdsto retrieve- Returns:
- the returned
Intersectionlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-intersectionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsByGenusType
IntersectionList getIntersectionsByGenusType(Type pathGenusType) throws OperationFailedException, PermissionDeniedException Gets anIntersectionListcorresponding to the given intersection genusTypewhich does not include intersections of genus types derived from the specifiedType. In plenary mode, the returned list contains all known intersections or an error results. Otherwise, the returned list may contain only those intersections that are accessible through this session.- Parameters:
pathGenusType- a path genus type- Returns:
- the returned
Pathlist - Throws:
NullArgumentException-pathGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsByParentGenusType
IntersectionList getIntersectionsByParentGenusType(Type intersectionGenusType) throws OperationFailedException, PermissionDeniedException Gets anIntersectionListcorresponding to the given intersection genusTypeand include any additional intersections with genus types derived from the specifiedType. In plenary mode, the returned list contains all known intersections or an error results. Otherwise, the returned list may contain only those intersections that are accessible through this session.- Parameters:
intersectionGenusType- an intersection genus type- Returns:
- the returned
Intersectionlist - Throws:
NullArgumentException-intersectionGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsByRecordType
IntersectionList getIntersectionsByRecordType(Type intersectionRecordType) throws OperationFailedException, PermissionDeniedException Gets anIntersectionListcontaining the given intersection recordType.In plenary mode, the returned list contains all known intersections or an error results. Otherwise, the returned list may contain only those intersections that are accessible through this session.- Parameters:
intersectionRecordType- an intersection record type- Returns:
- the returned
Intersectionlist - Throws:
NullArgumentException-intersectionRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsForPath
IntersectionList getIntersectionsForPath(Id pathId) throws OperationFailedException, PermissionDeniedException Gets anIntersectionListconnected to the givenPath. In plenary mode, the returned list contains all of the intersections, or an error results if an intersection along the path is not found or inaccessible. Otherwise, inaccessibleIntersectionsmay be omitted from the list.- Parameters:
pathId- a pathId- Returns:
- the returned
Intersectionlist - Throws:
NullArgumentException-pathIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsForPathAtCoordinate
IntersectionList getIntersectionsForPathAtCoordinate(Id pathId, Coordinate coordinate, Distance distance) throws OperationFailedException, PermissionDeniedException Gets anIntersectionListconnected to the givenPathwithin a distance of a given coordinate. In plenary mode, the returned list contains all of the paths, or an error results if a path connected to the location is not found or inaccessible. Otherwise, inaccessiblePathsmay be omitted from the list.- Parameters:
pathId- a pathIdcoordinate- a coordinatedistance- a distance- Returns:
- the returned
Intersectionlist - Throws:
NullArgumentException-pathId, coordinateordistanceisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersectionsForPaths
IntersectionList getIntersectionsForPaths(Id pathId, Id crossingPathId) throws OperationFailedException, PermissionDeniedException Gets theIntersectionsof both given paths. In plenary mode, the returned list contains all of the intersections, or an error results if an intersection along the path is not found or inaccessible. Otherwise, inaccessibleIntersectionsmay be omitted from the list.- Parameters:
pathId- a pathIdcrossingPathId- another pathId- Returns:
- the returned
Intersectionlist - Throws:
NullArgumentException-pathIdorcrossingPathIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getIntersections
Gets allIntersection. In plenary mode, the returned list contains all of the intersections. or an error results if an intersection is not found or inaccessible. Otherwise, inaccessibleIntersectionsmay be omitted from the list.- Returns:
- the returned
Intersectionlist - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-