Awesome
OWand
Magic Potion <-> OWL Transformation Tool Status
###Export
Not yet processed:
- user defined restrictions (!?)
- instances
set-restrictions
onval*>
andref*>
roles [except cardinality]- concept's restrictions [except property key for not-nil restriction of
val>
andref>
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 representbefore?
andafter?
restrictionrestrictions
onMP
concept
construct may be used to define all kinds of restrictions, both on single properties (instead ofrole
restrictions
for example) and whole concept as group of properties (for example predicate assome
,any
restriction on some concpet properties), relation between properties (for this caseOWL
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>
)
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 <ow-config>)
####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. <br/>
License
Copyright (C) Nevena Vidojević 2011
Distributed under the Eclipse Public License, the same as Clojure.