syntax
[ class tree: syntax ] [ index: syntax ] [ all elements ]

Class: RDF_Parser

Source Location: /RDF-0.2.0/RDF/Parser.php

Class Overview

RDF_Object
   |
   --RDF_Parser

An RDF paser.


Author(s):

  • Luis Argerich <lrargerich at yahoo.com>, Chris Bizer <chris at bizer.de>, Radoslaw Oldakowski <radol at gmx.de> Daniel Westphal <mail at d-westphal.de>

Version:

  • V0.7

Variables

Methods


Inherited Variables

Inherited Methods

Class: RDF_Object

RDF_Object::factory()
RDF_Object::toString()
Serializes a object into a string

Class Details

[line 24]
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: V0.7
  • Access: public


[ Top ]


Class Variables

$model =

[line 27]


Type:   mixed


[ Top ]

$rdf_parser =

[line 26]


Type:   mixed


[ Top ]



Method Detail

add_statement_to_model   [line 1905]

object Model_Memory add_statement_to_model( string &$user_data, string $subject_type, string $subject, string $predicate, string $ordinal, string $object_type, string $object, string $xml_lang, $datatype)

Adds a new statement to the model This method is called by generateModel().
  • Access: protected

Parameters:

string   &$user_data   — 
string   $subject_type   — 
string   $subject   — 
string   $predicate   — 
string   $ordinal   — 
string   $object_type   — 
string   $object   — 
string   $xml_lang   —  )
   $datatype   — 

[ Top ]

generateModel   [line 1969]

object Model_Memory &generateModel( string $base, [boolean $rdfBaseURI = false])

Generates a new Model_Memory 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

Parameters:

string   $base   — 
boolean   $rdfBaseURI   — 

[ Top ]

is_valid_id   [line 557]

void is_valid_id( string $id)

IDs which contain CombiningChars or Extenders (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid.

If you want to use IDs containing these characters you can turn off the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php).

  • Access: protected

Parameters:

string   $id   — 

[ Top ]

rdf_get_base   [line 2127]

void rdf_get_base( )

  • Access: protected

[ Top ]

rdf_get_xml_parser   [line 2099]

void rdf_get_xml_parser( )

  • Access: protected

[ Top ]

rdf_parse   [line 2090]

void rdf_parse( string $s, string $is_final)

  • Access: protected

Parameters:

string   $s   — 
string   $is_final   — 

[ Top ]

rdf_parser_create   [line 2029]

void rdf_parser_create( string $encoding)

  • Access: protected

Parameters:

string   $encoding   — 

[ Top ]

rdf_parser_free   [line 2074]

void rdf_parser_free( )

  • Access: protected

[ Top ]

rdf_set_base   [line 2109]

void rdf_set_base( string $base)

  • Access: protected

Parameters:

string   $base   — 

[ Top ]

_character_data_handler   [line 1852]

void _character_data_handler( string $parser, string $s)

  • Access: protected

Parameters:

string   $parser   — 
string   $s   — 

[ Top ]

_clear_element   [line 78]

void _clear_element( string &$e)

  • Access: protected

Parameters:

string   &$e   — 

[ Top ]

_copy_element   [line 63]

void _copy_element( string $source, string &$destination)

  • Access: protected

Parameters:

string   $source   — 
string   &$destination   — 

[ Top ]

_end_collection   [line 1605]

void _end_collection( )

  • Access: protected

[ Top ]

_end_element_handler   [line 1808]

void _end_element_handler( string $parser, string $name)

  • Access: protected

Parameters:

string   $parser   — 
string   $name   — 

[ Top ]

_end_literal_property   [line 1761]

void _end_literal_property( )

property elements with text only as content set the state to RDF_IN_PROPERTY_LITERAL. as character data is received from expat, it is saved in a buffer and reported when the end tag is received.
  • Access: protected

[ Top ]

_generate_anonymous_uri   [line 644]

void _generate_anonymous_uri( string &$buf)

  • Access: protected

Parameters:

string   &$buf   — 

[ Top ]

_handle_collection_element   [line 1430]

void _handle_collection_element( string &$namespace_uri, string &$local_name, string &$attributes)

  • Access: protected

Parameters:

string   &$namespace_uri   — 
string   &$local_name   — 
string   &$attributes   — 

[ Top ]

_handle_property_attributes   [line 814]

void _handle_property_attributes( string $subject_type, string $subject, string $attributes, string $xml_lang, string $bag_id, string $statements)

  • Access: protected

Parameters:

string   $subject_type   — 
string   $subject   — 
string   $attributes   — 
string   $xml_lang   — 
string   $bag_id   — 
string   $statements   — 

[ Top ]

_handle_property_element   [line 1147]

void _handle_property_element( string &$namespace_uri, string &$local_name, string &$attributes)

  • Access: protected

Parameters:

string   &$namespace_uri   — 
string   &$local_name   — 
string   &$attributes   — 

[ Top ]

_handle_resource_element   [line 951]

void _handle_resource_element( string $namespace_uri, string $local_name, string $attributes, string $parent)

  • Access: protected

Parameters:

string   $namespace_uri   — 
string   $local_name   — 
string   $attributes   — 
string   $parent   — 

[ Top ]

_handle_xml_end_element   [line 1522]

void _handle_xml_end_element( string $name)

  • Access: protected

Parameters:

string   $name   — 

[ Top ]

_handle_xml_start_element   [line 1490]

void _handle_xml_start_element( string &$namespace_uri, string &$local_name, string &$attributes)

  • Access: protected

Parameters:

string   &$namespace_uri   — 
string   &$local_name   — 
string   &$attributes   — 

[ Top ]

_is_absolute_uri   [line 345]

void _is_absolute_uri( string $uri)

  • Access: protected

Parameters:

string   $uri   — 

[ Top ]

_is_alnum   [line 325]

void _is_alnum( string $val)

  • Access: protected

Parameters:

string   $val   — 

[ Top ]

_is_alpha   [line 335]

void _is_alpha( string $val)

  • Access: protected

Parameters:

string   $val   — 

[ Top ]

_is_forbidden_rdf_node_element   [line 304]

void _is_forbidden_rdf_node_element( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_forbidden_rdf_property_element   [line 256]

void _is_forbidden_rdf_property_element( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_node_element   [line 277]

void _is_rdf_node_element( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_ordinal   [line 186]

void _is_rdf_ordinal( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_property_attribute   [line 202]

void _is_rdf_property_attribute( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_property_attribute_literal   [line 169]

void _is_rdf_property_attribute_literal( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_property_attribute_resource   [line 159]

void _is_rdf_property_attribute_resource( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_is_rdf_property_element   [line 230]

void _is_rdf_property_element( string $local_name)

  • Access: protected

Parameters:

string   $local_name   — 

[ Top ]

_join_name_and_declare_prefix   [line 1563]

void _join_name_and_declare_prefix( string $namespace_uri, string $local_name)

  • Access: protected

Parameters:

string   $namespace_uri   — 
string   $local_name   — 

[ Top ]

_new_element   [line 35]

void _new_element( )

  • Access: protected

[ Top ]

_pop_element   [line 146]

void _pop_element( )

  • Access: protected

[ Top ]

_push_element   [line 120]

void _push_element( )

  • Access: protected

[ Top ]

_report_statement   [line 669]

void _report_statement( string $subject_type, string $subject, string $predicate, string $ordinal, string $object_type, string $object, string $xml_lang, string $bag_id, string $statements, string $statement_id, $datatype)

  • Access: protected

Parameters:

string   $subject_type   — 
string   $subject   — 
string   $predicate   — 
string   $ordinal   — 
string   $object_type   — 
string   $object   — 
string   $xml_lang   — 
string   $bag_id   — 
string   $statements   — 
string   $statement_id   — 
   $datatype   — 

[ Top ]

_resolve_id   [line 594]

void _resolve_id( string $id, string &$buffer)

  • Access: protected

Parameters:

string   $id   — 
string   &$buffer   — 

[ Top ]

_resolve_uri_reference   [line 428]

void _resolve_uri_reference( string $base_uri, string $reference_uri, string &$buffer)

  • Access: protected

Parameters:

string   $base_uri   — 
string   $reference_uri   — 
string   &$buffer   — 

[ Top ]

_split_name   [line 617]

void _split_name( string $name, string &$buffer, string &$namespace_uri, string &$local_name)

  • Access: protected

Parameters:

string   $name   — 
string   &$buffer   — 
string   &$namespace_uri   — 
string   &$local_name   — 

[ Top ]

_start_element_handler   [line 1659]

void _start_element_handler( string $parser, string $name, string $attributes)

  • Access: protected

Parameters:

string   $parser   — 
string   $name   — 
string   $attributes   — 

[ Top ]

_start_ns_declaration_handler   [line 2061]

void _start_ns_declaration_handler( resource &$parser, string $ns_prefix, string $ns_uri)

  • Access: protected

Parameters:

resource   &$parser   — 
string   $ns_prefix   — 
string   $ns_uri   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.