SMWExpLiteral Class Reference
[Semantic MediaWiki]

A single datatype literal for export. More...

Inherits SMWExpElement.

List of all members.

Public Member Functions

 __construct ($lexicalForm, $datatype= '', $dataItem=null)
 Constructor.
 getDatatype ()
 Return the URI of the datatype used, or the empty string if untyped.
 getLexicalForm ()
 Return the lexical form of the literal.

Protected Attributes

 $m_datatype
 $m_lexicalForm


Detailed Description

A single datatype literal for export.

Defined by a literal value and a datatype URI.

Todo:
Currently no support for language tags.

Definition at line 194 of file SMW_Exp_Element.php.


Constructor & Destructor Documentation

SMWExpLiteral::__construct ( lexicalForm,
datatype = '',
dataItem = null 
)

Constructor.

The given lexical form should be the plain string for representing the literal without datatype or language information. It must not use any escaping or abbrevition mechanisms.

Parameters:
$lexicalForm string lexical form
$datatype string datatype URI or empty for untyped literals
$dataItem SMWDataItem or null

Definition at line 216 of file SMW_Exp_Element.php.


Member Function Documentation

SMWExpLiteral::getDatatype (  ) 

Return the URI of the datatype used, or the empty string if untyped.

Returns:
string

Definition at line 227 of file SMW_Exp_Element.php.

Referenced by SMWRDFXMLSerializer::serializeExpLiteral().

SMWExpLiteral::getLexicalForm (  ) 

Return the lexical form of the literal.

The result does not use any escapings and might still need to be escaped in some contexts. The lexical form is not validated or canonicalized.

Returns:
string

Definition at line 238 of file SMW_Exp_Element.php.


Member Data Documentation

SMWExpLiteral::$m_datatype [protected]

Definition at line 200 of file SMW_Exp_Element.php.

SMWExpLiteral::$m_lexicalForm [protected]

Definition at line 205 of file SMW_Exp_Element.php.


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