OSID Logo
OSID Specifications
lexicon package
Version 3.0.0
Interfaceosid.lexicon.TextLookupSession
Implementsosid.OsidSession
Used Byosid.lexicon.LexiconManager
osid.lexicon.LexiconProxyManager
Description

This session provides methods for retrieving Text objects. The Text represents a fixed connection between two Texts .

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 press view: All text methods in this session operate, retrieve and pertain to texts defined explicitly in the current press. Using an isolated view is useful for managing Texts with the TextAdminSession .
  • federated press view: All text methods in this session operate, retrieve and pertain to all texts defined in this press and any other texts implicitly available in this press through press inheritence.

Generally, the comparative view should be used for most presses as it permits operation even if there is data that cannot be accessed. The methods useFederatedPressView() and useIsolatedPressView() behave as a radio group and one should be selected before invoking any lookup methods.

MethodgetPressId
Description

Gets the Press Id associated with this session.

Returnosid.id.Idthe Press Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPress
Description

Gets the Press associated with this session.

Returnosid.lexicon.Pressthe press
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupTexts
Description

Tests if this user can perform Text lookups. 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 a PERMISSION_DENIED . This is intended as a hint to an press that may opt not to offer lookup operations to unauthorized users.

Returnbooleanfalse if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeTextView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryTextView
Description

A complete view of the Text 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedPressView
Description

Federates the view for methods in this session. A federated view will include texts in presses which are children of this press in the press hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedPressView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this press only.

CompliancemandatoryThis method is must be implemented.
MethodgetText
Description

Gets the Text specified by its Id .

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Text may have a different Id than requested, such as the case where a duplicate Id was assigned to a Text and retained for compatibility.

Parametersosid.id.IdtextIdId of the Text
Returnosid.lexicon.Textthe text
ErrorsNOT_FOUNDtextId not found
NULL_ARGUMENTtextId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetTextsByIds
Description

Gets a TextList corresponding to the given IdList .

In plenary mode, the returned list contains all of the texts specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Texts may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdListtextIdsthe list of Ids to retrieve
Returnosid.lexicon.TextListthe returned Text list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENTtextIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTextsByGenusType
Description

Gets a TextList corresponding to the given text genus Type which does not include texts of genus types derived from the specified Type .

In plenary mode, the returned list contains all known texts or an error results. Otherwise, the returned list may contain only those texts that are accessible through this session.

In effective mode, texts are returned that are currently effective. In any effective mode, effective texts and those currently expired are returned.

Parametersosid.type.TypetextGenusTypea text genus type
Returnosid.lexicon.TextListthe returned Text list
ErrorsNULL_ARGUMENTtextGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTextsByParentGenusType
Description

Gets a TextList corresponding to the given text genus Type and include any additional texts with genus types derived from the specified Type .

In plenary mode, the returned list contains all known texts or an error results. Otherwise, the returned list may contain only those texts that are accessible through this session.

Parametersosid.type.TypetextGenusTypea text genus type
Returnosid.lexicon.TextListthe returned Text list
ErrorsNULL_ARGUMENTtextGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTextsByRecordType
Description

Gets a TextList containing the given text record Type .

In plenary mode, the returned list contains all known texts or an error results. Otherwise, the returned list may contain only those texts that are accessible through this session.

Parametersosid.type.TypetextRecordTypea text record type
Returnosid.lexicon.TextListthe returned Text list
ErrorsNULL_ARGUMENTtextRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTexts
Description

Gets all Texts .

In plenary mode, the returned list contains all known texts or an error results. Otherwise, the returned list may contain only those texts that are accessible through this session.

In effective mode, texts are returned that are currently effective. In any effective mode, effective texts and those currently expired are returned.

Returnosid.lexicon.TextLista list of Texts
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.