27.06.2013 Views

Proceedings of the 12th European Conference on Knowledge ...

Proceedings of the 12th European Conference on Knowledge ...

Proceedings of the 12th European Conference on Knowledge ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Thomas Janke<br />

The rule states that whenever an instance X is related to an instance Y via <str<strong>on</strong>g>the</str<strong>on</strong>g> relati<strong>on</strong> transforms,<br />

<str<strong>on</strong>g>the</str<strong>on</strong>g>n Y is related to X via isTransformedBy. The implicati<strong>on</strong> also holds in <str<strong>on</strong>g>the</str<strong>on</strong>g> o<str<strong>on</strong>g>the</str<strong>on</strong>g>r directi<strong>on</strong>.<br />

Both examples <str<strong>on</strong>g>of</str<strong>on</strong>g> <strong>on</strong>tology patterns show that <str<strong>on</strong>g>the</str<strong>on</strong>g> very same modeling primitives can have very<br />

different representati<strong>on</strong>s in various <strong>on</strong>tology languages.<br />

4.3 Ontology generati<strong>on</strong> based <strong>on</strong> patterns<br />

The generati<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> c<strong>on</strong>crete <strong>on</strong>tologies is implemented as a model to model transformati<strong>on</strong> based <strong>on</strong><br />

modular patterns. Modularity is a key requirement in this layer. The reas<strong>on</strong>s for that are manifold. The<br />

proposed approach is based <strong>on</strong> <str<strong>on</strong>g>the</str<strong>on</strong>g> idea that modeling best practices can be provided in an<br />

executable form ready to be applied transparently. This is <strong>on</strong>ly possible if <str<strong>on</strong>g>the</str<strong>on</strong>g> platform provides a<br />

framework which allows <str<strong>on</strong>g>the</str<strong>on</strong>g> modular descripti<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> patterns and <str<strong>on</strong>g>the</str<strong>on</strong>g>refore <str<strong>on</strong>g>the</str<strong>on</strong>g> c<strong>on</strong>tributi<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> selfc<strong>on</strong>tained<br />

patterns instead <str<strong>on</strong>g>of</str<strong>on</strong>g> complete transformati<strong>on</strong>s. In o<str<strong>on</strong>g>the</str<strong>on</strong>g>r words, various <strong>on</strong>tology experts<br />

should be enabled by <str<strong>on</strong>g>the</str<strong>on</strong>g> framework to c<strong>on</strong>tribute single parts <str<strong>on</strong>g>of</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> whole transformati<strong>on</strong>. This does<br />

not <strong>on</strong>ly lower <str<strong>on</strong>g>the</str<strong>on</strong>g> initial effort necessary to c<strong>on</strong>tribute knowledge in form <str<strong>on</strong>g>of</str<strong>on</strong>g> patterns but is also well<br />

aligned to <str<strong>on</strong>g>the</str<strong>on</strong>g> approach followed by <str<strong>on</strong>g>the</str<strong>on</strong>g> ODP community in <str<strong>on</strong>g>the</str<strong>on</strong>g>ir pattern collecti<strong>on</strong> wiki (ODP, n.d.).<br />

Moreover, modular patterns introduce room for c<strong>on</strong>figurable variability. Certain modeling problems<br />

can be solved by more than <strong>on</strong>e pattern. The W3C, for example, describes two different patterns<br />

(W3C, 2006) for n-ary relati<strong>on</strong>s with <str<strong>on</strong>g>the</str<strong>on</strong>g>ir corresp<strong>on</strong>ding advantages and disadvantages. In a modular<br />

transformati<strong>on</strong> framework, patterns can easily be exchanged according to specific requirements<br />

without <str<strong>on</strong>g>the</str<strong>on</strong>g> need to edit <strong>on</strong>e m<strong>on</strong>olithic transformati<strong>on</strong>. The Eclipse Modeling Project <str<strong>on</strong>g>of</str<strong>on</strong>g>fers various<br />

model transformati<strong>on</strong> frameworks as candidates to be used to implement <str<strong>on</strong>g>the</str<strong>on</strong>g> <strong>on</strong>tology generati<strong>on</strong><br />

layer. The most prominent and widely used frameworks are ATL and Epsil<strong>on</strong>. Unfortunately, both <str<strong>on</strong>g>of</str<strong>on</strong>g><br />

<str<strong>on</strong>g>the</str<strong>on</strong>g>m <strong>on</strong>ly <str<strong>on</strong>g>of</str<strong>on</strong>g>fer limited support<br />

for pattern modularizati<strong>on</strong> and extensibility. Therefore, ano<str<strong>on</strong>g>the</str<strong>on</strong>g>r model<br />

to model transformati<strong>on</strong> framework has been designed and implemented. Its architecture is<br />

introduced in Figure 4.<br />

Figure 4: Model transformati<strong>on</strong> framework based <strong>on</strong> patterns<br />

The framework c<strong>on</strong>sists <str<strong>on</strong>g>of</str<strong>on</strong>g> a number <str<strong>on</strong>g>of</str<strong>on</strong>g> transformati<strong>on</strong>s which can be executed by <str<strong>on</strong>g>the</str<strong>on</strong>g> runtime<br />

comp<strong>on</strong>ent. Every transformati<strong>on</strong> c<strong>on</strong>tains <str<strong>on</strong>g>of</str<strong>on</strong>g> a number <str<strong>on</strong>g>of</str<strong>on</strong>g> patterns which are applied during<br />

executi<strong>on</strong>. Moreover, every transformati<strong>on</strong> provides helpers that encapsulate functi<strong>on</strong>ality used by<br />

multiple patterns and is bound to a number <str<strong>on</strong>g>of</str<strong>on</strong>g> input and <str<strong>on</strong>g>the</str<strong>on</strong>g>ir corresp<strong>on</strong>ding output models. Every<br />

pattern is implemented using plain Java. As a result, all IDE features, namely code completi<strong>on</strong>,<br />

debugging, logging, syntax checking etc., are available for pattern development. In order to describe<br />

c<strong>on</strong>crete transformati<strong>on</strong> steps, every pattern defines an arbitrary<br />

number <str<strong>on</strong>g>of</str<strong>on</strong>g> rules whereat every rule is<br />

a plain method with custom annotati<strong>on</strong>s provided by <str<strong>on</strong>g>the</str<strong>on</strong>g> framework. Listing 2 illustrates <str<strong>on</strong>g>the</str<strong>on</strong>g> method<br />

signature for <str<strong>on</strong>g>the</str<strong>on</strong>g> n-ary relati<strong>on</strong> pattern discussed above.<br />

@Rule(label="Property2NaryObjectProperty",extend="Property2Property",<br />

priority=1)<br />

public void match(@In Property property,<br />

@Out OWLObjectProperty objectProperty,<br />

@Out OWLClass relati<strong>on</strong>Class)<br />

{ … }<br />

Listing 2: Transformati<strong>on</strong> rule c<strong>on</strong>tained in an n-ary relati<strong>on</strong> pattern<br />

466

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!