BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMWRecordValue Class Reference
Inheritance diagram for SMWRecordValue:
Collaboration diagram for SMWRecordValue:

Public Member Functions

 getProperties ()
 
 getValuesFromString ($value)
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getWikiValue ()
 
 setProperty (SMWDIProperty $property)
 
 setFieldProperties (array $properties)
 
 getDVs ()
 
 getDataItems ()
 
 getPropertyDataItems ()
 
- Public Member Functions inherited from SMWDataValue
 __construct ($typeid)
 
 setUserValue ($value, $caption=false, $approximateValue=false)
 
 setDataItem (SMWDataItem $dataItem)
 
 setProperty (SMWDIProperty $property)
 
 getProperty ()
 
 setContextPage (SMWDIWikiPage $contextPage=null)
 
 getContextPage ()
 
 setOptions (Options $options)
 
 setOption ($key, $value)
 
 getOptionValueFor ($key)
 
 isEnabledFeature ($feature)
 
 setCaption ($caption)
 
 getCaption ()
 
 getPreferredCaption ()
 
 addInfolink (SMWInfolink $link)
 
 setOutputFormat ($formatString)
 
 getOutputFormat ()
 
 addError ($error)
 
 addErrorMsg ($parameters, $type=null, $language=null)
 
 clearErrors ()
 
 getQueryDescription ($value)
 
 getDataValueFormatter ()
 
 getPropertySpecificationLookup ()
 
 getDataItem ()
 
 __toString ()
 
 getShortWikiText ($linked=null)
 
 getShortHTMLText ($linker=null)
 
 getLongWikiText ($linked=null)
 
 getLongHTMLText ($linker=null)
 
 getShortText ($outputformat, $linker=null)
 
 getLongText ($outputformat, $linker=null)
 
 getInfolinkText ($outputformat, $linker=null)
 
 getWikiValue ()
 
 getTypeID ()
 
 disableServiceLinks ()
 
 getInfolinks ()
 
 getHash ()
 
 isNumeric ()
 
 isValid ()
 
 canUse ()
 
 setExtraneousFunctions (array $extraneousFunctions)
 
 getExtraneousFunctionFor ($name, array $parameters=array())
 
 getErrorText ()
 
 getErrors ()
 

Static Public Member Functions

static findPropertyDataItems ($diProperty)
 
- Static Public Member Functions inherited from SMWDataValue
static prepareValue (&$value, &$comparator)
 

Protected Member Functions

 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 checkAllowedValues ()
 
 makeOutputText ($type=0, $linker=null)
 
 makeValueOutputText ($type, $dataValue, $linker)
 
- Protected Member Functions inherited from SMWDataValue
 parseUserValue ($value)
 
 loadDataItem (SMWDataItem $dataItem)
 
 getServiceLinkParams ()
 
 checkAllowedValues ()
 
 convertDoubleWidth ($value)
 

Protected Attributes

 $m_diProperties = null
 cache for properties for the fields of this data value
 
- Protected Attributes inherited from SMWDataValue
 $m_dataitem
 
 $m_property = null
 
 $m_contextPage = null
 
 $m_caption
 
 $m_typeid
 
 $m_outformat = false
 
 $approximateValue = false
 

Additional Inherited Members

- Public Attributes inherited from SMWDataValue
const OPT_USER_LANGUAGE = 'user.language'
 
const OPT_CONTENT_LANGUAGE = 'content.language'
 

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 SMWDIContainer objects to return its inner state. See the documentation for SMWDIContainer 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 SMWDIWikiPage 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

Member Function Documentation

SMWRecordValue::checkAllowedValues ( )
protected
Todo:
Allowed values for multi-valued properties are not supported yet.
static SMWRecordValue::findPropertyDataItems (   $diProperty)
static

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

Since
1.6
Parameters
$diPropertymixed null or SMWDIProperty object for which to retrieve the types
Returns
array of SMWDIProperty
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
SMWRecordValue::getDVs ( )
Deprecated:
as of 1.6, use getDataItems instead
Returns
array of SMWDataItem
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 SMWDIProperty
SMWRecordValue::getValuesFromString (   $value)
Since
2.3
Parameters
string$value
Returns
array
SMWRecordValue::loadDataItem ( SMWDataItem  $dataItem)
protected
See Also
SMWDataValue::loadDataItem()
Parameters
$dataitemSMWDataItem
Returns
boolean
SMWRecordValue::setFieldProperties ( array  $properties)
Since
2.1
Parameters
SMWDIProperty[]$properties
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).

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