Markers¶
Osid Primitive¶
-
class
dlkit.osid.markers.
OsidPrimitive
¶ A marker interface for an interface that behaves like a language primitive.
Primitive types, such as numbers and strings, do not encapsulate behaviors supplied by an OSID Provider. More complex primitives are expressed through interface definitions but are treated in a similar fashion as a language primitive. OSID Primitives supplied by an OSID Consumer must be consumable by any OSID Provider.
Identifiable¶
-
class
dlkit.osid.markers.
Identifiable
¶ A marker interface for objects uniquely identified with an OSID
Id
.-
ident
¶ Gets the Id associated with this instance of this OSID object.
Persisting any reference to this object is done by persisting the Id returned from this method. The Id returned may be different than the Id used to query this object. In this case, the new Id should be preferred over the old one for future queries.
Returns: the Id
Return type: osid.id.Id
-
is_current
()¶ Tests to see if the last method invoked retrieved up-to-date data.
Simple retrieval methods do not specify errors as, generally, the data is retrieved once at the time this object is instantiated. Some implementations may provide real-time data though the application may not always care. An implementation providing a real-time service may fall back to a previous snapshot in case of error. This method returns false if the data last retrieved was stale.
Returns: true
if the last data retrieval was up to date,false
otherwiseReturn type: boolean
-
Extensible¶
-
class
dlkit.osid.markers.
Extensible
¶ A marker interface for objects that contain
OsidRecords
.-
record_types
¶ Gets the record types available in this object.
A record
Type
explicitly indicates the specification of an interface to the record. A record may or may not inherit other record interfaces through interface inheritance in which case support of a record type may not be explicit in the returned list. Interoperability with the typed interface to this object should be performed throughhasRecordType()
.Returns: the record types available Return type: osid.type.TypeList
-
has_record_type
(record_type)¶ Tests if this object supports the given record
Type
.The given record type may be supported by the object through interface/type inheritence. This method should be checked before retrieving the record interface.
Parameters: record_type ( osid.type.Type
) – a typeReturns: true
if a record of the given recordType
is available,false
otherwiseReturn type: boolean
-
Browsable¶
-
class
dlkit.osid.markers.
Browsable
¶ A marker interface for objects that offer property inspection.
-
properties
¶ Gets a list of properties.
Properties provide a means for applications to display a representation of the contents of a record without understanding its
Type
specification. Applications needing to examine a specific property should use the extension interface defined by itsType
.Returns: a list of properties Return type: osid.PropertyList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– an authorization failure occurred
-
get_properties_by_record_type
(record_type)¶ Gets a list of properties corresponding to the specified record type.
Properties provide a means for applications to display a representation of the contents of a record without understanding its record interface specification. Applications needing to examine a specific propertyshould use the methods defined by the record
Type
. The resulting set includes properties specified by parents of the recordtype
in the case a record’s interface extends another.Parameters: record_type ( osid.type.Type
) – the record type corresponding to the properties set to retrieveReturns: a list of properties Return type: osid.PropertyList
Raise: NullArgument
–record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– an authorization failure occurredRaise: Unsupported
–has_record_type(record_type)
isfalse
-
Suppliable¶
-
class
dlkit.osid.markers.
Suppliable
¶ A marker interface for OSID Provider-owned objects used to supply input from an OSID Consumer.
Temporal¶
-
class
dlkit.osid.markers.
Temporal
¶ Temporal
is used to indicate the object endures for a period of time.-
is_effective
()¶ Tests if the current date is within the start end end dates inclusive.
Returns: true
if this is effective,false
otherwiseReturn type: boolean
-
start_date
¶ Gets the start date.
Returns: the start date Return type: osid.calendaring.DateTime
-
end_date
¶ Gets the end date.
Returns: the end date Return type: osid.calendaring.DateTime
-
Subjugateable¶
-
class
dlkit.osid.markers.
Subjugateable
¶ A
Subjugateable
is anOsidObject
dependent upon anotherOsidObject
.A
Subjugateable
is created in the context of the administeringOsidObject
that may not be reassigned.A
Subjugateable
always has a fixed Id of it administeringOsidObject
.
Aggregateable¶
-
class
dlkit.osid.markers.
Aggregateable
¶ Aggregateable
is used for anOsidObject
to indicate that some or all of the definition is based on an included set of otherOsidObjects
which are directly accessible and do not exist outside the context of the parent object.Aggregateables
allow for anOsidObject
to stand alone without knowledge of the originating service.An
Asset
is an example of an aggregate by including theAssetContents
. An Asset also contains a provider however in this case the provider is categorized as a simple data attribute of theAsset
that can be changed by updating theAsset
using anAssetForm
. TheAssetContent
differs in there exists a explicit mapping to theAsset
managed through anOsidSession
but accessible directly within theAsset
to enable its consumption outside the Repository OSID.This marker has little practicality other than to identify a service pattern that is neither a data attribute nor a separately accessible relationship or mapping.
Containable¶
-
class
dlkit.osid.markers.
Containable
¶ A
Containable
is a kind of aggregate where anOsidObject
is defined as a recursive composition of itself directly accessible without knowledge of the originating service.-
is_sequestered
()¶ Tests if this
Containable
is sequestered in that it should not appear outside of its aggregated composition.Returns: true
if this containable is sequestered,false
if this containable may appear outside its aggregateReturn type: boolean
-
Sourceable¶
-
class
dlkit.osid.markers.
Sourceable
¶ Sourceble
is used forOsidObjects
where information about a provider is appropriate.Examples of
Sourceables
are catalogs, compositions, and services.-
provider_id
¶ Gets the
Id
of the provider.Returns: the provider Id
Return type: osid.id.Id
-
provider
¶ Gets the
Resource
representing the provider.Returns: the provider Return type: osid.resource.Resource
Raise: OperationFailed
– unable to complete request
-
branding_ids
¶ Gets the branding asset
Ids
.Returns: a list of asset Ids
Return type: osid.id.IdList
-
branding
¶ Gets a branding, such as an image or logo, expressed using the
Asset
interface.Returns: a list of assets Return type: osid.repository.AssetList
Raise: OperationFailed
– unable to complete request
-
Federateable¶
-
class
dlkit.osid.markers.
Federateable
¶ Federateable
is used to indicate anOsidObject
can be federated using the OSID Hierarchy pattern.An OSID federation of
OsidObjects
is where it is inferred from the hiererarchy that anyOsidObject
“includes” its children.
Operable¶
-
class
dlkit.osid.markers.
Operable
¶ Operable
is used to indicate anOsidObject
performs operations.The active status indicates if the
Operable
is on or off. The active status is determined from the operational status and the enabling rules.The operational status indicates the Operable is functioning. This status is not set administratively but instead refelects suitable conditions for operation.
Operables may be administratively turned on of off through the enabled and disabled administrative overrides. If there are no related
OsidEnabler
rules, thenis_enabled()
should be set totrue
andis_disabled()
set tofalse
for theOperable
to be on andis_enabled()
set tofalse
andis_disabled()
set to true for theOperable
to beoff
.is_enabled()
andis_disabled()
cannot both betru
e.If there are related
OsidEnabler
rules, the active status of at least oneOsidEnabler
results in atrue
value forisOperational()
. This active status can be overridden by settingis_disabled()
totrue
. If there are no activeOsidEnabler
rules,is_operational()
is false resulting in anoff
Operable
unlessis_enabled()
istrue
.For the active status to be completely determined by the
OsidEnablers,
bothis_enabled()
andis_disabled()
should befalse
where theis_active()
status is completely driven fromisOperational()
.-
is_active
()¶ Tests if this operable is active.
is_active()
istrue
ifis_operational()
istrue
andis_disabled()
isfalse,
oris_enabled()
istrue
.Returns: true
if this operable is on,false
if it is offReturn type: boolean
-
is_enabled
()¶ Tests if this operable is administravely enabled.
Administratively enabling overrides any applied
OsidEnabler
. If this method returnstrue
thenis_disabled()
must returnfalse
.Returns: true
if this operable is enabled,false
if the active status is determined by other rulesReturn type: boolean
-
is_disabled
()¶ Tests if this operable is administravely disabled.
Administratively disabling overrides any applied
OsidEnabler
. If this method returnstrue
thenis_enabled()
must returnfalse
.Returns: true
if this operable is disabled,false
if the active status is determined by other rulesReturn type: boolean
-
is_operational
()¶ Tests if this
Operable
is operational.This Operable is operational if any of the applied
OsidEnablers
aretrue
.Returns: true
if this operable is operational,false
otherwiseReturn type: boolean
-