SMWTypeListValue Class Reference
[SMWDataValues]

This datavalue implements special processing suitable for defining the list of types that is required for SMWRecordValue objects. More...

Inherits SMWDataValue.

List of all members.

Public Member Functions

 getShortWikiText ($linked=null)
 Returns a short textual representation for this data value.
 getShortHTMLText ($linker=null)
 Returns a short textual representation for this data value.
 getLongWikiText ($linked=null)
 Return the long textual description of the value, as printed for example in the factbox.
 getLongHTMLText ($linker=null)
 Return the long textual description of the value, as printed for example in the factbox.
 getWikiValue ()
 Return the plain wiki version of the value, or FALSE if no such version is available.
 getTypeValues ()

Protected Member Functions

 parseUserValue ($value)
 Initialise the datavalue from the given value string.
 loadDataItem (SMWDataItem $dataItem)
 setDataItemFromTypeValues ()
 The special feature of this implementation of getDBkeys is that it uses internal type ids to obtain a short internal value for the type.
 makeOutputText ($type=0, $linker=null)
 makeValueOutputText ($type, $datavalue, $linker)

Protected Attributes

 $m_typevalues


Detailed Description

This datavalue implements special processing suitable for defining the list of types that is required for SMWRecordValue objects.

The input is a plain semicolon-separated list of type labels.

Author:
Markus Krötzsch

Definition at line 15 of file SMW_DV_TypeList.php.


Member Function Documentation

SMWTypeListValue::parseUserValue ( value  )  [protected]

Initialise the datavalue from the given value string.

The format of this strings might be any acceptable user input and especially includes the output of getWikiValue().

Parameters:
string $value

Reimplemented from SMWDataValue.

Definition at line 23 of file SMW_DV_TypeList.php.

References setDataItemFromTypeValues().

SMWTypeListValue::loadDataItem ( SMWDataItem dataItem  )  [protected]

See also:
SMWDataValue::setDataItem()
Parameters:
$dataitem SMWDataItem
Returns:
boolean

Reimplemented from SMWDataValue.

Definition at line 38 of file SMW_DV_TypeList.php.

References SMWDataValueFactory::findTypeLabel(), and SMWDataItem::TYPE_STRING.

SMWTypeListValue::setDataItemFromTypeValues (  )  [protected]

The special feature of this implementation of getDBkeys is that it uses internal type ids to obtain a short internal value for the type.

Note that this also given language independence but that this is of little use: if the value is given in another language in the wiki, then either the value is still understood, or the language-independent database entry is only of temporary use until someone edits the respective page.

Definition at line 61 of file SMW_DV_TypeList.php.

References SMWDataValue::addError(), and smwfLoadExtensionMessages().

Referenced by parseUserValue().

SMWTypeListValue::getShortWikiText ( linked = null  ) 

Returns a short textual representation for this data value.

If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in wiki text.

The parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.

Reimplemented from SMWDataValue.

Definition at line 76 of file SMW_DV_TypeList.php.

References makeOutputText().

SMWTypeListValue::getShortHTMLText ( linker = null  ) 

Returns a short textual representation for this data value.

If the value was initialised from a user supplied string, then this original string should be reflected in this short version (i.e. no normalisation should normally happen). There might, however, be additional parts such as code for generating tooltips. The output is in HTML text.

The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).

Reimplemented from SMWDataValue.

Definition at line 80 of file SMW_DV_TypeList.php.

References makeOutputText().

SMWTypeListValue::getLongWikiText ( linked = null  ) 

Return the long textual description of the value, as printed for example in the factbox.

If errors occurred, return the error message The result always is a wiki-source string.

The parameter $linked controls linking of values such as titles and should be non-NULL and non-false if this is desired.

Reimplemented from SMWDataValue.

Definition at line 84 of file SMW_DV_TypeList.php.

References makeOutputText().

SMWTypeListValue::getLongHTMLText ( linker = null  ) 

Return the long textual description of the value, as printed for example in the factbox.

If errors occurred, return the error message The result always is an HTML string.

The parameter $linker controls linking of values such as titles and should be some Linker object (or NULL for no linking).

Reimplemented from SMWDataValue.

Definition at line 88 of file SMW_DV_TypeList.php.

References makeOutputText().

SMWTypeListValue::getWikiValue (  ) 

Return the plain wiki version of the value, or FALSE if no such version is available.

The returned string suffices to reobtain the same DataValue when passing it as an input string to setUserValue().

Reimplemented from SMWDataValue.

Definition at line 92 of file SMW_DV_TypeList.php.

References makeOutputText().

SMWTypeListValue::getTypeValues (  ) 

Definition at line 96 of file SMW_DV_TypeList.php.

SMWTypeListValue::makeOutputText ( type = 0,
linker = null 
) [protected]

SMWTypeListValue::makeValueOutputText ( type,
datavalue,
linker 
) [protected]

Definition at line 115 of file SMW_DV_TypeList.php.

Referenced by makeOutputText().


Member Data Documentation

SMWTypeListValue::$m_typevalues [protected]

Definition at line 21 of file SMW_DV_TypeList.php.


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

Generated on Wed May 18 07:16:10 2011 for Semantic MediaWiki by  doxygen 1.5.6