SMWContainerValue Class Reference
[SMWDataValues]

Abstract datavalue class to implement a generic container for complex values (internal objects) that do not have a single value but a set of nested property-value pairs. More...

Inherits SMWDataValue.

List of all members.

Public Member Functions

 getDBkeys ()
 Serialize data in the format described for parseDBkeys().
 getHash ()
 Return a string that identifies the value of the object, and that can be used to compare different value objects.
 getData ()
 Return the stored data as a SMWSemanticData object.

Protected Member Functions

 parseDBkeys ($args)
 Containers have one DB key, so the value of this function should be an array with one element.


Detailed Description

Abstract datavalue class to implement a generic container for complex values (internal objects) that do not have a single value but a set of nested property-value pairs.

Author:
Markus Krötzsch

Definition at line 16 of file SMW_DV_Container.php.


Member Function Documentation

SMWContainerValue::parseDBkeys ( args  )  [protected]

Containers have one DB key, so the value of this function should be an array with one element.

This one DB key should consist of an array of arbitrary length where each entry encodes one property-value pair. The pairs are encoded as arrays of size two that correspond to the input arguments of SMWSemanticData::addPropertyStubValue(): a property DB key (string), and a value DB key array (array).

Reimplemented from SMWDataValue.

Definition at line 25 of file SMW_DV_Container.php.

SMWContainerValue::getDBkeys (  ) 

Serialize data in the format described for parseDBkeys().

However, it is usually expected that callers are aware of containers (this is the main purpose of this abstract class) so they can use specific methods for accessing the data in a more convenient form that contains the (probably available) information about property and data *objects* (not just their plain strings).

Reimplemented from SMWDataValue.

Definition at line 43 of file SMW_DV_Container.php.

SMWContainerValue::getHash (  ) 

Return a string that identifies the value of the object, and that can be used to compare different value objects.

Possibly overwritten by subclasses (e.g. to ensure that returned value is normalised first)

Returns:
string

Reimplemented from SMWDataValue.

Definition at line 53 of file SMW_DV_Container.php.

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

SMWContainerValue::getData (  ) 

Return the stored data as a SMWSemanticData object.

This is more conveniently to access than what getDBkeys() gives, but intended only for reading. It may not be safe to write to the returned object.

Definition at line 74 of file SMW_DV_Container.php.


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

Generated on Sat Oct 29 07:15:51 2011 for Semantic MediaWiki by  doxygen 1.5.6