Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMWTurtleSerializer Class Reference
Inheritance diagram for SMWTurtleSerializer:
Inheritance graph
[legend]
Collaboration diagram for SMWTurtleSerializer:
Collaboration graph
[legend]

Public Member Functions

 __construct ( $sparqlMode=false)
 
 clear ()
 
 flushSparqlPrefixes ()
 
 serializeDeclaration ( $uri, $typename)
 
 serializeExpData (SMWExpData $expData)
 
- Public Member Functions inherited from SMWSerializer
 __construct ()
 
 clear ()
 
 startSerialization ()
 
 finishSerialization ()
 
 serializeDeclarations ()
 
 serializeDeclaration ( $uri, $typename)
 
 serializeExpData (SMWExpData $data)
 
 flushContent ()
 

Static Public Member Functions

static reset ()
 
static getTurtleNameForExpElement (SMWExpElement $expElement)
 

Protected Member Functions

 serializeHeader ()
 
 serializeFooter ()
 
 serializeNamespace ( $shortname, $uri)
 
 serializeNestedExpData (SMWExpData $data, $indent)
 
 serializeExpLiteral (SMWExpLiteral $element)
 
 serializeExpResource (SMWExpResource $element)
 
- Protected Member Functions inherited from SMWSerializer
 serializeHeader ()
 
 serializeFooter ()
 
 serializeNamespaces ()
 
 serializeNamespace ( $shortname, $uri)
 
 requireNamespace ( $nsshort, $nsuri)
 
 requireDeclaration (SMWExpResource $resource, $decltype)
 
 recordDeclarationTypes (SMWExpData $expData)
 
 declarationDone (SMWExpResource $element, $typeflag)
 
 isOWLClassTypeProperty (SMWExpNsResource $property)
 

Protected Attributes

 $subexpdata
 
 $sparqlmode
 
 $sparql_namespaces
 
- Protected Attributes inherited from SMWSerializer
 $pre_ns_buffer
 
 $post_ns_buffer
 
 $decl_todo
 
 $decl_done
 
 $extra_namespaces
 
 $global_namespaces
 

Detailed Description

File holding the SMWTurtleSerializer class that provides basic functions for serialising OWL data in Turtle syntax.

Author
Markus Krötzsch Class for serializing exported data (encoded as SMWExpData object) in Turtle syntax.

Member Function Documentation

◆ flushSparqlPrefixes()

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.

Returns
array shortName => namespace URI

◆ getTurtleNameForExpElement()

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.

Parameters
$expElementSMWExpElement being SMWExpLiteral or SMWExpResource
Returns
string

◆ reset()

static SMWTurtleSerializer::reset ( )
static
Since
2.3

◆ serializeNestedExpData()

SMWTurtleSerializer::serializeNestedExpData ( SMWExpData  $data,
  $indent 
)
protected

Serialize the given SMWExpData object, possibly recursively with increased indentation.

Parameters
$dataSMWExpData containing the data to be serialised.
$indentstring specifying a prefix for indentation (usually a sequence of tabs)

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy