new $k.RDFExporter(document)
Creates a new RDF Exporter
Name | Type | Description |
---|---|---|
document |
$k.AbstractTextDocument |
optional
Document to write on. A new text document will be created if not specified Abstract superclass of Javascript objects that wrap a i-views object |
- Since:
- 4.3.2
Methods
exportElements(elements)
Export the elements as RDF
Name | Type | Description |
---|---|---|
elements |
Array.<$k.SemanticElement> |
List of semantic elements to export |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 4.3.2
Throws:
Type | Description |
---|---|
$k.exception.RuntimeError | If any error occurs during the export |
setParameter(name, value)
Set a parameter controlling the RDF export
Name | Type | Description |
---|---|---|
name |
string |
Name of the parameter to set |
value |
Value of the parameter |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 4.3.2
- See:
Throws:
Type | Description |
---|---|
$k.exception.TypeError | If the value does not match the expected type for the parameter |
$k.exception.InvalidValue | If the name / value is not a valid |
setParameters(object)
Set parameters controlling the RDF export
Possible parameters:
- abbreviateURIs: Abbreviate URIs using rdf:ID and xml:base
- baseURI: Base URI
- 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
- 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
- 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
Name | Type | Description |
---|---|---|
object |
object |
Object with parameter names and values |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 4.3.2
Throws:
Type | Description |
---|---|
$k.exception.TypeError | If the passed object or any value does not match the expected type for the parameter |
$k.exception.InvalidValue | If a name / value is not a valid |
setPropertyFilter(filterFunction)
Filter the exported properties. The function receives a property and should return true if the property should be exported.
Name | Type | Description |
---|---|---|
filterFunction |
function |
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:
Type | Description |
---|---|
$k.exception.TypeError | If the output document is based on an external stream (file etc.) |
Returns:
Type | Description |
---|---|
string |