Skip to content
Snippets Groups Projects
Commit 29019af5 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Synching

parent fec258f0
Branches
Tags
No related merge requests found
......@@ -220,10 +220,22 @@ aspect GenRewrites {
pStream.println(ind(1)+"}");
// TEMPORARY!!!!!
// Rewrite isSkillOf/hasSkill/hasProperty/isPropertyOf to ClassUse
// Rewrite isSkillOf/hasSkill/hasProperty/isPropertyOf to ClassUse.
// Should probably be auto-generated instead.
pStream.println(ind(1)+"rewrite ComplexElement {");
pStream.println(ind(2)+"when ((name().equals(\"hasSkill\")");
pStream.println(ind(2)+"|| name().equals(\"isSkillOf\"))");
pStream.println(ind(2)+"|| name().equals(\"hasProperty\"))");
pStream.println("&& getNumAttribute() > 0 && getAttribute(0) instanceof RdfResource)");
pStream.println(ind(2)+"to ClassUse {");
pStream.println(ind(3)+"ClassUse use = new ClassUse();");
pStream.println(ind(3)+"String att = getAttribute(0).name();");
pStream.println(ind(3)+"use.setOwlIdentifier(new OwlIdentifier(att.substring(att.indexOf('#')+1,att.indexOf('_'))));");
pStream.println(ind(3)+"use.setAttributeList(getAttributeList());");
pStream.println(ind(3)+"use.setElementList(new List());");
pStream.println(ind(3)+"return use;");
pStream.println(ind(2)+"}");
pStream.println(ind(2)+"when ((name().equals(\"isSkillOf\")");
pStream.println(ind(2)+"|| name().equals(\"isPropertyOf\"))");
pStream.println("&& getNumAttribute() > 0 && getAttribute(0) instanceof RdfResource)");
pStream.println(ind(2)+"to ClassUse {");
pStream.println(ind(3)+"ClassUse use = new ClassUse();");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment