aboutsummaryrefslogtreecommitdiffstats
path: root/model/context-model
diff options
context:
space:
mode:
authorramverma <ram.krishna.verma@ericsson.com>2018-05-25 11:55:45 +0100
committerramverma <ram.krishna.verma@ericsson.com>2018-05-25 16:25:25 +0100
commit6029d25f5f3ad43fe02ffe1a4beb1eda0a6ae5e3 (patch)
tree489296a005ced47a3a4acffc6ce64b65f5367d77 /model/context-model
parent5abd3063949496c231ed8d3013c2ab17fc9288bb (diff)
Adding apex event-model module
- Adding apex event-model module - Fixing namespaces Change-Id: If37a1773000ca99eb5d97703fdeb5788ce55365c Issue-ID: POLICY-856 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'model/context-model')
-rw-r--r--model/context-model/pom.xml10
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbum.java)83
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbums.java)88
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextModel.java)73
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchema.java)84
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchemas.java)87
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/package-info.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/package-info.java)15
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparer.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/ContextComparer.java)12
-rw-r--r--model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/package-info.java (renamed from model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/package-info.java)2
-rw-r--r--model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModelCreator.java106
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextAlbums.java)12
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextModel.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextModel.java)12
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextSchemas.java)12
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModel.java)40
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java123
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparison.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparison.java)12
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java (renamed from model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparisonFactory.java)98
-rw-r--r--model/context-model/src/test/resources/META-INF/persistence.xml26
-rw-r--r--model/context-model/src/test/resources/json/ContextModel.json10
-rw-r--r--model/context-model/src/test/resources/logback-test.xml8
20 files changed, 460 insertions, 453 deletions
diff --git a/model/context-model/pom.xml b/model/context-model/pom.xml
index 9f7766c79..b7ee5b447 100644
--- a/model/context-model/pom.xml
+++ b/model/context-model/pom.xml
@@ -36,12 +36,6 @@
<artifactId>basic-model</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.13.1.1</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
@@ -57,10 +51,10 @@
<goal>java</goal>
</goals>
<configuration>
- <mainClass>org.onap.apex.model.basicmodel.handling.ApexSchemaGenerator</mainClass>
+ <mainClass>org.onap.policy.apex.model.basicmodel.handling.ApexSchemaGenerator</mainClass>
<classpathScope>compile</classpathScope>
<arguments>
- <argument>org.onap.apex.model.contextmodel.concepts.AxContextModel</argument>
+ <argument>org.onap.policy.apex.model.contextmodel.concepts.AxContextModel</argument>
<argument>${project.build.directory}/model/xml/apex-context-model.xsd</argument>
</arguments>
</configuration>
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbum.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java
index 045ea0aba..27f9b8b9b 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbum.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import java.util.List;
@@ -35,43 +35,42 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyUse;
-import org.onap.apex.model.basicmodel.concepts.AxValidationMessage;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse;
+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.utilities.Assertions;
/**
* This class is used to define an album of context.
* <p>
- * A context album is a distributed map of context that will be distributed across all process
- * instances that require access to it. This class defines the schema (structure) of the items in
- * the context album, whether the items on the context album are writable or not, and what the scope
- * of the context album is.
+ * A context album is a distributed map of context that will be distributed across all process instances that require
+ * access to it. This class defines the schema (structure) of the items in the context album, whether the items on the
+ * context album are writable or not, and what the scope of the context album is.
* <p>
- * The structure of items (objects) the context album is defined as a schema, which is understood by
- * whatever schema implementation is being used for the context album.
+ * The structure of items (objects) the context album is defined as a schema, which is understood by whatever schema
+ * implementation is being used for the context album.
* <p>
- * The scope of a context album is a string field, understood by whatever distribution mechanism is
- * being used for the context album. The distribution mechanism uses the scope of the context album
- * to decide to which executable entities a given context album is distributed.
+ * The scope of a context album is a string field, understood by whatever distribution mechanism is being used for the
+ * context album. The distribution mechanism uses the scope of the context album to decide to which executable entities
+ * a given context album is distributed.
* <p>
- * The writable flag on a context album defines whether users of a context album can write to the
- * context album or just read objects from the context album.
+ * The writable flag on a context album defines whether users of a context album can write to the context album or just
+ * read objects from the context album.
* <p>
- * Validation checks that the album key and the context schema key are not null and that the scope
- * field is not undefined and matches the regular expression {@link SCOPE_REGEXP}.
+ * Validation checks that the album key and the context schema key are not null and that the scope field is not
+ * undefined and matches the regular expression {@link SCOPE_REGEXP}.
*/
@Entity
@Table(name = "AxContextAlbum")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "apexContextAlbum", namespace = "http://www.ericsson.com/apex")
-@XmlType(name = "AxContextAlbum", namespace = "http://www.ericsson.com/apex",
- propOrder = {"key", "scope", "isWritable", "itemSchema"})
+@XmlRootElement(name = "apexContextAlbum", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxContextAlbum", namespace = "http://www.onap.org/policy/apex-pdp",
+ propOrder = { "key", "scope", "isWritable", "itemSchema" })
public class AxContextAlbum extends AxConcept {
private static final String SCOPE_STRING = "scope";
@@ -113,9 +112,9 @@ public class AxContextAlbum extends AxConcept {
// @formatter:on
/**
- * The default constructor creates a context album with a null artifact key. The scope of the
- * context album is set as {@link SCOPE_UNDEFINED}, the album is writable, and the artifact key
- * of the context schema is set to the null artifact key.
+ * The default constructor creates a context album with a null artifact key. The scope of the context album is set
+ * as {@link SCOPE_UNDEFINED}, the album is writable, and the artifact key of the context schema is set to the null
+ * artifact key.
*/
public AxContextAlbum() {
this(new AxArtifactKey());
@@ -126,7 +125,7 @@ public class AxContextAlbum extends AxConcept {
/**
* Copy constructor
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxContextAlbum(final AxContextAlbum copyConcept) {
@@ -134,9 +133,9 @@ public class AxContextAlbum extends AxConcept {
}
/**
- * The keyed constructor creates a context album with the specified artifact key. The scope of
- * the context album is set as {@link SCOPE_UNDEFINED}, the album is writable, and the artifact
- * key of the context schema is set to the null artifact key.
+ * The keyed constructor creates a context album with the specified artifact key. The scope of the context album is
+ * set as {@link SCOPE_UNDEFINED}, the album is writable, and the artifact key of the context schema is set to the
+ * null artifact key.
*
* @param key the key of the context album
*/
@@ -168,7 +167,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
*/
@Override
public AxArtifactKey getKey() {
@@ -178,7 +177,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
*/
@Override
public List<AxKey> getKeys() {
@@ -257,7 +256,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.
* basicmodel.concepts.AxValidationResult)
*/
@Override
@@ -294,7 +293,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
*/
@Override
public void clean() {
@@ -306,7 +305,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
*/
@Override
public String toString() {
@@ -328,7 +327,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
@@ -350,7 +349,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
*/
@Override
public int hashCode() {
@@ -366,7 +365,7 @@ public class AxContextAlbum extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) {
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbums.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java
index e48d064cb..f9d34cef6 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbums.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import java.util.List;
import java.util.Map;
@@ -40,33 +40,32 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxConceptGetter;
-import org.onap.apex.model.basicmodel.concepts.AxConceptGetterImpl;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationMessage;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetterImpl;
+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.utilities.Assertions;
/**
- * This class is a context album container and holds a map of the context albums for an entire Apex
- * model. All Apex models that use context albums must have an {@link AxContextAlbums} field. The
- * {@link AxContextAlbums} class implements the helper methods of the {@link AxConceptGetter}
- * interface to allow {@link AxContextAlbum} instances to be retrieved by calling methods directly
- * on this class without referencing the contained map.
+ * This class is a context album container and holds a map of the context albums for an entire Apex model. All Apex
+ * models that use context albums must have an {@link AxContextAlbums} field. The {@link AxContextAlbums} class
+ * implements the helper methods of the {@link AxConceptGetter} interface to allow {@link AxContextAlbum} instances to
+ * be retrieved by calling methods directly on this class without referencing the contained map.
* <p>
- * Validation checks that the container key is not null. An observation is issued if no context
- * albums are defined in the container. If context albums do exist, they are checked to ensure that
- * keys and values are not null and that the map key matches the key in the map value for all album
- * entries. Each context album entry is then validated individually.
+ * Validation checks that the container key is not null. An observation is issued if no context albums are defined in
+ * the container. If context albums do exist, they are checked to ensure that keys and values are not null and that the
+ * map key matches the key in the map value for all album entries. Each context album entry is then validated
+ * individually.
*/
@Entity
@Table(name = "AxContextAlbums")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AxContextAlbums", namespace = "http://www.ericsson.com/apex", propOrder = {"key", "albums"})
+@XmlType(name = "AxContextAlbums", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "key", "albums" })
public final class AxContextAlbums extends AxConcept implements AxConceptGetter<AxContextAlbum> {
private static final long serialVersionUID = -4844259809024470975L;
@@ -84,8 +83,8 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
// @formatter:on
/**
- * The Default Constructor creates a {@link AxContextAlbums} object with a null artifact key and
- * creates an empty context album map.
+ * The Default Constructor creates a {@link AxContextAlbums} object with a null artifact key and creates an empty
+ * context album map.
*/
public AxContextAlbums() {
this(new AxArtifactKey());
@@ -93,7 +92,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/**
* Copy constructor
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxContextAlbums(final AxContextAlbums copyConcept) {
@@ -101,8 +100,8 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
}
/**
- * The Key Constructor creates a {@link AxContextAlbums} object with the given artifact key and
- * creates an empty context album map.
+ * The Key Constructor creates a {@link AxContextAlbums} object with the given artifact key and creates an empty
+ * context album map.
*
* @param key the key of the context album container
*/
@@ -127,10 +126,9 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
}
/**
- * When a model is unmarshalled from disk or from the database, the context album map is
- * returned as a raw hash map. This method is called by JAXB after unmarshaling and is used to
- * convert the hash map to a {@link NavigableMap} so that it will work with the
- * {@link AxConceptGetter} interface.
+ * When a model is unmarshalled from disk or from the database, the context album map is returned as a raw hash map.
+ * This method is called by JAXB after unmarshaling and is used to convert the hash map to a {@link NavigableMap} so
+ * that it will work with the {@link AxConceptGetter} interface.
*
* @param u the unmarshaler that is unmarshaling the model
* @param parent the parent object of this object in the unmarshaler
@@ -146,7 +144,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
*/
@Override
public AxArtifactKey getKey() {
@@ -156,7 +154,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
*/
@Override
public List<AxKey> getKeys() {
@@ -202,7 +200,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
*/
@Override
public void clean() {
@@ -216,7 +214,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
*/
@Override
public String toString() {
@@ -236,7 +234,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.
* basicmodel.concepts.AxValidationResult)
*/
@Override
@@ -281,7 +279,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
@@ -306,7 +304,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
*/
@Override
public int hashCode() {
@@ -320,7 +318,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) {
@@ -373,7 +371,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConceptGetter#get(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.model.
* basicmodel.concepts.AxArtifactKey)
*/
@Override
@@ -384,7 +382,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
*/
@Override
public AxContextAlbum get(final String conceptKeyName) {
@@ -394,8 +392,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String,
- * java.lang.String)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String, java.lang.String)
*/
@Override
public AxContextAlbum get(final String conceptKeyName, final String conceptKeyVersion) {
@@ -406,7 +403,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
*/
@Override
public Set<AxContextAlbum> getAll(final String conceptKeyName) {
@@ -416,8 +413,7 @@ public final class AxContextAlbums extends AxConcept implements AxConceptGetter<
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String,
- * java.lang.String)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String, java.lang.String)
*/
@Override
public Set<AxContextAlbum> getAll(final String conceptKeyName, final String conceptKeyVersion) {
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextModel.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java
index dcd381872..2aa6fc70a 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextModel.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import java.util.List;
@@ -34,32 +34,31 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.service.ModelService;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.service.ModelService;
import org.onap.policy.apex.model.utilities.Assertions;
/**
- * A container class for an Apex context model. This class is a container class that allows an Apex
- * model to be constructed that just contains context and the key information for that context. The
- * model contains schema definitions and the definitions of context albums that use those schemas.
- * In the case where Apex context is being used without policy or independent of policy, an Apex
- * context model is sufficient to get Apex context working.
+ * A container class for an Apex context model. This class is a container class that allows an Apex model to be
+ * constructed that just contains context and the key information for that context. The model contains schema
+ * definitions and the definitions of context albums that use those schemas. In the case where Apex context is being
+ * used without policy or independent of policy, an Apex context model is sufficient to get Apex context working.
* <p>
- * Validation runs {@link AxModel} validation on the model. In addition, the
- * {@link AxContextSchemas} and {@link AxContextAlbums} validation is run on the context schemas and
- * albums in the model.
+ * Validation runs {@link AxModel} validation on the model. In addition, the {@link AxContextSchemas} and
+ * {@link AxContextAlbums} validation is run on the context schemas and albums in the model.
*/
@Entity
@Table(name = "AxContextModel")
-@XmlRootElement(name = "apexContextModel", namespace = "http://www.ericsson.com/apex")
+@XmlRootElement(name = "apexContextModel", namespace = "http://www.onap.org/policy/apex-pdp")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AxContextModel", namespace = "http://www.ericsson.com/apex", propOrder = {"schemas", "albums"})
+@XmlType(name = "AxContextModel", namespace = "http://www.onap.org/policy/apex-pdp",
+ propOrder = { "schemas", "albums" })
public class AxContextModel extends AxModel {
private static final long serialVersionUID = 8800599637708309945L;
@@ -83,16 +82,16 @@ public class AxContextModel extends AxModel {
// @formatter:on
/**
- * The Default Constructor creates a {@link AxContextModel} object with a null artifact key and
- * creates an empty context model.
+ * The Default Constructor creates a {@link AxContextModel} object with a null artifact key and creates an empty
+ * context model.
*/
public AxContextModel() {
this(new AxArtifactKey());
}
/**
- * The Key Constructor creates a {@link AxContextModel} object with the given artifact key and
- * creates an empty context model.
+ * The Key Constructor creates a {@link AxContextModel} object with the given artifact key and creates an empty
+ * context model.
*
* @param key the key of the context model
*/
@@ -104,7 +103,7 @@ public class AxContextModel extends AxModel {
/**
* Copy constructor
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxContextModel(final AxContextModel copyConcept) {
@@ -112,8 +111,8 @@ public class AxContextModel extends AxModel {
}
/**
- * Constructor that initiates a {@link AxContextModel} with schemas and keys for those schemas.
- * An empty {@link AxContextAlbums} container is created.
+ * Constructor that initiates a {@link AxContextModel} with schemas and keys for those schemas. An empty
+ * {@link AxContextAlbums} container is created.
*
* @param key the key of the context model
* @param schemas the context schema definitions
@@ -145,7 +144,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#register()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#register()
*/
@Override
public void register() {
@@ -157,7 +156,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#getKeys()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#getKeys()
*/
@Override
public List<AxKey> getKeys() {
@@ -210,7 +209,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#validate(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#validate(org.onap.policy.apex.model.
* basicmodel.concepts.AxValidationResult)
*/
@Override
@@ -225,7 +224,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#clean()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#clean()
*/
@Override
public void clean() {
@@ -237,7 +236,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#toString()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#toString()
*/
@Override
public String toString() {
@@ -256,7 +255,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
@@ -277,7 +276,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#hashCode()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#hashCode()
*/
@Override
public int hashCode() {
@@ -292,7 +291,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#equals(java.lang.Object)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) {
@@ -320,7 +319,7 @@ public class AxContextModel extends AxModel {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxModel#compareTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#compareTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchema.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
index 852e3f552..3abcebee9 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchema.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import java.util.List;
@@ -34,42 +34,40 @@ import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationMessage;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.basicmodel.dao.converters.CDATAConditioner;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+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.utilities.Assertions;
/**
- * This class holds a data schema definition in Apex. A data schema describes the structure of a
- * single atom of data handled by Apex. This atom of data can be a primitive type such as an integer
- * or a string, or it can be a more complex data type such as a Java object or an object described
- * using a data definition language such as Avro. The schema flavour defines the type of schema
- * being defined and the schema itself defines the schema. The schema flavour is used by Apex to
- * look up and load a plugin class that understands and interprets the schema definition and can
+ * This class holds a data schema definition in Apex. A data schema describes the structure of a single atom of data
+ * handled by Apex. This atom of data can be a primitive type such as an integer or a string, or it can be a more
+ * complex data type such as a Java object or an object described using a data definition language such as Avro. The
+ * schema flavour defines the type of schema being defined and the schema itself defines the schema. The schema flavour
+ * is used by Apex to look up and load a plugin class that understands and interprets the schema definition and can
* create instances of classes for the schema.
* <p>
- * An {@link AxContextSchema} is used to define each parameter in Apex events, the messages that
- * enter, exit, and are passed internally in Apex. In addition, an Apex {@link AxContextAlbum}
- * instances hold a map of {@link AxContextSchema} instances to represent the context being managed
- * as an {@link AxContextAlbum}. For example, the state of all cells in a mobile network might be
- * represented as an {@link AxContextAlbum} with its {@link AxContextSchema} being defined as @code
- * cell} objects.
+ * An {@link AxContextSchema} is used to define each parameter in Apex events, the messages that enter, exit, and are
+ * passed internally in Apex. In addition, an Apex {@link AxContextAlbum} instances hold a map of
+ * {@link AxContextSchema} instances to represent the context being managed as an {@link AxContextAlbum}. For example,
+ * the state of all cells in a mobile network might be represented as an {@link AxContextAlbum} with its
+ * {@link AxContextSchema} being defined as @code cell} objects.
* <p>
- * Validation checks that the schema key is not null. It also checks that the schema flavour is
- * defined and matches the regular expression {@link SCHEMA_FLAVOUR_REGEXP}. Finally, validation
- * checks that the defined schema is not a blank or empty string.
+ * Validation checks that the schema key is not null. It also checks that the schema flavour is defined and matches the
+ * regular expression {@link SCHEMA_FLAVOUR_REGEXP}. Finally, validation checks that the defined schema is not a blank
+ * or empty string.
*/
@Entity
@Table(name = "AxContextSchema")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "apexContextSchema", namespace = "http://www.ericsson.com/apex")
-@XmlType(name = "AxContextSchema", namespace = "http://www.ericsson.com/apex",
- propOrder = {"key", "schemaFlavour", "schemaDefinition"})
+@XmlRootElement(name = "apexContextSchema", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxContextSchema", namespace = "http://www.onap.org/policy/apex-pdp",
+ propOrder = { "key", "schemaFlavour", "schemaDefinition" })
public class AxContextSchema extends AxConcept {
private static final String SCHEMA_FLAVOUR = "schemaFlavour";
@@ -101,9 +99,8 @@ public class AxContextSchema extends AxConcept {
private String schemaDefinition;
/**
- * The default constructor creates a context schema with a null artifact key. The flavour of the
- * context album is set as {@link SCHEMA_FLAVOUR_UNDEFINED} and the schema itself is defined as
- * an empty string.
+ * The default constructor creates a context schema with a null artifact key. The flavour of the context album is
+ * set as {@link SCHEMA_FLAVOUR_UNDEFINED} and the schema itself is defined as an empty string.
*/
public AxContextSchema() {
this(new AxArtifactKey());
@@ -112,7 +109,7 @@ public class AxContextSchema extends AxConcept {
/**
* Copy constructor
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxContextSchema(final AxContextSchema copyConcept) {
@@ -120,9 +117,8 @@ public class AxContextSchema extends AxConcept {
}
/**
- * The key constructor creates a context schema with the given artifact key. The flavour of the
- * context album is set as {@link SCHEMA_FLAVOUR_UNDEFINED} and the schema itself is defined as
- * an empty string.
+ * The key constructor creates a context schema with the given artifact key. The flavour of the context album is set
+ * as {@link SCHEMA_FLAVOUR_UNDEFINED} and the schema itself is defined as an empty string.
*
* @param key the key
*/
@@ -151,7 +147,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
*/
@Override
public AxArtifactKey getKey() {
@@ -161,7 +157,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
*/
@Override
public List<AxKey> getKeys() {
@@ -218,7 +214,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.
* basicmodel.concepts.AxValidationResult)
*/
@Override
@@ -256,7 +252,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
*/
@Override
public void clean() {
@@ -268,7 +264,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
*/
@Override
public String toString() {
@@ -288,7 +284,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
@@ -309,7 +305,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
*/
@Override
public int hashCode() {
@@ -324,7 +320,7 @@ public class AxContextSchema extends AxConcept {
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) {
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchemas.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java
index b4a7e4ada..df94a87a9 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchemas.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import java.util.List;
import java.util.Map;
@@ -40,33 +40,31 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxConceptGetter;
-import org.onap.apex.model.basicmodel.concepts.AxConceptGetterImpl;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationMessage;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetterImpl;
+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.utilities.Assertions;
/**
- * This class is a context schema container and holds a map of the context schemas for an entire
- * Apex model. All Apex models that use context schemas must have an {@link AxContextSchemas} field.
- * The {@link AxContextSchemas} class implements the helper methods of the {@link AxConceptGetter}
- * interface to allow {@link AxContextSchema} instances to be retrieved by calling methods directly
- * on this class without referencing the contained map.
+ * This class is a context schema container and holds a map of the context schemas for an entire Apex model. All Apex
+ * models that use context schemas must have an {@link AxContextSchemas} field. The {@link AxContextSchemas} class
+ * implements the helper methods of the {@link AxConceptGetter} interface to allow {@link AxContextSchema} instances to
+ * be retrieved by calling methods directly on this class without referencing the contained map.
* <p>
- * Validation checks that the container key is not null. An error is issued if no context schemas
- * are defined in the container. Each context schema entry is checked to ensure that its key and
- * value are not null and that the key matches the key in the map value. Each context schema entry
- * is then validated individually.
+ * Validation checks that the container key is not null. An error is issued if no context schemas are defined in the
+ * container. Each context schema entry is checked to ensure that its key and value are not null and that the key
+ * matches the key in the map value. Each context schema entry is then validated individually.
*/
@Entity
@Table(name = "AxContextSchemas")
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AxContextSchemas", namespace = "http://www.ericsson.com/apex", propOrder = {"key", "schemas"})
+@XmlType(name = "AxContextSchemas", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "key", "schemas" })
public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxContextSchema> {
private static final long serialVersionUID = -3203734282886453582L;
@@ -87,8 +85,8 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
// @formatter:on
/**
- * The Default Constructor creates a {@link AxContextSchemas} object with a null artifact key
- * and creates an empty context schemas map.
+ * The Default Constructor creates a {@link AxContextSchemas} object with a null artifact key and creates an empty
+ * context schemas map.
*/
public AxContextSchemas() {
this(new AxArtifactKey());
@@ -96,7 +94,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/**
* Copy constructor
- *
+ *
* @param copyConcept the concept to copy from
*/
public AxContextSchemas(final AxContextSchemas copyConcept) {
@@ -104,8 +102,8 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
}
/**
- * The Key Constructor creates a {@link AxContextSchemas} object with the given artifact key and
- * creates an empty context schemas map.
+ * The Key Constructor creates a {@link AxContextSchemas} object with the given artifact key and creates an empty
+ * context schemas map.
*
* @param key the key of the context album container
*/
@@ -130,10 +128,9 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
}
/**
- * When a model is unmarshalled from disk or from the database, the context schema map is
- * returned as a raw hash map. This method is called by JAXB after unmarshaling and is used to
- * convert the hash map to a {@link NavigableMap} so that it will work with the
- * {@link AxConceptGetter} interface.
+ * When a model is unmarshalled from disk or from the database, the context schema map is returned as a raw hash
+ * map. This method is called by JAXB after unmarshaling and is used to convert the hash map to a
+ * {@link NavigableMap} so that it will work with the {@link AxConceptGetter} interface.
*
* @param u the unmarshaler that is unmarshaling the model
* @param parent the parent object of this object in the unmarshaler
@@ -149,7 +146,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
*/
@Override
public AxArtifactKey getKey() {
@@ -159,7 +156,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
*/
@Override
public List<AxKey> getKeys() {
@@ -203,7 +200,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.
* basicmodel.concepts.AxValidationResult)
*/
@Override
@@ -246,7 +243,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
*/
@Override
public void clean() {
@@ -260,7 +257,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
*/
@Override
public String toString() {
@@ -278,7 +275,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.
* basicmodel.concepts.AxConcept)
*/
@Override
@@ -304,7 +301,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
*/
@Override
public int hashCode() {
@@ -318,7 +315,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) {
@@ -370,7 +367,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(com.ericsson.apex.core.
+ * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.core.
* basicmodel.concepts.AxArtifactKey)
*/
@Override
@@ -381,7 +378,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
+ * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
*/
@Override
public AxContextSchema get(final String conceptKeyName) {
@@ -391,8 +388,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang.String,
- * java.lang.String)
+ * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang.String, java.lang.String)
*/
@Override
public AxContextSchema get(final String conceptKeyName, final String conceptKeyVersion) {
@@ -403,7 +399,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
+ * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
*/
@Override
public Set<AxContextSchema> getAll(final String conceptKeyName) {
@@ -413,8 +409,7 @@ public class AxContextSchemas extends AxConcept implements AxConceptGetter<AxCon
/*
* (non-Javadoc)
*
- * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String,
- * java.lang.String)
+ * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String, java.lang.String)
*/
@Override
public Set<AxContextSchema> getAll(final String conceptKeyName, final String conceptKeyVersion) {
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/package-info.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/package-info.java
index f89f2f803..a7aa3a5ad 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/package-info.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/package-info.java
@@ -5,23 +5,24 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
/**
- * Contains the concepts required to manage context in APEX. It defines the main APEX concepts of
- * Context Schemas and Context Albums.
- *
+ * Contains the concepts required to manage context in APEX. It defines the main APEX concepts of Context Schemas and
+ * Context Albums.
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-package org.onap.apex.model.contextmodel.concepts;
+
+package org.onap.policy.apex.model.contextmodel.concepts;
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/ContextComparer.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparer.java
index 8d654be74..7a5ebfd22 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/ContextComparer.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparer.java
@@ -18,13 +18,13 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.handling;
+package org.onap.policy.apex.model.contextmodel.handling;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbums;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchema;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
import org.onap.policy.apex.model.utilities.comparison.KeyedMapComparer;
import org.onap.policy.apex.model.utilities.comparison.KeyedMapDifference;
diff --git a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/package-info.java b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/package-info.java
index bfc44f7e0..ec1fa893f 100644
--- a/model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/package-info.java
+++ b/model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/package-info.java
@@ -24,4 +24,4 @@
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-package org.onap.apex.model.contextmodel.handling;
+package org.onap.policy.apex.model.contextmodel.handling;
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModelCreator.java b/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModelCreator.java
deleted file mode 100644
index b53d8d04d..000000000
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModelCreator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.apex.model.contextmodel.handling;
-
-import java.util.UUID;
-
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.apex.model.basicmodel.test.TestApexModelCreator;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbums;
-import org.onap.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchema;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchemas;
-
-public class TestApexContextModelCreator implements TestApexModelCreator<AxContextModel> {
-
- @Override
- public AxContextModel getModel() {
- final AxContextSchema schema0 = new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java", "com.ericsson.apex.concept.TestContextItem000");
- final AxContextSchema schema1 = new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java", "com.ericsson.apex.concept.TestContextItem00A");
-
- final AxContextSchemas contextSchemas = new AxContextSchemas(new AxArtifactKey("ContextSchemas", "0.0.1"));
- contextSchemas.getSchemasMap().put(schema0.getKey(), schema0);
- contextSchemas.getSchemasMap().put(schema1.getKey(), schema1);
-
- final AxContextAlbum contextAlbum0 = new AxContextAlbum(new AxArtifactKey("contextAlbum0", "0.0.1"), "APPLICATION", true, schema0.getKey());
- final AxContextAlbum contextAlbum1 = new AxContextAlbum(new AxArtifactKey("contextAlbum1", "0.0.1"), "GLOBAL" , false, schema1.getKey());
-
- final AxContextAlbums axContext = new AxContextAlbums(new AxArtifactKey("contextAlbums", "0.0.1"));
- axContext.getAlbumsMap().put(contextAlbum0.getKey(), contextAlbum0);
- axContext.getAlbumsMap().put(contextAlbum1.getKey(), contextAlbum1);
-
- final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
- final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"), contextSchemas, axContext, keyInformation);
-
- contextModel.setKeyInformation(keyInformation);
- contextModel.getKeyInformation().getKeyInfoMap().put(schema0 .getKey(), new AxKeyInfo(schema0 .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000001"), "axContextSchema0"));
- contextModel.getKeyInformation().getKeyInfoMap().put(schema1 .getKey(), new AxKeyInfo(schema1 .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000002"), "axContextSchema1"));
- contextModel.getKeyInformation().getKeyInfoMap().put(contextSchemas.getKey(), new AxKeyInfo(contextSchemas.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000003"), "ContextSchemas"));
- contextModel.getKeyInformation().getKeyInfoMap().put(contextAlbum0 .getKey(), new AxKeyInfo(contextAlbum0 .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000004"), "contextAlbum0"));
- contextModel.getKeyInformation().getKeyInfoMap().put(contextAlbum1 .getKey(), new AxKeyInfo(contextAlbum1 .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000005"), "contextAlbum1"));
- contextModel.getKeyInformation().getKeyInfoMap().put(axContext .getKey(), new AxKeyInfo(axContext .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000006"), "axContext"));
- contextModel.getKeyInformation().getKeyInfoMap().put(contextModel .getKey(), new AxKeyInfo(contextModel .getKey(), UUID.fromString("00000000-0000-0000-0000-000000000007"), "contextModel"));
- contextModel.getKeyInformation().getKeyInfoMap().put(keyInformation.getKey(), new AxKeyInfo(keyInformation.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000008"), "keyInformation"));
-
- return contextModel;
- }
-
- @Override
- public AxContextModel getInvalidModel() {
- final AxContextModel contextModel = getModel();
-
- contextModel.getAlbums().get(new AxArtifactKey("contextAlbum0", "0.0.1")).setScope("UNDEFINED");
-
- contextModel.getSchemas().get(new AxArtifactKey("StringType", "0.0.1")).setSchema("");
-
- return contextModel;
- }
-
- public AxContextModel getMalstructuredModel() {
- final AxContextModel contextModel = getModel();
-
- contextModel.getAlbums().get(new AxArtifactKey("contextAlbum1", "0.0.1")).setKey(new AxArtifactKey("contextAlbum1", "0.0.2"));;
- contextModel.getSchemas().get(new AxArtifactKey("MapType", "0.0.1")).setKey(new AxArtifactKey("MapType", "0.0.2"));;
-
- return contextModel;
- }
-
- @Override
- public AxContextModel getObservationModel() {
- final AxContextModel contextModel = getModel();
-
- contextModel.getKeyInformation().get("contextAlbum1", "0.0.1").setDescription("");
-
- return contextModel;
- }
-
- @Override
- public AxContextModel getWarningModel() {
- final AxContextModel contextModel = getModel();
-
- contextModel.getKeyInformation().get("contextAlbum1", "0.0.1").setUuid(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- return contextModel;
- }
-}
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextAlbums.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
index 476cda9a3..710c44e5b 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextAlbums.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -28,11 +28,11 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbums;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+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.contextmodel.concepts.AxContextAlbum;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
/**
* @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextModel.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextModel.java
index cab40f316..163e50018 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextModel.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextModel.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -27,11 +27,11 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbums;
-import org.onap.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
/**
* @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextSchemas.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
index 1e81c5a95..e9e9564ac 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextSchemas.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.concepts;
+package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -28,11 +28,11 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchema;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+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.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
/**
* @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModel.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java
index 0723a6827..477755ccc 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModel.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java
@@ -5,20 +5,20 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.handling;
+package org.onap.policy.apex.model.contextmodel.handling;
import static org.junit.Assert.assertTrue;
@@ -29,10 +29,10 @@ import java.sql.DriverManager;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
-import org.onap.apex.model.basicmodel.test.TestApexModel;
-import org.onap.apex.model.contextmodel.concepts.AxContextModel;
+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.test.TestApexModel;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
public class TestApexContextModel {
private Connection connection;
@@ -95,7 +95,7 @@ public class TestApexContextModel {
@Test
public void testModelWriteReadJPA() throws Exception {
final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
daoParameters.setPersistenceUnit("DAOTest");
testApexModel.testApexModelWriteReadJPA(daoParameters);
@@ -103,25 +103,25 @@ public class TestApexContextModel {
private static final String VALID_MODEL_STRING = "***validation of model successful***";
- private static final String OBSERVATION_MODEL_STRING =
- "\n" + "***observations noted during validation of model***\n"
- + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxKeyInfo:OBSERVATION:description is blank\n"
- + "********************************";
+ private static final String OBSERVATION_MODEL_STRING = "\n"
+ + "***observations noted during validation of model***\n"
+ + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:OBSERVATION:description is blank\n"
+ + "********************************";
private static final String WARNING_MODEL_STRING = "\n" + "***warnings issued during validation of model***\n"
- + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxKeyInfo:WARNING:UUID is a zero UUID: 00000000-0000-0000-0000-000000000000\n"
+ + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:WARNING:UUID is a zero UUID: 00000000-0000-0000-0000-000000000000\n"
+ "********************************";
private static final String INVALID_MODEL_STRING = "\n" + "***validation of model failed***\n"
- + "AxArtifactKey:(name=StringType,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextSchema:INVALID:no schemaDefinition specified, schemaDefinition may not be blank\n"
- + "AxArtifactKey:(name=contextAlbum0,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n"
+ + "AxArtifactKey:(name=StringType,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema:INVALID:no schemaDefinition specified, schemaDefinition may not be blank\n"
+ + "AxArtifactKey:(name=contextAlbum0,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n"
+ "********************************";
private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n"
- + "AxArtifactKey:(name=ContextModel,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextModel:INVALID:key information not found for key AxArtifactKey:(name=contextAlbum1,version=0.0.2)\n"
- + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextModel:WARNING:key not found for key information entry\n"
- + "AxArtifactKey:(name=ContextSchemas,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextSchemas:INVALID:key on schemas entry AxArtifactKey:(name=MapType,version=0.0.1) does not equal entry key AxArtifactKey:(name=MapType,version=0.0.2)\n"
- + "AxArtifactKey:(name=contextAlbums,version=0.0.1):org.onap.apex.model.contextmodel.concepts.AxContextAlbums:INVALID:key on context album entry key AxArtifactKey:(name=contextAlbum1,version=0.0.1) does not equal context album value key AxArtifactKey:(name=contextAlbum1,version=0.0.2)\n"
+ + "AxArtifactKey:(name=ContextModel,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextModel:INVALID:key information not found for key AxArtifactKey:(name=contextAlbum1,version=0.0.2)\n"
+ + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextModel:WARNING:key not found for key information entry\n"
+ + "AxArtifactKey:(name=ContextSchemas,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas:INVALID:key on schemas entry AxArtifactKey:(name=MapType,version=0.0.1) does not equal entry key AxArtifactKey:(name=MapType,version=0.0.2)\n"
+ + "AxArtifactKey:(name=contextAlbums,version=0.0.1):org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums:INVALID:key on context album entry key AxArtifactKey:(name=contextAlbum1,version=0.0.1) does not equal context album value key AxArtifactKey:(name=contextAlbum1,version=0.0.2)\n"
+ "********************************";
}
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java
new file mode 100644
index 000000000..4e8d8d5a9
--- /dev/null
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModelCreator.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.model.contextmodel.handling;
+
+import java.util.UUID;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
+
+public class TestApexContextModelCreator implements TestApexModelCreator<AxContextModel> {
+
+ @Override
+ public AxContextModel getModel() {
+ final AxContextSchema schema0 = new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java",
+ "org.onap.policy.apex.concept.TestContextItem000");
+ final AxContextSchema schema1 = new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java",
+ "org.onap.policy.apex.concept.TestContextItem00A");
+
+ final AxContextSchemas contextSchemas = new AxContextSchemas(new AxArtifactKey("ContextSchemas", "0.0.1"));
+ contextSchemas.getSchemasMap().put(schema0.getKey(), schema0);
+ contextSchemas.getSchemasMap().put(schema1.getKey(), schema1);
+
+ final AxContextAlbum contextAlbum0 =
+ new AxContextAlbum(new AxArtifactKey("contextAlbum0", "0.0.1"), "APPLICATION", true, schema0.getKey());
+ final AxContextAlbum contextAlbum1 =
+ new AxContextAlbum(new AxArtifactKey("contextAlbum1", "0.0.1"), "GLOBAL", false, schema1.getKey());
+
+ final AxContextAlbums axContext = new AxContextAlbums(new AxArtifactKey("contextAlbums", "0.0.1"));
+ axContext.getAlbumsMap().put(contextAlbum0.getKey(), contextAlbum0);
+ axContext.getAlbumsMap().put(contextAlbum1.getKey(), contextAlbum1);
+
+ final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+ final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"),
+ contextSchemas, axContext, keyInformation);
+
+ contextModel.setKeyInformation(keyInformation);
+ contextModel.getKeyInformation().getKeyInfoMap().put(schema0.getKey(), new AxKeyInfo(schema0.getKey(),
+ UUID.fromString("00000000-0000-0000-0000-000000000001"), "axContextSchema0"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(schema1.getKey(), new AxKeyInfo(schema1.getKey(),
+ UUID.fromString("00000000-0000-0000-0000-000000000002"), "axContextSchema1"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(contextSchemas.getKey(), new AxKeyInfo(
+ contextSchemas.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000003"), "ContextSchemas"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(contextAlbum0.getKey(), new AxKeyInfo(
+ contextAlbum0.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000004"), "contextAlbum0"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(contextAlbum1.getKey(), new AxKeyInfo(
+ contextAlbum1.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000005"), "contextAlbum1"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(axContext.getKey(), new AxKeyInfo(axContext.getKey(),
+ UUID.fromString("00000000-0000-0000-0000-000000000006"), "axContext"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(contextModel.getKey(), new AxKeyInfo(contextModel.getKey(),
+ UUID.fromString("00000000-0000-0000-0000-000000000007"), "contextModel"));
+ contextModel.getKeyInformation().getKeyInfoMap().put(keyInformation.getKey(), new AxKeyInfo(
+ keyInformation.getKey(), UUID.fromString("00000000-0000-0000-0000-000000000008"), "keyInformation"));
+
+ return contextModel;
+ }
+
+ @Override
+ public AxContextModel getInvalidModel() {
+ final AxContextModel contextModel = getModel();
+
+ contextModel.getAlbums().get(new AxArtifactKey("contextAlbum0", "0.0.1")).setScope("UNDEFINED");
+
+ contextModel.getSchemas().get(new AxArtifactKey("StringType", "0.0.1")).setSchema("");
+
+ return contextModel;
+ }
+
+ @Override
+ public AxContextModel getMalstructuredModel() {
+ final AxContextModel contextModel = getModel();
+
+ contextModel.getAlbums().get(new AxArtifactKey("contextAlbum1", "0.0.1"))
+ .setKey(new AxArtifactKey("contextAlbum1", "0.0.2"));;
+ contextModel.getSchemas().get(new AxArtifactKey("MapType", "0.0.1"))
+ .setKey(new AxArtifactKey("MapType", "0.0.2"));;
+
+ return contextModel;
+ }
+
+ @Override
+ public AxContextModel getObservationModel() {
+ final AxContextModel contextModel = getModel();
+
+ contextModel.getKeyInformation().get("contextAlbum1", "0.0.1").setDescription("");
+
+ return contextModel;
+ }
+
+ @Override
+ public AxContextModel getWarningModel() {
+ final AxContextModel contextModel = getModel();
+
+ contextModel.getKeyInformation().get("contextAlbum1", "0.0.1")
+ .setUuid(UUID.fromString("00000000-0000-0000-0000-000000000000"));
+
+ return contextModel;
+ }
+}
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparison.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparison.java
index fe87509b9..794cfa9f7 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparison.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparison.java
@@ -18,18 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.handling;
+package org.onap.policy.apex.model.contextmodel.handling;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchema;
-import org.onap.apex.model.contextmodel.handling.ContextComparer;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.handling.ContextComparer;
import org.onap.policy.apex.model.utilities.comparison.KeyedMapDifference;
/**
diff --git a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparisonFactory.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java
index 1850c222d..2c6f8e172 100644
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparisonFactory.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java
@@ -5,48 +5,52 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.apex.model.contextmodel.handling;
+package org.onap.policy.apex.model.contextmodel.handling;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
/**
* This class creates sample Policy Models
- *
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestContextComparisonFactory {
public AxContextModel getFullModel() {
- final AxContextSchema testContextSchema000 = new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema000");
- final AxContextSchema testContextSchema00A = new AxContextSchema(new AxArtifactKey("TestContextSchema00A", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema00A");
- final AxContextSchema testContextSchema00C = new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema00C");
-
- final AxContextAlbum externalContextAlbum = new AxContextAlbum(new AxArtifactKey("ExternalContextAlbum", "0.0.1"), "EXTERNAL", false,
- testContextSchema000.getKey());
- final AxContextAlbum globalContextAlbum = new AxContextAlbum(new AxArtifactKey("GlobalContextAlbum", "0.0.1"), "GLOBAL", true, testContextSchema00A.getKey());
- final AxContextAlbum policy0ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy0ContextAlbum", "0.0.1"), "APPLICATION", true,
- testContextSchema00C.getKey());
- final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true,
- testContextSchema00C.getKey());
+ final AxContextSchema testContextSchema000 =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema000");
+ final AxContextSchema testContextSchema00A =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema00A", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema00A");
+ final AxContextSchema testContextSchema00C =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema00C");
+
+ final AxContextAlbum externalContextAlbum = new AxContextAlbum(
+ new AxArtifactKey("ExternalContextAlbum", "0.0.1"), "EXTERNAL", false, testContextSchema000.getKey());
+ final AxContextAlbum globalContextAlbum = new AxContextAlbum(new AxArtifactKey("GlobalContextAlbum", "0.0.1"),
+ "GLOBAL", true, testContextSchema00A.getKey());
+ final AxContextAlbum policy0ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy0ContextAlbum", "0.0.1"),
+ "APPLICATION", true, testContextSchema00C.getKey());
+ final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(
+ new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true, testContextSchema00C.getKey());
final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
@@ -66,12 +70,15 @@ public class TestContextComparisonFactory {
}
public AxContextModel getShellModel() {
- final AxContextSchema testContextSchema000 = new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema000");
- final AxContextSchema testContextSchema00A = new AxContextSchema(new AxArtifactKey("TestContextSchema00A", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema00A");
- final AxContextSchema testContextSchema00C = new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema00C");
+ final AxContextSchema testContextSchema000 =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema000");
+ final AxContextSchema testContextSchema00A =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema00A", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema00A");
+ final AxContextSchema testContextSchema00C =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema00C");
final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
@@ -82,11 +89,12 @@ public class TestContextComparisonFactory {
}
public AxContextModel getSingleEntryModel() {
- final AxContextSchema testContextSchema000 = new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema000");
+ final AxContextSchema testContextSchema000 =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema000");
- final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true,
- testContextSchema000.getKey());
+ final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(
+ new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true, testContextSchema000.getKey());
final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
@@ -97,17 +105,19 @@ public class TestContextComparisonFactory {
}
public AxContextModel getNoGlobalContextModel() {
- final AxContextSchema testContextSchema000 = new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema000");
- final AxContextSchema testContextSchema00C = new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
- "com.ericsson.apex.concept.TestContextSchema00C");
-
- final AxContextAlbum externalContextAlbum = new AxContextAlbum(new AxArtifactKey("ExternalContextAlbum", "0.0.1"), "EXTERNAL", false,
- testContextSchema000.getKey());
- final AxContextAlbum policy0ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy0ContextAlbum", "0.0.1"), "APPLICATION", true,
- testContextSchema00C.getKey());
- final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true,
- testContextSchema00C.getKey());
+ final AxContextSchema testContextSchema000 =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema000");
+ final AxContextSchema testContextSchema00C =
+ new AxContextSchema(new AxArtifactKey("TestContextSchema00C", "0.0.1"), "JAVA",
+ "org.onap.policy.apex.concept.TestContextSchema00C");
+
+ final AxContextAlbum externalContextAlbum = new AxContextAlbum(
+ new AxArtifactKey("ExternalContextAlbum", "0.0.1"), "EXTERNAL", false, testContextSchema000.getKey());
+ final AxContextAlbum policy0ContextAlbum = new AxContextAlbum(new AxArtifactKey("Policy0ContextAlbum", "0.0.1"),
+ "APPLICATION", true, testContextSchema00C.getKey());
+ final AxContextAlbum policy1ContextAlbum = new AxContextAlbum(
+ new AxArtifactKey("Policy1ContextAlbum ", "0.0.1"), "APPLICATION", true, testContextSchema00C.getKey());
final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
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 d9203b4be..ec9357851 100644
--- a/model/context-model/src/test/resources/META-INF/persistence.xml
+++ b/model/context-model/src/test/resources/META-INF/persistence.xml
@@ -23,19 +23,19 @@
<persistence-unit name="DAOTest" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.onap.apex.model.basicmodel.dao.converters.CDATAConditioner</class>
- <class>org.onap.apex.model.basicmodel.dao.converters.UUID2String</class>
- <class>org.onap.apex.model.basicmodel.concepts.AxArtifactKey</class>
- <class>org.onap.apex.model.basicmodel.concepts.AxConcept</class>
- <class>org.onap.apex.model.basicmodel.concepts.AxKeyInfo</class>
- <class>org.onap.apex.model.basicmodel.concepts.AxKeyInformation</class>
- <class>org.onap.apex.model.basicmodel.concepts.AxModel</class>
- <class>org.onap.apex.model.basicmodel.concepts.TestEntity</class>
- <class>org.onap.apex.model.contextmodel.concepts.AxContextSchema</class>
- <class>org.onap.apex.model.contextmodel.concepts.AxContextSchemas</class>
- <class>org.onap.apex.model.contextmodel.concepts.AxContextAlbum</class>
- <class>org.onap.apex.model.contextmodel.concepts.AxContextAlbums</class>
- <class>org.onap.apex.model.contextmodel.concepts.AxContextModel</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>
+ <class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation</class>
+ <class>org.onap.policy.apex.model.basicmodel.concepts.AxModel</class>
+ <class>org.onap.policy.apex.model.basicmodel.concepts.TestEntity</class>
+ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema</class>
+ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas</class>
+ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum</class>
+ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums</class>
+ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextModel</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
diff --git a/model/context-model/src/test/resources/json/ContextModel.json b/model/context-model/src/test/resources/json/ContextModel.json
index cbaabc63b..2c93ef1c2 100644
--- a/model/context-model/src/test/resources/json/ContextModel.json
+++ b/model/context-model/src/test/resources/json/ContextModel.json
@@ -85,7 +85,7 @@
"name" : "StringType",
"version" : "0.0.1"
},
- "javaType" : "com.ericsson.apex.core.contextmodel.concepts.TestContextItem000"
+ "javaType" : "org.onap.policy.apex.core.contextmodel.concepts.TestContextItem000"
},
"isWritable" : true,
"valueString" : ""
@@ -96,7 +96,7 @@
"name" : "MapType",
"version" : "0.0.1"
},
- "javaType" : "com.ericsson.apex.core.contextmodel.concepts.TestContextItem00A"
+ "javaType" : "org.onap.policy.apex.core.contextmodel.concepts.TestContextItem00A"
},
"isWritable" : true,
"valueString" : ""
@@ -107,7 +107,7 @@
"name" : "StringType",
"version" : "0.0.1"
},
- "javaType" : "com.ericsson.apex.core.contextmodel.concepts.TestContextItem000"
+ "javaType" : "org.onap.policy.apex.core.contextmodel.concepts.TestContextItem000"
},
"isWritable" : true,
"valueString" : ""
@@ -118,7 +118,7 @@
"name" : "MapType",
"version" : "0.0.1"
},
- "javaType" : "com.ericsson.apex.core.contextmodel.concepts.TestContextItem00A"
+ "javaType" : "org.onap.policy.apex.core.contextmodel.concepts.TestContextItem00A"
},
"isWritable" : true,
"valueString" : ""
@@ -141,7 +141,7 @@
"name" : "MapType",
"version" : "0.0.1"
},
- "javaType" : "com.ericsson.apex.core.contextmodel.concepts.TestContextItem00A"
+ "javaType" : "org.onap.policy.apex.core.contextmodel.concepts.TestContextItem00A"
},
"isWritable" : true
},
diff --git a/model/context-model/src/test/resources/logback-test.xml b/model/context-model/src/test/resources/logback-test.xml
index 07bc02591..628f02397 100644
--- a/model/context-model/src/test/resources/logback-test.xml
+++ b/model/context-model/src/test/resources/logback-test.xml
@@ -40,7 +40,7 @@
<appender-ref ref="STDOUT" />
</logger>
- <logger name="com.ericsson.apex.core.contextmodel" level="TRACE" additivity="false">
+ <logger name="org.onap.policy.apex.core.contextmodel" level="TRACE" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
@@ -48,7 +48,7 @@
<appender-ref ref="STDOUT" />
</logger>
- <logger name="com.ericsson.apex.core" level="TRACE" additivity="false">
+ <logger name="org.onap.policy.apex.core" level="TRACE" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
@@ -68,11 +68,11 @@
</encoder>
</appender>
- <logger name="com.ericsson.apex.core.context.impl.monitoring" level="TRACE" additivity="false">
+ <logger name="org.onap.policy.apex.core.context.impl.monitoring" level="TRACE" additivity="false">
<appender-ref ref="CTXT_FILE" />
</logger>
- <logger name="com.ericsson.apex.core.context" level="INFO" additivity="false">
+ <logger name="org.onap.policy.apex.core.context" level="INFO" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
</configuration>