Semantic MediaWiki and related extensions
Public Member Functions | Static Protected Member Functions | List of all members
SMW\Exporter\Element\ExpLiteral Class Reference
Collaboration diagram for SMW\Exporter\Element\ExpLiteral:
Collaboration graph
[legend]

Public Member Functions

 __construct ($lexicalForm, $datatype= '', $lang= '', DataItem $dataItem=null)
 
 getLang ()
 
 getDatatype ()
 
 getLexicalForm ()
 
 getSerialization ()
 
- Public Member Functions inherited from SMW\Exporter\Element\ExpElement
 __construct (DataItem $dataItem=null)
 
 getDataItem ()
 
 getHash ()
 
 getSerialization ()
 

Static Protected Member Functions

static deserialize ($serialization)
 
- Static Protected Member Functions inherited from SMW\Exporter\Element\ExpElement
static deserialize ($serialization)
 

Additional Inherited Members

- Static Public Member Functions inherited from SMW\Exporter\Element\ExpElement
static newFromSerialization (array $serialization)
 
- Public Attributes inherited from SMW\Exporter\Element
const TYPE_RESOURCE = 0
 
const TYPE_NSRESOURCE = 1
 
const TYPE_LITERAL = 2
 
- Protected Attributes inherited from SMW\Exporter\Element\ExpElement
 $dataItem
 

Detailed Description

A single datatype literal for export. Defined by a literal value and a datatype URI.

GNU GPL v2+

Since
2.2
Author
Markus Krötzsch
mwjames

Constructor & Destructor Documentation

SMW\Exporter\Element\ExpLiteral::__construct (   $lexicalForm,
  $datatype = '',
  $lang = '',
DataItem  $dataItem = null 
)
Note
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 abbreviation mechanisms.
Parameters
string$lexicalFormlexical form
string$datatypeData type URI or empty for untyped literals
string$lang
DataItem | null$dataItem
Exceptions
InvalidArgumentException

Member Function Documentation

static SMW\Exporter\Element\ExpLiteral::deserialize (   $serialization)
staticprotected
SMW\Exporter\Element\ExpLiteral::getDatatype ( )

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

Returns
string
SMW\Exporter\Element\ExpLiteral::getLang ( )

Returns a language tag with the language tag must be well-formed according to BCP47

Returns
string
SMW\Exporter\Element\ExpLiteral::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
SMW\Exporter\Element\ExpLiteral::getSerialization ( )
Since
2.2
Returns
array

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