OSID Logo
OSID Specifications
lexicon package
Version 3.1.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.Id the Press Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPress
Description

Gets the Press associated with this session.

Returnosid.lexicon.Press the press
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.

Returnboolean false if lookup methods are not authorized, true otherwise
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedPressView
Description

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

Compliancemandatory This 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.IdtextId Id of the Text
Returnosid.lexicon.Text the text
ErrorsNOT_FOUND textId not found
NULL_ARGUMENT textId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdListtextIds the list of Ids to retrieve
Returnosid.lexicon.TextList the returned Text list
ErrorsNOT_FOUND an Id was not found
NULL_ARGUMENT textIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypetextGenusType a text genus type
Returnosid.lexicon.TextList the returned Text list
ErrorsNULL_ARGUMENT textGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypetextGenusType a text genus type
Returnosid.lexicon.TextList the returned Text list
ErrorsNULL_ARGUMENT textGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypetextRecordType a text record type
Returnosid.lexicon.TextList the returned Text list
ErrorsNULL_ARGUMENT textRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TextList a list of Texts
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.