Commit e5a44589 authored by Anders Nilsson's avatar Anders Nilsson
Browse files

Synching

parent dea65328
......@@ -130,6 +130,11 @@ aspect GenPrettyPrinter {
pStream.println(" getChild(i).prettyPrint(indent,pStream);");
pStream.println(" }");
pStream.println(" }\n");
pStream.println(" public void Start.prettyPrint(String indent, PrintStream pStream) {");
pStream.println(" for (int i=0; i<getNumElement(); i++) {");
pStream.println(" getElement(i).prettyPrint(indent,pStream);");
pStream.println(" }");
pStream.println(" }\n");
super.genPrettyPrinter(ind,pStream);
pStream.println("}\n");
}
......@@ -143,6 +148,10 @@ aspect GenPrettyPrinter {
// }
pStream.println(">\");");
pStream.println(" String childIndent = indent + \" \";");
Restrictions restr = getRestrictions();
for (int i=0; i<restr.getNumRestriction(); i++) {
}
pStream.println(" for (int i=0; i<getNumElement(); i++) {");
pStream.println(" getElement(i).prettyPrint(childIndent,pStream);");
pStream.println(" }");
......
......@@ -82,6 +82,6 @@ abstract OwlValuesFrom: ComplexElement;
Properties ::= Property:Element*;
//Restrictions ::= OwlRestriction*;
Restrictions ::= OwlRestriction*;
abstract OwlProperty : ComplexElement;
......@@ -13,18 +13,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -201,31 +201,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("MeasureTemperature") && !(this instanceof Thing))
to MeasureTemperature {
MeasureTemperature node = new MeasureTemperature();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("DetectColor") && !(this instanceof Thing))
to DetectColor {
......@@ -286,18 +261,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -341,31 +316,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("MeasureOrientationOfObject") && !(this instanceof Thing))
to MeasureOrientationOfObject {
MeasureOrientationOfObject node = new MeasureOrientationOfObject();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("ManufacturingFunction") && !(this instanceof Thing))
to ManufacturingFunction {
......@@ -444,18 +394,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -468,44 +418,19 @@ aspect Rewrites {
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSkillList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("CheckPresence") && !(this instanceof Thing))
to CheckPresence {
CheckPresence node = new CheckPresence();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSensorList(l);
node.setSkillList(l);
return node;
}
}
......@@ -570,6 +495,17 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("MaximumForce") && !(this instanceof Thing))
to MaximumForce {
MaximumForce node = new MaximumForce();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("SmartCamera") && !(this instanceof Thing))
to SmartCamera {
......@@ -580,18 +516,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -638,6 +574,56 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("OpticDistanceSensorScanner") && !(this instanceof Thing))
to OpticDistanceSensorScanner {
OpticDistanceSensorScanner node = new OpticDistanceSensorScanner();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSkillList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Determine") && !(this instanceof Thing))
to Determine {
Determine node = new Determine();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("CoordinateReferenceSystem") && !(this instanceof Thing))
to CoordinateReferenceSystem {
......@@ -659,18 +645,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -735,31 +721,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("LaserScanner2D") && !(this instanceof Thing))
to LaserScanner2D {
LaserScanner2D node = new LaserScanner2D();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSkillList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Store") && !(this instanceof Thing))
to Store {
......@@ -839,31 +800,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("MeasureSpeed") && !(this instanceof Thing))
to MeasureSpeed {
MeasureSpeed node = new MeasureSpeed();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Pan") && !(this instanceof Thing))
to Pan {
......@@ -943,31 +879,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("MeasureTorque") && !(this instanceof Thing))
to MeasureTorque {
MeasureTorque node = new MeasureTorque();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("FingerGripper") && !(this instanceof Thing))
to FingerGripper {
......@@ -978,18 +889,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -1186,52 +1097,27 @@ aspect Rewrites {
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("WheelEncoder") && !(this instanceof Thing))
to WheelEncoder {
WheelEncoder node = new WheelEncoder();
when (getOwlIdentifier().getIDENTIFIER().equals("CycleTime") && !(this instanceof Thing))
to CycleTime {
CycleTime node = new CycleTime();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Weld") && !(this instanceof Thing))
to Weld {
Weld node = new Weld();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSkillList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("CycleTime") && !(this instanceof Thing))
to CycleTime {
CycleTime node = new CycleTime();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Weld") && !(this instanceof Thing))
to Weld {
Weld node = new Weld();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
......@@ -1250,31 +1136,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("DetectCollision") && !(this instanceof Thing))
to DetectCollision {
DetectCollision node = new DetectCollision();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Accuracy") && !(this instanceof Thing))
to Accuracy {
......@@ -1362,31 +1223,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("OpticSwitch") && !(this instanceof Thing))
to OpticSwitch {
OpticSwitch node = new OpticSwitch();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setSkillList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("AdjustVacuumToGrip") && !(this instanceof Thing))
to AdjustVacuumToGrip {
......@@ -1416,6 +1252,31 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("CompressDecompressImageData") && !(this instanceof Thing))
to CompressDecompressImageData {
CompressDecompressImageData node = new CompressDecompressImageData();
node.setOwlIdentifier(getOwlIdentifier());
node.setAttributeList(getAttributeList());
node.setElementList(getElementList());
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Device) {
l.add(getElement(i));
}
}
node.setDeviceList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Sensor) {
l.add(getElement(i));
}
}
node.setSensorList(l);
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("Varnish") && !(this instanceof Thing))
to Varnish {
......@@ -1444,18 +1305,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -1469,18 +1330,18 @@ aspect Rewrites {
List l;
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Skill) {
if (getElement(i) instanceof Property) {
l.add(getElement(i));
}
}
node.setSkillList(l);
node.setPropertyList(l);
l = new List();
for (int i=0; i<getNumElement(); i++) {
if (getElement(i) instanceof Property) {
if (getElement(i) instanceof Skill) {
l.add(getElement(i));
}
}
node.setPropertyList(l);
node.setSkillList(l);
return node;
}
}
......@@ -1502,31 +1363,6 @@ aspect Rewrites {
return node;
}
}
rewrite ComplexElement {
when (getOwlIdentifier().getIDENTIFIER().equals("BarcodeReader") && !(this instanceof Thing))