Skip to content
/ OWand Public

Dev tool/Leiningen plugin for Magic Potion <-> OWL transformation.

Notifications You must be signed in to change notification settings

nevenavv/OWand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OWand

Magic Potion <-> OWL Transformation Tool Status

###Export

Not yet processed:

  • user defined restrictions (!?)
  • instances
  • set-restrictions on val*> and ref*> roles [except cardinality]
  • concept's restrictions [except property key for not-nil restriction of val> and ref> roles]
  • some restrictions from ow.restrictions, e.g. has-value, in

Generated OWL file is RDF Valid and Protégé sucessfully parsed.

Generated OWL model is in RDF/XML syntax and can be easily transformed to other OWL(RDF) syntax formats using available tools.

###Import in progress

Details

MP -> OWL transformation (export) is not 1-to-1 transformation due to OWL's limited expresiveness and MP's rich expresiveness. Details are disscussed further below.

###Transformation rationale/rules

####Restriction functions Case 1 Restrictions using MP predicates and ow.restrictions

Besides before? and after? (as stated below), predicates from MP predicates are easily transformed to OWL counterparts (due to no obvious advantage and need for additional logic for manual processing of this predicates, now they are hooked to appropriate restriction functions from ow.restrictions

Case 2 Restrictions as user defined predicates

Highly unlikely to cover those as it could be anything. With that, when defining model user is encouraged to use already defined predicates/restriction functions from MP/predicates and ow.restrictions.

####Disjoint classes Currently all Classes on same level of hierarchy are disjointed from one another.

####Other

  • OWL temporal logic support - how to represent before? and after? restriction
  • restrictions on MP concept construct may be used to define all kinds of restrictions, both on single properties (instead of role restrictions for example) and whole concept as group of properties (for example predicate as some, any restriction on some concpet properties), relation between properties (for this case OWL support is very limited)... where is the limit?

####Presumptions

  • no forward declaration of model elements (no use of declare, all elements that the one depends on are defined before that one)

####Other TODOs

  • logging, e.g. reporting transformation results
  • maybe some logical checks/validaton

Usage

Configuration is defined with following map (<ow-config>)

keyval-typedefaultdescriptionnow used
:from-formatkeyword:rdf/xmlformat of input owl fileno
:to-formatkeyword:rdf/xmlformat of output owl fileno
:ontology-namestring"example"ontology nameyes
:from-owl-locationstring"/"location of owl files for importno
:to-owl-locationstring"ow-export/"location where owl generated file will be setyes
:mp-domain-ns-generatedstring"domain"ns of generated magic potion model no
:mp-domain-ns-sourcesymbol'ow.my-domainsource ns of magic potion model; currently looking in src/ folder as rootyes
:ont-root-domain-nsstring"http://example.org/ontologies/"owl domain namespace for this ontology modelyes

Available util functions: ow.core/owc-update-default and ow.core/owc-reset-to-default.

Interactive changes on model will be automatically updated on next call of desired goal (no need to explicitely reload model's ns).

###Try in REPL

lein deps, compile, repl

=>(use 'ow.core)
=>(ow-export-goal)

###Use s dev-tool

####Export (ow.core/ow-export-goal) (ow.core/ow-export-goal )

####Import

(ow.core/ow-import-goal)
(ow.core/ow-import-goal <ow-config>)

If <ow-config> is supplied, given pairs will override default.

###Use as Leiningen plugin

Build project and in :dev-dependency in your project.clj add:

[ow "0.0.1-SNAPSHOT"]

If supplied, plugin will override default configuration pairs with ones on :ow-config in project.clj
####Export goal

lein ow-export

####Import goal

lein ow-import

Installation

Build jar with Leiningen

Magic Potion must be available on classpath.


License

Copyright (C) Nevena Vidojević 2011

Distributed under the Eclipse Public License, the same as Clojure.

About

Dev tool/Leiningen plugin for Magic Potion <-> OWL transformation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published