Reformatting Exporter

The Purpose

RDF data can be manipulated abstractly via a programmatic API without reference to a specific serialization format. However, the need to download such data or to deploy it to some byte-oriented destination requires that RDF data is serialized/reformatting according to some data format. Semantic Turkey abstracts the support for diverse formats under the extension point ReformattingExporter.

The Model

A ReformattingExporter (it.uniroma2.art.semanticturkey.extension.extpts.reformattingexporter.ReformattingExporter) is provided with a a connection to a source repository together with the graphs to serialize, producing a ClosableFormattedResource that contains the serialized/reformatted data. Additional parameters hold the format chosen by the user and context-dependent stuff, such as the lexicalization model used in the input data.

The factory of a conforming extension should implement the interface it.uniroma2.art.semanticturkey.extension.extpts.commons.io.FormatCapabilityProvider to communicate the list of data formats supported by that particular extension.

Extension Point Details

The tables below summarizes the details of the ReformattingExporter extension point.

Name Reformatting Exporter
Description A Reformatting Exporter can serialize/reformat RDF triples to some data format
Identifier it.uniroma2.art.semanticturkey.extension.extpts.reformattingexporter.ReformattingExporter
Configuration n/a
Settings n/a

Interfaces

The following interface defines the contract for the ReformattingExporter extension point.


/**
* Extension point for reformatting exporters. These components can be placed inside an export pipeline, just
* before a {@link Deployer}, in order to convert RDF data into (usually a non-RDF) format.
* 
*/
public interface ReformattingExporter extends Extension {
	public ClosableFormattedResource export(RepositoryConnection sourceRepositoryConnection, IRI[] graphs,
			@Nullable String format, ExporterContext exporterContext) throws ReformattingException, IOException;
}

Choosing and Configuring a Reformatting Exporter

ReformattingExporters can be created on demand by the system as they are needed to deploy data to non triple-oriented destinations. Nonetheless, they are usually configurable components, the configurations of which can be stored according to the standard configuration/settings mechanism.

Reformatting Exporter Implementations

RDF Serializing Exporter

Name RDF Serializing Exporter
Description A Reformatting Exporter that serializes RDF data according to a concrete RDF syntax
Identifier it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.rdfserializer.RDFSerializingExporter
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

RDF Serializing Exporter (it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.rdfserializer.RDFSerializingExporterConfiguration)
pretty print (prettyPrint)
Tells whether pretty printing is preferred
boolean
Optional
inline blank nodes (inlineBlankNodes)
Tells whether to use blank node property lists, collections, and anonymous nodes instead of blank node labels. This setting requires that all triples are first loaded in memory, and should not be checked for large datasets
boolean
Optional
xsd:string to plain literal (xsdStringToPlainLiteral)
Tells whether the serializer should remove the xsd:string datatype from literals and represent them as RDF-1.0 Plain Literals
boolean
Optional
rdf:langString to language tagged literal (rdfLangStringToLangLiteral)
Tells whether the serializer should omit the rdf:langString datatype from language literals when serializing them
boolean
Optional
baseDirective (base directive)
Tells whether the serializer should include a base directive
boolean
Optional
Settings n/a

Zthes Serializing Exporter

Name Zthes Serializing Exporter
Description A Reformatting Exporter that serializes RDF data according to a concrete Zthes syntax
Identifier it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.zthesserializer.ZthesSerializingExporter
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

Zthes Serializing Exporter (it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.zthesserializer.ZthesSerializingExporterConfiguration)
pivot languages (pivotLanguages)
Priority list of language tags which the relation of PT terms are based on
Set<java.lang.String>
Optional
Settings n/a

Spreadsheet Serializing Exporter

Name Spreadsheet Serializing Exporter
Description A Reformatting Exporter that serializes RDF data into a Spreadsheet
Identifier it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.spreadsheetserializer.SpreadsheetSerializingExporter
Configuration

Scopes: SYSTEM, PROJECT, USER, PROJECT_USER

Spreadsheet Serializing Exporter (it.uniroma2.art.semanticturkey.extension.impl.reformattingexporter.spreadsheetserializer.SpreadsheetSerializingExporterConfiguration)
Preferred language (language)
The language of the Preferred Label to show near the Skos Reource (Concept, ConceptScheme and Collection)
String
Optional
skos:note reified (reifiedNotes)
True if there are Reiified notes (via skos:note and its subproperties), false otherwise
Boolean
Optional
Settings n/a