CWIS Developer Documentation
Public Member Functions | Static Public Member Functions | List of all members
Vocabulary Class Reference

Controlled vocabulary. More...

Public Member Functions

 __construct ($FileName)
 Object constructor. More...
 
 Status ()
 Get string indicate status of last action. More...
 
 Hash ()
 Get hash string for vocabulary (generated from file name). More...
 
 Name ()
 Get vocabulary name. More...
 
 Description ()
 Get vocabulary description. More...
 
 Url ()
 Get URL attached to vocabulary. More...
 
 Version ()
 Get version number for vocabulary. More...
 
 HasQualifier ()
 Get whether vocabulary has associated qualifier. More...
 
 QualifierName ()
 Get qualifier name. More...
 
 QualifierNamespace ()
 Get qualifier namespace. More...
 
 QualifierUrl ()
 Get qualifier URL. More...
 
 OwnerName ()
 Get name of owning (maintaining) organization. More...
 
 OwnerUrl ()
 Get primary URL for owning (maintaining) organization. More...
 
 TermArray ()
 Get vocabulary terms as multi-dimensional array. More...
 
 TermList ()
 Get vocabulary terms as flat array with double-dash separators. More...
 

Static Public Member Functions

static HashForFile ($FileName=NULL)
 Get hash string for specified vocabulary file name. More...
 
static FileSearchPaths ($NewValue=NULL)
 Get/set the list of paths where vocabulary files will be searched for. More...
 

Detailed Description

Controlled vocabulary.

Definition at line 13 of file Vocabulary.php.

Constructor & Destructor Documentation

Vocabulary::__construct (   $FileName)

Object constructor.

Parameters
string$FileNameName of .voc file containing vocabulary to load.
Note
Check Status() to determine if constructor succeeded

Definition at line 22 of file Vocabulary.php.

Member Function Documentation

Vocabulary::Description ( )

Get vocabulary description.

Returns
string Vocabulary description.

Definition at line 90 of file Vocabulary.php.

static Vocabulary::FileSearchPaths (   $NewValue = NULL)
static

Get/set the list of paths where vocabulary files will be searched for.

Parameters
array$NewValueArray of paths to search (OPTIONAL)
Returns
current SearchPaths

Definition at line 205 of file Vocabulary.php.

Vocabulary::Hash ( )

Get hash string for vocabulary (generated from file name).

Returns
string 32-character hash string.

Definition at line 62 of file Vocabulary.php.

static Vocabulary::HashForFile (   $FileName = NULL)
static

Get hash string for specified vocabulary file name.

Parameters
string$FileNameName of .voc file containing vocabulary.
Returns
string 32-character hash string.

Definition at line 72 of file Vocabulary.php.

Referenced by VocabularyFactory\GetVocabularyByHash().

Here is the caller graph for this function:

Vocabulary::HasQualifier ( )

Get whether vocabulary has associated qualifier.

Returns
bool TRUE if vocabulary has qualifier, otherwise FALSE.

Definition at line 117 of file Vocabulary.php.

References QualifierName(), QualifierNamespace(), and QualifierUrl().

Vocabulary::Name ( )

Get vocabulary name.

Returns
string Vocabulary name.

Definition at line 81 of file Vocabulary.php.

Vocabulary::OwnerName ( )

Get name of owning (maintaining) organization.

Returns
string Name of owner or empty string if no owner name available.

Definition at line 161 of file Vocabulary.php.

Vocabulary::OwnerUrl ( )

Get primary URL for owning (maintaining) organization.

Returns
string URL for owner or empty string if no owner URL available.

Definition at line 171 of file Vocabulary.php.

Vocabulary::QualifierName ( )

Get qualifier name.

Returns
string Qualifier name, or empty string if no qualifier name available or no qualifier associated with vocabulary.

Definition at line 129 of file Vocabulary.php.

Referenced by HasQualifier().

Here is the caller graph for this function:

Vocabulary::QualifierNamespace ( )

Get qualifier namespace.

Returns
string Qualifier namespace, or empty string if no qualifier namespace available or no qualifier associated with vocabulary.

Definition at line 140 of file Vocabulary.php.

Referenced by HasQualifier().

Here is the caller graph for this function:

Vocabulary::QualifierUrl ( )

Get qualifier URL.

Returns
string Qualifier URL, or empty string if no qualifier URL available or no qualifier associated with vocabulary.

Definition at line 151 of file Vocabulary.php.

Referenced by HasQualifier().

Here is the caller graph for this function:

Vocabulary::Status ( )

Get string indicate status of last action.

Definition at line 53 of file Vocabulary.php.

Vocabulary::TermArray ( )

Get vocabulary terms as multi-dimensional array.

Returns
array Associative hierarchical array with terms for index.

Definition at line 181 of file Vocabulary.php.

Referenced by TermList().

Here is the caller graph for this function:

Vocabulary::TermList ( )

Get vocabulary terms as flat array with double-dash separators.

Returns
array Array of terms.

Definition at line 193 of file Vocabulary.php.

References TermArray().

Vocabulary::Url ( )

Get URL attached to vocabulary.

Returns
string URL associated with vocabulary.

Definition at line 99 of file Vocabulary.php.

Vocabulary::Version ( )

Get version number for vocabulary.

Returns
string Vocabulary version.

Definition at line 108 of file Vocabulary.php.


The documentation for this class was generated from the following file: