Transformation Pattern: changing naming convention

Let us consider that we want to change a delimiter (from camel-case to underscore style) within names of entities (URI fragments). To accomplish this, we can use ontology transformation service and simply specify appropriate transformation pattern, where source ontology pattern (OP1) could be as follows:

<op1>
  <entity_declarations>
    <placeholder type="Class">?A</placeholder>
  </entity_declarations>
  <ndp>
    <exist>delimiter_camel-case(?A)</exist>
  </ndp>
</op1>

Then, we can specify target ontology pattern (OP2) in the following way:

<op2>
  <entity_declarations>
    <placeholder type="Class">?B</placeholder>
  </entity_declarations>
  <ndp>
    <exist>delimiter_underscore(?B)</exist>
  </ndp>
</op2>

In order to specify how source ontology pattern can be transformed to target ontology pattern, we need to specify transformation links between any kinds of entities. This is captured within pattern alignment (PA) as follows:

<pt>
  <eq op1="?A" op2="?B"/>    
  <ntp entity="?B">make_delimiter_hyphen(?A)</ntp>
  <ntp entity="?A">make_delimiter_camel-case(?B)</ntp>
</pt>



ondrej 2013-05-10