Class RDFUtil

Description

Useful utility methods.

Static class.



History:

  • 12-06-2004 : improved namespace handling in function writeAsHTMLTable() added (tobias.gauss@web.de)
  • 09-10-2004 : added support for OWL and infered statements
  • 11-18-2003 : Function writeAsHtmlTable() htmlspecialchars & nl2br for displaying literals added.
  • 04-23-2003 : Chunk_split() removed from writeHTMLTable
  • 12-04-2002 : Added support for "rdf:datatype" in writeHTMLTable
  • 10-03-2002 : Green coloring for RDF_SCHEMA nodes added to writeHTMLTable
  • 09-10-2002 : First version of this class.

  • access: public
  • author: Chris Bizer <chris@bizer.de>, Daniel Westphal <dawe@gmx.de>
  • version: V0.9.1

Located in /util/RdfUtil.php (line 29)

Object
   |
   --RDFUtil
Method Summary
object Resource createOrd (Integer $num)
String escapeValue (String $textValue)
string getLocalName (Object $resource)
string getNamespace (Object $resource)
Integer getOrd (object Resource $resource)
string guessName (String $uri)
string guessNamespace (String $uri)
boolean isRDF (Object $resource)
void writeHTMLTable (object MemModel &$model)
Methods
createOrd (line 147)

Creates ordinal RDF resource out of an integer.

  • access: public
object Resource createOrd (Integer $num)
  • Integer $num
escapeValue (line 112)

Escapes < > and &

  • access: public
String escapeValue (String $textValue)
  • String $textValue
getLocalName (line 72)

Delivers the Localname (without the namespace prefix) out of the URI of a Resource.

  • access: public
string getLocalName (Object $resource)
  • Object $resource: Resource $resource
getNamespace (line 61)

Extracts the namespace prefix out of the URI of a Resource.

  • access: public
string getNamespace (Object $resource)
  • Object $resource: Resource $resource
getOrd (line 129)

Converts an ordinal RDF resource to an integer.

e.g. Resource(RDF:_1) => 1

  • access: public
Integer getOrd (object Resource $resource)
  • object Resource $resource
guessName (line 50)

Delivers the name out of the URI (without the namespace prefix).

  • access: public
string guessName (String $uri)
  • String $uri
guessNamespace (line 38)

Extracts the namespace prefix out of a URI.

  • access: public
string guessNamespace (String $uri)
  • String $uri
isRDF (line 101)

Tests if the URI of a resource belongs to the RDF syntax/model namespace.

  • access: public
boolean isRDF (Object $resource)
  • Object $resource: Resource $resource
writeHTMLTable (line 158)

Prints a MemModel as HTML table.

You can change the colors in the configuration file.

  • access: public
void writeHTMLTable (object MemModel &$model)
  • object MemModel &$model

Inherited Methods

Inherited From Object

Object::toString()

Documentation generated on Fri, 17 Dec 2004 16:17:19 +0100 by phpDocumentor 1.3.0RC3