aboutsummaryrefslogtreecommitdiffstats
path: root/model/context-model/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /model/context-model/src
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/context-model/src')
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java14
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java6
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java4
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java14
-rw-r--r--model/context-model/src/test/resources/META-INF/persistence.xml4
5 files changed, 21 insertions, 21 deletions
diff --git a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
index 3abcebee9..bf8289ecb 100644
--- a/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
@@ -40,7 +40,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner;
+import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner;
import org.onap.policy.apex.model.utilities.Assertions;
/**
@@ -93,8 +93,8 @@ public class AxContextSchema extends AxConcept {
private String schemaFlavour;
@Column(name = "schemaDefinition", length = MAX_SCHEMA_SIZE)
- @Convert(converter = CDATAConditioner.class)
- @XmlJavaTypeAdapter(value = CDATAConditioner.class)
+ @Convert(converter = CDataConditioner.class)
+ @XmlJavaTypeAdapter(value = CDataConditioner.class)
@XmlElement(name = "schemaDefinition", required = true)
private String schemaDefinition;
@@ -343,8 +343,8 @@ public class AxContextSchema extends AxConcept {
if (!schemaFlavour.equals(other.schemaFlavour)) {
return false;
}
- final String thisSchema = CDATAConditioner.clean(schemaDefinition).replaceAll("\n", "");
- final String otherSchema = CDATAConditioner.clean(other.schemaDefinition).replaceAll("\n", "");
+ final String thisSchema = CDataConditioner.clean(schemaDefinition).replaceAll("\n", "");
+ final String otherSchema = CDataConditioner.clean(other.schemaDefinition).replaceAll("\n", "");
return thisSchema.equals(otherSchema);
}
@@ -372,8 +372,8 @@ public class AxContextSchema extends AxConcept {
if (!schemaFlavour.equals(other.schemaFlavour)) {
return schemaFlavour.compareTo(other.schemaFlavour);
}
- final String thisSchema = CDATAConditioner.clean(schemaDefinition).replaceAll("\n", "");
- final String otherSchema = CDATAConditioner.clean(other.schemaDefinition).replaceAll("\n", "");
+ final String thisSchema = CDataConditioner.clean(schemaDefinition).replaceAll("\n", "");
+ final String otherSchema = CDataConditioner.clean(other.schemaDefinition).replaceAll("\n", "");
return thisSchema.compareTo(otherSchema);
}
}
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
index 710c44e5b..839e19835 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
@@ -53,8 +53,8 @@ public class TestContextAlbums {
final AxArtifactKey newKey = new AxArtifactKey("NewAlbumName", "0.0.1");
album.setKey(newKey);
- assertEquals("NewAlbumName:0.0.1", album.getKey().getID());
- assertEquals("NewAlbumName:0.0.1", album.getKeys().get(0).getID());
+ assertEquals("NewAlbumName:0.0.1", album.getKey().getId());
+ assertEquals("NewAlbumName:0.0.1", album.getKeys().get(0).getId());
album.setKey(albumKey);
try {
@@ -74,7 +74,7 @@ public class TestContextAlbums {
final AxArtifactKey newSchemaKey = new AxArtifactKey("NewAlbumSchemaName", "0.0.1");
album.setItemSchema(newSchemaKey);
- assertEquals("NewAlbumSchemaName:0.0.1", album.getItemSchema().getID());
+ assertEquals("NewAlbumSchemaName:0.0.1", album.getItemSchema().getId());
album.setItemSchema(albumSchemaKey);
AxValidationResult result = new AxValidationResult();
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
index e9e9564ac..02dfd6fb1 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
@@ -50,8 +50,8 @@ public class TestContextSchemas {
final AxArtifactKey newKey = new AxArtifactKey("NewSchemaName", "0.0.1");
schema.setKey(newKey);
- assertEquals("NewSchemaName:0.0.1", schema.getKey().getID());
- assertEquals("NewSchemaName:0.0.1", schema.getKeys().get(0).getID());
+ assertEquals("NewSchemaName:0.0.1", schema.getKey().getId());
+ assertEquals("NewSchemaName:0.0.1", schema.getKeys().get(0).getId());
try {
schema.setSchemaFlavour("");
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java
index 477755ccc..10609ec9b 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.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.contextmodel.concepts.AxContextModel;
@@ -84,21 +84,21 @@ public class TestApexContextModel {
@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("DAOTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("DAOTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";
diff --git a/model/context-model/src/test/resources/META-INF/persistence.xml b/model/context-model/src/test/resources/META-INF/persistence.xml
index ec9357851..b7911caa2 100644
--- a/model/context-model/src/test/resources/META-INF/persistence.xml
+++ b/model/context-model/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="DAOTest" 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>