Inherits SMWSerializer.
Public Member Functions | |
| __construct ($sparqlMode=false) | |
| clear () | |
| Clear internal states to start a new serialization. | |
| flushSparqlPrefixes () | |
| Get an array of namespace prefixes used in SPARQL mode. | |
| serializeDeclaration ($uri, $typename) | |
| Serialize a single declaration for the given $uri (expanded) and type (given as a QName). | |
| serializeExpData (SMWExpData $data) | |
| Serialise the given SMWExpData object. | |
Static Public Member Functions | |
| static | getTurtleNameForExpElement (SMWExpElement $expElement) |
| Get the Turtle serialization string for the given SMWExpElement. | |
Protected Member Functions | |
| serializeHeader () | |
| Serialize the header (i.e. | |
| serializeFooter () | |
| Serialise the footer (i.e. | |
| serializeNamespace ($shortname, $uri) | |
| Serialize a single namespace. | |
| serializeNestedExpData (SMWExpData $data, $indent) | |
| Serialize the given SMWExpData object, possibly recursively with increased indentation. | |
| serializeExpLiteral (SMWExpLiteral $element) | |
| serializeExpResource (SMWExpResource $element) | |
Protected Attributes | |
| $subexpdata | |
| $sparqlmode | |
| $sparql_namespaces | |
Definition at line 19 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::__construct | ( | $ | sparqlMode = false |
) |
Definition at line 44 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::clear | ( | ) |
Clear internal states to start a new serialization.
Reimplemented from SMWSerializer.
Definition at line 49 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::flushSparqlPrefixes | ( | ) |
Get an array of namespace prefixes used in SPARQL mode.
Namespaces are not serialized among triples in SPARQL mode but are collected separately. This method returns the prefixes and empties the collected list afterwards.
Definition at line 62 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::serializeHeader | ( | ) | [protected] |
Serialize the header (i.e.
write it to the internal buffer). May include standard syntax to start output but also declare some common namespaces globally.
Reimplemented from SMWSerializer.
Definition at line 68 of file SMW_Serializer_Turtle.php.
References SMWExporter::expandURI().
| SMWTurtleSerializer::serializeFooter | ( | ) | [protected] |
Serialise the footer (i.e.
write it to the internal buffer).
Reimplemented from SMWSerializer.
Definition at line 98 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::serializeDeclaration | ( | $ | uri, | |
| $ | typename | |||
| ) |
Serialize a single declaration for the given $uri (expanded) and type (given as a QName).
| $uri | string URI of the thing to declare | |
| $typename | string one of owl:Class, owl:ObjectProperty, and owl:datatypeProperty |
Reimplemented from SMWSerializer.
Definition at line 104 of file SMW_Serializer_Turtle.php.
References SMWExporter::expandURI().
| SMWTurtleSerializer::serializeExpData | ( | SMWExpData $ | data | ) |
Serialise the given SMWExpData object.
The method must not assume that the exported data refers to wiki pages or other SMW data, and it must ensure that all required auxiliary declarations for obtaining proper OWL are included in any case (this can be done using requireDeclaration()).
| $data | SMWExpData containing the data to be serialised. |
Reimplemented from SMWSerializer.
Definition at line 108 of file SMW_Serializer_Turtle.php.
References SMWSerializer::serializeNamespaces(), and serializeNestedExpData().
| SMWTurtleSerializer::serializeNamespace | ( | $ | shortname, | |
| $ | uri | |||
| ) | [protected] |
Serialize a single namespace.
Namespaces that were serialized in such a way that they remain available for all following output should be added to $global_namespaces.
| $shortname | string abbreviation/prefix to declare | |
| $uri | string URI prefix that the namespace encodes |
Reimplemented from SMWSerializer.
Definition at line 116 of file SMW_Serializer_Turtle.php.
| SMWTurtleSerializer::serializeNestedExpData | ( | SMWExpData $ | data, | |
| $ | indent | |||
| ) | [protected] |
Serialize the given SMWExpData object, possibly recursively with increased indentation.
| $data | SMWExpData containing the data to be serialised. | |
| $indent | string specifying a prefix for indentation (usually a sequence of tabs) |
Definition at line 132 of file SMW_Serializer_Turtle.php.
References SMWSerializer::isOWLClassTypeProperty(), SMWSerializer::recordDeclarationTypes(), SMWSerializer::requireDeclaration(), serializeExpLiteral(), and serializeExpResource().
Referenced by serializeExpData().
| SMWTurtleSerializer::serializeExpLiteral | ( | SMWExpLiteral $ | element | ) | [protected] |
| SMWTurtleSerializer::serializeExpResource | ( | SMWExpResource $ | element | ) | [protected] |
Definition at line 209 of file SMW_Serializer_Turtle.php.
References SMWSerializer::requireNamespace().
Referenced by serializeNestedExpData().
| static SMWTurtleSerializer::getTurtleNameForExpElement | ( | SMWExpElement $ | expElement | ) | [static] |
Get the Turtle serialization string for the given SMWExpElement.
The method just computes a name, and does not serialize triples, so the parameter must be an SMWExpResource or SMWExpLiteral, no SMWExpData.
| $expElement | SMWExpElement being SMWExpLiteral or SMWExpResource |
Definition at line 224 of file SMW_Serializer_Turtle.php.
References SMWExporter::expandURI().
Referenced by SMWSparqlStoreQueryEngine::buildClassCondition(), SMWSparqlStoreQueryEngine::buildConjunctionCondition(), SMWSparqlStoreQueryEngine::buildDisjunctionCondition(), SMWSparqlStoreQueryEngine::buildNamespaceCondition(), SMWSparqlStoreQueryEngine::buildPropertyCondition(), SMWSparqlStoreQueryEngine::buildValueCondition(), SMWSparqlStore::changeTitle(), SMWSparqlDatabase4Store::deleteContentByValue(), SMWSparqlStore::deleteSparqlData(), SMWSparqlStoreQueryEngine::getSparqlConditionString(), and SMWSparqlStore::getSparqlRedirectTarget().
SMWTurtleSerializer::$subexpdata [protected] |
Definition at line 29 of file SMW_Serializer_Turtle.php.
SMWTurtleSerializer::$sparqlmode [protected] |
Definition at line 36 of file SMW_Serializer_Turtle.php.
SMWTurtleSerializer::$sparql_namespaces [protected] |
Definition at line 42 of file SMW_Serializer_Turtle.php.
1.5.6