C++: Some code cleanup
authorjani <jani@asema.com>
Thu, 1 Nov 2018 20:31:24 +0000 (22:31 +0200)
committerjani <jani@asema.com>
Thu, 1 Nov 2018 20:31:24 +0000 (22:31 +0200)
Common/C++/SmartAPI/smartapi/model/DependentPriceSpecification.cpp
Common/C++/SmartAPI/smartapi/model/DependentPriceSpecification.h
Common/C++/SmartAPI/smartapi/model/TimeDependentPriceSpecification.cpp
Common/C++/SmartAPI/tests/TestSequences.cpp
Examples/Java/CoffeeMakerFor10Cups/README [new file with mode: 0644]
Examples/Java/CoffeeMakerFor10Cups/src/acme/MainClass.java [new file with mode: 0644]
Examples/Java/ExtendingModel/src/acme/model/MagneticEntity.java [new file with mode: 0644]

index 8c641487f3b389032a1b042dc9c663e176acaf27..67b19c81e19c523a04829fa51581e69fee423f69 100644 (file)
@@ -46,16 +46,7 @@ Resource* DependentPriceSpecification::serialize(Model* model)
 void DependentPriceSpecification::parse(Statement* statement)
 {
        INIT_PARSE(statement)
-//    PARSE_LIST(PROPERTY__LIST, setConditions)
-    PARSE_LIST_AS(PROPERTY__LIST, setConditions, Condition)
+       PARSE_LIST_AS(PROPERTY__LIST, setConditions, Condition)
        FINISH_PARSE(PriceSpecification)
 }
 
-//PropertyList<Condition*> DependentPriceSpecification::getConditions()
-//{
-//    PropertyList<Condition*> ret;
-//    for (int i = 0; i < mConditions.length(); i++) {
-//        ret.append((Condition*)mConditions.at(i));
-//    }
-//    return ret;
-//}
index d0fafd3a6348b9acbb821b09e2cb9b1939be2b86..ccb7acb75275336ea9ea5efea086c08098e34c23 100644 (file)
@@ -17,10 +17,10 @@ public:
        void parse(Statement* statement);
        virtual void clearReferences(QSet<GraphItem*>* trash);
 
-       bool hasCondition()                                 { return !mConditions.isEmpty(); }
+       bool hasCondition()                                                                     { return !mConditions.isEmpty(); }
        PropertyList<Condition*> getConditions()                        { return mConditions; }
-       void addCondition(Condition* condition)             { mConditions.append(condition); }
-       void setConditions(PropertyList<Condition*> list)   { mConditions = list; add(PROPERTY__LIST, &mConditions); }
+       void addCondition(Condition* condition)                         { mConditions.append(condition); }
+       void setConditions(PropertyList<Condition*> list)       { mConditions = list; add(PROPERTY__LIST, &mConditions); }
 
 
 private:
index 6ed46359521922755e1d32ff2e3bf0f53612589b..2d94d88f014ea35a5808aee8cb7b7d815ed97409 100644 (file)
@@ -31,8 +31,8 @@ TimeDependentPriceSpecification::~TimeDependentPriceSpecification()
 
 void TimeDependentPriceSpecification::clearReferences(QSet<GraphItem*>* trash)
 {
-       INIT_CLEAR(DependentPriceSpecification,trash);
-       FINISH_CLEAR(DependentPriceSpecification,trash);
+       INIT_CLEAR(DependentPriceSpecification, trash);
+       FINISH_CLEAR(DependentPriceSpecification, trash);
 }
 
 Resource* TimeDependentPriceSpecification::serialize(Model* model)
index c023582baeba82b0330e71251a9a9adcdf28cf43..571cf498db3366039458f5565f8fc4898e22765c 100644 (file)
@@ -56,6 +56,8 @@
 #include "smartapi/model/PriceSpecification.h"
 #include "smartapi/model/DistanceDependentPriceSpecification.h"
 #include "smartapi/model/PropertyDependentPriceSpecification.h"
+#include "smartapi/model/TimeDependentPriceSpecification.h"
+#include "smartapi/model/TimeDependentPriceListSpecification.h"
 #include "smartapi/model/Restriction.h"
 #include "smartapi/model/Ring.h"
 #include "smartapi/model/SystemOfInterest.h"
@@ -2959,54 +2961,54 @@ bool multiParseTest()
 
 bool identifierManagementTest()
 {
-    qDebug() << "Running identifierManagementTest...";
-    QString domain = "asema.com";
-    QString systemId = "iotc/123";
-    QString objId = "/obj%567&/>qwerty/";
-
-    Entity* e = new Entity(Tools::createIdentifierUri(domain, systemId, objId));
-    qDebug() << "identifier creation successful";
-    printf("%s\n", Tools::toString(e, SERIALIZATION__TURTLE).toLocal8Bit().constData());
-    QString domain2 = e->getDomain();
-    QString systemId2 = e->getSystemIdentifier();
-    QString objId2 = e->getObjectIdentifier();
-    QString secondObjectId = e->getObjectIdentifier(2);
-    qDebug() << "domain:" << domain2;
-    qDebug() << "systemId:" << systemId2;
-    qDebug() << "objectId:" << objId2;
-    qDebug() << "secondObjectId:" << secondObjectId;
-    qDebug() << "identifier partition successful";
-
-    if (domain == domain2) {
-        qDebug() << "domain correct";
-    } else {
-        qDebug() << "domain match FAILED!";
-        return false;
-    }
+       qDebug() << "Running identifierManagementTest...";
+       QString domain = "asema.com";
+       QString systemId = "iotc/123";
+       QString objId = "/obj%567&/>qwerty/";
+
+       Entity* e = new Entity(Tools::createIdentifierUri(domain, systemId, objId));
+       qDebug() << "identifier creation successful";
+       printf("%s\n", Tools::toString(e, SERIALIZATION__TURTLE).toLocal8Bit().constData());
+       QString domain2 = e->getDomain();
+       QString systemId2 = e->getSystemIdentifier();
+       QString objId2 = e->getObjectIdentifier();
+       QString secondObjectId = e->getObjectIdentifier(2);
+       qDebug() << "domain:" << domain2;
+       qDebug() << "systemId:" << systemId2;
+       qDebug() << "objectId:" << objId2;
+       qDebug() << "secondObjectId:" << secondObjectId;
+       qDebug() << "identifier partition successful";
+
+       if (domain == domain2) {
+               qDebug() << "domain correct";
+       } else {
+               qDebug() << "domain match FAILED!";
+               return false;
+       }
 
-    if (systemId == systemId2) {
-        qDebug() << "systemId correct";
-    } else {
-        qDebug() << "systemId match FAILED!";
-        return false;
-    }
+       if (systemId == systemId2) {
+               qDebug() << "systemId correct";
+       } else {
+               qDebug() << "systemId match FAILED!";
+               return false;
+       }
 
-    if (objId == objId2) {
-        qDebug() << "objId correct";
-    } else {
-        qDebug() << "objId match FAILED!";
-        return false;
-    }
+       if (objId == objId2) {
+               qDebug() << "objId correct";
+       } else {
+               qDebug() << "objId match FAILED!";
+               return false;
+       }
 
-    if (secondObjectId.isEmpty()) {
-        qDebug() << "secondObjectId correct";
-    } else {
-        qDebug() << "secondObjectId match FAILED!";
-        return false;
-    }
+       if (secondObjectId.isEmpty()) {
+               qDebug() << "secondObjectId correct";
+       } else {
+               qDebug() << "secondObjectId match FAILED!";
+               return false;
+       }
 
-    e->destroyCascade();
-    return true;
+       e->destroyCascade();
+       return true;
 }
 
 bool priceSpecificationSerializeParseTest()
@@ -3014,7 +3016,7 @@ bool priceSpecificationSerializeParseTest()
        DistanceDependentPriceSpecification* ddps = new DistanceDependentPriceSpecification();
 
        Coordinates* c = new Coordinates(20.1, 21.0);
-    ddps->setCoordinates(c);
+       ddps->setCoordinates(c);
 
        QString serialized = Tools::toString(ddps, SERIALIZATION__TURTLE);
        qDebug() << "Serialized:";
@@ -3022,40 +3024,40 @@ bool priceSpecificationSerializeParseTest()
        ddps->destroyCascade();
 
        qDebug() << "-------------------";
-    DistanceDependentPriceSpecification* parsedEntity = (DistanceDependentPriceSpecification*)Tools::fromStringAsObj(serialized);
+       DistanceDependentPriceSpecification* parsedEntity = (DistanceDependentPriceSpecification*)Tools::fromStringAsObj(serialized);
 
        qDebug() << "\nRe-serializing...";
-    QString reserializedPayload = Tools::toString(parsedEntity, SERIALIZATION__TURTLE);
+       QString reserializedPayload = Tools::toString(parsedEntity, SERIALIZATION__TURTLE);
        printf("%s\n", reserializedPayload.toLatin1().data());
 
-    parsedEntity->destroyCascade();
+       parsedEntity->destroyCascade();
 
-    return true;
+       return true;
 }
 
 bool priceSpecificationCopyTest()
 {
-    Offering* o = new Offering("http://offering.com");
-    PropertyDependentPriceSpecification* ps = new PropertyDependentPriceSpecification();
-    ps->setUnit(RESOURCE__EURO);
-    ps->setReferenceObject("http://someobject.com");
-    ps->setProperty("http://proper.ty");
-    Condition* c1 = new Condition();
-    c1->addLesser(new Variant(10));
-    c1->addAction(new Variant(5));
-    ps->addCondition(c1);
-    Condition* c2 = new Condition();
-    c2->addGreaterOrEqual(new Variant(10));
-    c2->addAction(new Variant(7));
-    ps->addCondition(c2);
-    o->addPriceSpecification(ps);
-
-    qDebug() << "original:";
-    o->turtlePrint();
-
-    Offering* copy = new Offering(o);
-    qDebug() << "copied:";
-    copy->turtlePrint();
+       Offering* o = new Offering("http://offering.com");
+       PropertyDependentPriceSpecification* ps = new PropertyDependentPriceSpecification();
+       ps->setUnit(RESOURCE__EURO);
+       ps->setReferenceObject("http://someobject.com");
+       ps->setProperty("http://proper.ty");
+       Condition* c1 = new Condition();
+       c1->addLesser(new Variant(10));
+       c1->addAction(new Variant(5));
+       ps->addCondition(c1);
+       Condition* c2 = new Condition();
+       c2->addGreaterOrEqual(new Variant(10));
+       c2->addAction(new Variant(7));
+       ps->addCondition(c2);
+       o->addPriceSpecification(ps);
+
+       qDebug() << "original:";
+       o->turtlePrint();
+
+       Offering* copy = new Offering(o);
+       qDebug() << "copied:";
+       copy->turtlePrint();
 
 //    qDebug() << "orig unit" << o->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0);
 //    qDebug() << "copy unit" << copy->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0);
@@ -3063,35 +3065,71 @@ bool priceSpecificationCopyTest()
 //    qDebug() << "orig unit" << ((Obj*)o->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0);
 //    qDebug() << "copy unit" << ((Obj*)copy->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0);
 
-    // test that local class pointers differ
-    if (o->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0) == copy->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0)) {
-        qDebug() << "Orignal and copied unit (variants) has same pointer while copy should be copied!";
-        return false;
-    }
+       // test that local class pointers differ
+       if (o->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0) == copy->getPriceSpecification().at(0)->getAll(PROPERTY__UNIT)->at(0)) {
+               qDebug() << "Orignal and copied unit (variants) has same pointer while copy should be copied!";
+               return false;
+       }
 
-    // test that pointers in property map differ
-    if (((Obj*)o->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0) == ((Obj*)copy->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0)) {
-        qDebug() << "Orignal and copied unit (variants) has same pointer while copy should be copied!";
-        return false;
-    }
+       // test that pointers in property map differ
+       if (((Obj*)o->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0) == ((Obj*)copy->getAll(PROPERTY__HASPRICESPECIFICATION)->at(0))->getAll(PROPERTY__UNIT)->at(0)) {
+               qDebug() << "Orignal and copied unit (variants) has same pointer while copy should be copied!";
+               return false;
+       }
 
-    o->destroyCascade();
-    qDebug() << "copied after destroying original:";
-    copy->turtlePrint();
+       o->destroyCascade();
+       qDebug() << "copied after destroying original:";
+       copy->turtlePrint();
 
-    if (copy->hasPriceSpecification() && ((PropertyDependentPriceSpecification*)copy->getPriceSpecification().at(0))->getConditions().length() == 2) {
-        return true;
-    } else {
-        if (!copy->hasPriceSpecification()) {
-            qDebug() << "copy->hasPriceSpecification() returned false!";
-            return false;
-        } else {
-            qDebug() << "copied condition list size should be 2 but it is" << ((PropertyDependentPriceSpecification*)copy->getPriceSpecification().at(0))->getConditions().length();
-        }
-        return false;
-    }
+       if (copy->hasPriceSpecification() && ((PropertyDependentPriceSpecification*)copy->getPriceSpecification().at(0))->getConditions().length() == 2) {
+               copy->destroyCascade();
+               return true;
+       } else {
+               if (!copy->hasPriceSpecification()) {
+                       qDebug() << "copy->hasPriceSpecification() returned false!";
+                       copy->destroyCascade();
+                       return false;
+               } else {
+                       qDebug() << "copied condition list size should be 2 but it is" << ((PropertyDependentPriceSpecification*)copy->getPriceSpecification().at(0))->getConditions().length();
+               }
+               copy->destroyCascade();
+               return false;
+       }
 }
 
+bool priceSpecificationTimeDependentSerializeParseTest()
+{
+       TimeDependentPriceListSpecification* tdps = new TimeDependentPriceListSpecification();
+       tdps->setName("Test spec");
+
+       TimeDependentPriceSpecification* ps = new TimeDependentPriceSpecification();
+       ps->setValidFrom(QDateTime::currentDateTime());
+       Condition* c = new Condition();
+       TemporalContext* tcx = new TemporalContext();
+       tcx->setStart(QTime::currentTime());
+
+       c->setTemporalContext(tcx);
+       c->addAction(new Variant(10));
+       ps->addCondition(c);
+
+       tdps->addPriceSpecification(ps);
+
+       QString serialized = Tools::toString(tdps, SERIALIZATION__TURTLE);
+       qDebug() << "Serialized:";
+       printf("%s\n", serialized.toLatin1().data());
+       tdps->destroyCascade();
+
+       qDebug() << "-------------------";
+       TimeDependentPriceSpecification* parsedEntity = (TimeDependentPriceSpecification*)Tools::fromStringAsObj(serialized);
+
+       qDebug() << "\nRe-serializing...";
+       QString reserializedPayload = Tools::toString(parsedEntity, SERIALIZATION__TURTLE);
+       printf("%s\n", reserializedPayload.toLatin1().data());
+
+       parsedEntity->destroyCascade();
+
+       return true;
+}
 
 bool serializeParseSignedResponseTest()
 {
@@ -3453,14 +3491,14 @@ int main(int argc, char *argv[])
                qDebug() << "\nPROPERTY TEST FAILED!";
                return -1;
        }
-
+       */
        //------- LIST TESTS ------
        qDebug() << "\n\nLIST SERIALIZE / PARSE TEST";
        if (!listSerializeParseTest()) {
                qDebug() << "\nLIST SERIALIZE / PARSE TEST FAILED!";
                return -1;
        }
-
+       /*
        qDebug() << "\n\nLIST SPEED TEST";
        if (!listSpeedTest()) {
                qDebug() << "\nLIST SPEED TEST FAILED!";
@@ -3472,7 +3510,7 @@ int main(int argc, char *argv[])
                qDebug() << "\nBASEOBJECT LIST TEST FAILED!";
                return -1;
        }
-
+       */
        //-------- TIMESERIES TESTS ------
        qDebug() << "\n\nSIMPLE TIMESERIES TEST";
        if (!simpleTimeSeriesTest()) {
@@ -3485,7 +3523,7 @@ int main(int argc, char *argv[])
                qDebug() << "\nVALUEOBJECT TIMESERIES TEST FAILED!";
                return -1;
        }
-
+       /*
        qDebug() << "\n\nVALUEOBJECT TIMESERIES LIST SUBSTITUTE TEST";
        if (!substitutiveValueObjectTimeSeriesTest()) {
                qDebug() << "\nVALUEOBJECT TIMESERIES LIST SUBSTITUTE TEST FAILED!";
@@ -3579,8 +3617,24 @@ int main(int argc, char *argv[])
                qDebug() << "\nBASIC PRICE SPEC TEST FAILED!";
                return -1;
        }
+
+       qDebug() << "\n\nPRICELIST COPY CONSTRUCTOR TEST";
+       if (!priceSpecificationCopyTest()) {
+               qDebug() << "\nPRICELIST COPY CONSTRUCTOR TEST FAILED!";
+               return -1;
+       }
+
     //currencyConversionTest();
 
+       */
+
+       qDebug() << "\n\nTIME DEPENDENT PRICELIST TEST";
+       if (!priceSpecificationTimeDependentSerializeParseTest()) {
+               qDebug() << "\nTIME DEPENDENT PRICELIST TEST!";
+               return -1;
+       }
+
+       /*
        //registrationTest();
        //registrationSearchTest();
 
@@ -3601,13 +3655,8 @@ int main(int argc, char *argv[])
                qDebug() << "\nSERIALIZE PARSE ROUTE TEST FAILED!";
                return -1;
        }
-*/
 
-    qDebug() << "\n\nCOPY CONSTRUCTOR TEST";
-    if (!priceSpecificationCopyTest()) {
-        qDebug() << "\nCOPY CONSTRUCTOR TEST FAILED!";
-        return -1;
-    }
+       */
 
        //app.exec();
        qDebug() << "\n\nAll tests passed!";
diff --git a/Examples/Java/CoffeeMakerFor10Cups/README b/Examples/Java/CoffeeMakerFor10Cups/README
new file mode 100644 (file)
index 0000000..83f8eca
--- /dev/null
@@ -0,0 +1,43 @@
+CoffeeMakerFor10Cups
+====================
+
+CoffeeMakerFor10Cups example demonstrates how you can extend the ontology with your own 
+custom properties and classes, and take them into use right away. By extending the ontology
+you can, for instance, define your own device type and assign properties for that 
+particular device type.
+
+
+HOWTO
+-----
+
+1) Extending the ontology
+
+To extend the ontology, navigate to SEAS Developer Website:
+    http://seas.asema.com/develop/serverworkbench
+and add you custom classes and properties into SEAS draft ontology.
+
+Custom classes in this example:
+       seas:CoffeeMaker (optional)
+       seas:CoffeeMakerFor10Cups
+       
+Custom proprties for this example:
+       seas:cupConstraints
+
+To avoid adding multiple definitions for the same concept, Remember to first search for 
+similar concepts in the ontology.
+
+
+2) Writing new classes (optional)
+
+If you want, you can write your own class based on the newly added ontology concepts.
+Use acme.mode.CoffeeMakerFor10Cups.java as a template for you new class.
+
+
+3) Use new concepts (and classes) in your project
+
+If you created new classes, you can instantiate them and use them similarly to any SEAS
+model class. Use useWithNewClass() method in acme.MainClass.java as a template.
+
+If you just want to directly use the new concepts, you can use useAsType() method in 
+acme.MainClass.java as a template. 
+
diff --git a/Examples/Java/CoffeeMakerFor10Cups/src/acme/MainClass.java b/Examples/Java/CoffeeMakerFor10Cups/src/acme/MainClass.java
new file mode 100644 (file)
index 0000000..10ad3c4
--- /dev/null
@@ -0,0 +1,92 @@
+package acme;
+
+import acme.model.CoffeeMakerFor10Cups;
+import smartapi.common.DATATYPE;
+import smartapi.common.NS;
+import smartapi.common.Tools;
+import smartapi.model.Address;
+import smartapi.model.Device;
+import smartapi.model.ValueObject;
+import smartapi.rdf.Variant;
+
+public class MainClass {
+
+       private final String myIdentity = "http://acme.com/smartapi/CCoffeeMaker";
+       
+       public MainClass()
+       {
+       }
+
+       public static void main(String[] args)
+       {
+               MainClass mainClass = new MainClass();
+               // You can use your newly created CoffeeMakerFor10Cups in two ways
+               // either:
+               mainClass.useWithNewClass();
+               // or:
+               mainClass.useAsType();
+       }
+       
+       /**
+        * Example on how to use your newly created custom class.
+        */
+       public void useWithNewClass()
+       {
+               // add your prefix mapping
+               NS.addPrefix("acme", "http://smart-api.io/ontology/1.0/acme#");
+               
+               // create object as an instance of your newly created class
+               CoffeeMakerFor10Cups coffeeMakerFor10Cups = new CoffeeMakerFor10Cups(myIdentity);
+               
+               // you can set your own property with setCupConstraints method
+               ValueObject cupConstraints = new ValueObject();
+               cupConstraints.setDataType(DATATYPE.INT);
+               cupConstraints.setValue(new Variant(6));
+               cupConstraints.setMinimum(new Variant(2));
+               cupConstraints.setMaximum(new Variant(10));
+               coffeeMakerFor10Cups.setCupConstraints(cupConstraints);
+               
+               // you can use all methods provided by Device class
+               Address address = new Address();
+               address.setCity("Paris");
+               coffeeMakerFor10Cups.setAddress(address);
+               
+               // print out for testing purposes
+               System.out.println(Tools.toString(coffeeMakerFor10Cups));
+               
+       }
+
+       /**
+        * Example on how to use your newly created concepts directly without implementing 
+        * new classes.
+        */
+       public void useAsType()
+       {
+               // add your prefix mapping
+               NS.addPrefix("acme", "http://smart-api.io/ontology/1.0/acme#");
+
+               // create object as an instance of Device
+               Device coffeeMakerFor10Cups = new Device(myIdentity);
+               
+               // add type seas:CoffeeMakerFor10Cups for the device
+               coffeeMakerFor10Cups.addType("acme:CoffeeMakerFor10Cups");
+               
+               // you can set your own property with add() method
+               ValueObject cupConstraints = new ValueObject();
+               cupConstraints.setDataType(DATATYPE.INT);
+               cupConstraints.setValue(new Variant(6));
+               cupConstraints.setMinimum(new Variant(2));
+               cupConstraints.setMaximum(new Variant(10));
+               coffeeMakerFor10Cups.add("acme:cupConstraints", cupConstraints);
+               
+               // you can use all methods provided by Device class
+               Address address = new Address();
+               address.setCity("Paris");
+               coffeeMakerFor10Cups.setAddress(address);
+               
+               // print out for testing purposes
+               System.out.println(Tools.toString(coffeeMakerFor10Cups));
+               
+       }
+       
+}
diff --git a/Examples/Java/ExtendingModel/src/acme/model/MagneticEntity.java b/Examples/Java/ExtendingModel/src/acme/model/MagneticEntity.java
new file mode 100644 (file)
index 0000000..b10d670
--- /dev/null
@@ -0,0 +1,30 @@
+package acme.model;
+
+import smartapi.common.PROPERTY;
+import smartapi.model.PhysicalEntity;
+import smartapi.model.ValueObject;
+
+public class MagneticEntity extends PhysicalEntity {
+
+       // make sure to add/define custom types and properties in:
+       //   http://talk.smart-api.io/develop/serverworkbench
+       private final String CLASS_TYPE = "http://smart-api.io/ontology/acme#MagneticEntity";
+       private final int PERMEABILITY = PROPERTY.add("http://smart-api.io/ontology/acme#permeability");
+
+       public MagneticEntity()
+       {
+               super();
+               this.addType(CLASS_TYPE);
+       }
+
+       public MagneticEntity(String identifierUri)
+       {
+               super(identifierUri);
+               this.addType(CLASS_TYPE);
+       }
+
+       // permeability accessors
+       public boolean hasPermeability() { return has(PERMEABILITY); }
+       public ValueObject getPermeability() { return getFirstAs(ValueObject.class, PERMEABILITY); }
+       public void setPermeability(ValueObject p) { set(PERMEABILITY, p); }
+}