Class RdfParser

Description

An RDF paser.

This class reads RDF data from files or URIs and generates models out of it. All valid RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised)

  • W3C Working Draft 10 October 2003
(http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported. The parser is based on the PHP version of repat (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html) by Luis Argerich (lrargerich@yahoo.com).

  • author: Luis Argerich <lrargerich@yahoo.com>, Chris Bizer <chris@bizer.de>, Radoslaw Oldakowski <radol@gmx.de> Daniel Westphal <mail@d-westphal.de>
  • version: $Id: RdfParser.html 443 2007-06-01 16:25:38Z cax $
  • access: public

Located in /syntax/RdfParser.php (line 28)

Object
   |
   --RdfParser
Variable Summary
mixed $model
mixed $rdf_parser
Method Summary
object MemModel &generateModel (string $base, [boolean $rdfBaseURI = false], [ $model = false])
void _parse_uri ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment)
void _report_error ( $error)
Variables
mixed $model (line 31)
mixed $rdf_parser (line 30)
Methods
generateModel (line 2203)

Generates a new MemModel from a URI, a file or from memory.

If you want to parse an RDF document, pass the URI or location in the filesystem of the RDF document. You can also pass RDF code direct to the function. If you pass RDF code directly to the parser and there is no xml:base included, you should set the base URI manually using the optional second parameter $rdfBaseURI. Make sure that here are proper namespace declarations in your input document.

  • access: public
object MemModel &generateModel (string $base, [boolean $rdfBaseURI = false], [ $model = false])
  • string $base
  • boolean $rdfBaseURI
  • $model
_is_forbidden_rdf_property_attribute (line 302)
void _is_forbidden_rdf_property_attribute ( $local_name)
  • $local_name
_parse_uri (line 469)
void _parse_uri ( $uri,  $buffer,  &$scheme,  &$authority,  &$path,  &$query,  &$fragment)
  • $uri
  • $buffer
  • &$scheme
  • &$authority
  • &$path
  • &$query
  • &$fragment
_report_error (line 1049)
void _report_error ( $error)
  • $error

Inherited Methods

Inherited From Object

Object::toString()

Documentation generated on Fri, 1 Jun 2007 16:50:45 +0200 by phpDocumentor 1.3.2