SMWThingDescription Class Reference
[SMWQuery]

A dummy description that describes any object. More...

Inherits SMWDescription.

List of all members.

Public Member Functions

 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.
 prune (&$maxsize, &$maxdepth, &$log)
 Determine the datatype of the values that are described by this object.


Detailed Description

A dummy description that describes any object.

Corresponds to owl:thing, the class of all abstract objects. Note that it is not used for datavalues of attributes in order to support type hinting in the API: descriptions of data are always SMWValueDescription objects.

Definition at line 162 of file SMW_Description.php.


Member Function Documentation

SMWThingDescription::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.

Definition at line 164 of file SMW_Description.php.

SMWThingDescription::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 168 of file SMW_Description.php.

SMWThingDescription::getSize (  ) 

Compute the size of the decription.

Default is 1.

Returns:
integer

Reimplemented from SMWDescription.

Definition at line 172 of file SMW_Description.php.

SMWThingDescription::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 SMWDescription.

Definition at line 176 of file SMW_Description.php.


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

Generated on Fri Feb 10 07:15:48 2012 for Semantic MediaWiki by  doxygen 1.5.6