SMWContainerSemanticData Class Reference
[SMWDataItems]

Subclass of SMWSemanticData that is used to store the data in SMWDIContainer objects. More...

Inherits SMWSemanticData.

List of all members.

Public Member Functions

 __sleep ()
 Restore complete serialization which is disabled in SMWSemanticData.
 hasAnonymousSubject ()
 Check if the subject of this container is an anonymous object.
 getSubject ()
 Return subject to which the stored semantic annotation refer to, or throw an exception if the subject is anonymous (if the data has not been contextualized with setMasterPage() yet).
 copyDataFrom (SMWSemanticData $semanticData)
 Change the object to become an exact copy of the given SMWSemanticData object.

Static Public Member Functions

static makeAnonymousContainer ($noDuplicates=true)
 Construct a data container that refers to an anonymous subject.


Detailed Description

Subclass of SMWSemanticData that is used to store the data in SMWDIContainer objects.

It is special since the subject that the stored property-value pairs refer may or may not be specified explicitly. This can be tested with hasAnonymousSubject(). When trying to access the subject in anonymous state, an Exception will be thrown. Anonymous container data items are used when no page context is available, e.g. when specifying such a value in a search form where the parent page is not known.

Besides this change, the subclass mainly is needed to restroe the disabled serialization of SMWSemanticData.

See also the documentation of SMWDIContainer.

Since:
1.6
Author:
Markus Krötzsch

Definition at line 26 of file SMW_DI_Container.php.


Member Function Documentation

static SMWContainerSemanticData::makeAnonymousContainer ( noDuplicates = true  )  [static]

Construct a data container that refers to an anonymous subject.

See the documentation of the class for details.

Since:
1.7
Parameters:
boolean $noDuplicates stating if duplicate data should be avoided

Definition at line 36 of file SMW_DI_Container.php.

Referenced by SMWCompatibilityHelpers::dataItemFromDBKeys(), and SMWRecordValue::parseUserValueOrQuery().

SMWContainerSemanticData::__sleep (  ) 

Restore complete serialization which is disabled in SMWSemanticData.

Reimplemented from SMWSemanticData.

Definition at line 44 of file SMW_DI_Container.php.

SMWContainerSemanticData::hasAnonymousSubject (  ) 

Check if the subject of this container is an anonymous object.

See the documenation of the class for details.

Returns:
boolean

Definition at line 55 of file SMW_DI_Container.php.

Referenced by getSubject().

SMWContainerSemanticData::getSubject (  ) 

Return subject to which the stored semantic annotation refer to, or throw an exception if the subject is anonymous (if the data has not been contextualized with setMasterPage() yet).

Returns:
SMWDIWikiPage subject

Reimplemented from SMWSemanticData.

Definition at line 72 of file SMW_DI_Container.php.

References hasAnonymousSubject().

SMWContainerSemanticData::copyDataFrom ( SMWSemanticData semanticData  ) 

Change the object to become an exact copy of the given SMWSemanticData object.

This is used to make other types of SMWSemanticData into an SMWContainerSemanticData. To copy objects of the same type, PHP clone() should be used.

Since:
1.7
Parameters:
$semanticData SMWSemanticData object to copy from

Definition at line 90 of file SMW_DI_Container.php.

References SMWSemanticData::getProperties(), SMWSemanticData::getPropertyValues(), SMWSemanticData::getSubject(), SMWSemanticData::hasVisibleProperties(), and SMWSemanticData::hasVisibleSpecialProperties().


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

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6