Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMWRecordValue Class Reference
Collaboration diagram for SMWRecordValue:
Collaboration graph
[legend]

Public Member Functions

 __construct ($typeid= '')
 
 getProperties ()
 
 getValuesFromString ($value)
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getWikiValue ()
 
 setProperty (DIProperty $property)
 
 setFieldProperties (array $properties)
 
 getDVs ()
 
 getDataItems ()
 
 getPropertyDataItems ()
 

Protected Member Functions

 parseUserValue ($value)
 
 loadDataItem (DataItem $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 More...
 

Detailed Description

SMWDataValue implements the handling of small sets of property-value pairs. The declaration of Records in SMW uses the order of values to encode the property that should be used, so the user only needs to enter a list of values. Internally, however, the property-value assignments are not stored with a particular order; they will only be ordered for display, following the declaration. This is why it is not supported to have Records using the same property for more than one value.

The class uses DIContainer objects to return its inner state. See the documentation for DIContainer for details on how this "pseudo" data encapsulated many property assignments. Such data is stored internally like a page with various property-value assignments. Indeed, record values can be created from DIWikiPage objects (the missing information will be fetched from the store).

Todo:

Enforce limitation of maximal number of values.

Enforce uniqueness of properties in declaration.

Complete internationalisation.

Author
Markus Krötzsch

Constructor & Destructor Documentation

SMWRecordValue::__construct (   $typeid = '')
Parameters
string$typeid

Member Function Documentation

SMWRecordValue::checkAllowedValues ( )
protected
Todo:
Allowed values for multi-valued properties are not supported yet.
SMWRecordValue::getDataItems ( )
Since
1.6
SMWRecordValue::getDVs ( )
Deprecated:
as of 1.6, use getDataItems instead
Returns
array of DataItem
SMWRecordValue::getLongHTMLText (   $linker = null)
SMWRecordValue::getLongWikiText (   $linked = null)
SMWRecordValue::getProperties ( )
Since
2.3
Returns
DIProperty[]|null
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 DIProperty
SMWRecordValue::getShortHTMLText (   $linker = null)
SMWRecordValue::getShortWikiText (   $linked = null)
SMWRecordValue::getValuesFromString (   $value)
Since
2.3
Parameters
string$value
Returns
array
SMWRecordValue::getWikiValue ( )
SMWRecordValue::loadDataItem ( DataItem  $dataItem)
protected
See also
SMWDataValue::loadDataItem()
Parameters
$dataitemDataItem
Returns
boolean
SMWRecordValue::makeOutputText (   $type = 0,
  $linker = null 
)
protected
SMWRecordValue::makeValueOutputText (   $type,
  $dataValue,
  $linker 
)
protected
SMWRecordValue::parseUserValue (   $value)
protected
SMWRecordValue::setFieldProperties ( array  $properties)
Since
2.1
Parameters
DIProperty[]$properties
SMWRecordValue::setProperty ( DIProperty  $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).

Member Data Documentation

SMWRecordValue::$m_diProperties = null
protected

cache for properties for the fields of this data value


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