Class: RdfSerializer ---------------------------------------------------------------------------------- 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. <BR><BR>History:<UL> <LI>12-14-2004 : bug in function serialize() fixed by Sören Auer( auer@informatik.uni-leipzig.de ) </LI> <LI>12-06-2004 : improved namespace handling added ( tobias.gauss@web.de )</LI> <LI>01-06-2004 : Empty model bug fixed.</LI> <LI>03-25-2004 : Bug in saveAs() fixed by inkel( inkel-php@f14web.com.ar )</LI> <LI>03-21-2004 : Support for xml default namespace added Methods changed: serialize(), writeNamespaceDeclarations(), getElementText()</LI> <LI>11-17-2003 : Support for XMLLiterals added.</LI> <LI>07-27-2003 : Functions addapted to the new class tree (MemModel extends Model)</LI> <LI>07-24-2003 : Bug in writeAbsoluteResourceReference() fixed by Paul Cowles( paul@semaview.com ) </LI> <LI>02-21-2003 : saveAs method added.</LI> <LI>02-12-2003 : rdf:type and bNode reference bug fixed.</LI> <LI>01-15-2003 : pass-by-reference bug fixed.</LI> <LI>01-10-2003 : rdf:datatype and $useAttributes bug fixed.</LI> <LI>12-04-2002 : Added support for rdf:datatype (writeContentStatements())</LI> <LI>12-04-2002 : Added rdf:nodeID attribute for blank nodes (writeSubjectURI, writeResourceReference)</LI> <LI>10-03-2002 : Bug in collectNamespaces() fixed.</LI> <LI>09-15-2002 : First version of this class.</LI> </UL>
|
PHP | addNamespacePrefix(string $prefix, string $namespace) |
---|
Adds a new prefix/namespace combination.
Arguments
PHP | configSortModel(unknown $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.
Arguments
PHP | configUseAttributes(unknown $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.
Arguments
PHP | configUseEntities(unknown $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.
Arguments
PHP | configUseQnames(unknown $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.
Arguments
PHP | configUseXmlDeclaration(unknown $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.
Arguments
PHP | boolean saveAs(unknown $model, unknown $filename, string $encoding) |
---|
Serializes a model and saves it into a file. Returns FALSE if the model couldn't be saved to the file.
Arguments
PHP | string serialize(unknown $model, unknown $xml_default_namespace, string $encoding) |
---|
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 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 SER_RDF_QNAMES were set to TRUE.
Arguments