[ Expand All ] [ Collapse All ] - [ Properties (3) ] [ Methods (8) ] - [ Legend ]

Literal Class v. V0.9.1

Object
Node
Literal

Class: Literal ----------------------------------------------------------------------------------

An RDF literal. The literal supports the xml:lang and rdf:datatype property. For XML datatypes see: http://www.w3.org/TR/xmlschema-2/

<BR><BR>History:<UL> <LI>11-08-2003 : Method setLanguage() added</LI> <LI>12-04-2002 : Datatype support added ($dtype, getDatatype, toString, setDatatype, equals)</LI> <LI>09-10-2002 : First version of this class.</LI>

AuthorsChris Bizer, Daniel Westphal
Properties implemented by Literal
private method dtype

Datatype of the literal

private method label

Label of the literal

private method lang

Language of the literal

Methods implemented by Literal
public method equals

PHPboolean equals(unknown $that)

Checks if ihe literal equals another literal. Two literals are equal, if they have the same label and they have the same language/datatype or both have no language/datatype property set.

Arguments

public method getDatatype

PHPstring getDatatype()

Returns the datatype of the literal.

Return

datatype of the literal

public method getLabel

PHPstring getLabel()

Returns the string value of the literal.

Return

value of the literal

public method getLanguage

PHPstring getLanguage()

Returns the language of the literal.

Return

language of the literal

constructor Literal

PHPLiteral(string $str, string $language)

Constructor

Arguments

public method setDatatype

PHPsetDatatype(unknown $datatype)

Sets the datatype of the literal. Instead of datatype URI, you can also use an datatype shortcuts like STRING or INTEGER. The array $short_datatype with the possible shortcuts is definded in ../constants.php

Arguments

public method setLanguage

PHPsetLanguage(string $lang)

Sets the language of the literal.

Arguments

public method toString

PHPstring toString()

Dumps literal.

Generated by PHPEdit - Copyright © 1999-2004 - Sébastien Hordeaux - WaterProof SARL