Class LibRDF_LiteralNode

Description

A representation of a literal node.

Literal nodes can have a type and a language, but not both.

Located in /Node.php (line 264)

LibRDF_Node
   |
   --LibRDF_LiteralNode
Method Summary
void __construct (mixed $value, string $datatype, string $language)
string getDatatype ()
string getLanguage ()
Variables

Inherited Variables

Inherited from LibRDF_Node

LibRDF_Node::$node
Methods
Constructor __construct (line 284)

Create a new Literal node.

Both the $language and $datatype parameters are optional.

The value of the literal node can either be a string or an XML literal in the form of a DOMNodeList object. If using XML, a datatype of http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral is implied, so the datatype parameter cannot be used with XML. A literal cannot have both a language and a datatype.

  • access: public
  • throws: LibRDF_Error If unabel to create a new node
void __construct (mixed $value, string $datatype, string $language)
  • mixed $value: The literal value, either a string, a DOMNodeList or a librdf_node resource
  • string $datatype: An optional datatype URI for the literal value
  • string $language: An option language for the literal value
getDatatype (line 367)

Return the datattype URI or NULL if this literal has no datatype.

  • return: The datatype URI
  • access: public
string getDatatype ()
getLanguage (line 384)

Return the language of this literal or NULL if the literal has no language.

  • return: The literal's language
  • access: public
string getLanguage ()

Inherited Methods

Inherited From LibRDF_Node

LibRDF_Node::getNode()
LibRDF_Node::isEqual()
LibRDF_Node::makeNode()
LibRDF_Node::__clone()
LibRDF_Node::__destruct()
LibRDF_Node::__toString()

Documentation generated on Thu, 15 Jun 2006 19:25:12 -0400 by phpDocumentor 1.3.0