Maven-based ontology development and management of ontology artifacts in distributed ontology repositories.
###User Guide (April 2016)
This document is for end users who are looking for information on how to run and use OntoMaven.
In order to run OntoMaven on your machine, you need:
- Mandatory is a Java Virtual Machine (JVM). Java 8 for 64-bit systems tested and found to be as a stable JVM for OntoMaven. Depending on your use case you may want to assign more RAM than assigned as default.
- An up-to-date Apache Maven version. At the time of creation of the guide at least Maven 3.0.5 was verified as a running version.
- If you want to use OntoMaven as a Maven project inside Eclipse or some other IDE you need their relevant Maven plugins. Please consider to use corresponding manuals for installation and usage.
- For support of distributed repositories you need to install a source code management (SCM) system like Git or Subversion (SVN).
Before you start to use the instructions from this section, be sure you already fulfilled the prerequirements mentioned in the section before.
Since OntoMaven is an open source project, you can get the source code and build it on your own. You can retrieve the source code of OntoMaven on the project's site http://www.corporate-semantic-web.de/ontomaven.html.
You can build and deploy OntoMaven like usual for a Maven based application with the command mvn build on the command line or the corresponding command in your favorite IDE.
In order to start the application to import ontologies and to collaborate with other knowledge engineers and domain experts, your command should have the following form (parameters are optional):
mvn de.csw:ontomaven:<goal_name> [-D<parameter_name>=<parameter_value>]
In Eclipse or other similar IDE you can start goals from the given configuration menu to run applications. Here you should insert de.csw:ontomaven:<goal_name> into the menu field to define your goal.
The available goals and their parameters are listed in another section.
By default the support for distributed repositories is not active. Edit the pom.xml file in the root directory of OntoMaven to specify your ontology repository.
The following code snippet shows you how to connect with some repository server using SVN:
<project>
...
<scm>
<connection>scm:svn:http://somerepository.com/svn_repo/trunk</connection>
<developerConnection>scm:svn:https://somerepository.com/svn_repo/trunk</developerConnection>
<url>http://somerepository.com/view.cvs</url>
</scm>
...
</project>Instead of SVN you can connect to any other supported SCM.
As of this writing the following SCMs are fully supported:
- Bazaar
- CVS
- Git
- Mercurial
- Subversion
- ...
Full list of supported SCMs (on the Apache Maven SCM site)
- ApplyAspects
Applys the choosen aspects of the ontology and creates a new result ontology.
aspectsAppliedOwlDirectorywith default value"target/aspectsAppliedOwlDirectory"aspectsAppliedOwlFileNamewith default value"aspectsAppliedOntology.owl"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"userAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>
- CreateOntologyGraph
Creates a graphml file of the ontology. The result file can be visualized by any tool supporting graphml files. Included into OntoMaven is also
graphDirectorywith default value"target/site/graph"graphFileNamewith default value"owlGraph.graphml"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"ifApplyAspectswith default valuefalseuserAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>
- CreateOntologyReport
Generates a report for the ontology. This report will contain information about the ontology and its elements like classes, properties, individuals.
ontologyReportOutputDirectorywith default value"target/site/ontologyReport"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"ifApplyAspectswith default valuefalseuserAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>
- ExportAxioms
Exports the axioms of the ontology into a file. Furthermore aspects can be applied and inferred axioms can be printed and exported.
ifExportInferredAxiomswith default valuefalseifExportOriginalAxiomswith default valuetrueaxiomsExportDirectorywith default value"target/exportedAxioms"axiomsExportFileNamewith default value"exportedAxioms.txt"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"ifApplyAspectswith default valuefalseuserAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>
- ImportOntologies
Loads and saves all (also transitiv) imports. The loaded ontologies will be saved in a specific directory. Every imported ontology will also be registered in a catalog. All goals will work with the local ontologies, if they are imported before.
importDirectorywith default value"imports"catalogFileNamewith default value"catalog.xml"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"
- InferAxioms
Exports the inferred axioms of the ontology into a file.
ifIncludeOriginalAxiomswith default valuetrueinferredOwlDirectorywith default value"target/inferredOwlFiles"inferredOwlFilewith default value"inferredOntology.owl"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"ifApplyAspectswith default valuefalseuserAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>
- PrintAspectNames
Prints names of in a given ontology existing aspects.
owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"
- RemoveAspects
Applys the choosen aspects of the ontology and creates a new result ontology.
owlFileWithoutAspectsNamewith default value"ontologyWithoutAspects.owl"owlFilesWithoutAspectsDirectorywith default value"target/owlFilesWithoutAspects"owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"
- TestEntailment
Tests if the axioms of an ontology can be inferred from the axioms of another ontology.
premiseOntologyFileNamewith default value"premiseOntology.owl"conclusionOntologyFileNamewith default value"conclusionOntology.owl"ifApplyPremiseAspectswith default valuetrueifApplyConclusionAspectswith default valuetrueuserPremiseAspectswith default value[](empty string array)userConclusionAspectswith default value[](empty string array)owlDirectorywith default value"owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"
- TestOntology
Tests an ontology regarding the syntax and consistency. The result will be printed in the console and written into a specified file.
owlDirectorywith default value"owl"owlFileNamewith default value"ontology.owl"aspectsIRIwith default value"http://www.corporate-semantic-web.de/ontologies/aspect_owl#hasAspect"ifApplyAspectswith default valuefalseuserAspectsdefined at the pom.xml file in the root directory of OntoMaven with the following lines:
<userAspects> <aspect>myFirstAspect</aspect> <aspect>mySecondAspect</aspect> ... </userAspects>