SMWRecordValue Class Reference
[SMWDataValues]

SMWDataValue implements the handling of short lists of values, where the order governs the type of each entry. More...

Inherits SMWDataValue.

List of all members.

Public Member Functions

 getQueryDescription ($value)
 Overwrite SMWDataValue::getQueryDescription() to be able to process comparators between all values.
 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.
 setProperty (SMWDIProperty $property)
 Make sure that the content is reset in this case.
 getDVs ()
 getDataItems ()
 Create a list (array with numeric keys) containing the datavalue objects that this SMWRecordValue object holds.
 getPropertyDataItems ()
 Return the array (list) of properties that the individual entries of this datatype consist of.

Static Public Member Functions

static findPropertyDataItems ($diProperty)
 Return the array (list) of properties that the individual entries of this datatype consist of.

Protected Member Functions

 parseUserValue ($value)
 Initialise the datavalue from the given value string.
 parseUserValueOrQuery ($value, $queryMode)
 loadDataItem (SMWDataItem $dataItem)
 checkAllowedValues ()
 makeOutputText ($type=0, $linker=null)
 makeValueOutputText ($type, $dataValue, $linker)

Protected Attributes

 $m_diProperties = null
 cache for properties for the fields of this data value


Detailed Description

SMWDataValue implements the handling of short lists of values, where the order governs the type of each entry.

Todo:
Enforce limitation of maximal number of values.
Todo:
Complete internationalisation.
Author:
Markus Krötzsch

Definition at line 17 of file SMW_DV_Record.php.


Member Function Documentation

SMWRecordValue::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 22 of file SMW_DV_Record.php.

References parseUserValueOrQuery().

SMWRecordValue::parseUserValueOrQuery ( value,
queryMode 
) [protected]

SMWRecordValue::loadDataItem ( SMWDataItem dataItem  )  [protected]

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

Reimplemented from SMWDataValue.

Definition at line 112 of file SMW_DV_Record.php.

References SMWDataItem::TYPE_CONTAINER.

SMWRecordValue::getQueryDescription ( value  ) 

Overwrite SMWDataValue::getQueryDescription() to be able to process comparators between all values.

Reimplemented from SMWDataValue.

Definition at line 125 of file SMW_DV_Record.php.

References parseUserValueOrQuery().

SMWRecordValue::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 129 of file SMW_DV_Record.php.

References makeOutputText().

SMWRecordValue::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 136 of file SMW_DV_Record.php.

References makeOutputText().

SMWRecordValue::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 143 of file SMW_DV_Record.php.

References makeOutputText().

SMWRecordValue::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 147 of file SMW_DV_Record.php.

References makeOutputText().

SMWRecordValue::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 151 of file SMW_DV_Record.php.

References makeOutputText().

SMWRecordValue::checkAllowedValues (  )  [protected]

Todo:
Allowed values for multi-valued properties are not supported yet.

Reimplemented from SMWDataValue.

Definition at line 156 of file SMW_DV_Record.php.

SMWRecordValue::setProperty ( SMWDIProperty property  ) 

Make sure that the content is reset in this case.

Todo:
This is not a full reset yet (the case that property is changed after a value was set does not occur in the normal flow of things, hence this has low priority).

Reimplemented from SMWDataValue.

Definition at line 163 of file SMW_DV_Record.php.

SMWRecordValue::getDVs (  ) 

Deprecated:
as of 1.6, use getDataItems instead
Returns:
array of SMWDataItem

Definition at line 175 of file SMW_DV_Record.php.

References getDataItems().

SMWRecordValue::getDataItems (  ) 

Create a list (array with numeric keys) containing the datavalue objects that this SMWRecordValue object holds.

Values that are not present are set to null. Note that the first index in the array is 0, not 1.

Since:
1.6
Returns:
array of SMWDataItem

Definition at line 189 of file SMW_DV_Record.php.

References SMWDataValue::getDataItem(), getPropertyDataItems(), and SMWDataValue::isValid().

Referenced by getDVs().

SMWRecordValue::getPropertyDataItems (  ) 

Return the array (list) of properties that the individual entries of this datatype consist of.

Since:
1.6
Todo:
I18N for error message.
Returns:
array of SMWDIProperty

Definition at line 218 of file SMW_DV_Record.php.

References SMWDataValue::addError().

Referenced by getDataItems(), makeOutputText(), and parseUserValueOrQuery().

static SMWRecordValue::findPropertyDataItems ( diProperty  )  [static]

Return the array (list) of properties that the individual entries of this datatype consist of.

Since:
1.6
Parameters:
$diProperty mixed null or SMWDIProperty object for which to retrieve the types
Returns:
array of SMWDIProperty

Definition at line 240 of file SMW_DV_Record.php.

References SMWDataValue::isValid(), and smwfGetStore().

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

SMWRecordValue::makeValueOutputText ( type,
dataValue,
linker 
) [protected]

Definition at line 292 of file SMW_DV_Record.php.

Referenced by makeOutputText().


Member Data Documentation

SMWRecordValue::$m_diProperties = null [protected]

cache for properties for the fields of this data value

Definition at line 20 of file SMW_DV_Record.php.


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

Generated on Thu Feb 9 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6