Class Type

Description

The Type class captures the fundamental concept of categorizing an object.

Type are designed to be shared among various OSIDs and Managers. The exact meaning of a particular type is left to the developers who use a given Type subclass. The form of the Type class enables categorization. There are four Strings that make up the Type class: authority, domain, keyword, and description. The first three of these Strings are used by the isEqual method to determine if two instance of the Type class are equal. The fourth String, description, is used to clarify the semantic meaning of the instance.

<p> An example of a FunctionType instance: </p>

<p>

  • authority is "higher ed"
    - domain is "authorization
    - keyword is "writing checks"
    - description is "This is the FunctionType for writing checks"
</p>

<p> This Type could be used with the authorization OSID. It could also be used with the dictionary OSID to determine the text to display for a given locale (for example, CANADA_FRENCH). The dictionary OSID could use the FunctionType instance as a key to find the display text, but it could also use just the keyword string from the FunctionType as a key. By using the keyword the same display text could then be used for other FunctionTypes such as:

  • authority is "mit"
    - domain is "accounting"
    - keyword is "writing checks"
    - description is "A/P check writing type"
    An instance of the Type class can be used in a variety of ways to
categorize information either as a complete object or as one of its parts (ie authority, domain, keyword). </p>

<p> OSID Version: 2.0 </p>

<p> Licensed under the org.osid.SidImplementationLicenseMIT. </p>

Located in /harmoni/oki2/osid/shared/Type.php (line 55)

SObject
   |
   --Type
Direct descendents
Class Description
StorableOKIType This is the StorablePrimitive equivalent of OKIType.
HarmoniType A generic type for Harmoni. Constructor takes the desired authority, domain, keyword, and description.
Method Summary
object Type (string $domain, string $authority, string $keyword, [optional $description = ""])
object Type fromString (string $aString, [string $glue = "::"])
string getAuthority ()
string getDescription ()
string getDomain ()
string getKeyword ()
boolean isEqual (mixed $type2, object Type $type2 )
boolean isEqualTo (mixed $type2, object Type $type2 )
string printableString ()
string typeToString (object Type $aType, [string $glue = "::"])
Methods
Constructor Type (line 149)

Constructor

object Type (string $domain, string $authority, string $keyword, [optional $description = ""])
  • string $domain
  • string $authority
  • string $keyword
  • optional $description: string $description
fromString (line 205)

Convert a delimited string to an OKI Type

  • static:
  • since: 6/1/05
  • access: public
object Type fromString (string $aString, [string $glue = "::"])
  • string $aString
  • string $glue
getAuthority (line 100)
  • access: public
string getAuthority ()
getDescription (line 133)
  • access: public
string getDescription ()
getDomain (line 111)
  • access: public
string getDomain ()
getKeyword (line 122)
  • access: public
string getKeyword ()
isEqual (line 89)
  • access: public
boolean isEqual (mixed $type2, object Type $type2 )

Redefinition of:
SObject::isEqual()
Answer whether the receiver and the argument are the same.
isEqualTo (line 66)
  • access: public
boolean isEqualTo (mixed $type2, object Type $type2 )

Redefinition of:
SObject::isEqualTo()
Answer whether the receiver and the argument are the same.
printableString (line 176)

Return a printable string

  • since: 7/13/05
  • access: public
string printableString ()

Redefinition of:
SObject::printableString()
Answer a String whose characters are a description of the receiver.
typeToString (line 190)

Convert an OKI Type to a delimited string

  • static:
  • since: 6/1/05
  • access: public
string typeToString (object Type $aType, [string $glue = "::"])

Inherited Methods

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:27:35 -0400 by phpDocumentor 1.3.0RC3