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

Class: RDF_Serializer

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

Class Overview

RDF_Object
   |
   --RDF_Serializer

An RDF seralizer.


Author(s):

  • Chris Bizer <chris at bizer.de>, Boris Motik <motik at fzi.de>, Daniel Westphal <dawe at gmx.de>, Leandro Mariano Lopez <llopez at xinergiaargentina.com>

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 18]
An RDF seralizer.

Seralizes models to RDF syntax. It supports the xml:base, xml:lang, rdf:datatype and rdf:nodeID directive. You can choose between different output syntaxes by using the configuration methods or changing the configuration default values in constants.php. This class is based on the java class edu.unika.aifb.rdf.api.syntax.RDFSerializer by Boris Motik.

  • Author: Chris Bizer <chris@bizer.de>, Boris Motik <motik@fzi.de>, Daniel Westphal <dawe@gmx.de>, Leandro Mariano Lopez <llopez@xinergiaargentina.com>
  • Version: V0.7
  • Access: public


[ Top ]


Class Variables

$m_attributeStatements = array()

[line 38]


Type:   mixed


[ Top ]

$m_baseURI =

[line 31]


Type:   mixed


[ Top ]

$m_contentStatements = array()

[line 39]


Type:   mixed


[ Top ]

$m_currentSubject =

[line 33]


Type:   mixed


[ Top ]

$m_defaultNamespaces = array()

[line 27]


Type:   mixed


[ Top ]

$m_groupTypeStatement =

[line 37]


Type:   mixed


[ Top ]

$m_namespaces = array()

[line 28]


Type:   mixed


[ Top ]

$m_nextAutomaticPrefixIndex =

[line 29]


Type:   mixed


[ Top ]

$m_out =

[line 30]


Type:   mixed


[ Top ]

$m_rdfAboutElementText =

[line 35]


Type:   mixed


[ Top ]

$m_rdfIDElementText =

[line 34]


Type:   mixed


[ Top ]

$m_rdfResourceElementText =

[line 36]


Type:   mixed


[ Top ]

$m_statements = array()

[line 32]


Type:   mixed


[ Top ]

$rdf_qnames =

[line 24]


Type:   mixed


[ Top ]

$rdf_qname_prefix =

[line 40]


Type:   mixed


[ Top ]

$sort_model =

[line 23]


Type:   mixed


[ Top ]

$use_attributes =

[line 22]


Type:   mixed


[ Top ]

$use_entities =

[line 21]


Type:   mixed


[ Top ]

$use_xml_declaration =

[line 25]


Type:   mixed


[ Top ]



Method Detail

RDF_Serializer (Constructor)   [line 45]

RDF_Serializer RDF_Serializer( )

  • Access: public

[ Top ]

addNamespacePrefix   [line 135]

void addNamespacePrefix( String $prefix, String $namespace)

Adds a new prefix/namespace combination.
  • Access: public

Parameters:

String   $prefix   — 
String   $namespace   — 

[ Top ]

canAbbreviateValue   [line 669]

void canAbbreviateValue( object Node $node)

  • Access: protected

Parameters:

object Node   $node   — 

[ Top ]

checkForDoubleAttributes   [line 429]

void checkForDoubleAttributes( object Node $predicate)

  • Access: protected

Parameters:

object Node   $predicate   — 

[ Top ]

collectNamespace   [line 741]

void collectNamespace( object Resource $resource)

  • Access: protected

Parameters:

object Resource   $resource   — 

[ Top ]

collectNamespaces   [line 711]

void collectNamespaces( object Model_Memory $model)

  • Access: protected

Parameters:

object Model_Memory   $model   — 

[ Top ]

configSortModel   [line 67]

void configSortModel( boolean $bool)

Serializer congiguration: Sort Model Flag if the serializer should sort the model by subject before serializing.

TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

  • Access: public

Parameters:

boolean   $bool   — 

[ Top ]

configUseAttributes   [line 95]

void configUseAttributes( boolean $bool)

Serializer congiguration: Use Attributes Flag if the serializer should serialize triples as XML attributes where possible.

TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

  • Access: public

Parameters:

boolean   $bool   — 

[ Top ]

configUseEntities   [line 81]

void configUseEntities( boolean $bool)

Serializer congiguration: Use Entities Flag if the serializer should use entities for URIs.

TRUE makes the RDF code more compact. FALSE is default. Default can be changed in constants.php.

  • Access: public

Parameters:

boolean   $bool   — 

[ Top ]

configUseQnames   [line 109]

void configUseQnames( boolean $bool)

Serializer congiguration: Use Qnames Flag if the serializer should use qualified names for RDF reserved words.

TRUE makes the RDF code more compact. TRUE is default. Default can be changed in constants.php.

  • Access: public

Parameters:

boolean   $bool   — 

[ Top ]

configUseXMLDeclaration   [line 123]

void configUseXMLDeclaration( boolean $bool)

Serializer congiguration: Use XML Declaration Flag if the serializer should start documents with the xml declaration <?xml version="1.0" encoding="UTF-8" ? >.

TRUE is default. Default can be changed in constants.php.

  • Access: public

Parameters:

boolean   $bool   — 

[ Top ]

getElementText   [line 686]

void getElementText( STRING $elementName)

  • Access: protected

Parameters:

STRING   $elementName   — 

[ Top ]

getNextNamespacePrefix   [line 757]

void getNextNamespacePrefix( )

  • Access: protected

[ Top ]

getValueQuoteType   [line 634]

void getValueQuoteType( STRING $textValue)

  • Access: protected

Parameters:

STRING   $textValue   — 

[ Top ]

relativizeURI   [line 448]

void relativizeURI( STRING $uri)

  • Access: protected

Parameters:

STRING   $uri   — 

[ Top ]

saveAs   [line 260]

boolean saveAs( &$model, $filename, [String $encoding = RDF_DEFAULT_ENCODING], object Model_Memory $model)

Serializes a model and saves it into a file.

Returns FALSE if the model couldn't be saved to the file.

  • Access: public

Parameters:

object Model_Memory   $model   — 
String   $encoding   — 
   &$model   — 
   $filename   — 

[ Top ]

serialize   [line 154]

string &serialize( &$model, [ $xml_default_namespace = null], [String $encoding = RDF_DEFAULT_ENCODING], object Model_Memory $model)

Serializes a model to RDF syntax.

RDF syntax can be changed by config_use_attributes($boolean), config_use_entities($boolean), config_sort_model($boolean). NOTE: There is only one default namespace allowed within an XML document. Therefore if RDF_SER_RDF_QNAMES in constants.php is set to FALSE and you pass another $xml_default_namespace as parameter, the model will be serialized as if RDF_SER_RDF_QNAMES were set to TRUE.

  • Access: public

Parameters:

object Model_Memory   $model   — 
String   $encoding   — 
   &$model   — 
   $xml_default_namespace   — 

[ Top ]

writeAbsoluteResourceReference   [line 591]

void writeAbsoluteResourceReference( String $rebaseURI)

  • Access: protected

Parameters:

String   $rebaseURI   — 

[ Top ]

writeAttributeStatements   [line 491]

void writeAttributeStatements( )

  • Access: protected

[ Top ]

writeContentStatements   [line 514]

void writeContentStatements( )

  • Access: protected

[ Top ]

writeDescriptions   [line 323]

void writeDescriptions( )

  • Access: protected

[ Top ]

writeEntityDeclarations   [line 279]

void writeEntityDeclarations( )

  • Access: protected

[ Top ]

writeEscapedCDATA   [line 624]

void writeEscapedCDATA( STRING $textValue)

  • Access: protected

Parameters:

STRING   $textValue   — 

[ Top ]

writeGroup   [line 379]

void writeGroup( )

  • Access: protected

[ Top ]

writeNamespaceDeclarations   [line 291]

void writeNamespaceDeclarations( )

  • Access: protected

[ Top ]

writeResourceReference   [line 562]

void writeResourceReference( Object $object_node)

  • Access: protected

Parameters:

Object   $object_node   — 

[ Top ]

writeSubjectURI   [line 464]

void writeSubjectURI( object Node $subject_node)

  • Access: protected

Parameters:

object Node   $subject_node   — 

[ Top ]

writeTextValue   [line 610]

void writeTextValue( STRING $textValue)

  • Access: protected

Parameters:

STRING   $textValue   — 

[ Top ]


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