Import from Directory

Import multiple RDFS files from a directory into separate or linked Mauro models.

This example demonstrates importing multiple RDFS ontology files from a directory. The import command automatically detects directory inputs and processes all files matching the format's supported extensions.

Multi-file importers like RDFS, JSON Schema Set, and Mermaid support importing from directories, creating semantic links between related models.

Run the import command with a directory path as input:
MauroImportExport.Cli import rdfs ontologies/ model.json --overwrite

The command will:

  • Detect that ontologies/ is a directory
  • Find all files with RDFS extensions (.ttl, .rdf, .owl, .n3)
  • Import each file as a separate model
  • Create semantic links for cross-file references
  • Write the combined result to model.json

The command imports all RDFS ontology files from the directory and saves the linked models as a Mauro JSON model. Files are processed in alphabetical order, and cross-file relationships are preserved through semantic links.

Tip:

Use the --verbose option to see which files are being processed and any warnings about external references.

Note:

Only files with supported extensions for the specified format are processed. Other files in the directory are ignored.