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 IdReturn 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: trueif the last data retrieval was up to date,falseotherwiseReturn 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
Typeexplicitly 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: trueif a record of the given recordTypeis available,falseotherwiseReturn 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
Typespecification. Applications needing to examine a specific property should use the extension interface defined by itsType.Returns: a list of properties Return type: osid.PropertyListRaise: 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 recordtypein 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.PropertyListRaise: NullArgument–record_typeisnullRaise: 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¶ Temporalis 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: trueif this is effective,falseotherwiseReturn 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
Subjugateableis anOsidObjectdependent upon anotherOsidObject.A
Subjugateableis created in the context of the administeringOsidObjectthat may not be reassigned.A
Subjugateablealways has a fixed Id of it administeringOsidObject.
Aggregateable¶
-
class
dlkit.osid.markers.Aggregateable¶ Aggregateableis used for anOsidObjectto indicate that some or all of the definition is based on an included set of otherOsidObjectswhich are directly accessible and do not exist outside the context of the parent object.Aggregateablesallow for anOsidObjectto stand alone without knowledge of the originating service.An
Assetis 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 theAssetthat can be changed by updating theAssetusing anAssetForm. TheAssetContentdiffers in there exists a explicit mapping to theAssetmanaged through anOsidSessionbut accessible directly within theAssetto 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
Containableis a kind of aggregate where anOsidObjectis defined as a recursive composition of itself directly accessible without knowledge of the originating service.-
is_sequestered()¶ Tests if this
Containableis sequestered in that it should not appear outside of its aggregated composition.Returns: trueif this containable is sequestered,falseif this containable may appear outside its aggregateReturn type: boolean
-
Sourceable¶
-
class
dlkit.osid.markers.Sourceable¶ Sourcebleis used forOsidObjectswhere information about a provider is appropriate.Examples of
Sourceablesare catalogs, compositions, and services.-
provider_id¶ Gets the
Idof the provider.Returns: the provider IdReturn type: osid.id.Id
-
provider¶ Gets the
Resourcerepresenting the provider.Returns: the provider Return type: osid.resource.ResourceRaise: OperationFailed– unable to complete request
-
branding_ids¶ Gets the branding asset
Ids.Returns: a list of asset IdsReturn type: osid.id.IdList
-
branding¶ Gets a branding, such as an image or logo, expressed using the
Assetinterface.Returns: a list of assets Return type: osid.repository.AssetListRaise: OperationFailed– unable to complete request
-
Federateable¶
-
class
dlkit.osid.markers.Federateable¶ Federateableis used to indicate anOsidObjectcan be federated using the OSID Hierarchy pattern.An OSID federation of
OsidObjectsis where it is inferred from the hiererarchy that anyOsidObject“includes” its children.
Operable¶
-
class
dlkit.osid.markers.Operable¶ Operableis used to indicate anOsidObjectperforms operations.The active status indicates if the
Operableis 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
OsidEnablerrules, thenis_enabled()should be set totrueandis_disabled()set tofalsefor theOperableto be on andis_enabled()set tofalseandis_disabled()set to true for theOperableto beoff.is_enabled()andis_disabled()cannot both betrue.If there are related
OsidEnablerrules, the active status of at least oneOsidEnablerresults in atruevalue forisOperational(). This active status can be overridden by settingis_disabled()totrue. If there are no activeOsidEnablerrules,is_operational()is false resulting in anoffOperableunlessis_enabled()istrue.For the active status to be completely determined by the
OsidEnablers,bothis_enabled()andis_disabled()should befalsewhere theis_active()status is completely driven fromisOperational().-
is_active()¶ Tests if this operable is active.
is_active()istrueifis_operational()istrueandis_disabled()isfalse,oris_enabled()istrue.Returns: trueif this operable is on,falseif it is offReturn type: boolean
-
is_enabled()¶ Tests if this operable is administravely enabled.
Administratively enabling overrides any applied
OsidEnabler. If this method returnstruethenis_disabled()must returnfalse.Returns: trueif this operable is enabled,falseif 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 returnstruethenis_enabled()must returnfalse.Returns: trueif this operable is disabled,falseif the active status is determined by other rulesReturn type: boolean
-
is_operational()¶ Tests if this
Operableis operational.This Operable is operational if any of the applied
OsidEnablersaretrue.Returns: trueif this operable is operational,falseotherwiseReturn type: boolean
-