SMWRecordDescription Class Reference
[SMWQuery]

A special type of conjunction used to express the conditions imposed on one record object by means of specifying a (partial) value for it in a query. More...

Inherits SMWConjunction.

List of all members.

Public Member Functions

 getQueryString ($asvalue=false)
 Return a string expressing this query.
 prune (&$maxsize, &$maxdepth, &$log)
 Determine the datatype of the values that are described by this object.


Detailed Description

A special type of conjunction used to express the conditions imposed on one record object by means of specifying a (partial) value for it in a query.

This class mostly works like a normal conjunction but it gets properties that encode the positions in the record, and which cannot be serialised like normal property conditions.

Definition at line 19 of file SMW_Record_Descriptions.php.


Member Function Documentation

SMWRecordDescription::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

Reimplemented from SMWConjunction.

Definition at line 21 of file SMW_Record_Descriptions.php.

Referenced by prune().

SMWRecordDescription::prune ( &$  maxsize,
&$  maxdepth,
&$  log 
)

Determine the datatype of the values that are described by this object.

Most descriptins can only describe wiki pages, so this is the default, but some descriptions may refer to other datatypes, and overwrite this function accordingly.

Returns:
string Recursively restrict query to a maximal size and depth as given. Returns a possibly changed description that should be used as a replacement. Reduce values of parameters to account for the returned descriptions size. Default implementation for non-nested descriptions of size 1. The parameter $log contains a list of all pruned conditions, updated when some description was reduced.
Note:
Objects must not do changes on $this during pruning, since $this can be reused in multiple places of one or many queries. Make new objects to reflect changes!

Reimplemented from SMWConjunction.

Definition at line 46 of file SMW_Record_Descriptions.php.

References SMWConjunction::getDescriptions(), SMWDescription::getPrintRequests(), and getQueryString().


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

Generated on Sun May 22 07:16:00 2011 for Semantic MediaWiki by  doxygen 1.5.6