Primitives¶
Id¶
-
class
dlkit.id.primitives.
Id
¶ Bases:
dlkit.osid.markers.OsidPrimitive
Id
represents an identifier object.Ids are designated by the following elements:
identifier:
a unique key or guidnamespace:
the namespace of the identifierauthority:
the issuer of the identifier
Two Ids are equal if their namespace, identifier and authority strings are equal. Only the identifier is case-sensitive. Persisting an
Id
means persisting the above components.Gets the authority of this
Id
.The authority is a string used to ensure the uniqueness of this
Id
when using a non- federated identifier space. Generally, it is a service name identifying the provider of thisId
. This method is used to compare oneId
to another.Returns: the authority of this Id
Return type: string
compliance: mandatory – This method must be implemented.
-
namespace
¶ Gets the namespace of the identifier.
The namespace reflects the domain in which the identifier is unique. When using a global identifier schema, the namespace may indicate the name of the scheme. When using a local identification scheme, the namespace may be more specific, such as the name of a database or file in which the identifiers exist. Federating adapters may use a custom namespace to include information for routing. This method is used to compare one
Id
to another.Returns: the authority of this Id
Return type: string
compliance: mandatory – This method must be implemented.
-
identifier
¶ Gets the identifier of this
Id
.This method is used to compare one
Id
to another.Returns: the identifier of this Id
Return type: string
compliance: mandatory – This method must be implemented.