SMWValueDescription Class Reference
[SMWQuery]

Description of one data value, or of a range of data values. More...

Inherits SMWDescription.

Inherited by SMAreaValueDescription, and SMGeoCoordsValueDescription.

List of all members.

Public Member Functions

 __construct (SMWDataItem $dataItem, $property, $comparator=SMW_CMP_EQ)
 getDataValue ()
 getDataItem ()
 getComparator ()
 getQueryString ($asvalue=false)
 Return a string expressing this query.
 isSingleton ()
 Return true if the description is required to encompass at most a single result, independently of the knowledge base.
 getSize ()
 Compute the size of the decription.

Protected Attributes

 $m_dataItem
 $m_comparator
 $m_property


Detailed Description

Description of one data value, or of a range of data values.

Technically this usually corresponds to nominal predicates or to unary concrete domain predicates in OWL which are parametrised by one constant from the concrete domain. In RDF, concrete domain predicates that define ranges (like "greater or equal to") are not directly available.

Definition at line 392 of file SMW_Description.php.


Constructor & Destructor Documentation

SMWValueDescription::__construct ( SMWDataItem dataItem,
property,
comparator = SMW_CMP_EQ 
)

Reimplemented in SMAreaValueDescription.

Definition at line 398 of file SMW_Description.php.


Member Function Documentation

SMWValueDescription::getDataValue (  ) 

Deprecated:
Use getDataItem() and SMWDataValueFactory::newDataItemValue() if needed. Vanishes before SMW 1.7

Definition at line 405 of file SMW_Description.php.

SMWValueDescription::getDataItem (  ) 

SMWValueDescription::getComparator (  ) 

SMWValueDescription::getQueryString ( asvalue = false  ) 

Return a string expressing this query.

Some descriptions have different syntax in property value positions. The parameter $asvalue specifies whether the serialisation should take that into account.

Example: The SMWValueDescription [[Paris]] returns the single result "Paris" but can also be used as value in [[has location::Paris]] which is preferred over the canonical [[has location::<q>[[Paris]]</q>]].

Parameters:
boolean $asvalue
Returns:
string

Reimplemented from SMWDescription.

Reimplemented in SMAreaValueDescription, and SMGeoCoordsValueDescription.

Definition at line 417 of file SMW_Description.php.

References SMWQueryLanguage::getStringForComparator(), and SMWDataValueFactory::newDataItemValue().

SMWValueDescription::isSingleton (  ) 

Return true if the description is required to encompass at most a single result, independently of the knowledge base.

Returns:
boolean

Reimplemented from SMWDescription.

Definition at line 431 of file SMW_Description.php.

SMWValueDescription::getSize (  ) 

Compute the size of the decription.

Default is 1.

Returns:
integer

Reimplemented from SMWDescription.

Definition at line 439 of file SMW_Description.php.

Referenced by SMAreaValueDescription::prune().


Member Data Documentation

SMWValueDescription::$m_dataItem [protected]

Definition at line 394 of file SMW_Description.php.

SMWValueDescription::$m_comparator [protected]

Definition at line 395 of file SMW_Description.php.

SMWValueDescription::$m_property [protected]

Definition at line 396 of file SMW_Description.php.


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

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