OWL Ontology Splitter

sswap.info
Simple Semantic Web Architecture and Protocol

OWL Ontology Splitter

This tool splits an OWL ontology, written using Protege, into multiple files. The tool requires that the OWL file that comprises the ontology conform to the guidelines outlined below. The file is split into the following files that conform to the SSWAP protocol, and packaged into a single zip archive:
  • A file for each OWL Class, ObjectProperty, DatatypeProperty, or AnnotationProperty that is in the namespace associated with a user-supplied namespace prefix. For example, the prefix map represents the namespace http://sswapmeet.sswap.info/map/ in the map.owl file, so splitting that file would yield files for the classes map:MapSet, map:MapPosition, etc. Note that files for individuals (as opposed to classes or predicates) are not written.
  • A file named owlOntology, which contains annotation information from the ontology in the Protege file.
  • A file named owlImports, which contains an owl:Ontology resource that imports all the files that were split.
  • A copy of the file being split.



Submit a URL:     
Optional Prefix
Or URI:



Submit a File:     
Optional Prefix
Or URI:



Submit a Graph:     
Optional Prefix
Or URI:



Ontology Authoring Guidelines

A SSWAP ontology may be written by using the free Protege ontology editor and splitting the resulting OWL file using the tool on this page. The OWL Ontology Splitter is OWL 1.1 compliant. After splitting the file, the unmodified file itself should be hosted along with the files generated by the splitter (a copy of the file is included in the zip file). This enables others to reference your ontology from within Protege by importing your OWL file at its URL. To get Protege to build a file suitable for use by the OWL Ontology Splitter, the following guidelines should be observed in using Protege 3.4 - the examples below use the ontology referred to in map.owl:
  • The Ontology URI (i.e., the value of the "Ontology URI" field on Protege's Metadata tab of the ontology should be the URI at which the monolithic unsplit ontology file is to reside. Note that even though the RDF/XML will appear in the OWL file as <owl:Ontology rdf:about=""/>, this default namespace will be displayed in Protege as the absolute URL of the OWL file, and this absolute URL is what you should enter in this field. In the example of the map.owl ontology, this URL is http://sswapmeet.sswap.info/map/map.owl.
  • Ironically, the Ontology URI discussed above should not be used in defining ontology terms. Instead, you should define a named namespace that refers to the parent path of the OWL file (be sure to include the trailing slash [/] character) and create ontology terms in that namespace. In the example of the map.owl ontology file, this namespace is referenced using the map prefix, which refers to the URL http://sswapmeet.sswap.info/map/. It is good practice to give your namespace prefixes names that you expect to be unique - for example, a Gramene-specific map ontology could be given the prefix grameneMap. Keeping namespaces unique enables Protege to honor your prefix names when it imports files; when prefix names clash, it arbitrarily creates new, less intuitive prefixes.
  • If your ontology imports other ontologies, the OWL Ontology Splitter will preserve those import directives into the owlOntology file. Yet in most cases this type of lexical transfer of file names is not what is wanted: what is wanted is for the new owlOntology file to import the "split versions" of ontologies, not their old monolithic files. The OWL Ontology Splitter will replace importing any file ending in *.owl with a file named <namespace>:owlImports. In this manner you can continue to work with monolithic *.owl ontologies in a tool such as Protege, while still splitting the resultant ontology and maintaining owl:imports to other split ontologies.
  • In summary, the Protege OWL file (and Metadata tab) will have lines similar to the following:

      <!-- note .owl file as base; no trailing #. This corresponds to the "Ontology URI" field -->
      xml:base="http://sswapmeet.sswap.info/map/map.owl"

      <!-- note trailing # on .owl file for default namespace. This corresponds to the "Default Namespace" field -->
      xmlns="http://sswapmeet.sswap.info/map/map.owl#"

      <!-- note trailing / on directory for prefix. This corresponds to the Prefix/Namespace fields -->
      xmlns:map="http://sswapmeet.sswap.info/map/"
These authoring guidelines ensure that your terms are delineated by slashes (/), not hashes (#), and thus translate immediately into independently dereferencable URIs: one URI per term as generated by the OWL Ontology Splitter.
As a hands-on example, you can save map.owl to your desktop and open it in Protege (in the "Welcome to Protege" dialog that appears when you first open Protege, click the "Open Other..." button to select map.owl; or, if Protege is already started, select the File -> Open menu item and click the "File" button to select map.owl from the resulting dialog). Note that this file has a namespace prefix map that refers to the namespace http://sswapmeet.sswap.info/map/. In Protege, you can view the contents of this file by selecting "View RDF/XML source code..." from the Code menu.
After viewing map.owl in Protege, split it by choosing the path to the file in the File: field above, entering map in the prefix field, and pressing the "Split File" button. Save the resulting map.zip file to your desktop and unzip it to view its contents.
Home     Protocol     Ontologies     Developers' Page     Contact Us



UOA                         NSF



SSWAP 11.08  •  24 August 2011