Quantcast

Copying individual properties from one ontology to Other

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Copying individual properties from one ontology to Other

ysg11
Hello,
I have 2 ontologies. In ontology 1 I have ClassA it has some data properties e.g hasColor, hasName etc
In another Ontology I have class ClassB. It too has data properties hasNewColor, hasNewName etc. Basically the name of data properties is different but values it indicate are same. ClassB also has some properties which are different from ClassA but maximum properties are similar with different names.
Now I want copy this similar properties of individual a1 in Ontology 1 to individual of Ontology 2 say b1.
So if I have
a1 rdf:type ClassA.
b1 rdf:type ClassB.
a1 hasColor "Red" .

I want to create b1 hasNewColor "Red" . So Every time I create individual a1, copy its data property to b1, store b1 , update data in a1(delete existing a1 and create new a1 with updated values) , create new b2(b1 still exist in ontology) and now want to copy updated a1 to b2 and thus the process continues.
Basically every time there is one individual of ClassA and multiple individuals of ClassB but only one of ClassB individual is not having 'hasNewColor' property assigned and the rest individuals have data properties assigned from earlier iterations. So I want to copy updated data properties to this individual of ClassB.

I wrote SWRL rule ClassA(?a),ClassB(?b),hasColor(?a,?r) -> hasNewColor(?b,?r) . but this does not work correctly as it tries to assign hasNewColor to previously assigned individuals as well and also hasNewColor is functional.

Is it possible to somehow express this in ontology?


Thanks and Regards,
ysg11




 
Loading...