$k. RDFExporter

new RDFExporter(documentopt)

Creates a new RDF Exporter

Parameters:
NameTypeAttributesDescription
document$k.AbstractTextDocument<optional>

Document to write on. A new text document will be created if not specified

Since
  • 4.3.2

Methods

exportElements(elements)

Export the elements as RDF

Parameters:
NameTypeDescription
elementsArray.<$k.SemanticElement>

List of semantic elements to export

Version
  • Experimental feature, might be removed at any time
Since
  • 4.3.2
Throws:

If any error occurs during the export

Type
$k.exception.RuntimeError

setParameter(name, value)

Set a parameter controlling the RDF export

Parameters:
NameTypeDescription
namestring

Name of the parameter to set

value

Value of the parameter

Version
  • Experimental feature, might be removed at any time
Since
  • 4.3.2
Throws:

setParameters(object)

Set parameters controlling the RDF export

Possible parameters:

  • abbreviateURIs: Abbreviate URIs using rdf:ID and xml:base
  • baseURI: Base URI
  • blobHash: True if additional comments should be exported
  • exportFrameIDs: Export object frame IDs
  • exportLabels: Export name as rdfs:label
  • exportMeta: True if meta properties should be exported. They will be exported as reifications.
  • exportPropertyIDs: Export IDs of properties
  • exportReferencedTopics: True if external relation targets should be exported as stubs
  • ignoreStoredIdentifier: If true, the RDF locator will always be generated. If false, the rdf:about/rdf:ID attribute will be used if present
  • qualifier: XML qualifier bound to the base URI
  • schemaNameSpace: Default schema XML namespace
  • schemaOnly: True if only types should be exported
  • shouldExportIndexers: True if assigned indexes should be exported
  • updatePersistentIdentifier: True if the generated values for rdf:ID / rdf:about should be materialized as attribute values
  • useFrameURIs: True if URIs constructed from the object ID should be used to identify objects
  • useKRDF: True if KRDF properties (e.g. krdf:internalName) should be exported
  • useOWL: True if OWL vocabulary should be used
Parameters:
NameTypeDescription
objectobject

Object with parameter names and values

Version
  • Experimental feature, might be removed at any time
Since
  • 4.3.2
Throws:

setPropertyFilter(filterFunction)

Filter the exported properties. The function receives a property and should return true if the property should be exported.

Parameters:
NameTypeDescription
filterFunctionfunction

Filter function

Version
  • Experimental feature, might be removed at any time
Since
  • 5.0.3

text() → {string}

Get the RDF contents as string

Since
  • 4.3.2
Throws:

If the output document is based on an external stream (file etc.)

Type
$k.exception.TypeError
Returns:
Type: 
string