RDFS Format

The RDFS format imports RDF Schema and OWL ontologies in Turtle format, enabling integration with Semantic Web technologies and ontology management systems.

Overview

The RDFS format (identifier: rdfs) imports ontologies defined using RDF Schema (RDFS) and Web Ontology Language (OWL). It supports:

  • RDFS class hierarchies (rdfs:Class, rdfs:subClassOf)
  • OWL object and data properties
  • Property domains and ranges
  • Ontology annotations (rdfs:label, rdfs:comment, skos:definition)
  • External ontology resolution via HTTP
  • Multiple ontologies from directories or ZIP archives

Format Identifier

Format: rdfs

File Extensions: .ttl (Turtle), .rdf (RDF/XML), .owl (RDF/XML), .nt (N-Triples), .n3 (Notation3)

MIME Types: text/turtle, application/rdf+xml, application/n-triples, text/n3

Direction Support

Direction Supported Version
Import Yes 1.4.0
Export Yes 1.3.0

Multi-File Support

The RDFS importer supports ZIP archives containing multiple ontology files, automatically resolving imports and cross-references between files.

RDFS/OWL Mapping

Ontology elements are mapped to Mauro as follows:

rdfs:Class / owl:Class
Maps to Mauro data class
rdfs:subClassOf
Captured as metadata showing class hierarchy
owl:ObjectProperty
Maps to reference type data elements linking classes
owl:DatatypeProperty
Maps to primitive type data elements
rdfs:domain
Determines the containing data class for properties
rdfs:range
Specifies the data type or reference target
rdfs:label
Maps to element label
rdfs:comment / skos:definition
Maps to element description

Examples

The following examples illustrate the use of the RDFS format

Import RDFS Ontology

MauroImportExport.Cli import rdfs ontology.ttl model.json

Import Multiple Ontologies from ZIP

MauroImportExport.Cli import rdfs ontologies.zip output.json --verbose

Export to RDFS (Default Turtle Format)

MauroImportExport.Cli export rdfs model.json ontology.ttl

Export to RDF/XML Format

MauroImportExport.Cli export rdfs model.json ontology.rdf --param serialisationFormat=rdfxml

Export to N-Triples Format

MauroImportExport.Cli export rdfs model.json ontology.nt --param serialisationFormat=ntriples

Export to Notation3 Format

MauroImportExport.Cli export rdfs model.json ontology.n3 --param serialisationFormat=notation3

List Available Export Parameters

MauroImportExport.Cli export rdfs --show-params

Export Serialisation Formats

The RDFS exporter supports multiple RDF serialisation formats via the serialisationFormat parameter:

turtle (default)
Turtle format with namespace prefixes for readability. Recommended for version control and human editing.
rdfxml
RDF/XML format compatible with most ontology editors and tools. Suitable for .rdf and .owl file extensions.
ntriples
N-Triples format with fully expanded URIs. Simple line-based format suitable for streaming and large datasets.
notation3
Notation3 format, a superset of Turtle with additional features for logic and rules.
rdfjson
Custom JSON representation of RDF triples for integration with JSON-based systems.
Important:

The file extension does not automatically determine the export format. You must explicitly specify the serialisationFormat parameter to export in a format other than Turtle.

Supported RDF Syntaxes for Import

The importer automatically detects and processes:

  • Turtle (.ttl, .turtle) - recommended format
  • RDF/XML (.rdf, .owl)
  • N-Triples (.nt)
  • Notation3 (.n3)

Format detection is based on content inspection. The file extension is used as a hint but content analysis determines the actual parser used.

External Ontology Resolution

The importer can fetch external ontologies referenced via owl:imports statements:

  • HTTP/HTTPS URLs are resolved automatically
  • Downloaded ontologies are cached during import
  • Configurable timeout for external fetches (30 seconds default)
  • Failed external imports are logged as warnings

Best Practices

  • Use Turtle format for better human readability and version control
  • Use RDF/XML format when compatibility with OWL editors (e.g., Protégé) is required
  • Use N-Triples format for large datasets or streaming applications
  • Specify the serialisationFormat parameter explicitly for non-Turtle exports
  • Include rdfs:label and rdfs:comment for all classes and properties
  • Use standard vocabularies (FOAF, Dublin Core) where applicable
  • Package multiple related ontologies in ZIP for batch import
  • Use stable, dereferenceable IRIs for class and property identifiers
  • Consider using skos:definition for detailed documentation

W3C Standards

The RDFS format complies with:

  • RDF Schema (RDFS) W3C Recommendation
  • OWL 2 Web Ontology Language
  • RDF 1.1 Turtle syntax
  • SKOS annotation properties