Objects¶
Osid Object¶
-
class
dlkit.osid.objects.
OsidObject
¶ Bases:
dlkit.osid.markers.Identifiable
,dlkit.osid.markers.Extensible
,dlkit.osid.markers.Browsable
OsidObject
is the top level interface for all OSID Objects.An OSID Object is an object identified by an OSID
Id
and may implements optional interfaces. OSID Objects also contain a display name and a description. These fields are required but may be used for a variety of purposes ranging from a primary name and description of the object to a more user friendly display of various attributes.Creation of OSID Objects and the modification of their data is managed through the associated
OsidSession
which removes the dependency of updating data elements upon object retrieval.TheOsidManager
should be used to test if updates are available and determine whatPropertyTypes
are supported. TheOsidManager
is also used to create the appropriateOsidSession
for object creation, updates and deletes.All
OsidObjects
are identified by an immutableId
. AnId
is assigned to an object upon creation of the object and cannot be changed once assigned.An
OsidObject
may support one or more supplementary records which are expressed in the form of interfaces. Each record interface is identified by a Type. A record interface may extend another record interface where support of the parent record interface is implied. In this case of interface inheritance, support of the parent record type may be implied throughhas_record_type()
and not explicit ingetRecordTypes()
.For example, if recordB extends recordA, typeB is a child of typeA. If a record implements typeB, than it also implements typeA. An application that only knows about typeA retrieves recordA. An application that knows about typeB, retrieves recordB which is the union of methods specified in typeA and typeB. If an application requests typeA, it may not attempt to access methods defined in typeB as they may not exist until explicitly requested. The mechanics of this polymorphism is defined by the language binder. One mechanism might be the use of casting.
In addition to the record
Types,
OSID Objects also have a genusType
. A genusType
indicates a classification or kind of the object where an “is a” relationship exists. The purpose of of the genusType
is to avoid the creation of unnecessary record types that may needlessly complicate an interface hierarchy or introduce interoperability issues. For example, an OSID object may have a recordType
ofPublication
that defines methods pertinent to publications, such as an ISBN number. A provider may wish to distinguish between books and journals without having the need of new record interfaces. In this case, the genusType
may be one ofBook
orJournal
. While this distinction can aid a search, these genres should be treated in such a way that do not introduce interoperability problems.Like record Types, the genus Types may also exist in an implicit type hierarchy. An OSID object always has at least one genus. Genus types should not be confused with subject tagging, which is managed externally to the object. Unlike record
Types,
an object’s genus may be modified. However, once an object’s record is created with a recordType,
it cannot be changed.Methods that return values are not permitted to return nulls. If a value is not set, it is indicated in the
Metadata
of the update form.-
display_name
¶ Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.
Returns: the display name Return type: osid.locale.DisplayText
compliance: mandatory – This method must be implemented. implementation notes: A display name is a string used for identifying an object in human terms. A provider may wish to initialize the display name based on one or more object attributes. In some cases, the display name may not map to a specific or significant object attribute but simply be used as a preferred display name that can be modified. A provider may also wish to translate the display name into a specific locale using the Locale service. Some OSIDs define methods for more detailed naming.
-
description
¶ Gets the description associated with this instance of this OSID object.
Returns: the description Return type: osid.locale.DisplayText
compliance: mandatory – This method must be implemented. implementation notes: A description is a string used for describing an object in human terms and may not have significance in the underlying system. A provider may wish to initialize the description based on one or more object attributes and/or treat it as an auxiliary piece of data that can be modified. A provider may also wish to translate the description into a specific locale using the Locale service.
-
genus_type
¶ Gets the genus type of this object.
Returns: the genus type of this object Return type: osid.type.Type
compliance: mandatory – This method must be implemented.
-
is_of_genus_type
(genus_type)¶ Tests if this object is of the given genus
Type
.The given genus type may be supported by the object through the type hierarchy.
Parameters: genus_type ( osid.type.Type
) – a genus typeReturns: true
if this object is of the given genusType,
false
otherwiseReturn type: boolean
Raise: NullArgument
–genus_type
isnull
compliance: mandatory – This method must be implemented.
-
Osid Relationship¶
-
class
dlkit.osid.objects.
OsidRelationship
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Temporal
A
Relationship
associates two OSID objects.Relationships are transient. They define a date range for which they are in effect.
Unlike other
OsidObjects
that rely on the auxiliary Journaling OSID to track variance over time,OsidRelationships
introduce a different concept of time independent from journaling. For example, in the present, a student was registered in a course and dropped it. The relationship between the student and the course remains pertinent, independent of any journaled changes that may have occurred to either the student or the course.Once the student has dropped the course, the relationship has expired such that
is_effective()
becomes false. It can be inferred that during the period of the effective dates, the student was actively registered in the course. Here is an example:- T1. September 1: Student registers for course for grades
- T2. September 10: Student drops course
- T3. September 15: Student re-registers for course pass/fail
- The relationships are:
T1. R1 {effective, September 1 -> end of term, data=grades} T2. R1 {ineffective, September 1 -> September 10, data=grades} T3. R1 {ineffective, September 1 -> September 10, data=grades}
R2 {effective, September 10 -> end of term, data=p/f}
An OSID Provider may also permit dates to be set in the future in which case the relationship can become automatically become effective at a future time and later expire. More complex effectiveness management can be done through other rule-based services.
OSID Consumer lookups and queries of relationships need to consider that it may be only effective relationshps are of interest.
-
has_end_reason
()¶ Tests if a reason this relationship came to an end is known.
Returns: true
if an end reason is available,false
otherwiseReturn type: boolean
Raise: IllegalState
–is_effective()
istrue
compliance: mandatory – This method must be implemented.
-
end_reason_id
¶ Gets a state
Id
indicating why this relationship has ended.Returns: a state Id
Return type: osid.id.Id
Raise: IllegalState
–has_end_reason()
isfalse
compliance: mandatory – This method must be implemented.
-
end_reason
¶ Gets a state indicating why this relationship has ended.
Returns: a state Return type: osid.process.State
Raise: IllegalState
–has_end_reason()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Osid Catalog¶
-
class
dlkit.osid.objects.
OsidCatalog
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Sourceable
,dlkit.osid.markers.Federateable
OsidCatalog
is the top level interface for all OSID catalog-like objects.A catalog relates to other OSID objects for the purpose of organization and federation and almost always are hierarchical. An example catalog is a
Repository
that relates to a collection ofAssets
.OsidCatalogs
allow for the retrieval of a provider identity and branding.Collections visible through an
OsidCatalog
may be the output of a dynamic query or some other rules-based evaluation. The facts surrounding the evaluation are theOsidObjects
visible to theOsidCatalog
from its position in the federated hierarchy. The input conditions may satisifed on a service-wide basis using anOsidQuery
or environmental conditions supplied to the services via aProxy
.Often, the selection of an
OsidCatalog
in instantiating anOsidSession
provides access to a set ofOsidObjects
. Because the view inside anOsidCatalog
can also be produced behaviorally using a rules evaluation, theId
(or well-known alias) of theOsidCatalog
may be used as an abstract means of requesting a predefined set of behaviors or data constraints from an OSID Provider.The flexibility of interpretation together with its central role in federation to build a rich and complex service from a set of individual OSID Providers makes cataloging an essential pattern to achieve abstraction from implementations in the OSIDs without loss of functionality. Most OSIDs include a cataloging pattern.
Osid Rule¶
-
class
dlkit.osid.objects.
OsidRule
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Operable
An
OsidRule
identifies an explicit or implicit rule evaluation.An associated
Rule
may be available in cases where the behavior of the object can be explicitly modified using a defined rule. In many cases, anOsidObject
may define specific methods to manage certain common behavioral aspects and delegate anything above and beyond what has been defined to a rule evaluation.Rules are defined to be operable. In the case of a statement evaluation, an enabled rule overrides any evaluation to return
true
and a disabled rule overrides any evaluation to returnfalse
.Rules
are never required to consume or implement. They serve as a mechanism to offer a level of management not attainable in the immediate service definition. Each Rule implies evaluating a set of facts known to the service to produce a resulting beavior. Rule evaluations may also accept input data or conditions, however,OsidRules
as they appear in throughout the services may or may not provide a means of supplyingOsidConditions
directly. In the services where an explicitOsidCondition
is absent they may be masquerading as another interface such as aProxy
or anOsidQuery
.-
has_rule
()¶ Tests if an explicit rule is available.
Returns: true
if an explicit rule is available,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
rule_id
¶ Gets the explicit rule
Id
.Returns: the rule Id
Return type: osid.id.Id
Raise: IllegalState
–has_rule()
isfalse
compliance: mandatory – This method must be implemented.
-
rule
¶ Gets the explicit rule.
Returns: the rule Return type: osid.rules.Rule
Raise: IllegalState
–has_rule()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
Osid Enabler¶
-
class
dlkit.osid.objects.
OsidEnabler
¶ Bases:
dlkit.osid.objects.OsidRule
,dlkit.osid.markers.Temporal
OsidEnabler
is used to manage the effectiveness, enabledness, or operation of anOsidObejct
.The
OsidEnabler
itself is active or inactive When anOsidEnabler
is active, anyOsidObject
mapped to it is “on.” When allOsidEnablers
mapped to anOsidObject
are inactive, then theOsidObject
is “off.”The managed
OsidObject
may have varying semantics as to what its on/off status means and in particular, which methods are used to indicate the effect of anOsidEnabler
. Some axamples:Operables:
OsidEnablers
effect the operational status.Temporals:
OsidEnablers
may be used to extend or shorten the effectiveness of aTemporal
such as anOsidRelationship.
In the case where an
OsidEnabler
may cause a discontinuity in aTemporal,
theOsidEnabler
may cause the creation of newTemporals
to capture the gap in effectiveness.For example, An
OsidRelationship
that began in 2007 may be brought to an end in 2008 due to the absence of any activeOsidEnablers
. When an effectiveOsidEnabler
appears in 2009, a newOsidRelationship
is created with a starting effective date of 2009 leaving the existingOsidRelationship
with effective dates from 2007 to 2008.An
OsidEnabler
itself is both aTemporal
and anOsidRule
whose activity status of the object may be controlled administratively, using a span of effective dates, through an external rule, or all three. TheOsidEnabler
defines a set of canned rules based on dates, events, and cyclic events.-
is_effective_by_schedule
()¶ Tests if the effectiveness of the enabler is governed by a
Schedule
.If a schedule exists, it is bounded by the effective dates of this enabler. If
is_effective_by_schedule()
istrue,
is_effective_by_event()
andis_effective_by_cyclic_event()
must befalse
.Returns: true
if the enabler is governed by schedule,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
schedule_id
¶ Gets the schedule
Id
.Returns: the schedule Id
Return type: osid.id.Id
Raise: IllegalState
–is_effective_by_schedule()
isfalse
compliance: mandatory – This method must be implemented.
-
schedule
¶ Gets the schedule.
Returns: the schedule Return type: osid.calendaring.Schedule
Raise: IllegalState
–is_effective_by_schedule()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
is_effective_by_event
()¶ Tests if the effectiveness of the enabler is governed by an
Event
such that the start and end dates of the event govern the effectiveness.The event may also be a
RecurringEvent
in which case the enabler is effective for start and end dates of each event in the series If an event exists, it is bounded by the effective dates of this enabler. Ifis_effective_by_event()
istrue,
is_effective_by_schedule()
andis_effective_by_cyclic_event()
must befalse
.Returns: true
if the enabler is governed by an event,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
event_id
¶ Gets the event
Id
.Returns: the event Id
Return type: osid.id.Id
Raise: IllegalState
–is_effective_by_event()
isfalse
compliance: mandatory – This method must be implemented.
-
event
¶ Gets the event.
Returns: the event Return type: osid.calendaring.Event
Raise: IllegalState
–is_effective_by_event()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
is_effective_by_cyclic_event
()¶ Tests if the effectiveness of the enabler is governed by a
CyclicEvent
.If a cyclic event exists, it is evaluated by the accompanying cyclic time period. If
is_effective_by_cyclic_event()
istrue,
is_effective_by_schedule()
andis_effective_by_event()
must befalse
.Returns: true
if the enabler is governed by a cyclic event,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
cyclic_event_id
¶ Gets the cyclic event
Id
.Returns: the cyclic event Id
Return type: osid.id.Id
Raise: IllegalState
–is_effective_by_cyclic_event()
isfalse
compliance: mandatory – This method must be implemented.
-
cyclic_event
¶ Gets the cyclic event.
Returns: the cyclic event Return type: osid.calendaring.cycle.CyclicEvent
Raise: IllegalState
–is_effective_by_cyclic_event()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
-
is_effective_for_demographic
()¶ Tests if the effectiveness of the enabler applies to a demographic resource.
Returns: true
if the rule apples to a demographic.false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
demographic_id
¶ Gets the demographic resource
Id
.Returns: the resource Id
Return type: osid.id.Id
Raise: IllegalState
–is_effective_for_demographic()
isfalse
compliance: mandatory – This method must be implemented.
-
demographic
¶ Gets the demographic resource.
Returns: the resource representing the demographic Return type: osid.resource.Resource
Raise: IllegalState
–is_effective_for_demographic()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Osid Constrainer¶
-
class
dlkit.osid.objects.
OsidConstrainer
¶ Bases:
dlkit.osid.objects.OsidRule
An
OsidConstrainer
marks an interface as a control point to constrain another object.A constrainer may define specific methods to describe the constrainment or incorporate external logic using a rule.
Osid Processor¶
-
class
dlkit.osid.objects.
OsidProcessor
¶ Bases:
dlkit.osid.objects.OsidRule
An
OsidProcessor
is an interface describing the operation of another object.A processor may define specific methods to manage processing, or incorporate external logic using a rule.
Osid Governator¶
-
class
dlkit.osid.objects.
OsidGovernator
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Operable
,dlkit.osid.markers.Sourceable
An
OsidGovernator
is a control point to govern the behavior of a service.OsidGovernators
generally indicate the presence ofOsidEnablers
and other rule governing interfaces to provide a means of managing service operations and constraints from a “behind the scenes” perspective. TheOsidGovernator
is a focal point for these various rules.OsidGovernators
areSourceable
. AnOsidGovernator
implies a governance that often corresponds to a provider of a process as opposed to a catalog provider ofOsidObjects
.OsidGovernators
areOperable
. They indicate an active and operational status and related rules may be administratively overridden using this control point. Administratively setting the enabled or disabled flags in the operator overrides any enabling rule mapped to thisOsidGovernator
.
Osid Compendium¶
-
class
dlkit.osid.objects.
OsidCompendium
¶ Bases:
dlkit.osid.objects.OsidObject
,dlkit.osid.markers.Subjugateable
OsidCompendium
is the top level interface for reports based on measurements, calculations, summaries, or views of transactional activity within periods of time.This time dimension of this report may align with managed time periods, specific dates, or both. Oh my.
Reports are often derived dynamically based on an examination of data managed elsewhere in an OSID. Reports may also be directly managed outside where it is desirable to capture summaries without the detail of the implied evaluated data. The behavior of a direct create or update of a report is not specified but is not limited to an override or a cascading update of underlying data.
The start and end date represents the date range used in the evaluation of the transactional data on which this report is based. The start and end date may be the same indicating that the evaluation occurred at a point in time rather than across a date range. The start and end date requested may differ from the start and end date indicated in this report because of the inability to interpolate or extrapolate the date. These dates should be examined to understand what actually occurred and to what dates the information in this report pertains.
These dates differ from the dates the report itself was requested, created, or modified. The dates refer to the context of the evaluation. In a managed report, the dates are simply the dates to which the report information pertains. The history of a single report may be examined in the Journaling OSID.
For example, the Location of a Resource at 12:11pm is reported to be in Longwood and at 12:23pm is reported to be at Chestnut Hill. A request of a
ResourceLocation
. A data correction may update the Longwood time to be 12:09pm. The update of theResourceLocation
from 12:11pm to 12:09pm may be examined in the Journaling OSID while the 12:11pm time would not longer be visible in current versions of this report.Reports may be indexed by a managed time period such as a
Term
orFiscalPeriod
. The evaluation dates may map to the opening and closing dates of the time period. Evaluation dates that differ from the time period may indicate that the transactional data is incomplete for that time period or that the report was calculated using a requested date range.OsidCompendiums
are subjugates to otherOsidObjects
in that what is reported is tied to an instance of a dimension such as a person, account, or anOsidCatalog
.-
start_date
¶ Gets the start date used in the evaluation of the transactional data on which this report is based.
Returns: the date Return type: osid.calendaring.DateTime
compliance: mandatory – This method must be implemented.
-
end_date
¶ Gets the end date used in the evaluation of the transactional data on which this report is based.
Returns: the date Return type: osid.calendaring.DateTime
compliance: mandatory – This method must be implemented.
-
is_interpolated
()¶ Tests if this report is interpolated within measured data or known transactions.
Interpolation may occur if the start or end date fall between two known facts or managed time period.
Returns: true
if this report is interpolated,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
is_extrapolated
()¶ Tests if this report is extrapolated outside measured data or known transactions.
Extrapolation may occur if the start or end date fall outside two known facts or managed time period. Extrapolation may occur within a managed time period in progress where the results of the entire time period are projected.
Returns: true
if this report is extrapolated,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
Osid Capsule¶
-
class
dlkit.osid.objects.
OsidCapsule
¶ OsidCapsule
wraps other objects.The interface has no meaning other than to return a set of semantically unrelated objects from a method.
Osid Form¶
-
class
dlkit.osid.objects.
OsidForm
¶ Bases:
dlkit.osid.markers.Identifiable
,dlkit.osid.markers.Suppliable
The
OsidForm
is the vehicle used to create and update objects.The form is a container for data to be sent to an update or create method of a session. Applications should persist their own data until a form is successfully submitted in an update or create transaction.
The form may provide some feedback as to the validity of certain data updates before the update transaction is issued to the correspodning session but a successful modification of the form is not a guarantee of success for the update transaction. A consumer may elect to perform all updates within a single update transaction or break up a large update intio smaller units. The tradeoff is the granularity of error feedback vs. the performance gain of a single transaction.
OsidForms
areIdentifiable
. TheId
of theOsidForm
is used to uniquely identify the update or create transaction and not that of the object being updated. Currently, it is not necessary to have theseIds
persisted.As with all aspects of the OSIDs, nulls cannot be used. Methods to clear values are also defined in the form.
A new
OsidForm
should be acquired for each transaction upon anOsidObject
. Forms should not be reused from one object to another even if the supplied data is the same as the forms may encapsulate data specific to the object requested. Example of changing a display name and a color defined in a color interface extension:ObjectForm form = session.getObjectFormForUpdate(objectId); form.setDisplayName(“new name”); ColorForm recordForm = form.getFormRecord(colorRecordType); recordForm.setColor(“green”); session.updateObject(objectId, form);-
is_for_update
()¶ Tests if this form is for an update operation.
Returns: true
if this form is for an update operation,false
if for a create operationReturn type: boolean
compliance: mandatory – This method must be implemented.
-
default_locale
¶ Gets a default locale for
DisplayTexts
when a locale is not specified.Returns: the default locale Return type: osid.locale.Locale
compliance: mandatory – This method must be implemented.
-
locales
¶ Gets a list of locales for available
DisplayText
translations that can be performed using this form.Returns: a list of available locales or an empty list if no translation operations are available Return type: osid.locale.LocaleList
compliance: mandatory – This method must be implemented.
-
set_locale
(language_type, script_type)¶ Specifies a language and script type for
DisplayText
fields in this form.Setting a locale to something other than the default locale may affect the
Metadata
in this form.If multiple locales are available for managing translations, the
Metadata
indicates the fields are unset as they may be returning a defeult value based on the default locale.Parameters: - language_type (
osid.type.Type
) – the language type - script_type (
osid.type.Type
) – the script type
Raise: NullArgument
–language_type
orscript_type
is nullRaise: Unsupported
–language_type
andscript_type
not available fromget_locales()
compliance: mandatory – This method must be implemented.
- language_type (
-
journal_comment_metadata
¶ Gets the metadata for the comment corresponding to this form submission.
The comment is used for describing the nature of the change to the corresponding object for the purposes of logging and auditing.
Returns: metadata for the comment Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
journal_comment
¶
-
is_valid
()¶ Tests if ths form is in a valid state for submission.
A form is valid if all required data has been supplied compliant with any constraints.
Returns: false
if there is a known error in this form,true
otherwiseReturn type: boolean
Raise: OperationFailed
– attempt to perform validation failedcompliance: mandatory – This method must be implemented.
-
validation_messages
¶ Gets text messages corresponding to additional instructions to pass form validation.
Returns: a list of messages Return type: osid.locale.DisplayText
compliance: mandatory – This method must be implemented.
-
invalid_metadata
¶ Gets a list of metadata for the elements in this form which are not valid.
Returns: invalid metadata Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
Osid Identifiable Form¶
-
class
dlkit.osid.objects.
OsidIdentifiableForm
¶ Bases:
dlkit.osid.objects.OsidForm
The
OsidIdentifiableForm
is used to create and update identifiable objects.The form is a container for data to be sent to an update or create method of a session.
Osid Extensible Form¶
-
class
dlkit.osid.objects.
OsidExtensibleForm
¶ Bases:
dlkit.osid.objects.OsidForm
,dlkit.osid.markers.Extensible
The
OsidExtensibleForm
is used to create and update extensible objects.The form is a container for data to be sent to an update or create method of a session.
-
required_record_types
¶ Gets the required record types for this form.
The required records may change as a result of other data in this form and should be checked before submission.
Returns: a list of required record types Return type: osid.type.TypeList
compliance: mandatory – This method must be implemented.
-
Osid Browsable Form¶
-
class
dlkit.osid.objects.
OsidBrowsableForm
¶ Bases:
dlkit.osid.objects.OsidForm
The
OsidBrowsableForm
is used to create and update browsable objects.The form is a container for data to be sent to an update or create method of a session.
Osid Temporal Form¶
-
class
dlkit.osid.objects.
OsidTemporalForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update temporals.
-
start_date_metadata
¶ Gets the metadata for a start date.
Returns: metadata for the date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
start_date
¶
-
end_date_metadata
¶ Gets the metadata for an end date.
Returns: metadata for the date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
end_date
¶
-
Osid Subjugateable Form¶
-
class
dlkit.osid.objects.
OsidSubjugateableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update dependent objects.
Osid Aggregateable Form¶
-
class
dlkit.osid.objects.
OsidAggregateableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update assemblages.
Osid Containable Form¶
-
class
dlkit.osid.objects.
OsidContainableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update containers.
-
sequestered_metadata
¶ Gets the metadata for the sequestered flag.
Returns: metadata for the sequestered flag Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
sequestered
¶
-
Osid Sourceable Form¶
-
class
dlkit.osid.objects.
OsidSourceableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update sourceables.
-
provider_metadata
¶ Gets the metadata for a provider.
Returns: metadata for the provider Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
provider
¶
-
branding_metadata
¶ Gets the metadata for the asset branding.
Returns: metadata for the asset branding. Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
branding
¶
-
license_metadata
¶ Gets the metadata for the license.
Returns: metadata for the license Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
license_
¶
-
Osid Federateable Form¶
-
class
dlkit.osid.objects.
OsidFederateableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update federateables.
Osid Operable Form¶
-
class
dlkit.osid.objects.
OsidOperableForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update operables.
-
enabled_metadata
¶ Gets the metadata for the enabled flag.
Returns: metadata for the enabled flag Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
enabled
¶
-
disabled_metadata
¶ Gets the metadata for the disabled flag.
Returns: metadata for the disabled flag Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
disabled
¶
-
Osid Object Form¶
-
class
dlkit.osid.objects.
OsidObjectForm
¶ Bases:
dlkit.osid.objects.OsidIdentifiableForm
,dlkit.osid.objects.OsidExtensibleForm
,dlkit.osid.objects.OsidBrowsableForm
The
OsidObjectForm
is used to create and updateOsidObjects
.The form is not an
OsidObject
but merely a container for data to be sent to an update or create method of a session. A provider may or may not combine theOsidObject
andOsidObjectForm
interfaces into a single object.Generally, a set method parallels each get method of an
OsidObject
. Additionally,Metadata
may be examined for each data element to assist in understanding particular rules concerning acceptable data.The form may provide some feedback as to the validity of certain data updates before the update transaction is issued to the correspodning session but a successful modification of the form is not a guarantee of success for the update transaction. A consumer may elect to perform all updates within a single update transaction or break up a large update intio smaller units. The tradeoff is the granularity of error feedback vs. the performance gain of a single transaction.
As with all aspects of the OSIDs, nulls cannot be used. Methods to clear values are also defined in the form.
A new
OsidForm
should be acquired for each transaction upon anOsidObject
. Forms should not be reused from one object to another even if the supplied data is the same as the forms may encapsulate data specific to the object requested. Example of changing a display name and a color defined in a color interface extension:ObjectForm form = session.getObjectFormForUpdate(objectId); form.setDisplayName(“new name”); ColorForm recordForm = form.getFormRecord(colorRecordType); recordForm.setColor(“green”); session.updateObject(objectId, form);-
display_name_metadata
¶ Gets the metadata for a display name.
Returns: metadata for the display name Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
display_name
¶
-
description_metadata
¶ Gets the metadata for a description.
Returns: metadata for the description Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
description
¶
-
genus_type_metadata
¶ Gets the metadata for a genus type.
Returns: metadata for the genus Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
genus_type
¶
-
Osid Relationship Form¶
-
class
dlkit.osid.objects.
OsidRelationshipForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidTemporalForm
This form is used to create and update relationshps.
Osid Catalog Form¶
-
class
dlkit.osid.objects.
OsidCatalogForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidSourceableForm
,dlkit.osid.objects.OsidFederateableForm
This form is used to create and update catalogs.
Osid Rule Form¶
-
class
dlkit.osid.objects.
OsidRuleForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidOperableForm
This form is used to create and update rules.
-
rule_metadata
¶ Gets the metadata for an associated rule.
Returns: metadata for the rule Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
rule
¶
-
Osid Enabler Form¶
-
class
dlkit.osid.objects.
OsidEnablerForm
¶ Bases:
dlkit.osid.objects.OsidRuleForm
,dlkit.osid.objects.OsidTemporalForm
This form is used to create and update enablers.
-
schedule_metadata
¶ Gets the metadata for an associated schedule.
Returns: metadata for the schedule Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
schedule
¶
-
event_metadata
¶ Gets the metadata for an associated event.
Returns: metadata for the event Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
event
¶
-
cyclic_event_metadata
¶ Gets the metadata for the cyclic event.
Returns: metadata for the cyclic event Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
cyclic_event
¶
-
demographic_metadata
¶ Gets the metadata for an associated demographic.
Returns: metadata for the resource. Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
demographic
¶
-
Osid Constrainer Form¶
-
class
dlkit.osid.objects.
OsidConstrainerForm
¶ Bases:
dlkit.osid.objects.OsidRuleForm
This form is used to create and update constrainers.
Osid Processor Form¶
-
class
dlkit.osid.objects.
OsidProcessorForm
¶ Bases:
dlkit.osid.objects.OsidRuleForm
This form is used to create and update processors.
Osid Governator Form¶
-
class
dlkit.osid.objects.
OsidGovernatorForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidOperableForm
,dlkit.osid.objects.OsidSourceableForm
This form is used to create and update governators.
Osid Compendium Form¶
-
class
dlkit.osid.objects.
OsidCompendiumForm
¶ Bases:
dlkit.osid.objects.OsidObjectForm
,dlkit.osid.objects.OsidSubjugateableForm
This form is used to create and update governators.
-
start_date_metadata
¶ Gets the metadata for a start date.
Returns: metadata for the date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
start_date
¶
-
end_date_metadata
¶ Gets the metadata for an end date.
Returns: metadata for the date Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
end_date
¶
-
interpolated_metadata
¶ Gets the metadata for the interpolated flag.
Returns: metadata for the interpolated flag Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
interpolated
¶
-
extrapolated_metadata
¶ Gets the metadata for the extrapolated flag.
Returns: metadata for the extrapolated flag Return type: osid.Metadata
compliance: mandatory – This method must be implemented.
-
extrapolated
¶
-
Osid Capsule Form¶
-
class
dlkit.osid.objects.
OsidCapsuleForm
¶ Bases:
dlkit.osid.objects.OsidForm
This form is used to create and update capsules.
Osid List¶
-
class
dlkit.osid.objects.
OsidList
¶ OsidList
is the top-level interface for all OSID lists.An OSID list provides sequential access, one at a time or many at a time, access to a set of elements. These elements are not required to be OsidObjects but generally are. The element retrieval methods are defined in the sub-interface of
OsidList
where the appropriate return type is defined.Osid lists are a once pass through iteration of elements. The size of the object set and the means in which the element set is generated or stored is not known. Assumptions based on the length of the element set by copying the entire contents of the list into a fixed buffer should be done with caution a awareness that an implementation may return a number of elements ranging from zero to infinity.
Lists are returned by methods when multiple return values are possible. There is no guarantee that successive calls to the same method will return the same set of elements in a list. Unless an order is specified in an interface definition, the order of the elements is not known.
-
has_next
()¶ Tests if there are more elements in this list.
Returns: true
if more elements are available in this list,false
if the end of the list has been reachedReturn type: boolean
compliance: mandatory – This method must be implemented. implementation notes: Any errors that may result from accesing the underlying set of elements are to be deferred until the consumer attempts retrieval in which case the provider must return
true
for this method.
-
available
()¶ Gets the number of elements available for retrieval.
The number returned by this method may be less than or equal to the total number of elements in this list. To determine if the end of the list has been reached, the method
has_next()
should be used. This method conveys what is known about the number of remaining elements at a point in time and can be used to determine a minimum size of the remaining elements, if known. A valid return is zero even ifhas_next()
is true.This method does not imply asynchronous usage. All OSID methods may block.
Returns: the number of elements available for retrieval Return type: cardinal
compliance: mandatory – This method must be implemented. implementation notes: Any errors that may result from accesing the underlying set of elements are to be deferred until the consumer attempts retrieval in which case the provider must return a positive integer for this method so the consumer can continue execution to receive the error. In all other circumstances, the provider must not return a number greater than the number of elements known since this number will be fed as a parameter to the bulk retrieval method.
-
skip
(n)¶ Skip the specified number of elements in the list.
If the number skipped is greater than the number of elements in the list, hasNext() becomes false and available() returns zero as there are no more elements to retrieve.
Parameters: n ( cardinal
) – the number of elements to skipcompliance: mandatory – This method must be implemented.
-
Osid Node¶
-
class
dlkit.osid.objects.
OsidNode
¶ Bases:
dlkit.osid.markers.Identifiable
,dlkit.osid.markers.Containable
A node interface for hierarchical objects.
The
Id
of the node is theId
of the object represented at this node.-
is_root
()¶ Tests if this node is a root in the hierarchy (has no parents).
A node may have no more parents available in this node structure but is not a root in the hierarchy. If both
is_root()
andhas_parents()
is false, the parents of this node may be accessed thorugh another node structure retrieval.Returns: true
if this node is a root in the hierarchy,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
has_parents
()¶ Tests if any parents are available in this node structure.
There may be no more parents in this node structure however there may be parents that exist in the hierarchy.
Returns: true
if this node has parents,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
parent_ids
¶ Gets the parents of this node.
Returns: the parents of this node Return type: osid.id.IdList
compliance: mandatory – This method must be implemented.
-
is_leaf
()¶ Tests if this node is a leaf in the hierarchy (has no children).
A node may have no more children available in this node structure but is not a leaf in the hierarchy. If both
is_leaf()
andhas_children()
is false, the children of this node may be accessed thorugh another node structure retrieval.Returns: true
if this node is a leaf in the hierarchy,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
has_children
()¶ Tests if any children are available in this node structure.
There may be no more children available in this node structure but this node may have children in the hierarchy.
Returns: true
if this node has children,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
-
child_ids
¶ Gets the children of this node.
Returns: the children of this node Return type: osid.id.IdList
compliance: mandatory – This method must be implemented.
-