diff options
Diffstat (limited to 'examples/examples-adaptive/src')
7 files changed, 32 insertions, 32 deletions
diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java index 6242b1618..6b71468d9 100644 --- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java +++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelFactory.java @@ -288,7 +288,7 @@ public class AdaptiveDomainModelFactory { final AxValidationResult result = anomalyDetectionPolicyModel.validate(new AxValidationResult()); if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) { - throw new ApexRuntimeException("model " + anomalyDetectionPolicyModel.getID() + " is not valid" + result); + throw new ApexRuntimeException("model " + anomalyDetectionPolicyModel.getId() + " is not valid" + result); } return anomalyDetectionPolicyModel; } @@ -550,7 +550,7 @@ public class AdaptiveDomainModelFactory { final AxValidationResult result = autoLearnPolicyModel.validate(new AxValidationResult()); if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) { - throw new ApexRuntimeException("model " + autoLearnPolicyModel.getID() + " is not valid" + result); + throw new ApexRuntimeException("model " + autoLearnPolicyModel.getId() + " is not valid" + result); } return autoLearnPolicyModel; } diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java index 0cc9bd3a2..9c860e3c8 100644 --- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java +++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/AdaptiveDomainModelSaver.java @@ -51,14 +51,14 @@ public final class AdaptiveDomainModelSaver { final AxPolicyModel adPolicyModel = new AdaptiveDomainModelFactory().getAnomalyDetectionPolicyModel(); final ApexModelSaver<AxPolicyModel> adModelSaver = new ApexModelSaver<>(AxPolicyModel.class, adPolicyModel, args[0]); - adModelSaver.apexModelWriteJSON(); - adModelSaver.apexModelWriteXML(); + adModelSaver.apexModelWriteJson(); + adModelSaver.apexModelWriteXml(); // Save Auto Learn model final AxPolicyModel alPolicyModel = new AdaptiveDomainModelFactory().getAutoLearnPolicyModel(); final ApexModelSaver<AxPolicyModel> alModelSaver = new ApexModelSaver<>(AxPolicyModel.class, alPolicyModel, args[0]); - alModelSaver.apexModelWriteJSON(); - alModelSaver.apexModelWriteXML(); + alModelSaver.apexModelWriteJson(); + alModelSaver.apexModelWriteXml(); } } diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java index 898531c32..9affa7876 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionDBWrite.java @@ -27,7 +27,7 @@ import java.sql.DriverManager; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -51,10 +51,10 @@ public class TestAnomalyDetectionDBWrite { @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); - daoParameters.setPersistenceUnit("AdaptiveModelsTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); + DaoParameters.setPersistenceUnit("AdaptiveModelsTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } } diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java index 7e2fb0eb7..3782f2d88 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAnomalyDetectionModel.java @@ -30,7 +30,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -60,21 +60,21 @@ public class TestAnomalyDetectionModel { @Test public void testModelWriteReadXML() throws Exception { - testApexModel.testApexModelWriteReadXML(); + testApexModel.testApexModelWriteReadXml(); } @Test public void testModelWriteReadJSON() throws Exception { - testApexModel.testApexModelWriteReadJSON(); + testApexModel.testApexModelWriteReadJson(); } @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); - daoParameters.setPersistenceUnit("AdaptiveModelsTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); + DaoParameters.setPersistenceUnit("AdaptiveModelsTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } private static final String VALID_MODEL_STRING = "***validation of model successful***"; diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java index 64efa6c35..e096105d9 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnDBWrite.java @@ -27,7 +27,7 @@ import java.sql.DriverManager; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -51,10 +51,10 @@ public class TestAutoLearnDBWrite { @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); - daoParameters.setPersistenceUnit("AdaptiveModelsTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); + DaoParameters.setPersistenceUnit("AdaptiveModelsTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } } diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java index aa7f621c9..beb7a9c80 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestAutoLearnModel.java @@ -30,7 +30,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -60,21 +60,21 @@ public class TestAutoLearnModel { @Test public void testModelWriteReadXML() throws Exception { - testApexModel.testApexModelWriteReadXML(); + testApexModel.testApexModelWriteReadXml(); } @Test public void testModelWriteReadJSON() throws Exception { - testApexModel.testApexModelWriteReadJSON(); + testApexModel.testApexModelWriteReadJson(); } @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); - daoParameters.setPersistenceUnit("AdaptiveModelsTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao"); + DaoParameters.setPersistenceUnit("AdaptiveModelsTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } private static final String VALID_MODEL_STRING = "***validation of model successful***"; diff --git a/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml b/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml index 7282bb562..4dcd879b6 100644 --- a/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml +++ b/examples/examples-adaptive/src/test/resources/META-INF/persistence.xml @@ -23,8 +23,8 @@ <persistence-unit name="AdaptiveModelsTest" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> - <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner</class> - <class>org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String</class> + <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner</class> + <class>org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String</class> <class>org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey</class> <class>org.onap.policy.apex.model.basicmodel.concepts.AxConcept</class> <class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo</class> |