RDFExport
Synopsis
Export annotations in RDF format.
Description
RDFExport creates an RDF file for each element of files . The file name is obtained by evaluating fileName as a string.
The triplet content of the files is specified by statements . statements provide the following libraries:
- one library for each entry in prefixes , which allows to write abbreviated URIs ( e.g.
rdf:type
); uri
with two functions:uri:set(URI)
: registers the default URI of the current element (URI
is evaluated as a string);-
uri:get
: evaluates as the URI previously registered for the current element; stmt
with several functions to specify the triplets to write into files:stmt:res(SUBJ, PROP, OBJ)
: specifies a triplet where the object is a resource;stmt:lit(SUBJ, PROP, OBJ)
: specifies a triplet where the object is an untyped literal;stmt:bool(SUBJ, PROP, OBJ)
: specifies a triplet where the object is a boolean literal;stmt:int(SUBJ, PROP, OBJ)
: specifies a triplet where the object is an integer literal;stmt:str(SUBJ, PROP, OBJ)
: specifies a triplet where the object is a string literal;stmt:double(SUBJ, PROP, OBJ)
: specifies a triplet where the object is a double literal;stmt:typed(SUBJ, PROP, OBJ, TYPE)
: specifies a triplet where the object is a custom type literal;stmt:lang(SUBJ, PROP, OBJ, LANG)
: specifies a triplet where the object is a string literal with a language qualifier;
All arguments are evaluated as strings, then interpreted as resource URIs or literals. The SUBJ
argument is optional: if omitted the subject is the URI registered for the current element.
Snippet
<rdfexport class="RDFExport">
<fileName></fileName>
<files></files>
<outDir></outDir>
<statements></statements>
</rdfexport>
Mandatory parameters
fileName
Name of the file. Evaluated as a string from the element representing the file (result of files .
files
Files to write. Evaluated as elements from the corpus. RDFExport creates a file for each element.
outDir
Base directory of output files.
statements
Triplets to write in files.
Optional parameters
charset
Charset to use.
format
Serialization format. Accepted values are listed here .
prefixes
Map of URI prefixes. Prefixes declared in this parameter are visible as libraries in statements . The following prefixes do not need to be specified: rdf
, rdfs
, dc
, rss
, owl
.