Class LibRDF_Serializer

Description

A wrapper around the librdf_serializer datatype.

This class is used in conjunction with LibRDF_Model to produce a serialization of a set of statements.

Located in /Serializer.php (line 51)


	
			
Method Summary
void __construct (string $name, [string $mime_type = NULL], [string $type_uri = NULL])
void __destruct ()
resource getSerializer ()
void setNamespace (string $uri, string $prefix)
Methods
Constructor __construct (line 78)

Create a new LibRDF_Serializer.

Name is the name of the serializer to use. Common choices are "rdfxml", "ntriples" and "turtle".

The "rdfxml" serializer is not pretty, outputing a flat list of one XML element per statement. "rdfxml-abbrev" is a bit nicer, but slower.

  • access: public
  • throws: LibRDF_Error If unable to create a new serializer
void __construct (string $name, [string $mime_type = NULL], [string $type_uri = NULL])
  • string $name: The name of the serializer to use
  • string $mime_type: The MIME type of the syntax
  • string $type_uri: The URI of the syntax
Destructor __destruct (line 99)

Free the serializer's resources.

  • access: public
void __destruct ()
getSerializer (line 115)

Return the wrapped librdf_serializer resource.

This function is intended for other LibRDF classes and should not be called.

  • return: The wrapper resource
  • access: public
resource getSerializer ()
setNamespace (line 129)

Set a prefix to URI mapping.

  • access: public
  • throws: LibRDF_Error If unable to set the prefix
void setNamespace (string $uri, string $prefix)
  • string $uri: The namespace URI
  • string $prefix: The string prefix to use

Documentation generated on Thu, 15 Jun 2006 19:25:13 -0400 by phpDocumentor 1.3.0