diff --git a/.gitignore b/.gitignore
index 236c0b3..3a97353 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 target
 .metadata/
 /bin/
+derby.log
diff --git a/model/basic-model/pom.xml b/model/basic-model/pom.xml
index cedb576..d663f92 100644
--- a/model/basic-model/pom.xml
+++ b/model/basic-model/pom.xml
@@ -43,12 +43,6 @@
             <artifactId>eclipselink</artifactId>
             <version>2.6.2</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
-            <version>10.13.1.1</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
@@ -64,10 +58,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.basicmodel.concepts.AxModel</argument>
+                                <argument>org.onap.policy.apex.model.basicmodel.concepts.AxModel</argument>
                                 <argument>${project.build.directory}/model/xml/apex-basic-model.xsd</argument>
                             </arguments>
                         </configuration>
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxArtifactKey.java b/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxArtifactKey.java
deleted file mode 100644
index 1de7ae7..0000000
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxArtifactKey.java
+++ /dev/null
@@ -1,376 +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.basicmodel.concepts;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-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.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.utilities.Assertions;
-
-/**
- * An artifact key uniquely identifies every first order entity in the system. Every first order concept in the system must have
- * an {@link AxArtifactKey} to identify it. Concepts that are wholly contained in another concept are identified using
- * a {@link AxReferenceKey} key.
- * <p>
- * Key validation checks that the name and version fields match the {@link NAME_REGEXP} and {@link VERSION_REGEXP} regular expressions respectively.
- */
-@Embeddable
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "apexArtifactKey", namespace = "http://www.ericsson.com/apex")
-
-@XmlType(name = "AxArtifactKey", namespace = "http://www.ericsson.com/apex", propOrder = { "name", "version" })
-
-public class AxArtifactKey extends AxKey {
-	private static final long serialVersionUID = 8932717618579392561L;
-
-	private static final String NAME_TOKEN = "name";
-	private static final String VERSION_TOKEN = "version";
-
-	@Column(name = NAME_TOKEN)
-	@XmlElement(required = true)
-	private String name;
-
-	@Column(name = VERSION_TOKEN)
-	@XmlElement(required = true)
-	private String version;
-
-	/**
-	 * The default constructor creates a null artifact key.
-	 */
-	public AxArtifactKey() {
-		this(NULL_KEY_NAME, NULL_KEY_VERSION);
-	}
-
-    /**
-     * Copy constructor
-     * @param copyConcept the concept to copy from
-     */
-    public AxArtifactKey(final AxArtifactKey copyConcept) {
-    		super(copyConcept);
-    }
-    
-	/**
-	 * Constructor to create a key with the specified name and version.
-	 *
-	 * @param name the key name
-	 * @param version the key version
-	 */
-	public AxArtifactKey(final String name, final String version) {
-		super();
-		this.name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
-		this.version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
-	}
-
-	/**
-	 * Constructor to create a key using the key and version from the specified key ID.
-	 *
-	 * @param id the key ID in a format that respects the {@link KEY_ID_REGEXP}
-	 */
-	public AxArtifactKey(final String id) {
-		Assertions.argumentNotNull(id, "id may not be null");
-
-		// Check the incoming ID is valid
-		Assertions.validateStringParameter("id", id, KEY_ID_REGEXP);
-
-		// Split on colon, if the id passes the regular expression test above
-		// it'll have just one colon separating the name and version
-		// No need for range checks or size checks on the array
-		final String[] nameVersionArray = id.split(":");
-
-		// Return the new key
-		name = Assertions.validateStringParameter(NAME_TOKEN, nameVersionArray[0], NAME_REGEXP);
-		version = Assertions.validateStringParameter(VERSION_TOKEN, nameVersionArray[1], VERSION_REGEXP);
-	}
-
-	/**
-	 * Get a null artifact key.
-	 *
-	 * @return a null artifact key
-	 */
-	public static final AxArtifactKey getNullKey() {
-		return new AxArtifactKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
-	 */
-	@Override
-	public AxArtifactKey getKey() {
-		return this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
-	 */
-	@Override
-	public List<AxKey> getKeys() {
-		final List<AxKey> keyList = new ArrayList<>();
-		keyList.add(getKey());
-		return keyList;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getID()
-	 */
-	@Override
-	public String getID() {
-		return name + ':' + version;
-	}
-
-	/**
-	 * Gets the key name.
-	 *
-	 * @return the key name
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * Sets the key name.
-	 *
-	 * @param name the key name
-	 */
-	public void setName(final String name) {
-		this.name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
-	}
-
-	/**
-	 * Gets the key version.
-	 *
-	 * @return the key version
-	 */
-	public String getVersion() {
-		return version;
-	}
-
-	/**
-	 * Sets the key version.
-	 *
-	 * @param version the key version
-	 */
-	public void setVersion(final String version) {
-		this.version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getCompatibility(com. ericsson.apex.model.basicmodel.concepts.AxKey)
-	 */
-	@Override
-	public AxKey.Compatibility getCompatibility(final AxKey otherKey) {
-		if (!(otherKey instanceof AxArtifactKey)) {
-			return Compatibility.DIFFERENT;
-		}
-		final AxArtifactKey otherArtifactKey = (AxArtifactKey) otherKey;
-
-		if (this.equals(otherArtifactKey)) {
-			return Compatibility.IDENTICAL;
-		}
-		if (!this.getName().equals(otherArtifactKey.getName())) {
-			return Compatibility.DIFFERENT;
-		}
-
-		final String[] thisVersionArray = getVersion().split("\\.");
-		final String[] otherVersionArray = otherArtifactKey.getVersion().split("\\.");
-
-		// There must always be at least one element in each version
-		if (!thisVersionArray[0].equals(otherVersionArray[0])) {
-			return Compatibility.MAJOR;
-		}
-
-		if (thisVersionArray.length >= 2 && otherVersionArray.length >= 2 && !thisVersionArray[1].equals(otherVersionArray[1])) {
-			return Compatibility.MINOR;
-		}
-
-		return Compatibility.PATCH;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#isCompatible(com. ericsson.apex.model.basicmodel.concepts.AxKey)
-	 */
-	@Override
-	public boolean isCompatible(final AxKey otherKey) {
-		if (!(otherKey instanceof AxArtifactKey)) {
-			return false;
-		}
-		final AxArtifactKey otherArtifactKey = (AxArtifactKey) otherKey;
-
-		final Compatibility compatibility = this.getCompatibility(otherArtifactKey);
-
-		return !(compatibility == Compatibility.DIFFERENT || compatibility == Compatibility.MAJOR);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
-	 */
-	@Override
-	public AxValidationResult validate(final AxValidationResult result) {
-		try {
-			Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
-		}
-		catch (final IllegalArgumentException e) {
-			result.addValidationMessage(
-					new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "name invalid-" + e.getMessage()));
-		}
-
-		try {
-			Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
-		}
-		catch (final IllegalArgumentException e) {
-			result.addValidationMessage(
-					new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "version invalid-" + e.getMessage()));
-		}
-
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
-	 */
-	@Override
-	public void clean() {
-		name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
-		version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
-	 */
-	@Override
-	public String toString() {
-		final StringBuilder builder = new StringBuilder();
-		builder.append(this.getClass().getSimpleName());
-		builder.append(":(");
-		builder.append("name=");
-		builder.append(name);
-		builder.append(",version=");
-		builder.append(version);
-		builder.append(")");
-		return builder.toString();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
-		Assertions.argumentNotNull(target, "target may not be null");
-
-		final AxConcept copyObject = target;
-		Assertions.instanceOf(copyObject, AxArtifactKey.class);
-
-		final AxArtifactKey copy = ((AxArtifactKey) copyObject);
-		copy.setName(name);
-		copy.setVersion(version);
-
-		return copyObject;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
-	 */
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + name.hashCode();
-		result = prime * result + version.hashCode();
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang. Object)
-	 */
-	@Override
-	public boolean equals(final Object obj) {
-		if (obj == null) {
-			return false;
-		}
-		if (this == obj) {
-			return true;
-		}
-		if (getClass() != obj.getClass()) {
-			return false;
-		}
-
-		final AxArtifactKey other = (AxArtifactKey) obj;
-
-		if (!name.equals(other.name)) {
-			return false;
-		}
-		return version.equals(other.version);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see java.lang.Comparable#compareTo(java.lang.Object)
-	 */
-	@Override
-	public int compareTo(final AxConcept otherObj) {
-		Assertions.argumentNotNull(otherObj, "comparison object may not be null");
-
-		if (this == otherObj) {
-			return 0;
-		}
-		if (getClass() != otherObj.getClass()) {
-			return this.hashCode() - otherObj.hashCode();
-		}
-
-		final AxArtifactKey other = (AxArtifactKey) otherObj;
-
-		if (!name.equals(other.name)) {
-			return name.compareTo(other.name);
-		}
-		return version.compareTo(other.version);
-	}
-}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInformation.java b/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInformation.java
deleted file mode 100644
index 3082c4f..0000000
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInformation.java
+++ /dev/null
@@ -1,448 +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.basicmodel.concepts;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import javax.persistence.CascadeType;
-import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.Table;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAccessType;
-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.AxValidationResult.ValidationResult;
-import org.onap.policy.apex.model.utilities.Assertions;
-
-/**
- * The Class AxKeyInformation holds a map of the key information for the entire Apex model. All Apex models {@link AxModel} must have an
- * {@link AxKeyInformation} field. The {@link AxKeyInformation} class implements the helper methods of the {@link AxConceptGetter} interface to allow
- * {@link AxKeyInfo} instances to be retrieved by calling methods directly on this class without referencing the contained map.
- * <p>
- * Validation checks that the key is not null, that the key information map is not empty, that each key and value in the map is defined, that the key in each
- * map entry matches the key if each entry value, and that no duplicate UUIDs exist. Each key information entry is then validated individually.
- */
-@Entity
-@Table(name = "AxKeyInformation")
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AxKeyInformation", namespace = "http://www.ericsson.com/apex", propOrder = { "key", "keyInfoMap" })
-
-public class AxKeyInformation extends AxConcept implements AxConceptGetter<AxKeyInfo> {
-	private static final long serialVersionUID = -2746380769017043888L;
-
-	@EmbeddedId
-	@XmlElement(name = "key", required = true)
-	private AxArtifactKey key;
-
-	// @formatter:off
-	@ManyToMany(cascade = CascadeType.ALL)
-	@JoinTable(
-			joinColumns = {
-					@JoinColumn(name = "keyInfoMapName", referencedColumnName = "name"),
-					@JoinColumn(name = "keyInfoMapVersion", referencedColumnName = "version"),
-			},
-			inverseJoinColumns = {
-					@JoinColumn(name = "keyInfoName", referencedColumnName = "name"),
-					@JoinColumn(name = "keyInfoVersion", referencedColumnName = "version")
-			})
-	private Map<AxArtifactKey, AxKeyInfo> keyInfoMap;
-	// @formatter:on
-
-	/**
-	 * The Default Constructor creates this concept with a null key.
-	 */
-	public AxKeyInformation() {
-		this(new AxArtifactKey());
-	}
-
-    /**
-     * Copy constructor
-     * @param copyConcept the concept to copy from
-     */
-    public AxKeyInformation(final AxKeyInformation copyConcept) {
-    		super(copyConcept);
-    }
-    
-	/**
-	 * Constructor to create this concept with the specified key.
-	 *
-	 * @param key the key of the concept
-	 */
-	public AxKeyInformation(final AxArtifactKey key) {
-		this(key, new TreeMap<AxArtifactKey, AxKeyInfo>());
-	}
-
-	/**
-	 * Constructor to create this concept and set all its fields.
-	 *
-	 * @param key the key of the concept
-	 * @param keyInfoMap the key info map of the concept
-	 */
-	public AxKeyInformation(final AxArtifactKey key, final Map<AxArtifactKey, AxKeyInfo> keyInfoMap) {
-		super();
-		Assertions.argumentNotNull(key, "key may not be null");
-		Assertions.argumentNotNull(keyInfoMap, "keyInfoMap may not be null");
-
-		this.key = key;
-		this.keyInfoMap = new TreeMap<>();
-		this.keyInfoMap.putAll(keyInfoMap);
-	}
-
-	/**
-	 * When a model is unmarshalled from disk or from the database, the key information 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
-	 */
-	public void afterUnmarshal(final Unmarshaller u, final Object parent) {
-		// The map must be navigable to allow name and version searching,
-		// unmarshaling returns a hash map
-		final NavigableMap<AxArtifactKey, AxKeyInfo> navigablekeyInfoMap = new TreeMap<>();
-		navigablekeyInfoMap.putAll(keyInfoMap);
-		keyInfoMap = navigablekeyInfoMap;
-	}
-
-	/**
-	 * This method generates default key information for all keys found in the concept passed in as a parameter that do not already have key information.
-	 *
-	 * @param concept the concept for which to generate key information
-	 */
-	public void generateKeyInfo(final AxConcept concept) {
-		for (final AxKey axKey : concept.getKeys()) {
-			if (!(axKey instanceof AxArtifactKey)) {
-				continue;
-			}
-
-			final AxArtifactKey artifactKey = (AxArtifactKey) axKey;
-			if (!keyInfoMap.containsKey(artifactKey)) {
-				final AxKeyInfo keyInfo = new AxKeyInfo(artifactKey);
-				//generate a reproducible UUID
-				keyInfo.setUuid(AxKeyInfo.generateReproducibleUUID(keyInfo.getID() + keyInfo.getDescription()));
-				keyInfoMap.put(artifactKey, keyInfo);
-			}
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
-	 */
-	@Override
-	public AxArtifactKey getKey() {
-		return key;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKeys()
-	 */
-	@Override
-	public List<AxKey> getKeys() {
-		final List<AxKey> keyList = key.getKeys();
-		keyList.addAll(keyInfoMap.keySet());
-
-		return keyList;
-	}
-
-	/**
-	 * Sets the key of this concept.
-	 *
-	 * @param key the key of this concept
-	 */
-	public void setKey(final AxArtifactKey key) {
-		Assertions.argumentNotNull(key, "key may not be null");
-		this.key = key;
-	}
-
-	/**
-	 * Gets the key info map of this concept.
-	 *
-	 * @return the key info map of this concept
-	 */
-	public Map<AxArtifactKey, AxKeyInfo> getKeyInfoMap() {
-		return keyInfoMap;
-	}
-
-	/**
-	 * Sets the key info map of this concept.
-	 *
-	 * @param keyInfoMap the key info map of this concept
-	 */
-	public void setKeyInfoMap(final Map<AxArtifactKey, AxKeyInfo> keyInfoMap) {
-		Assertions.argumentNotNull(keyInfoMap, "keyInfoMap may not be null");
-		this.keyInfoMap = new TreeMap<>();
-		this.keyInfoMap.putAll(keyInfoMap);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
-	 */
-	@Override
-	public AxValidationResult validate(final AxValidationResult resultIn) {
-		AxValidationResult result = resultIn;
-
-		if (key.equals(AxArtifactKey.getNullKey())) {
-			result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
-		}
-
-		result = key.validate(result);
-
-		if (keyInfoMap.size() == 0) {
-			result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "keyInfoMap may not be empty"));
-		}
-		else {
-			final Set<UUID> uuidSet = new TreeSet<>();
-
-			for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry : keyInfoMap.entrySet()) {
-				result = validateKeyInfoEntry(keyInfoEntry, uuidSet, result);
-			}
-		}
-
-		return result;
-	}
-
-	/**
-	 * Validate an key information entry
-	 * @param keyInfoEntry the key information entry
-	 * @param uuidSet the set of UUIDs encountered in validation so far, the UUID of this entry is added to the set
-	 * @param result the validation result to append to
-	 * @return The validation result
-	 */
-	private AxValidationResult validateKeyInfoEntry(final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry, Set<UUID> uuidSet, AxValidationResult result) {
-		if (keyInfoEntry.getKey().equals(AxArtifactKey.getNullKey())) {
-			result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
-					"key on keyInfoMap entry " + keyInfoEntry.getKey() + " may not be the null key"));
-		}
-		else if (keyInfoEntry.getValue() == null) {
-			result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
-					"value on keyInfoMap entry " + keyInfoEntry.getKey() + " may not be null"));
-		}
-		else {
-			if (!keyInfoEntry.getKey().equals(keyInfoEntry.getValue().getKey())) {
-				result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
-						"key on keyInfoMap entry " + keyInfoEntry.getKey() + " does not equal entry key " + keyInfoEntry.getValue().getKey()));
-			}
-
-			result = keyInfoEntry.getValue().validate(result);
-
-			if (uuidSet.contains(keyInfoEntry.getValue().getUUID())) {
-				result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
-						"duplicate UUID found on keyInfoMap entry " + keyInfoEntry.getKey() + ":" + keyInfoEntry.getValue().getUUID()));
-			}
-			else {
-				uuidSet.add(keyInfoEntry.getValue().getUUID());
-			}
-		}
-		
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#clean()
-	 */
-	@Override
-	public void clean() {
-		key.clean();
-		for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry : keyInfoMap.entrySet()) {
-			keyInfoEntry.getKey().clean();
-			keyInfoEntry.getValue().clean();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#toString()
-	 */
-	@Override
-	public String toString() {
-		final StringBuilder builder = new StringBuilder();
-		builder.append(this.getClass().getSimpleName());
-		builder.append(":(");
-		builder.append("key=");
-		builder.append(key);
-		builder.append(",keyInfoMap=");
-		builder.append(keyInfoMap);
-		builder.append(")");
-		return builder.toString();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
-		Assertions.argumentNotNull(target, "target may not be null");
-
-		final Object copyObject = target;
-		Assertions.instanceOf(copyObject, AxKeyInformation.class);
-
-		final AxKeyInformation copy = ((AxKeyInformation) copyObject);
-		copy.setKey(new AxArtifactKey(key));
-		final Map<AxArtifactKey, AxKeyInfo> newKeyInfoMap = new TreeMap<>();
-		for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoMapEntry : keyInfoMap.entrySet()) {
-			newKeyInfoMap.put(new AxArtifactKey(keyInfoMapEntry.getKey()), new AxKeyInfo(keyInfoMapEntry.getValue()));
-		}
-		copy.setKeyInfoMap(newKeyInfoMap);
-
-		return copy;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#hashCode()
-	 */
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + key.hashCode();
-		result = prime * result + keyInfoMap.hashCode();
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#equals(java.lang. Object)
-	 */
-	@Override
-	public boolean equals(final Object obj) {
-		if (obj == null) {
-			return false;
-		}
-		if (this == obj) {
-			return true;
-		}
-
-		if (getClass() != obj.getClass()) {
-			return false;
-		}
-
-		final AxKeyInformation other = (AxKeyInformation) obj;
-		if (!key.equals(other.key)) {
-			return false;
-		}
-		return keyInfoMap.equals(other.keyInfoMap);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see java.lang.Comparable#compareTo(java.lang.Object)
-	 */
-	@Override
-	public int compareTo(final AxConcept otherObj) {
-		if (otherObj == null) {
-			return -1;
-		}
-		if (this == otherObj) {
-			return 0;
-		}
-		if (getClass() != otherObj.getClass()) {
-			return this.hashCode() - otherObj.hashCode();
-		}
-
-		final AxKeyInformation other = (AxKeyInformation) otherObj;
-		if (!key.equals(other.key)) {
-			return key.compareTo(other.key);
-		}
-		if (!keyInfoMap.equals(other.keyInfoMap)) {
-			return (keyInfoMap.hashCode() - other.keyInfoMap.hashCode());
-		}
-
-		return 0;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(com. ericsson.apex.core.basicmodel.concepts.AxArtifactKey)
-	 */
-	@Override
-	public AxKeyInfo get(final AxArtifactKey conceptKey) {
-		return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKey);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang. String)
-	 */
-	@Override
-	public AxKeyInfo get(final String conceptKeyName) {
-		return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKeyName);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang. String, java.lang.String)
-	 */
-	@Override
-	public AxKeyInfo get(final String conceptKeyName, final String conceptKeyVersion) {
-		return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKeyName, conceptKeyVersion);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java. lang.String)
-	 */
-	@Override
-	public Set<AxKeyInfo> getAll(final String conceptKeyName) {
-		return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).getAll(conceptKeyName);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java. lang.String, java.lang.String)
-	 */
-	@Override
-	public Set<AxKeyInfo> getAll(final String conceptKeyName, final String conceptKeyVersion) {
-		return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).getAll(conceptKeyName, conceptKeyVersion);
-	}
-}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/DefaultApexDao.java b/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/DefaultApexDao.java
deleted file mode 100644
index a73a15e..0000000
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/DefaultApexDao.java
+++ /dev/null
@@ -1,526 +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.basicmodel.dao.impl;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.ApexRuntimeException;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.dao.ApexDao;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class DefaultApexDao is an JPA implementation of the {@link ApexDao} class for Apex concepts ({@link AxConcept}). It uses the default
- * JPA implementation in the javax {@link Persistence} class.
- *
- *
- * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
- */
-public class DefaultApexDao implements ApexDao {
-	private static final XLogger LOGGER = XLoggerFactory.getXLogger(DefaultApexDao.class);
-
-	private static final String SELECT_C_FROM = "SELECT c FROM ";
-	private static final String AND_C_KEY_LOCAL_NAME = "' AND c.key.localName='";
-	private static final String AND_C_KEY_PARENT_KEY_VERSION = "' AND c.key.parentKeyVersion='";
-	private static final String C_WHERE_C_KEY_PARENT_KEY_NAME = " c WHERE c.key.parentKeyName='";
-	private static final String AND_C_KEY_VERSION = "' AND c.key.version='";
-	private static final String C_WHERE_C_KEY_NAME = " c WHERE c.key.name='";
-	private static final String DELETE_FROM = "DELETE FROM ";
-
-	// Entity manager for JPA
-	private EntityManagerFactory emf = null;
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#init(com.ericsson.apex.model.basicmodel.dao.DAOParameters)
-	 */
-	@Override
-	public void init(final DAOParameters daoParameters) throws ApexException {
-		if (daoParameters == null || daoParameters.getPersistenceUnit() == null) {
-			LOGGER.error("Apex persistence unit parameter not set");
-			throw new ApexException("Apex persistence unit parameter not set");
-		}
-
-		LOGGER.debug("Creating Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" . . .");
-		try {
-			emf = Persistence.createEntityManagerFactory(daoParameters.getPersistenceUnit(), daoParameters.getJdbcProperties());
-		}
-		catch (final Exception e) {
-			LOGGER.warn("Creation of Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" failed", e);
-			throw new ApexException("Creation of Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" failed", e);
-		}
-		LOGGER.debug("Created Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\"");
-	}
-
-	/**
-	 * Gets the entity manager for this DAO.
-	 *
-	 * @return the entity manager
-	 */
-	protected final synchronized EntityManager getEntityManager() {
-		if (emf == null) {
-			LOGGER.warn("Apex DAO has not been initialized");
-			throw new ApexRuntimeException("Apex DAO has not been initialized");
-		}
-
-		return emf.createEntityManager();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#close()
-	 */
-	@Override
-	public final void close() {
-		if (emf != null) {
-			emf.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#create(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public <T extends AxConcept> void create(final T obj) {
-		if (obj == null) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			mg.merge(obj);
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#delete(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public <T extends AxConcept> void delete(final T obj) {
-		if (obj == null) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			mg.remove(mg.contains(obj) ? obj : mg.merge(obj));
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#delete(java.lang.Class,
-	 * com.ericsson.apex.model.basicmodel.concepts.AxArtifactKey)
-	 */
-	@Override
-	public <T extends AxConcept> void delete(final Class<T> aClass, final AxArtifactKey key) {
-		if (key == null) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName() + AND_C_KEY_VERSION
-					+ key.getVersion() + "'", aClass).executeUpdate();
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#delete(java.lang.Class,
-	 * com.ericsson.apex.model.basicmodel.concepts.AxReferenceKey)
-	 */
-	@Override
-	public <T extends AxConcept> void delete(final Class<T> aClass, final AxReferenceKey key) {
-		if (key == null) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME + key.getParentKeyName()
-			+ AND_C_KEY_PARENT_KEY_VERSION + key.getParentKeyVersion() + AND_C_KEY_LOCAL_NAME + key.getLocalName() + "'",
-			aClass).executeUpdate();
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#create(java.util.Collection)
-	 */
-	@Override
-	public <T extends AxConcept> void create(final Collection<T> objs) {
-		if (objs == null || objs.isEmpty()) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			for (final T t : objs) {
-				mg.merge(t);
-			}
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#delete(java.util.Collection)
-	 */
-	@Override
-	public <T extends AxConcept> void delete(final Collection<T> objs) {
-		if (objs == null || objs.isEmpty()) {
-			return;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			for (final T t : objs) {
-				mg.remove(mg.contains(t) ? t : mg.merge(t));
-			}
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#deleteByArtifactKey(java.lang.Class, java.util.Collection)
-	 */
-	@Override
-	public <T extends AxConcept> int deleteByArtifactKey(final Class<T> aClass, final Collection<AxArtifactKey> keys) {
-		if (keys == null || keys.isEmpty()) {
-			return 0;
-		}
-		int deletedCount = 0;
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			for (final AxArtifactKey key : keys) {
-				deletedCount += mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName()
-				+ AND_C_KEY_VERSION + key.getVersion() + "'", aClass).executeUpdate();
-			}
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-		return deletedCount;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#deleteByReferenceKey(java.lang.Class, java.util.Collection)
-	 */
-	@Override
-	public <T extends AxConcept> int deleteByReferenceKey(final Class<T> aClass, final Collection<AxReferenceKey> keys) {
-		if (keys == null || keys.isEmpty()) {
-			return 0;
-		}
-		int deletedCount = 0;
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			for (final AxReferenceKey key : keys) {
-				deletedCount += mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME
-						+ key.getParentKeyName() + AND_C_KEY_PARENT_KEY_VERSION + key.getParentKeyVersion() + AND_C_KEY_LOCAL_NAME
-						+ key.getLocalName() + "'", aClass).executeUpdate();
-			}
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-		return deletedCount;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#deleteAll(java.lang.Class)
-	 */
-	@Override
-	public <T extends AxConcept> void deleteAll(final Class<T> aClass) {
-		final EntityManager mg = getEntityManager();
-		try {
-			mg.getTransaction().begin();
-			mg.createQuery(DELETE_FROM + aClass.getSimpleName() + " c ", aClass).executeUpdate();
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#get(java.lang.Class, com.ericsson.apex.model.basicmodel.concepts.AxArtifactKey)
-	 */
-	@Override
-	public <T extends AxConcept> T get(final Class<T> aClass, final AxArtifactKey key) {
-		if (aClass == null) {
-			return null;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			final T t = mg.find(aClass, key);
-			if (t != null) {
-				// This clone is created to force the JPA DAO to recurse down through the object
-				try { 
-					T clonedT = aClass.newInstance();
-					t.copyTo(clonedT);
-					return clonedT;
-				}
-				catch (Exception e) {
-					LOGGER.warn("Could not clone object of class \"" + aClass.getCanonicalName() + "\"", e);
-					return null;
-				}
-			}
-			else {
-				return null;
-			}
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#get(java.lang.Class, com.ericsson.apex.model.basicmodel.concepts.AxReferenceKey)
-	 */
-	@Override
-	public <T extends AxConcept> T get(final Class<T> aClass, final AxReferenceKey key) {
-		if (aClass == null) {
-			return null;
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			final T t = mg.find(aClass, key);
-			if (t != null) {
-				try { 
-					T clonedT = aClass.newInstance();
-					t.copyTo(clonedT);
-					return clonedT;
-				}
-				catch (Exception e) {
-					LOGGER.warn("Could not clone object of class \"" + aClass.getCanonicalName() + "\"", e);
-					return null;
-				}
-			}
-			else {
-				return null;
-			}
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#getAll(java.lang.Class)
-	 */
-	@Override
-	public <T extends AxConcept> List<T> getAll(final Class<T> aClass) {
-		if (aClass == null) {
-			return Collections.emptyList();
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			return mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + " c", aClass).getResultList();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#getAll(java.lang.Class,
-	 * com.ericsson.apex.model.basicmodel.concepts.AxArtifactKey)
-	 */
-	@Override
-	public <T extends AxConcept> List<T> getAll(final Class<T> aClass, final AxArtifactKey parentKey) {
-		if (aClass == null) {
-			return Collections.emptyList();
-		}
-		final EntityManager mg = getEntityManager();
-		try {
-			return mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME + parentKey.getName()
-			+ AND_C_KEY_PARENT_KEY_VERSION + parentKey.getVersion() + "'", aClass).getResultList();
-		}
-		finally {
-			mg.close();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#getArtifact(java.lang.Class,
-	 * com.ericsson.apex.model.basicmodel.concepts.AxArtifactKey)
-	 */
-	@Override
-	public <T extends AxConcept> T getArtifact(final Class<T> aClass, final AxArtifactKey key) {
-		if (aClass == null || key == null) {
-			return null;
-		}
-		final EntityManager mg = getEntityManager();
-		List<T> ret;
-		try {
-			ret = mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName()
-			+ AND_C_KEY_VERSION + key.getVersion() + "'", aClass).getResultList();
-		}
-		finally {
-			mg.close();
-		}
-		if (ret == null || ret.isEmpty()) {
-			return null;
-		}
-		if (ret.size() > 1) {
-			throw new IllegalArgumentException(
-					"More than one result was returned for search for " + aClass + " with key " + key.getID() + ": " + ret);
-		}
-		return ret.get(0);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#getArtifact(java.lang.Class,
-	 * com.ericsson.apex.model.basicmodel.concepts.AxReferenceKey)
-	 */
-	@Override
-	public <T extends AxConcept> T getArtifact(final Class<T> aClass, final AxReferenceKey key) {
-		if (aClass == null || key == null) {
-			return null;
-		}
-		final EntityManager mg = getEntityManager();
-		List<T> ret;
-		try {
-			ret = mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME + key.getParentKeyName()
-			+ AND_C_KEY_PARENT_KEY_VERSION + key.getParentKeyVersion() + AND_C_KEY_LOCAL_NAME + key.getLocalName() + "'",
-			aClass).getResultList();
-		}
-		finally {
-			mg.close();
-		}
-		if (ret == null || ret.isEmpty()) {
-			return null;
-		}
-		if (ret.size() > 1) {
-			throw new IllegalArgumentException(
-					"More than one result was returned for search for " + aClass + " with key " + key.getID() + ": " + ret);
-		}
-		return ret.get(0);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#update(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public <T extends AxConcept> T update(final T obj) {
-		final EntityManager mg = getEntityManager();
-		T ret;
-		try {
-			mg.getTransaction().begin();
-			ret = mg.merge(obj);
-			mg.flush();
-			mg.getTransaction().commit();
-		}
-		finally {
-			mg.close();
-		}
-		return ret;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.dao.ApexDao#size(java.lang.Class)
-	 */
-	@Override
-	public <T extends AxConcept> long size(final Class<T> aClass) {
-		if (aClass == null) {
-			return 0;
-		}
-		final EntityManager mg = getEntityManager();
-		long size = 0;
-		try {
-			size = mg.createQuery("SELECT COUNT(c) FROM " + aClass.getSimpleName() + " c", Long.class).getSingleResult();
-		}
-		finally {
-			mg.close();
-		}
-		return size;
-	}
-}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexConceptException.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexConceptException.java
similarity index 96%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexConceptException.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexConceptException.java
index bfe296d..1ffb277 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexConceptException.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexConceptException.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 /**
  * This class is an exception thrown on Apex Concept errors.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexException.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexException.java
similarity index 97%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexException.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexException.java
index 74a60e2..2dcbf7b 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexException.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexException.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 /**
  * This class is a base exception from which all Apex exceptions are sub classes.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexRuntimeException.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexRuntimeException.java
similarity index 98%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexRuntimeException.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexRuntimeException.java
index 4cdfbe4..f3db3ae 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/ApexRuntimeException.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/ApexRuntimeException.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 /**
  * This class is a base run time exception from which all Apex run time exceptions are sub classes.
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxArtifactKey.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxArtifactKey.java
new file mode 100644
index 0000000..382d502
--- /dev/null
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxArtifactKey.java
@@ -0,0 +1,384 @@
+/*-
+ * ============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.basicmodel.concepts;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.utilities.Assertions;
+
+/**
+ * An artifact key uniquely identifies every first order entity in the system. Every first order concept in the system
+ * must have an {@link AxArtifactKey} to identify it. Concepts that are wholly contained in another concept are
+ * identified using a {@link AxReferenceKey} key.
+ * <p>
+ * Key validation checks that the name and version fields match the {@link NAME_REGEXP} and {@link VERSION_REGEXP}
+ * regular expressions respectively.
+ */
+@Embeddable
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "apexArtifactKey", namespace = "http://www.onap.org/policy/apex-pdp")
+
+@XmlType(name = "AxArtifactKey", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "name", "version" })
+
+public class AxArtifactKey extends AxKey {
+    private static final long serialVersionUID = 8932717618579392561L;
+
+    private static final String NAME_TOKEN = "name";
+    private static final String VERSION_TOKEN = "version";
+
+    @Column(name = NAME_TOKEN)
+    @XmlElement(required = true)
+    private String name;
+
+    @Column(name = VERSION_TOKEN)
+    @XmlElement(required = true)
+    private String version;
+
+    /**
+     * The default constructor creates a null artifact key.
+     */
+    public AxArtifactKey() {
+        this(NULL_KEY_NAME, NULL_KEY_VERSION);
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxArtifactKey(final AxArtifactKey copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * Constructor to create a key with the specified name and version.
+     *
+     * @param name the key name
+     * @param version the key version
+     */
+    public AxArtifactKey(final String name, final String version) {
+        super();
+        this.name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
+        this.version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
+    }
+
+    /**
+     * Constructor to create a key using the key and version from the specified key ID.
+     *
+     * @param id the key ID in a format that respects the {@link KEY_ID_REGEXP}
+     */
+    public AxArtifactKey(final String id) {
+        Assertions.argumentNotNull(id, "id may not be null");
+
+        // Check the incoming ID is valid
+        Assertions.validateStringParameter("id", id, KEY_ID_REGEXP);
+
+        // Split on colon, if the id passes the regular expression test above
+        // it'll have just one colon separating the name and version
+        // No need for range checks or size checks on the array
+        final String[] nameVersionArray = id.split(":");
+
+        // Return the new key
+        name = Assertions.validateStringParameter(NAME_TOKEN, nameVersionArray[0], NAME_REGEXP);
+        version = Assertions.validateStringParameter(VERSION_TOKEN, nameVersionArray[1], VERSION_REGEXP);
+    }
+
+    /**
+     * Get a null artifact key.
+     *
+     * @return a null artifact key
+     */
+    public static final AxArtifactKey getNullKey() {
+        return new AxArtifactKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+     */
+    @Override
+    public AxArtifactKey getKey() {
+        return this;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = new ArrayList<>();
+        keyList.add(getKey());
+        return keyList;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getID()
+     */
+    @Override
+    public String getID() {
+        return name + ':' + version;
+    }
+
+    /**
+     * Gets the key name.
+     *
+     * @return the key name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the key name.
+     *
+     * @param name the key name
+     */
+    public void setName(final String name) {
+        this.name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
+    }
+
+    /**
+     * Gets the key version.
+     *
+     * @return the key version
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * Sets the key version.
+     *
+     * @param version the key version
+     */
+    public void setVersion(final String version) {
+        this.version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getCompatibility(org.onap.policy.apex.model.basicmodel.
+     * concepts.AxKey)
+     */
+    @Override
+    public AxKey.Compatibility getCompatibility(final AxKey otherKey) {
+        if (!(otherKey instanceof AxArtifactKey)) {
+            return Compatibility.DIFFERENT;
+        }
+        final AxArtifactKey otherArtifactKey = (AxArtifactKey) otherKey;
+
+        if (this.equals(otherArtifactKey)) {
+            return Compatibility.IDENTICAL;
+        }
+        if (!this.getName().equals(otherArtifactKey.getName())) {
+            return Compatibility.DIFFERENT;
+        }
+
+        final String[] thisVersionArray = getVersion().split("\\.");
+        final String[] otherVersionArray = otherArtifactKey.getVersion().split("\\.");
+
+        // There must always be at least one element in each version
+        if (!thisVersionArray[0].equals(otherVersionArray[0])) {
+            return Compatibility.MAJOR;
+        }
+
+        if (thisVersionArray.length >= 2 && otherVersionArray.length >= 2
+                && !thisVersionArray[1].equals(otherVersionArray[1])) {
+            return Compatibility.MINOR;
+        }
+
+        return Compatibility.PATCH;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxKey#isCompatible(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxKey)
+     */
+    @Override
+    public boolean isCompatible(final AxKey otherKey) {
+        if (!(otherKey instanceof AxArtifactKey)) {
+            return false;
+        }
+        final AxArtifactKey otherArtifactKey = (AxArtifactKey) otherKey;
+
+        final Compatibility compatibility = this.getCompatibility(otherArtifactKey);
+
+        return !(compatibility == Compatibility.DIFFERENT || compatibility == Compatibility.MAJOR);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult result) {
+        try {
+            Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "name invalid-" + e.getMessage()));
+        }
+
+        try {
+            Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "version invalid-" + e.getMessage()));
+        }
+
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+     */
+    @Override
+    public void clean() {
+        name = Assertions.validateStringParameter(NAME_TOKEN, name, NAME_REGEXP);
+        version = Assertions.validateStringParameter(VERSION_TOKEN, version, VERSION_REGEXP);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append("name=");
+        builder.append(name);
+        builder.append(",version=");
+        builder.append(version);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
+        Assertions.argumentNotNull(target, "target may not be null");
+
+        final AxConcept copyObject = target;
+        Assertions.instanceOf(copyObject, AxArtifactKey.class);
+
+        final AxArtifactKey copy = ((AxArtifactKey) copyObject);
+        copy.setName(name);
+        copy.setVersion(version);
+
+        return copyObject;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + name.hashCode();
+        result = prime * result + version.hashCode();
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang. Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        final AxArtifactKey other = (AxArtifactKey) obj;
+
+        if (!name.equals(other.name)) {
+            return false;
+        }
+        return version.equals(other.version);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        Assertions.argumentNotNull(otherObj, "comparison object may not be null");
+
+        if (this == otherObj) {
+            return 0;
+        }
+        if (getClass() != otherObj.getClass()) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxArtifactKey other = (AxArtifactKey) otherObj;
+
+        if (!name.equals(other.name)) {
+            return name.compareTo(other.name);
+        }
+        return version.compareTo(other.version);
+    }
+}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConcept.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
similarity index 88%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConcept.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
index 005d17d..3d7f502 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConcept.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.io.Serializable;
 import java.util.List;
@@ -28,13 +28,13 @@
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * This class is the base class for all Apex concept classes. It enforces implementation of abstract methods and interfaces on all concepts
- * that are sub-classes of this class.
+ * This class is the base class for all Apex concept classes. It enforces implementation of abstract methods and
+ * interfaces on all concepts that are sub-classes of this class.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 
-@XmlType(name = "AxConcept", namespace = "http://www.ericsson.com/apex")
+@XmlType(name = "AxConcept", namespace = "http://www.onap.org/policy/apex-pdp")
 
 public abstract class AxConcept implements Serializable, Comparable<AxConcept> {
     private static final long serialVersionUID = -7434939557282697490L;
@@ -42,18 +42,18 @@
     /**
      * Default constructor
      */
-    public AxConcept() {
-    }
-    
+    public AxConcept() {}
+
     /**
      * Copy constructor
+     * 
      * @param copyConcept the concept to copy from
      */
     public AxConcept(final AxConcept copyConcept) {
         Assertions.argumentNotNull(copyConcept, "copy concept may not be null");
-    		copyConcept.copyTo(this);
+        copyConcept.copyTo(this);
     }
-    
+
     /**
      * Gets the key of this concept.
      *
@@ -62,7 +62,8 @@
     public abstract AxKey getKey();
 
     /**
-     * Gets a list of all keys for this concept and all concepts that are defined or referenced by this concept and its sub-concepts.
+     * Gets a list of all keys for this concept and all concepts that are defined or referenced by this concept and its
+     * sub-concepts.
      *
      * @return the keys used by this concept and it's contained concepts
      */
@@ -72,7 +73,8 @@
      * Validate that this concept is structurally correct.
      *
      * @param result the parameter in which the result of the validation will be returned
-     * @return the validation result that was passed in in the @{link result} field with the result of this validation added
+     * @return the validation result that was passed in in the @{link result} field with the result of this validation
+     *         added
      */
     public abstract AxValidationResult validate(AxValidationResult result);
 
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetter.java
similarity index 97%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetter.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetter.java
index d5d1752..0735f87 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetter.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.Set;
 
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetterImpl.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java
similarity index 86%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetterImpl.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java
index af97641..b4bff80 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxConceptGetterImpl.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.NavigableMap;
 import java.util.Set;
@@ -49,7 +49,8 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.core.basicmodel.concepts.AxConceptGetter#get(com. ericsson.apex.core.basicmodel.concepts.AxArtifactKey)
+     * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.apex.core.basicmodel.
+     * concepts.AxArtifactKey)
      */
     @Override
     public C get(final AxArtifactKey conceptKey) {
@@ -59,7 +60,7 @@
     /*
      * (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 C get(final String conceptKeyName) {
@@ -81,8 +82,7 @@
                 break;
             }
             foundKey = nextkey;
-        }
-        while (true);
+        } while (true);
 
         return conceptMap.get(foundKey);
     }
@@ -90,7 +90,7 @@
     /*
      * (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 C get(final String conceptKeyName, final String conceptKeyVersion) {
@@ -98,8 +98,7 @@
 
         if (conceptKeyVersion != null) {
             return conceptMap.get(new AxArtifactKey(conceptKeyName, conceptKeyVersion));
-        }
-        else {
+        } else {
             return this.get(conceptKeyName);
         }
     }
@@ -107,7 +106,7 @@
     /*
      * (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<C> getAll(final String conceptKeyName) {
@@ -117,7 +116,7 @@
     /*
      * (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<C> getAll(final String conceptKeyName, final String conceptKeyVersion) {
@@ -148,8 +147,7 @@
                 break;
             }
             returnSet.add(conceptMap.get(foundKey));
-        }
-        while (true);
+        } while (true);
 
         return returnSet;
     }
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKey.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKey.java
similarity index 80%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKey.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKey.java
index 0d63dbf..36b4925 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKey.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKey.java
@@ -1,28 +1,28 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 /**
- * The key uniquely identifies every entity in the system. This class is an abstract class to give a common parent for all key types in the
- * system.
+ * The key uniquely identifies every entity in the system. This class is an abstract class to give a common parent for
+ * all key types in the system.
  */
 public abstract class AxKey extends AxConcept {
     private static final long serialVersionUID = 6281159885962014041L;
@@ -48,11 +48,17 @@
     public enum Compatibility {
         /** The keys have different names. */
         DIFFERENT,
-        /** The name of the key matches but the Major version number of the keys is different (x in x.y.z do not match). */
+        /**
+         * The name of the key matches but the Major version number of the keys is different (x in x.y.z do not match).
+         */
         MAJOR,
-        /** The name of the key matches but the Minor version number of the keys is different (y in x.y.z do not match). */
+        /**
+         * The name of the key matches but the Minor version number of the keys is different (y in x.y.z do not match).
+         */
         MINOR,
-        /** The name of the key matches but the Patch version number of the keys is different (z in x.y.z do not match). */
+        /**
+         * The name of the key matches but the Patch version number of the keys is different (z in x.y.z do not match).
+         */
         PATCH,
         /** The keys match completely. */
         IDENTICAL
@@ -62,21 +68,22 @@
      * Default constructor
      */
     public AxKey() {
-    		super();
+        super();
     }
-    
+
     /**
      * Copy constructor
+     *
      * @param copyConcept the concept to copy from
      */
     public AxKey(final AxKey copyConcept) {
-    		super(copyConcept);
+        super(copyConcept);
     }
-    
-   /*
+
+    /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getID()
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getID()
      */
     @Override
     public abstract String getID();
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInfo.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java
similarity index 80%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInfo.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java
index 1ffb40b..6c709fa 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyInfo.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.List;
 import java.util.Random;
@@ -36,24 +36,26 @@
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.basicmodel.dao.converters.CDATAConditioner;
-import org.onap.apex.model.basicmodel.dao.converters.UUID2String;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner;
+import org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * The key information on an {@link AxArtifactKey} key in an Apex policy model. Each {@link AxArtifactKey} must have an {@link AxKeyInfo} object. THe
- * information held is the key's UUID and it's description.
+ * The key information on an {@link AxArtifactKey} key in an Apex policy model. Each {@link AxArtifactKey} must have an
+ * {@link AxKeyInfo} object. THe information held is the key's UUID and it's description.
  * <p>
- * Validation checks that all fields are defined and that the key is valid. It also observes that descriptions are blank and warns if the UUID is a zero UUID.
+ * Validation checks that all fields are defined and that the key is valid. It also observes that descriptions are blank
+ * and warns if the UUID is a zero UUID.
  */
 
 @Entity
 @Table(name = "AxKeyInfo")
 
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "apexKeyInfo", namespace = "http://www.ericsson.com/apex")
-@XmlType(name = "AxKeyInfo", namespace = "http://www.ericsson.com/apex", propOrder = { "key", "uuid", "description" })
+@XmlRootElement(name = "apexKeyInfo", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxKeyInfo", namespace = "http://www.onap.org/policy/apex-pdp",
+        propOrder = { "key", "uuid", "description" })
 
 public class AxKeyInfo extends AxConcept {
     private static final long serialVersionUID = -4023935924068914308L;
@@ -86,12 +88,13 @@
 
     /**
      * Copy constructor
+     *
      * @param copyConcept the concept to copy from
      */
     public AxKeyInfo(final AxKeyInfo copyConcept) {
-    		super(copyConcept);
+        super(copyConcept);
     }
-    
+
     /**
      * Constructor to create this concept with the specified key.
      *
@@ -122,7 +125,7 @@
     /*
      * (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() {
@@ -132,7 +135,7 @@
     /*
      * (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() {
@@ -190,24 +193,29 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
      */
     @Override
     public AxValidationResult validate(final AxValidationResult resultIn) {
         AxValidationResult result = resultIn;
 
         if (key.equals(AxArtifactKey.getNullKey())) {
-            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
         }
 
         result = key.validate(result);
 
         if (description.trim().length() == 0) {
-            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.OBSERVATION, "description is blank"));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.OBSERVATION,
+                    "description is blank"));
         }
 
         if (uuid.equals(new UUID(0, 0))) {
-            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.WARNING, "UUID is a zero UUID: " + new UUID(0, 0)));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.WARNING,
+                    "UUID is a zero UUID: " + new UUID(0, 0)));
         }
 
         return result;
@@ -216,7 +224,7 @@
     /*
      * (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() {
@@ -227,7 +235,7 @@
     /*
      * (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() {
@@ -244,13 +252,15 @@
         return builder.toString();
     }
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
         Assertions.argumentNotNull(target, "target may not be null");
 
         final Object copyObject = target;
@@ -267,7 +277,7 @@
     /*
      * (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() {
@@ -282,7 +292,7 @@
     /*
      * (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) {
@@ -345,11 +355,10 @@
         final Random random;
         if (seed != null && seed.length() > 0) {
             random = new Random(seed.hashCode());
-        }
-        else {
+        } else {
             random = new Random();
         }
-        byte[] array = new byte[UUID_BYTE_LENGTH_16];
+        final byte[] array = new byte[UUID_BYTE_LENGTH_16];
         random.nextBytes(array);
         return UUID.nameUUIDFromBytes(array);
     }
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java
new file mode 100644
index 0000000..2ddbe5d
--- /dev/null
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java
@@ -0,0 +1,460 @@
+/*-
+ * ============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.basicmodel.concepts;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.NavigableMap;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import javax.persistence.CascadeType;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.Table;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.utilities.Assertions;
+
+/**
+ * The Class AxKeyInformation holds a map of the key information for the entire Apex model. All Apex models
+ * {@link AxModel} must have an {@link AxKeyInformation} field. The {@link AxKeyInformation} class implements the helper
+ * methods of the {@link AxConceptGetter} interface to allow {@link AxKeyInfo} instances to be retrieved by calling
+ * methods directly on this class without referencing the contained map.
+ * <p>
+ * Validation checks that the key is not null, that the key information map is not empty, that each key and value in the
+ * map is defined, that the key in each map entry matches the key if each entry value, and that no duplicate UUIDs
+ * exist. Each key information entry is then validated individually.
+ */
+@Entity
+@Table(name = "AxKeyInformation")
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AxKeyInformation", namespace = "http://www.onap.org/policy/apex-pdp",
+        propOrder = { "key", "keyInfoMap" })
+
+public class AxKeyInformation extends AxConcept implements AxConceptGetter<AxKeyInfo> {
+    private static final long serialVersionUID = -2746380769017043888L;
+
+    @EmbeddedId
+    @XmlElement(name = "key", required = true)
+    private AxArtifactKey key;
+
+    // @formatter:off
+    @ManyToMany(cascade = CascadeType.ALL)
+    @JoinTable(
+            joinColumns = { @JoinColumn(name = "keyInfoMapName", referencedColumnName = "name"),
+                    @JoinColumn(name = "keyInfoMapVersion", referencedColumnName = "version"), },
+            inverseJoinColumns = { @JoinColumn(name = "keyInfoName", referencedColumnName = "name"),
+                    @JoinColumn(name = "keyInfoVersion", referencedColumnName = "version") })
+    private Map<AxArtifactKey, AxKeyInfo> keyInfoMap;
+    // @formatter:on
+
+    /**
+     * The Default Constructor creates this concept with a null key.
+     */
+    public AxKeyInformation() {
+        this(new AxArtifactKey());
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxKeyInformation(final AxKeyInformation copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * Constructor to create this concept with the specified key.
+     *
+     * @param key the key of the concept
+     */
+    public AxKeyInformation(final AxArtifactKey key) {
+        this(key, new TreeMap<AxArtifactKey, AxKeyInfo>());
+    }
+
+    /**
+     * Constructor to create this concept and set all its fields.
+     *
+     * @param key the key of the concept
+     * @param keyInfoMap the key info map of the concept
+     */
+    public AxKeyInformation(final AxArtifactKey key, final Map<AxArtifactKey, AxKeyInfo> keyInfoMap) {
+        super();
+        Assertions.argumentNotNull(key, "key may not be null");
+        Assertions.argumentNotNull(keyInfoMap, "keyInfoMap may not be null");
+
+        this.key = key;
+        this.keyInfoMap = new TreeMap<>();
+        this.keyInfoMap.putAll(keyInfoMap);
+    }
+
+    /**
+     * When a model is unmarshalled from disk or from the database, the key information 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
+     */
+    public void afterUnmarshal(final Unmarshaller u, final Object parent) {
+        // The map must be navigable to allow name and version searching,
+        // unmarshaling returns a hash map
+        final NavigableMap<AxArtifactKey, AxKeyInfo> navigablekeyInfoMap = new TreeMap<>();
+        navigablekeyInfoMap.putAll(keyInfoMap);
+        keyInfoMap = navigablekeyInfoMap;
+    }
+
+    /**
+     * This method generates default key information for all keys found in the concept passed in as a parameter that do
+     * not already have key information.
+     *
+     * @param concept the concept for which to generate key information
+     */
+    public void generateKeyInfo(final AxConcept concept) {
+        for (final AxKey axKey : concept.getKeys()) {
+            if (!(axKey instanceof AxArtifactKey)) {
+                continue;
+            }
+
+            final AxArtifactKey artifactKey = (AxArtifactKey) axKey;
+            if (!keyInfoMap.containsKey(artifactKey)) {
+                final AxKeyInfo keyInfo = new AxKeyInfo(artifactKey);
+                // generate a reproducible UUID
+                keyInfo.setUuid(AxKeyInfo.generateReproducibleUUID(keyInfo.getID() + keyInfo.getDescription()));
+                keyInfoMap.put(artifactKey, keyInfo);
+            }
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+     */
+    @Override
+    public AxArtifactKey getKey() {
+        return key;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = key.getKeys();
+        keyList.addAll(keyInfoMap.keySet());
+
+        return keyList;
+    }
+
+    /**
+     * Sets the key of this concept.
+     *
+     * @param key the key of this concept
+     */
+    public void setKey(final AxArtifactKey key) {
+        Assertions.argumentNotNull(key, "key may not be null");
+        this.key = key;
+    }
+
+    /**
+     * Gets the key info map of this concept.
+     *
+     * @return the key info map of this concept
+     */
+    public Map<AxArtifactKey, AxKeyInfo> getKeyInfoMap() {
+        return keyInfoMap;
+    }
+
+    /**
+     * Sets the key info map of this concept.
+     *
+     * @param keyInfoMap the key info map of this concept
+     */
+    public void setKeyInfoMap(final Map<AxArtifactKey, AxKeyInfo> keyInfoMap) {
+        Assertions.argumentNotNull(keyInfoMap, "keyInfoMap may not be null");
+        this.keyInfoMap = new TreeMap<>();
+        this.keyInfoMap.putAll(keyInfoMap);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult resultIn) {
+        AxValidationResult result = resultIn;
+
+        if (key.equals(AxArtifactKey.getNullKey())) {
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+        }
+
+        result = key.validate(result);
+
+        if (keyInfoMap.size() == 0) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "keyInfoMap may not be empty"));
+        } else {
+            final Set<UUID> uuidSet = new TreeSet<>();
+
+            for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry : keyInfoMap.entrySet()) {
+                result = validateKeyInfoEntry(keyInfoEntry, uuidSet, result);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Validate an key information entry
+     *
+     * @param keyInfoEntry the key information entry
+     * @param uuidSet the set of UUIDs encountered in validation so far, the UUID of this entry is added to the set
+     * @param result the validation result to append to
+     * @return The validation result
+     */
+    private AxValidationResult validateKeyInfoEntry(final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry,
+            final Set<UUID> uuidSet, AxValidationResult result) {
+        if (keyInfoEntry.getKey().equals(AxArtifactKey.getNullKey())) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key on keyInfoMap entry " + keyInfoEntry.getKey() + " may not be the null key"));
+        } else if (keyInfoEntry.getValue() == null) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "value on keyInfoMap entry " + keyInfoEntry.getKey() + " may not be null"));
+        } else {
+            if (!keyInfoEntry.getKey().equals(keyInfoEntry.getValue().getKey())) {
+                result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                        "key on keyInfoMap entry " + keyInfoEntry.getKey() + " does not equal entry key "
+                                + keyInfoEntry.getValue().getKey()));
+            }
+
+            result = keyInfoEntry.getValue().validate(result);
+
+            if (uuidSet.contains(keyInfoEntry.getValue().getUUID())) {
+                result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                        "duplicate UUID found on keyInfoMap entry " + keyInfoEntry.getKey() + ":"
+                                + keyInfoEntry.getValue().getUUID()));
+            } else {
+                uuidSet.add(keyInfoEntry.getValue().getUUID());
+            }
+        }
+
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+     */
+    @Override
+    public void clean() {
+        key.clean();
+        for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoEntry : keyInfoMap.entrySet()) {
+            keyInfoEntry.getKey().clean();
+            keyInfoEntry.getValue().clean();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append("key=");
+        builder.append(key);
+        builder.append(",keyInfoMap=");
+        builder.append(keyInfoMap);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
+        Assertions.argumentNotNull(target, "target may not be null");
+
+        final Object copyObject = target;
+        Assertions.instanceOf(copyObject, AxKeyInformation.class);
+
+        final AxKeyInformation copy = ((AxKeyInformation) copyObject);
+        copy.setKey(new AxArtifactKey(key));
+        final Map<AxArtifactKey, AxKeyInfo> newKeyInfoMap = new TreeMap<>();
+        for (final Entry<AxArtifactKey, AxKeyInfo> keyInfoMapEntry : keyInfoMap.entrySet()) {
+            newKeyInfoMap.put(new AxArtifactKey(keyInfoMapEntry.getKey()), new AxKeyInfo(keyInfoMapEntry.getValue()));
+        }
+        copy.setKeyInfoMap(newKeyInfoMap);
+
+        return copy;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + key.hashCode();
+        result = prime * result + keyInfoMap.hashCode();
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang. Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        final AxKeyInformation other = (AxKeyInformation) obj;
+        if (!key.equals(other.key)) {
+            return false;
+        }
+        return keyInfoMap.equals(other.keyInfoMap);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        if (otherObj == null) {
+            return -1;
+        }
+        if (this == otherObj) {
+            return 0;
+        }
+        if (getClass() != otherObj.getClass()) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxKeyInformation other = (AxKeyInformation) otherObj;
+        if (!key.equals(other.key)) {
+            return key.compareTo(other.key);
+        }
+        if (!keyInfoMap.equals(other.keyInfoMap)) {
+            return (keyInfoMap.hashCode() - other.keyInfoMap.hashCode());
+        }
+
+        return 0;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.core.basicmodel.concepts.
+     * AxArtifactKey)
+     */
+    @Override
+    public AxKeyInfo get(final AxArtifactKey conceptKey) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKey);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang. String)
+     */
+    @Override
+    public AxKeyInfo get(final String conceptKeyName) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKeyName);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#get(java.lang. String, java.lang.String)
+     */
+    @Override
+    public AxKeyInfo get(final String conceptKeyName, final String conceptKeyVersion) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).get(conceptKeyName,
+                conceptKeyVersion);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java. lang.String)
+     */
+    @Override
+    public Set<AxKeyInfo> getAll(final String conceptKeyName) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).getAll(conceptKeyName);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.core.basicmodel.concepts.AxConceptGetter#getAll(java. lang.String, java.lang.String)
+     */
+    @Override
+    public Set<AxKeyInfo> getAll(final String conceptKeyName, final String conceptKeyVersion) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxKeyInfo>) keyInfoMap).getAll(conceptKeyName,
+                conceptKeyVersion);
+    }
+}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyUse.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java
similarity index 70%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyUse.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java
index 990c8f7..eeb8dc6 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxKeyUse.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java
@@ -1,34 +1,34 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.List;
 
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * This class records a usage of a key in the system. When the list of keys being used by a concept is built using the getKeys() method of
- * the {@link AxConcept} class, an instance of this class is created for every key occurrence. The list of keys returned by the getKeys()
- * method is a list of {@link AxKeyUse} objects.
+ * This class records a usage of a key in the system. When the list of keys being used by a concept is built using the
+ * getKeys() method of the {@link AxConcept} class, an instance of this class is created for every key occurrence. The
+ * list of keys returned by the getKeys() method is a list of {@link AxKeyUse} objects.
  * <p>
  * Validation checks that each key is valid.
  */
@@ -47,12 +47,13 @@
 
     /**
      * Copy constructor
+     *
      * @param copyConcept the concept to copy from
      */
     public AxKeyUse(final AxKeyUse copyConcept) {
-    		super(copyConcept);
+        super(copyConcept);
     }
-    
+
     /**
      * This constructor creates an instance of this class, and holds a reference to a used key.
      *
@@ -66,7 +67,7 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
      */
     @Override
     public AxKey getKey() {
@@ -76,7 +77,7 @@
     /*
      * (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() {
@@ -86,7 +87,7 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getID()
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getID()
      */
     @Override
     public String getID() {
@@ -106,7 +107,8 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getCompatibility(com. ericsson.apex.model.basicmodel.concepts.AxKey)
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getCompatibility(org.onap.policy.apex.model.basicmodel.
+     * concepts.AxKey)
      */
     @Override
     public AxKey.Compatibility getCompatibility(final AxKey otherKey) {
@@ -116,7 +118,9 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#isCompatible(com. ericsson.apex.model.basicmodel.concepts.AxKey)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxKey#isCompatible(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxKey)
      */
     @Override
     public boolean isCompatible(final AxKey otherKey) {
@@ -126,13 +130,15 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
      */
     @Override
     public AxValidationResult validate(final AxValidationResult result) {
         if (usedKey.equals(AxArtifactKey.getNullKey())) {
-            result.addValidationMessage(
-                    new AxValidationMessage(usedKey, this.getClass(), ValidationResult.INVALID, "usedKey is a null key"));
+            result.addValidationMessage(new AxValidationMessage(usedKey, this.getClass(), ValidationResult.INVALID,
+                    "usedKey is a null key"));
         }
         return usedKey.validate(result);
     }
@@ -140,7 +146,7 @@
     /*
      * (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() {
@@ -150,7 +156,7 @@
     /*
      * (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() {
@@ -163,13 +169,15 @@
         return builder.toString();
     }
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
         Assertions.argumentNotNull(target, "target may not be null");
 
         final Object copyObject = target;
@@ -177,20 +185,19 @@
 
         final AxKeyUse copy = ((AxKeyUse) copyObject);
         try {
-			copy.usedKey = usedKey.getClass().newInstance();
-		}
-        catch (Exception e) {
-        	throw new ApexRuntimeException("error copying concept key: " + e.getMessage(), e);
-		}
+            copy.usedKey = usedKey.getClass().newInstance();
+        } catch (final Exception e) {
+            throw new ApexRuntimeException("error copying concept key: " + e.getMessage(), e);
+        }
         usedKey.copyTo(copy.usedKey);
-        
+
         return copy;
     }
 
     /*
      * (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() {
@@ -203,7 +210,7 @@
     /*
      * (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/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java
similarity index 71%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxModel.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java
index f0489c7..dac1d69 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxModel.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.List;
 import java.util.Set;
@@ -39,32 +39,34 @@
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.basicmodel.service.ModelService;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.service.ModelService;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * This class is the base class for all models in Apex. All model classes inherit from this model so all models must have a key and have key information.
+ * This class is the base class for all models in Apex. All model classes inherit from this model so all models must
+ * have a key and have key information.
  * <p>
- * Validation checks that the model key is valid. It goes on to check for null keys and checks each key for uniqueness in the model. A check is carried out to
- * ensure that an {@link AxKeyInfo} instance exists for every {@link AxArtifactKey} key. For each {@link AxReferenceKey} instance, a check is made that its
- * parent and local name are nut null and that a {@link AxKeyInfo} entry exists for its parent. Then a check is made that each used {@link AxArtifactKey} and
- * {@link AxReferenceKey} usage references a key that exists. Finally, a check is made to ensure that an {@link AxArtifactKey} instance exists for every
- * {@link AxKeyInfo} instance.
+ * Validation checks that the model key is valid. It goes on to check for null keys and checks each key for uniqueness
+ * in the model. A check is carried out to ensure that an {@link AxKeyInfo} instance exists for every
+ * {@link AxArtifactKey} key. For each {@link AxReferenceKey} instance, a check is made that its parent and local name
+ * are nut null and that a {@link AxKeyInfo} entry exists for its parent. Then a check is made that each used
+ * {@link AxArtifactKey} and {@link AxReferenceKey} usage references a key that exists. Finally, a check is made to
+ * ensure that an {@link AxArtifactKey} instance exists for every {@link AxKeyInfo} instance.
  */
 
 @Entity
 @Table(name = "AxModel")
 @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
 
-@XmlRootElement(name = "apexModel", namespace = "http://www.ericsson.com/apex")
+@XmlRootElement(name = "apexModel", namespace = "http://www.onap.org/policy/apex-pdp")
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "AxModel", namespace = "http://www.ericsson.com/apex", propOrder = { "key", "keyInformation" })
+@XmlType(name = "AxModel", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "key", "keyInformation" })
 
 public class AxModel extends AxConcept {
     private static final String IS_A_NULL_KEY = " is a null key";
 
-	private static final long serialVersionUID = -771659065637205430L;
+    private static final long serialVersionUID = -771659065637205430L;
 
     @EmbeddedId
     @XmlElement(name = "key", required = true)
@@ -72,10 +74,8 @@
 
     // @formatter:off
     @OneToOne(cascade = CascadeType.ALL)
-    @JoinColumns({
-        @JoinColumn(name = "keyInformationName", referencedColumnName = "name"),
-        @JoinColumn(name = "keyInformationVersion", referencedColumnName = "version")
-    })
+    @JoinColumns({ @JoinColumn(name = "keyInformationName", referencedColumnName = "name"),
+            @JoinColumn(name = "keyInformationVersion", referencedColumnName = "version") })
     @XmlElement(name = "keyInformation", required = true)
     private AxKeyInformation keyInformation;
     // @formatter:on
@@ -89,12 +89,13 @@
 
     /**
      * Copy constructor
+     *
      * @param copyConcept the concept to copy from
      */
     public AxModel(final AxModel copyConcept) {
-    		super(copyConcept);
+        super(copyConcept);
     }
-    
+
     /**
      * Constructor to create this concept with the specified key.
      *
@@ -120,8 +121,9 @@
     }
 
     /**
-     * Registers this model with the {@link ModelService}. All models are registered with the model service so that models can be references from anywhere in
-     * the Apex system without being passed as references through deep call chains.
+     * Registers this model with the {@link ModelService}. All models are registered with the model service so that
+     * models can be references from anywhere in the Apex system without being passed as references through deep call
+     * chains.
      */
     public void register() {
         ModelService.registerModel(AxKeyInformation.class, getKeyInformation());
@@ -130,7 +132,7 @@
     /*
      * (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() {
@@ -140,7 +142,7 @@
     /*
      * (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() {
@@ -186,14 +188,17 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
      */
     @Override
     public AxValidationResult validate(final AxValidationResult resultIn) {
         AxValidationResult result = resultIn;
 
         if (key.equals(AxArtifactKey.getNullKey())) {
-            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
         }
 
         result = key.validate(result);
@@ -207,10 +212,9 @@
         for (final AxKey axKey : this.getKeys()) {
             // Check for the two type of keys we have
             if (axKey instanceof AxArtifactKey) {
-            		result = validateArtifactKeyInModel((AxArtifactKey) axKey, artifactKeySet, result);
-            }
-            else if (axKey instanceof AxReferenceKey) {
-        			result = validateReferenceKeyInModel((AxReferenceKey) axKey, referenceKeySet, result);
+                result = validateArtifactKeyInModel((AxArtifactKey) axKey, artifactKeySet, result);
+            } else if (axKey instanceof AxReferenceKey) {
+                result = validateReferenceKeyInModel((AxReferenceKey) axKey, referenceKeySet, result);
             }
             // It must be an AxKeyUse, nothing else is legal
             else {
@@ -231,26 +235,28 @@
         // Check key information for unused key information
         for (final AxArtifactKey keyInfoKey : keyInformation.getKeyInfoMap().keySet()) {
             if (!artifactKeySet.contains(keyInfoKey)) {
-                result.addValidationMessage(
-                        new AxValidationMessage(keyInfoKey, this.getClass(), ValidationResult.WARNING, "key not found for key information entry"));
+                result.addValidationMessage(new AxValidationMessage(keyInfoKey, this.getClass(),
+                        ValidationResult.WARNING, "key not found for key information entry"));
             }
         }
 
         return result;
     }
 
-	/**
+    /**
      * Check for consistent usage of an artifact key in the model
+     *
      * @param artifactKey The artifact key to check
-     * @param artifactKeySet The set of artifact keys encountered so far, this key is appended to the set 
+     * @param artifactKeySet The set of artifact keys encountered so far, this key is appended to the set
      * @param result The validation result to append to
      * @return the result of the validation
      */
-    private AxValidationResult validateArtifactKeyInModel(final AxArtifactKey artifactKey, Set<AxArtifactKey> artifactKeySet, AxValidationResult result) {
+    private AxValidationResult validateArtifactKeyInModel(final AxArtifactKey artifactKey,
+            final Set<AxArtifactKey> artifactKeySet, final AxValidationResult result) {
         // Null key check
         if (artifactKey.equals(AxArtifactKey.getNullKey())) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key " + artifactKey + IS_A_NULL_KEY));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key " + artifactKey + IS_A_NULL_KEY));
         }
 
         // Null key name start check
@@ -261,34 +267,35 @@
 
         // Unique key check
         if (artifactKeySet.contains(artifactKey)) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "duplicate key " + artifactKey + " found"));
-        }
-        else {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "duplicate key " + artifactKey + " found"));
+        } else {
             artifactKeySet.add(artifactKey);
         }
 
         // Key information check
         if (!keyInformation.getKeyInfoMap().containsKey(artifactKey)) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key information not found for key " + artifactKey));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key information not found for key " + artifactKey));
         }
-        
-        return result;
-	}
 
-	/**
+        return result;
+    }
+
+    /**
      * Check for consistent usage of a reference key in the model
+     *
      * @param artifactKey The reference key to check
-     * @param referenceKeySet The set of reference keys encountered so far, this key is appended to the set 
+     * @param referenceKeySet The set of reference keys encountered so far, this key is appended to the set
      * @param result The validation result to append to
      * @return the result of the validation
      */
-    private AxValidationResult validateReferenceKeyInModel(final AxReferenceKey referenceKey, Set<AxReferenceKey> referenceKeySet, AxValidationResult result) {
+    private AxValidationResult validateReferenceKeyInModel(final AxReferenceKey referenceKey,
+            final Set<AxReferenceKey> referenceKeySet, final AxValidationResult result) {
         // Null key check
         if (referenceKey.equals(AxReferenceKey.getNullKey())) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key " + referenceKey + IS_A_NULL_KEY));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key " + referenceKey + IS_A_NULL_KEY));
         }
 
         // Null parent key check
@@ -299,8 +306,8 @@
 
         // Null local name check
         if (referenceKey.getLocalName().equals(AxKey.NULL_KEY_NAME)) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key " + referenceKey + " has a null local name"));
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key " + referenceKey + " has a null local name"));
         }
 
         // Null key name start check
@@ -311,10 +318,9 @@
 
         // Unique key check
         if (referenceKeySet.contains(referenceKey)) {
-            result.addValidationMessage(
-                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "duplicate key " + referenceKey + " found"));
-        }
-        else {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "duplicate key " + referenceKey + " found"));
+        } else {
             referenceKeySet.add(referenceKey);
         }
 
@@ -325,44 +331,44 @@
         }
 
         return result;
-	}
-    
-	/**
+    }
+
+    /**
      * Check for consistent usage of cross-key references in the model
+     *
      * @param usedKeySet The set of all keys used in the model
-     * @param artifactKeySet The set of artifact keys encountered so far, this key is appended to the set 
-     * @param referenceKeySet The set of reference keys encountered so far, this key is appended to the set 
+     * @param artifactKeySet The set of artifact keys encountered so far, this key is appended to the set
+     * @param referenceKeySet The set of reference keys encountered so far, this key is appended to the set
      * @param result The validation result to append to
      * @return the result of the validation
      */
-	private AxValidationResult validateKeyUses(final Set<AxKeyUse> usedKeySet, final Set<AxArtifactKey> artifactKeySet,
-			final Set<AxReferenceKey> referenceKeySet, AxValidationResult result) {
+    private AxValidationResult validateKeyUses(final Set<AxKeyUse> usedKeySet, final Set<AxArtifactKey> artifactKeySet,
+            final Set<AxReferenceKey> referenceKeySet, final AxValidationResult result) {
         // Check all key uses
         for (final AxKeyUse usedKey : usedKeySet) {
             if (usedKey.getKey() instanceof AxArtifactKey) {
                 // AxArtifact key usage, check the key exists
                 if (!artifactKeySet.contains(usedKey.getKey())) {
-                    result.addValidationMessage(new AxValidationMessage(usedKey.getKey(), this.getClass(), ValidationResult.INVALID,
-                            "an artifact key used in the model is not defined"));
+                    result.addValidationMessage(new AxValidationMessage(usedKey.getKey(), this.getClass(),
+                            ValidationResult.INVALID, "an artifact key used in the model is not defined"));
                 }
-            }
-            else {
+            } else {
                 // AxReference key usage, check the key exists
                 if (!referenceKeySet.contains(usedKey.getKey())) {
-                    result.addValidationMessage(new AxValidationMessage(usedKey.getKey(), this.getClass(), ValidationResult.INVALID,
-                            "a reference key used in the model is not defined"));
+                    result.addValidationMessage(new AxValidationMessage(usedKey.getKey(), this.getClass(),
+                            ValidationResult.INVALID, "a reference key used in the model is not defined"));
                 }
             }
         }
-        
+
         return result;
-	}
+    }
 
 
-	/*
+    /*
      * (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() {
@@ -373,7 +379,7 @@
     /*
      * (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() {
@@ -388,13 +394,15 @@
         return builder.toString();
     }
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
         Assertions.argumentNotNull(target, "target may not be null");
 
         final Object copyObject = target;
@@ -410,7 +418,7 @@
     /*
      * (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() {
@@ -424,7 +432,7 @@
     /*
      * (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/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxReferenceKey.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java
similarity index 76%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxReferenceKey.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java
index 9401152..5965dd0 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxReferenceKey.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -31,42 +31,46 @@
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * A reference key identifies entities in the system that are contained in other entities. Every contained concept in the system must have an
- * {@link AxReferenceKey} to identify it. Non-contained first order concepts are identified using an {@link AxArtifactKey} key.
+ * A reference key identifies entities in the system that are contained in other entities. Every contained concept in
+ * the system must have an {@link AxReferenceKey} to identify it. Non-contained first order concepts are identified
+ * using an {@link AxArtifactKey} key.
  * <p>
- * An {@link AxReferenceKey} contains an {@link AxArtifactKey} key reference to the first order entity that contains it. The local name of the reference key
- * must uniquely identify the referenced concept among those concepts contained in the reference key's parent. In other words, if a parent concept has more than
- * one child, the local name in the key of all its children must be unique.
+ * An {@link AxReferenceKey} contains an {@link AxArtifactKey} key reference to the first order entity that contains it.
+ * The local name of the reference key must uniquely identify the referenced concept among those concepts contained in
+ * the reference key's parent. In other words, if a parent concept has more than one child, the local name in the key of
+ * all its children must be unique.
  * <p>
- * If a reference key's parent is itself a reference key, then the parent's local name must be set in the reference key. If the parent is a first order concept,
- * then the parent's local name in the key will be set to NULL.
+ * If a reference key's parent is itself a reference key, then the parent's local name must be set in the reference key.
+ * If the parent is a first order concept, then the parent's local name in the key will be set to NULL.
  * <p>
- * Key validation checks that the parent name and parent version fields match the {@link NAME_REGEXP} and {@link VERSION_REGEXP} regular expressions
- * respectively and that the local name fields match the {@link LOCAL_NAME_REGEXP} regular expression.
+ * Key validation checks that the parent name and parent version fields match the {@link NAME_REGEXP} and
+ * {@link VERSION_REGEXP} regular expressions respectively and that the local name fields match the
+ * {@link LOCAL_NAME_REGEXP} regular expression.
  */
 @Embeddable
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "apexReferenceKey", namespace = "http://www.ericsson.com/apex")
-@XmlType(name = "AxReferenceKey", namespace = "http://www.ericsson.com/apex", propOrder = { "parentKeyName", "parentKeyVersion", "parentLocalName",
-        "localName" })
+@XmlRootElement(name = "apexReferenceKey", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxReferenceKey", namespace = "http://www.onap.org/policy/apex-pdp",
+        propOrder = { "parentKeyName", "parentKeyVersion", "parentLocalName", "localName" })
 
 public class AxReferenceKey extends AxKey {
-	private static final String PARENT_KEY_NAME = "parentKeyName";
-	private static final String PARENT_KEY_VERSION = "parentKeyVersion";
-	private static final String PARENT_LOCAL_NAME = "parentLocalName";
+    private static final String PARENT_KEY_NAME = "parentKeyName";
+    private static final String PARENT_KEY_VERSION = "parentKeyVersion";
+    private static final String PARENT_LOCAL_NAME = "parentLocalName";
     private static final String LOCAL_NAME = "localName";
 
-	private static final long serialVersionUID = 8932717618579392561L;
+    private static final long serialVersionUID = 8932717618579392561L;
 
-    /** Regular expression to specify the structure of local names in reference keys.*/
+    /** Regular expression to specify the structure of local names in reference keys. */
     public static final String LOCAL_NAME_REGEXP = "[A-Za-z0-9\\-_\\.]+|^$";
 
-    /** Regular expression to specify the structure of IDs in reference keys.*/
-    public static final String REFERENCE_KEY_ID_REGEXP = "[A-Za-z0-9\\-_]+:[0-9].[0-9].[0-9]:[A-Za-z0-9\\-_]+:[A-Za-z0-9\\-_]+";
+    /** Regular expression to specify the structure of IDs in reference keys. */
+    public static final String REFERENCE_KEY_ID_REGEXP =
+            "[A-Za-z0-9\\-_]+:[0-9].[0-9].[0-9]:[A-Za-z0-9\\-_]+:[A-Za-z0-9\\-_]+";
 
     private static final int PARENT_NAME_FIELD = 0;
     private static final int PARENT_VERSION_FIELD = 1;
@@ -102,7 +106,8 @@
      * @param referenceKey the reference key to copy from
      */
     public AxReferenceKey(final AxReferenceKey referenceKey) {
-        this(referenceKey.getParentKeyName(), referenceKey.getParentKeyVersion(), referenceKey.getParentLocalName(), referenceKey.getLocalName());
+        this(referenceKey.getParentKeyName(), referenceKey.getParentKeyVersion(), referenceKey.getParentLocalName(),
+                referenceKey.getLocalName());
     }
 
     /**
@@ -135,8 +140,8 @@
     }
 
     /**
-     * Constructor to create a reference key for the given parent reference key (specified by the parent reference key's artifact key and local name) with the
-     * given local name.
+     * Constructor to create a reference key for the given parent reference key (specified by the parent reference key's
+     * artifact key and local name) with the given local name.
      *
      * @param axArtifactKey the artifact key of the parent reference key of this reference key
      * @param parentLocalName the local name of the parent reference key of this reference key
@@ -147,8 +152,8 @@
     }
 
     /**
-     * Constructor to create a reference key for the given parent artifact key (specified by the parent artifact key's name and version) with the given local
-     * name.
+     * Constructor to create a reference key for the given parent artifact key (specified by the parent artifact key's
+     * name and version) with the given local name.
      *
      * @param parentKeyName the name of the parent artifact key of this reference key
      * @param parentKeyVersion the version of the parent artifact key of this reference key
@@ -159,18 +164,22 @@
     }
 
     /**
-     * Constructor to create a reference key for the given parent key (specified by the parent key's name, version nad local name) with the given local name.
+     * Constructor to create a reference key for the given parent key (specified by the parent key's name, version nad
+     * local name) with the given local name.
      *
      * @param parentKeyName the parent key name of this reference key
      * @param parentKeyVersion the parent key version of this reference key
      * @param parentLocalName the parent local name of this reference key
      * @param localName the local name of this reference key
      */
-    public AxReferenceKey(final String parentKeyName, final String parentKeyVersion, final String parentLocalName, final String localName) {
+    public AxReferenceKey(final String parentKeyName, final String parentKeyVersion, final String parentLocalName,
+            final String localName) {
         super();
         this.parentKeyName = Assertions.validateStringParameter(PARENT_KEY_NAME, parentKeyName, NAME_REGEXP);
-        this.parentKeyVersion = Assertions.validateStringParameter(PARENT_KEY_VERSION, parentKeyVersion, VERSION_REGEXP);
-        this.parentLocalName = Assertions.validateStringParameter(PARENT_LOCAL_NAME, parentLocalName, LOCAL_NAME_REGEXP);
+        this.parentKeyVersion =
+                Assertions.validateStringParameter(PARENT_KEY_VERSION, parentKeyVersion, VERSION_REGEXP);
+        this.parentLocalName =
+                Assertions.validateStringParameter(PARENT_LOCAL_NAME, parentLocalName, LOCAL_NAME_REGEXP);
         this.localName = Assertions.validateStringParameter(LOCAL_NAME, localName, LOCAL_NAME_REGEXP);
     }
 
@@ -189,10 +198,14 @@
         final String[] nameVersionNameArray = conditionedId.split(":");
 
         // Initiate the new key
-        parentKeyName = Assertions.validateStringParameter(PARENT_KEY_NAME, nameVersionNameArray[PARENT_NAME_FIELD], NAME_REGEXP);
-        parentKeyVersion = Assertions.validateStringParameter(PARENT_KEY_VERSION, nameVersionNameArray[PARENT_VERSION_FIELD], VERSION_REGEXP);
-        parentLocalName = Assertions.validateStringParameter(PARENT_LOCAL_NAME, nameVersionNameArray[PARENT_LOCAL_NAME_FIELD], LOCAL_NAME_REGEXP);
-        localName = Assertions.validateStringParameter(LOCAL_NAME, nameVersionNameArray[LOCAL_NAME_FIELD], LOCAL_NAME_REGEXP);
+        parentKeyName = Assertions.validateStringParameter(PARENT_KEY_NAME, nameVersionNameArray[PARENT_NAME_FIELD],
+                NAME_REGEXP);
+        parentKeyVersion = Assertions.validateStringParameter(PARENT_KEY_VERSION,
+                nameVersionNameArray[PARENT_VERSION_FIELD], VERSION_REGEXP);
+        parentLocalName = Assertions.validateStringParameter(PARENT_LOCAL_NAME,
+                nameVersionNameArray[PARENT_LOCAL_NAME_FIELD], LOCAL_NAME_REGEXP);
+        localName = Assertions.validateStringParameter(LOCAL_NAME, nameVersionNameArray[LOCAL_NAME_FIELD],
+                LOCAL_NAME_REGEXP);
     }
 
     /**
@@ -201,13 +214,14 @@
      * @return a null reference key
      */
     public static AxReferenceKey getNullKey() {
-        return new AxReferenceKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION, AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_NAME);
+        return new AxReferenceKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION, AxKey.NULL_KEY_NAME,
+                AxKey.NULL_KEY_NAME);
     }
 
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#getKey()
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
      */
     @Override
     public AxReferenceKey getKey() {
@@ -217,7 +231,7 @@
     /*
      * (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() {
@@ -229,7 +243,7 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getID()
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getID()
      */
     @Override
     public String getID() {
@@ -313,7 +327,8 @@
      * @param parentKeyVersion the parent key version of this reference key
      */
     public void setParentKeyVersion(final String parentKeyVersion) {
-        this.parentKeyVersion = Assertions.validateStringParameter(PARENT_KEY_VERSION, parentKeyVersion, VERSION_REGEXP);
+        this.parentKeyVersion =
+                Assertions.validateStringParameter(PARENT_KEY_VERSION, parentKeyVersion, VERSION_REGEXP);
     }
 
     /**
@@ -331,7 +346,8 @@
      * @param parentLocalName the parent local name of this reference key
      */
     public void setParentLocalName(final String parentLocalName) {
-        this.parentLocalName = Assertions.validateStringParameter(PARENT_LOCAL_NAME, parentLocalName, LOCAL_NAME_REGEXP);
+        this.parentLocalName =
+                Assertions.validateStringParameter(PARENT_LOCAL_NAME, parentLocalName, LOCAL_NAME_REGEXP);
     }
 
     /**
@@ -355,7 +371,8 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#getCompatibility(com. ericsson.apex.model.basicmodel.concepts.AxKey)
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxKey#getCompatibility(org.onap.policy.apex.model.basicmodel.
+     * concepts.AxKey)
      */
     @Override
     public AxKey.Compatibility getCompatibility(final AxKey otherKey) {
@@ -370,7 +387,9 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxKey#isCompatible(com. ericsson.apex.model.basicmodel.concepts.AxKey)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxKey#isCompatible(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxKey)
      */
     @Override
     public boolean isCompatible(final AxKey otherKey) {
@@ -385,36 +404,38 @@
     /*
      * (non-Javadoc)
      *
-     * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#validate(com. ericsson.apex.model.basicmodel.concepts.AxValidationResult)
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
      */
     @Override
     public AxValidationResult validate(final AxValidationResult result) {
         try {
             Assertions.validateStringParameter(PARENT_KEY_NAME, parentKeyName, NAME_REGEXP);
-        }
-        catch (final IllegalArgumentException e) {
-            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "parentKeyName invalid-" + e.getMessage()));
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "parentKeyName invalid-" + e.getMessage()));
         }
 
         try {
             Assertions.validateStringParameter(PARENT_KEY_VERSION, parentKeyVersion, VERSION_REGEXP);
-        }
-        catch (final IllegalArgumentException e) {
-            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "parentKeyVersion invalid-" + e.getMessage()));
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "parentKeyVersion invalid-" + e.getMessage()));
         }
 
         try {
             Assertions.validateStringParameter(PARENT_LOCAL_NAME, parentLocalName, LOCAL_NAME_REGEXP);
-        }
-        catch (final IllegalArgumentException e) {
-            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "parentLocalName invalid-" + e.getMessage()));
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "parentLocalName invalid-" + e.getMessage()));
         }
 
         try {
             Assertions.validateStringParameter(LOCAL_NAME, localName, LOCAL_NAME_REGEXP);
-        }
-        catch (final IllegalArgumentException e) {
-            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID, "localName invalid-" + e.getMessage()));
+        } catch (final IllegalArgumentException e) {
+            result.addValidationMessage(new AxValidationMessage(this, this.getClass(), ValidationResult.INVALID,
+                    "localName invalid-" + e.getMessage()));
         }
 
         return result;
@@ -423,7 +444,7 @@
     /*
      * (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() {
@@ -436,7 +457,7 @@
     /*
      * (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() {
@@ -455,13 +476,15 @@
         return builder.toString();
     }
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see com.ericsson.apex.model.basicmodel.concepts.AxConcept#copyTo(com.ericsson.apex.model.basicmodel.concepts.AxConcept)
-	 */
-	@Override
-	public AxConcept copyTo(final AxConcept target) {
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept target) {
         Assertions.argumentNotNull(target, "target may not be null");
 
         final Object copyObject = target;
@@ -479,7 +502,7 @@
     /*
      * (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() {
@@ -495,7 +518,7 @@
     /*
      * (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/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationMessage.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
similarity index 87%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationMessage.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
index ef8eb31..7ca0b2f 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationMessage.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
@@ -1,31 +1,32 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
- * A validation message is created for each validation observation observed during validation of a concept. The message holds the key and
- * the class of the concept on which the observation was made as well as the type of observation and a message describing the observation.
+ * A validation message is created for each validation observation observed during validation of a concept. The message
+ * holds the key and the class of the concept on which the observation was made as well as the type of observation and a
+ * message describing the observation.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
@@ -43,7 +44,8 @@
      * @param validationResult the type of observation made
      * @param message a message describing the observation
      */
-    public AxValidationMessage(final AxKey observedKey, final Class<?> observedClass, final ValidationResult validationResult, final String message) {
+    public AxValidationMessage(final AxKey observedKey, final Class<?> observedClass,
+            final ValidationResult validationResult, final String message) {
         Assertions.argumentNotNull(observedKey, "observedKey may not be null");
         Assertions.argumentNotNull(observedClass, "observedClass may not be null");
         Assertions.argumentNotNull(validationResult, "validationResult may not be null");
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationResult.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationResult.java
similarity index 75%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationResult.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationResult.java
index 363fd15..664cf95 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/AxValidationResult.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationResult.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.LinkedList;
 import java.util.List;
@@ -35,12 +35,19 @@
     public enum ValidationResult {
         /** No problems or observations were detected during validation. */
         VALID,
-        /** Observations were made on a concept (such as blank descriptions) of a nature that will not affect the use of the concept. */
+        /**
+         * Observations were made on a concept (such as blank descriptions) of a nature that will not affect the use of
+         * the concept.
+         */
         OBSERVATION,
-        /** Warnings were made on a concept (such as defined but unused concepts) of a nature that may affect the use of the concept. */
+        /**
+         * Warnings were made on a concept (such as defined but unused concepts) of a nature that may affect the use of
+         * the concept.
+         */
         WARNING,
         /**
-         * Errors were detected on a concept (such as referenced but undefined concepts) of a nature that will affect the use of the concept.
+         * Errors were detected on a concept (such as referenced but undefined concepts) of a nature that will affect
+         * the use of the concept.
          */
         INVALID
     }
@@ -52,8 +59,8 @@
     private final List<AxValidationMessage> messageList = new LinkedList<>();
 
     /**
-     * Check if a validation reported a valid concept, returns true if the model is usable (that is, even if the model has warnings or
-     * observations).
+     * Check if a validation reported a valid concept, returns true if the model is usable (that is, even if the model
+     * has warnings or observations).
      *
      * @return true, if the concept is reported as valid and can be used
      */
@@ -89,8 +96,8 @@
     }
 
     /**
-     * Adds a validation message to the validation result, used by validate() implementations on {@link AxConcept} subclasses to report
-     * validaiton observations.
+     * Adds a validation message to the validation result, used by validate() implementations on {@link AxConcept}
+     * subclasses to report validaiton observations.
      *
      * @param validationMessage the validation message
      */
@@ -115,23 +122,23 @@
         final StringBuilder builder = new StringBuilder();
 
         switch (validationResult) {
-        case VALID:
+            case VALID:
 
-        builder.append("***validation of model successful***");
-            return builder.toString();
-        case OBSERVATION:
+                builder.append("***validation of model successful***");
+                return builder.toString();
+            case OBSERVATION:
 
-        builder.append("\n***observations noted during validation of model***\n");
-            break;
-        case WARNING:
+                builder.append("\n***observations noted during validation of model***\n");
+                break;
+            case WARNING:
 
-        builder.append("\n***warnings issued during validation of model***\n");
-            break;
-        case INVALID:
-        builder.append("\n***validation of model failed***\n");
-            break;
-        default:
-            break;
+                builder.append("\n***warnings issued during validation of model***\n");
+                break;
+            case INVALID:
+                builder.append("\n***validation of model failed***\n");
+                break;
+            default:
+                break;
         }
 
         for (final AxValidationMessage message : messageList) {
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/package-info.java
similarity index 81%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/package-info.java
index 4d5c91c..294a664 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/package-info.java
@@ -1,33 +1,33 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
  * This package contains the fundamental concepts for all APEX models.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 
-@XmlSchema(namespace = "http://www.ericsson.com/apex", elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
-        @XmlNs(namespaceURI = "http://www.ericsson.com/apex", prefix = "") })
+@XmlSchema(namespace = "http://www.onap.org/policy/apex-pdp", elementFormDefault = XmlNsForm.QUALIFIED,
+        xmlns = { @XmlNs(namespaceURI = "http://www.onap.org/policy/apex-pdp", prefix = "") })
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java
similarity index 94%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDao.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java
index 5aab39c..461f3f1 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDao.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java
@@ -1,36 +1,36 @@
-/*
+/*-
  * ============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.basicmodel.dao;
+package org.onap.policy.apex.model.basicmodel.dao;
 
 import java.util.Collection;
 import java.util.List;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+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.AxReferenceKey;
 
 /**
- * The Interface ApexDao describes the DAO interface for reading and writing Apex {@link AxConcept} concepts to and from databases using
- * JDBC.
+ * The Interface ApexDao describes the DAO interface for reading and writing Apex {@link AxConcept} concepts to and from
+ * databases using JDBC.
  *
  * @author Sergey Sachkov
  * @author liam.fallon@ericsson.com
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDaoFactory.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDaoFactory.java
similarity index 76%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDaoFactory.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDaoFactory.java
index ecb8a46..50724d2 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/ApexDaoFactory.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDaoFactory.java
@@ -1,33 +1,33 @@
-/*
+/*-
  * ============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.basicmodel.dao;
+package org.onap.policy.apex.model.basicmodel.dao;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.utilities.Assertions;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
 /**
- * This factory class returns an Apex DAO for the configured persistence mechanism. The factory uses the plugin class specified in {@link DAOParameters} to
- * instantiate a DAO instance.
+ * This factory class returns an Apex DAO for the configured persistence mechanism. The factory uses the plugin class
+ * specified in {@link DAOParameters} to instantiate a DAO instance.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
@@ -49,16 +49,18 @@
         Object apexDaoObject = null;
         try {
             apexDaoObject = Class.forName(daoParameters.getPluginClass()).newInstance();
-        }
-        catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
+        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
             LOGGER.error("Apex DAO class not found for DAO plugin \"" + daoParameters.getPluginClass() + "\"", e);
-            throw new ApexException("Apex DAO class not found for DAO plugin \"" + daoParameters.getPluginClass() + "\"", e);
+            throw new ApexException(
+                    "Apex DAO class not found for DAO plugin \"" + daoParameters.getPluginClass() + "\"", e);
         }
 
         // Check the class is an Apex DAO
         if (!(apexDaoObject instanceof ApexDao)) {
-            LOGGER.error("Specified Apex DAO plugin class \"" + daoParameters.getPluginClass() + "\" does not implement the ApexDao interface");
-            throw new ApexException("Specified Apex DAO plugin class \"" + daoParameters.getPluginClass() + "\" does not implement the ApexDao interface");
+            LOGGER.error("Specified Apex DAO plugin class \"" + daoParameters.getPluginClass()
+                    + "\" does not implement the ApexDao interface");
+            throw new ApexException("Specified Apex DAO plugin class \"" + daoParameters.getPluginClass()
+                    + "\" does not implement the ApexDao interface");
         }
 
         return (ApexDao) apexDaoObject;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/DAOParameters.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/DAOParameters.java
similarity index 87%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/DAOParameters.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/DAOParameters.java
index ccf15fe..5a44d18 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/DAOParameters.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/DAOParameters.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.dao;
+package org.onap.policy.apex.model.basicmodel.dao;
 
 import java.util.Properties;
 
@@ -29,7 +29,7 @@
  */
 public class DAOParameters {
     /** The default Apex DAO plugin class. */
-    public static final String DEFAULT_PLUGIN_CLASS = "org.onap.apex.model.basicmodel.dao.impl.DefaultApexDao";
+    public static final String DEFAULT_PLUGIN_CLASS = "org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao";
 
     private String pluginClass = DEFAULT_PLUGIN_CLASS;
     private String persistenceUnit;
@@ -55,8 +55,8 @@
     }
 
     /**
-     * Gets the persistence unit for the DAO. The persistence unit defines the JDBC properties the DAO will use. The persistence unit must defined in the
-     * {@code META-INF/persistence.xml} resource file
+     * Gets the persistence unit for the DAO. The persistence unit defines the JDBC properties the DAO will use. The
+     * persistence unit must defined in the {@code META-INF/persistence.xml} resource file
      *
      * @return the persistence unit to use for JDBC access
      */
@@ -65,8 +65,8 @@
     }
 
     /**
-     * Sets the persistence unit for the DAO. The persistence unit defines the JDBC properties the DAO will use. The persistence unit must defined in the
-     * {@code META-INF/persistence.xml} resource file
+     * Sets the persistence unit for the DAO. The persistence unit defines the JDBC properties the DAO will use. The
+     * persistence unit must defined in the {@code META-INF/persistence.xml} resource file
      *
      * @param daoPersistenceUnit the persistence unit to use for JDBC access
      */
@@ -119,6 +119,7 @@
      */
     @Override
     public String toString() {
-        return "DAOParameters [pluginClass=" + pluginClass + ", persistenceUnit=" + persistenceUnit + ", jdbcProperties=" + jdbcProperties + "]";
+        return "DAOParameters [pluginClass=" + pluginClass + ", persistenceUnit=" + persistenceUnit
+                + ", jdbcProperties=" + jdbcProperties + "]";
     }
 }
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/CDATAConditioner.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/CDATAConditioner.java
similarity index 92%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/CDATAConditioner.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/CDATAConditioner.java
index d949ab2..9e840da 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/CDATAConditioner.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/CDATAConditioner.java
@@ -1,32 +1,32 @@
-/*
+/*-
  * ============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.basicmodel.dao.converters;
+package org.onap.policy.apex.model.basicmodel.dao.converters;
 
 import javax.persistence.AttributeConverter;
 import javax.persistence.Converter;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 
 /**
- * The Class CDATAConditioner converts a CDATA String to and from database format by removing spaces at the ends of lines and
- * platform-specific new line endings.
+ * The Class CDATAConditioner converts a CDATA String to and from database format by removing spaces at the ends of
+ * lines and platform-specific new line endings.
  *
  * @author John Keeney (John.Keeney@ericsson.com)
  */
@@ -84,8 +84,7 @@
     public static final String clean(final String in) {
         if (in == null) {
             return null;
-        }
-        else {
+        } else {
             return in.replaceAll("\\s+$", "").replaceAll("\\r?\\n", NL);
         }
     }
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/UUID2String.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/UUID2String.java
similarity index 97%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/UUID2String.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/UUID2String.java
index 4e6b660..f26dfc2 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/UUID2String.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/UUID2String.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.dao.converters;
+package org.onap.policy.apex.model.basicmodel.dao.converters;
 
 import java.util.UUID;
 
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/package-info.java
similarity index 83%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/package-info.java
index c7bad67..f1e9a3b 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/converters/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/package-info.java
@@ -1,27 +1,28 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
- * Contains converters used by APEX EclipseLink marshaling and unmarshaling of {@link org.onap.apex.model.basicmodel.concepts.AxConcept}
- * instances to and from files and databases.
- * 
+ * Contains converters used by APEX EclipseLink marshaling and unmarshaling of
+ * {@link org.onap.policy.apex.model.basicmodel.concepts.AxConcept} instances to and from files and databases.
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel.dao.converters;
+
+package org.onap.policy.apex.model.basicmodel.dao.converters;
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java
new file mode 100644
index 0000000..228362b
--- /dev/null
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java
@@ -0,0 +1,520 @@
+/*-
+ * ============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.basicmodel.dao.impl;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
+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.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.dao.ApexDao;
+import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * The Class DefaultApexDao is an JPA implementation of the {@link ApexDao} class for Apex concepts ({@link AxConcept}).
+ * It uses the default JPA implementation in the javax {@link Persistence} class.
+ *
+ *
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ */
+public class DefaultApexDao implements ApexDao {
+    private static final XLogger LOGGER = XLoggerFactory.getXLogger(DefaultApexDao.class);
+
+    private static final String SELECT_C_FROM = "SELECT c FROM ";
+    private static final String AND_C_KEY_LOCAL_NAME = "' AND c.key.localName='";
+    private static final String AND_C_KEY_PARENT_KEY_VERSION = "' AND c.key.parentKeyVersion='";
+    private static final String C_WHERE_C_KEY_PARENT_KEY_NAME = " c WHERE c.key.parentKeyName='";
+    private static final String AND_C_KEY_VERSION = "' AND c.key.version='";
+    private static final String C_WHERE_C_KEY_NAME = " c WHERE c.key.name='";
+    private static final String DELETE_FROM = "DELETE FROM ";
+
+    // Entity manager for JPA
+    private EntityManagerFactory emf = null;
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.dao.ApexDao#init(org.onap.policy.apex.model.basicmodel.dao.DAOParameters)
+     */
+    @Override
+    public void init(final DAOParameters daoParameters) throws ApexException {
+        if (daoParameters == null || daoParameters.getPersistenceUnit() == null) {
+            LOGGER.error("Apex persistence unit parameter not set");
+            throw new ApexException("Apex persistence unit parameter not set");
+        }
+
+        LOGGER.debug("Creating Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" . . .");
+        try {
+            emf = Persistence.createEntityManagerFactory(daoParameters.getPersistenceUnit(),
+                    daoParameters.getJdbcProperties());
+        } catch (final Exception e) {
+            LOGGER.warn("Creation of Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" failed", e);
+            throw new ApexException(
+                    "Creation of Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\" failed", e);
+        }
+        LOGGER.debug("Created Apex persistence unit \"" + daoParameters.getPersistenceUnit() + "\"");
+    }
+
+    /**
+     * Gets the entity manager for this DAO.
+     *
+     * @return the entity manager
+     */
+    protected final synchronized EntityManager getEntityManager() {
+        if (emf == null) {
+            LOGGER.warn("Apex DAO has not been initialized");
+            throw new ApexRuntimeException("Apex DAO has not been initialized");
+        }
+
+        return emf.createEntityManager();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#close()
+     */
+    @Override
+    public final void close() {
+        if (emf != null) {
+            emf.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#create(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public <T extends AxConcept> void create(final T obj) {
+        if (obj == null) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            mg.merge(obj);
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#delete(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public <T extends AxConcept> void delete(final T obj) {
+        if (obj == null) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            mg.remove(mg.contains(obj) ? obj : mg.merge(obj));
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#delete(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey)
+     */
+    @Override
+    public <T extends AxConcept> void delete(final Class<T> aClass, final AxArtifactKey key) {
+        if (key == null) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName() + AND_C_KEY_VERSION
+                    + key.getVersion() + "'", aClass).executeUpdate();
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#delete(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey)
+     */
+    @Override
+    public <T extends AxConcept> void delete(final Class<T> aClass, final AxReferenceKey key) {
+        if (key == null) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME + key.getParentKeyName()
+                    + AND_C_KEY_PARENT_KEY_VERSION + key.getParentKeyVersion() + AND_C_KEY_LOCAL_NAME
+                    + key.getLocalName() + "'", aClass).executeUpdate();
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#create(java.util.Collection)
+     */
+    @Override
+    public <T extends AxConcept> void create(final Collection<T> objs) {
+        if (objs == null || objs.isEmpty()) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            for (final T t : objs) {
+                mg.merge(t);
+            }
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#delete(java.util.Collection)
+     */
+    @Override
+    public <T extends AxConcept> void delete(final Collection<T> objs) {
+        if (objs == null || objs.isEmpty()) {
+            return;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            for (final T t : objs) {
+                mg.remove(mg.contains(t) ? t : mg.merge(t));
+            }
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#deleteByArtifactKey(java.lang.Class, java.util.Collection)
+     */
+    @Override
+    public <T extends AxConcept> int deleteByArtifactKey(final Class<T> aClass, final Collection<AxArtifactKey> keys) {
+        if (keys == null || keys.isEmpty()) {
+            return 0;
+        }
+        int deletedCount = 0;
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            for (final AxArtifactKey key : keys) {
+                deletedCount += mg.createQuery(DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName()
+                        + AND_C_KEY_VERSION + key.getVersion() + "'", aClass).executeUpdate();
+            }
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+        return deletedCount;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#deleteByReferenceKey(java.lang.Class,
+     * java.util.Collection)
+     */
+    @Override
+    public <T extends AxConcept> int deleteByReferenceKey(final Class<T> aClass,
+            final Collection<AxReferenceKey> keys) {
+        if (keys == null || keys.isEmpty()) {
+            return 0;
+        }
+        int deletedCount = 0;
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            for (final AxReferenceKey key : keys) {
+                deletedCount +=
+                        mg.createQuery(
+                                DELETE_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME
+                                        + key.getParentKeyName() + AND_C_KEY_PARENT_KEY_VERSION
+                                        + key.getParentKeyVersion() + AND_C_KEY_LOCAL_NAME + key.getLocalName() + "'",
+                                aClass).executeUpdate();
+            }
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+        return deletedCount;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#deleteAll(java.lang.Class)
+     */
+    @Override
+    public <T extends AxConcept> void deleteAll(final Class<T> aClass) {
+        final EntityManager mg = getEntityManager();
+        try {
+            mg.getTransaction().begin();
+            mg.createQuery(DELETE_FROM + aClass.getSimpleName() + " c ", aClass).executeUpdate();
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#get(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey)
+     */
+    @Override
+    public <T extends AxConcept> T get(final Class<T> aClass, final AxArtifactKey key) {
+        if (aClass == null) {
+            return null;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            final T t = mg.find(aClass, key);
+            if (t != null) {
+                // This clone is created to force the JPA DAO to recurse down through the object
+                try {
+                    final T clonedT = aClass.newInstance();
+                    t.copyTo(clonedT);
+                    return clonedT;
+                } catch (final Exception e) {
+                    LOGGER.warn("Could not clone object of class \"" + aClass.getCanonicalName() + "\"", e);
+                    return null;
+                }
+            } else {
+                return null;
+            }
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#get(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey)
+     */
+    @Override
+    public <T extends AxConcept> T get(final Class<T> aClass, final AxReferenceKey key) {
+        if (aClass == null) {
+            return null;
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            final T t = mg.find(aClass, key);
+            if (t != null) {
+                try {
+                    final T clonedT = aClass.newInstance();
+                    t.copyTo(clonedT);
+                    return clonedT;
+                } catch (final Exception e) {
+                    LOGGER.warn("Could not clone object of class \"" + aClass.getCanonicalName() + "\"", e);
+                    return null;
+                }
+            } else {
+                return null;
+            }
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#getAll(java.lang.Class)
+     */
+    @Override
+    public <T extends AxConcept> List<T> getAll(final Class<T> aClass) {
+        if (aClass == null) {
+            return Collections.emptyList();
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            return mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + " c", aClass).getResultList();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#getAll(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey)
+     */
+    @Override
+    public <T extends AxConcept> List<T> getAll(final Class<T> aClass, final AxArtifactKey parentKey) {
+        if (aClass == null) {
+            return Collections.emptyList();
+        }
+        final EntityManager mg = getEntityManager();
+        try {
+            return mg
+                    .createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME
+                            + parentKey.getName() + AND_C_KEY_PARENT_KEY_VERSION + parentKey.getVersion() + "'", aClass)
+                    .getResultList();
+        } finally {
+            mg.close();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#getArtifact(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey)
+     */
+    @Override
+    public <T extends AxConcept> T getArtifact(final Class<T> aClass, final AxArtifactKey key) {
+        if (aClass == null || key == null) {
+            return null;
+        }
+        final EntityManager mg = getEntityManager();
+        List<T> ret;
+        try {
+            ret = mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_NAME + key.getName()
+                    + AND_C_KEY_VERSION + key.getVersion() + "'", aClass).getResultList();
+        } finally {
+            mg.close();
+        }
+        if (ret == null || ret.isEmpty()) {
+            return null;
+        }
+        if (ret.size() > 1) {
+            throw new IllegalArgumentException("More than one result was returned for search for " + aClass
+                    + " with key " + key.getID() + ": " + ret);
+        }
+        return ret.get(0);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#getArtifact(java.lang.Class,
+     * org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey)
+     */
+    @Override
+    public <T extends AxConcept> T getArtifact(final Class<T> aClass, final AxReferenceKey key) {
+        if (aClass == null || key == null) {
+            return null;
+        }
+        final EntityManager mg = getEntityManager();
+        List<T> ret;
+        try {
+            ret = mg.createQuery(SELECT_C_FROM + aClass.getSimpleName() + C_WHERE_C_KEY_PARENT_KEY_NAME
+                    + key.getParentKeyName() + AND_C_KEY_PARENT_KEY_VERSION + key.getParentKeyVersion()
+                    + AND_C_KEY_LOCAL_NAME + key.getLocalName() + "'", aClass).getResultList();
+        } finally {
+            mg.close();
+        }
+        if (ret == null || ret.isEmpty()) {
+            return null;
+        }
+        if (ret.size() > 1) {
+            throw new IllegalArgumentException("More than one result was returned for search for " + aClass
+                    + " with key " + key.getID() + ": " + ret);
+        }
+        return ret.get(0);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#update(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public <T extends AxConcept> T update(final T obj) {
+        final EntityManager mg = getEntityManager();
+        T ret;
+        try {
+            mg.getTransaction().begin();
+            ret = mg.merge(obj);
+            mg.flush();
+            mg.getTransaction().commit();
+        } finally {
+            mg.close();
+        }
+        return ret;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.dao.ApexDao#size(java.lang.Class)
+     */
+    @Override
+    public <T extends AxConcept> long size(final Class<T> aClass) {
+        if (aClass == null) {
+            return 0;
+        }
+        final EntityManager mg = getEntityManager();
+        long size = 0;
+        try {
+            size = mg.createQuery("SELECT COUNT(c) FROM " + aClass.getSimpleName() + " c", Long.class)
+                    .getSingleResult();
+        } finally {
+            mg.close();
+        }
+        return size;
+    }
+}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/package-info.java
similarity index 87%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/package-info.java
index 16da226..12e854f 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/impl/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/package-info.java
@@ -19,8 +19,8 @@
  */
 
 /**
- * Contains a default DAO implementation for APEX {@link org.onap.apex.model.basicmodel.concepts.AxConcept} classes that uses javax persistence.
+ * Contains a default DAO implementation for APEX {@link org.onap.policy.apex.model.basicmodel.concepts.AxConcept} classes that uses javax persistence.
  * 
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel.dao.impl;
+package org.onap.policy.apex.model.basicmodel.dao.impl;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/package-info.java
similarity index 83%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/package-info.java
index 0ad255a..fe551b8 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/dao/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/package-info.java
@@ -1,27 +1,29 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
- * Defines and implements the Data Access Object (DAO) that allows Apex {@link org.onap.apex.model.basicmodel.concepts.AxConcept} concepts to
- * be read from and written to databases over JDBC.
- * 
+ * Defines and implements the Data Access Object (DAO) that allows Apex
+ * {@link org.onap.policy.apex.model.basicmodel.concepts.AxConcept} concepts to be read from and written to databases over
+ * JDBC.
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel.dao;
+
+package org.onap.policy.apex.model.basicmodel.dao;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelCreator.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelCreator.java
similarity index 92%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelCreator.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelCreator.java
index 5a9de96..7b6d830 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelCreator.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelCreator.java
@@ -18,9 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
-import org.onap.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
 
 /**
  * This interface is implemented by factories that create Apex models. It is mainly used by unit test classes that generate Apex models for test purposes.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelException.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelException.java
similarity index 92%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelException.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelException.java
index 252bee4..8964a5b 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelException.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelException.java
@@ -18,9 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 
 /**
  * This exception is invoked if an exception occurs in model handling.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelFileWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java
similarity index 96%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelFileWriter.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java
index 8d9cf2a..2312b88 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelFileWriter.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java
@@ -18,13 +18,13 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.File;
 import java.io.FileOutputStream;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelReader.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java
similarity index 97%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelReader.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java
index 84760f5..b19255a 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelReader.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -40,8 +40,8 @@
 import org.eclipse.persistence.jaxb.JAXBContextFactory;
 import org.eclipse.persistence.jaxb.MarshallerProperties;
 import org.eclipse.persistence.oxm.MediaType;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
 import org.onap.policy.apex.model.utilities.Assertions;
 import org.onap.policy.apex.model.utilities.ResourceUtils;
 import org.onap.policy.apex.model.utilities.TextFileUtils;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelSaver.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java
similarity index 95%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelSaver.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java
index 7f4efee..16ea1f3 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelSaver.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java
@@ -18,12 +18,12 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.File;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
 import org.onap.policy.apex.model.utilities.Assertions;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelStringWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java
similarity index 96%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelStringWriter.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java
index 882092c..3d2e50b 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelStringWriter.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java
@@ -18,12 +18,12 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.ByteArrayOutputStream;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
 import org.onap.policy.apex.model.utilities.Assertions;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java
similarity index 97%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelWriter.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java
index 5b7a956..180c244 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexModelWriter.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
@@ -41,8 +41,8 @@
 import org.eclipse.persistence.jaxb.JAXBContextFactory;
 import org.eclipse.persistence.jaxb.MarshallerProperties;
 import org.eclipse.persistence.oxm.MediaType;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
 import org.onap.policy.apex.model.utilities.Assertions;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexSchemaGenerator.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java
similarity index 98%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexSchemaGenerator.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java
index 5055df6..6e17ab9 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/ApexSchemaGenerator.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.File;
 import java.io.IOException;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/package-info.java
similarity index 67%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/package-info.java
index 871a0ea..081cff5 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/handling/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/package-info.java
@@ -1,36 +1,35 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
- * Contains a number of utility classes for handling APEX {@link org.onap.apex.model.basicmodel.concepts.AxModel} models and
- * {@link org.onap.apex.model.basicmodel.concepts.AxConcept} concepts.
- * Classes to read and write models to files, strings, and databases are included, as
- * well as classes to generate XML schemas for models.
- * 
+ * Contains a number of utility classes for handling APEX {@link org.onap.policy.apex.model.basicmodel.concepts.AxModel}
+ * models and {@link org.onap.policy.apex.model.basicmodel.concepts.AxConcept} concepts. Classes to read and write
+ * models to files, strings, and databases are included, as well as classes to generate XML schemas for models.
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 
-@XmlSchema(namespace = "http://www.ericsson.com/apex", elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
-        @XmlNs(namespaceURI = "http://www.ericsson.com/apex", prefix = "") })
+@XmlSchema(namespace = "http://www.onap.org/policy/apex-pdp", elementFormDefault = XmlNsForm.QUALIFIED,
+        xmlns = { @XmlNs(namespaceURI = "http://www.onap.org/policy/apex-pdp", prefix = "") })
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/package-info.java
similarity index 96%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/package-info.java
index dbee9cc..8c76c5f 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/package-info.java
@@ -26,4 +26,4 @@
  * 
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel;
+package org.onap.policy.apex.model.basicmodel;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/AbstractParameters.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
similarity index 95%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/AbstractParameters.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
index 2cde325..95bc853 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/AbstractParameters.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
@@ -18,9 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
-import org.onap.apex.model.basicmodel.concepts.ApexRuntimeException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
 import org.onap.policy.apex.model.utilities.Assertions;
 
 /**
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ModelService.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java
similarity index 94%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ModelService.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java
index 688beaa..d1ecc60 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ModelService.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java
@@ -18,13 +18,13 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.onap.apex.model.basicmodel.concepts.ApexRuntimeException;
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
 
 /**
  * The model service makes Apex models available to all classes in a JVM.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ParameterService.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ParameterService.java
similarity index 96%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ParameterService.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ParameterService.java
index 9a254b0..0622130 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/ParameterService.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ParameterService.java
@@ -18,14 +18,14 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.onap.apex.model.basicmodel.concepts.ApexRuntimeException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
 
 /**
  * The parameter service makes Apex parameters available to all classes in a JVM.
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/package-info.java
similarity index 94%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/package-info.java
index da6c698..a27e45d 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/service/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/package-info.java
@@ -23,4 +23,4 @@
  * 
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java
similarity index 94%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModel.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java
index e7e5067..04b6420 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModel.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java
@@ -18,22 +18,22 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.test;
+package org.onap.policy.apex.model.basicmodel.test;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.net.URL;
 
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.dao.ApexDao;
-import org.onap.apex.model.basicmodel.dao.ApexDaoFactory;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
-import org.onap.apex.model.basicmodel.handling.ApexModelFileWriter;
-import org.onap.apex.model.basicmodel.handling.ApexModelReader;
-import org.onap.apex.model.basicmodel.handling.ApexModelWriter;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+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.dao.ApexDao;
+import org.onap.policy.apex.model.basicmodel.dao.ApexDaoFactory;
+import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter;
 import org.onap.policy.apex.model.utilities.ResourceUtils;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModelCreator.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModelCreator.java
similarity index 90%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModelCreator.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModelCreator.java
index 7213c66..9807489 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/TestApexModelCreator.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModelCreator.java
@@ -18,10 +18,10 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.test;
+package org.onap.policy.apex.model.basicmodel.test;
 
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelCreator;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelCreator;
 
 /**
  * The Interface TestApexModelCreator is used to create models for Apex model tests. It is mainly used by unit tests for Apex domain models so that
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/package-info.java
similarity index 95%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/package-info.java
index 6bd6b73..9bbdd1c 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/test/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/package-info.java
@@ -23,4 +23,4 @@
  * 
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
-package org.onap.apex.model.basicmodel.test;
+package org.onap.policy.apex.model.basicmodel.test;
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java
similarity index 86%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java
index a2bfbb8..28f0cf7 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.xml;
+package org.onap.policy.apex.model.basicmodel.xml;
 
 import java.io.Serializable;
 
@@ -27,20 +27,21 @@
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
 
 /**
- * This class manages marshaling and unmarshaling of Apex {@link AxReferenceKey} concepts using JAXB. The local name in reference keys must have specific
- * handling.
+ * This class manages marshaling and unmarshaling of Apex {@link AxReferenceKey} concepts using JAXB. The local name in
+ * reference keys must have specific handling.
  */
 @XmlAccessorType(XmlAccessType.PROPERTY)
-@XmlType(namespace = "http://www.ericsson.com/apex")
+@XmlType(namespace = "http://www.onap.org/policy/apex-pdp")
 public class AxReferenceKeyAdapter extends XmlAdapter<String, AxReferenceKey> implements Serializable {
 
     private static final long serialVersionUID = -3480405083900107029L;
 
     /*
      * (non-Javadoc)
+     * 
      * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
      */
     @Override
@@ -50,6 +51,7 @@
 
     /*
      * (non-Javadoc)
+     * 
      * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
      */
     @Override
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/package-info.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/package-info.java
similarity index 81%
rename from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/package-info.java
rename to model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/package-info.java
index 77bc0c1..290209d 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/xml/package-info.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/package-info.java
@@ -1,33 +1,33 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
  * Contains utility classes for managing marshaling and unmarshaling of APEX models using JAXB.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 
-@XmlSchema(namespace = "http://www.ericsson.com/apex", elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
-        @XmlNs(namespaceURI = "http://www.ericsson.com/apex", prefix = "") })
+@XmlSchema(namespace = "http://www.onap.org/policy/apex-pdp", elementFormDefault = XmlNsForm.QUALIFIED,
+        xmlns = { @XmlNs(namespaceURI = "http://www.onap.org/policy/apex-pdp", prefix = "") })
 
-package org.onap.apex.model.basicmodel.xml;
+package org.onap.policy.apex.model.basicmodel.xml;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
diff --git a/model/basic-model/src/main/resources/xml/example.xsd b/model/basic-model/src/main/resources/xml/example.xsd
index 9f253f2..75ecdc3 100644
--- a/model/basic-model/src/main/resources/xml/example.xsd
+++ b/model/basic-model/src/main/resources/xml/example.xsd
@@ -18,7 +18,7 @@
   SPDX-License-Identifier: Apache-2.0
   ============LICENSE_END=========================================================
 -->
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://www.ericsson.com/apex" xmlns="http://www.ericsson.com/apex" xmlns:tns="http://www.ericsson.com/apex" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://www.onap.org/policy/apex-pdp" xmlns="http://www.onap.org/policy/apex-pdp" xmlns:tns="http://www.onap.org/policy/apex-pdp" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
   <xs:element name="apexArtifactKey" type="AxArtifactKey"/>
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModel.java b/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModel.java
deleted file mode 100644
index e4d91b7..0000000
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModel.java
+++ /dev/null
@@ -1,137 +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.basicmodel.handling;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
-import org.onap.apex.model.basicmodel.test.TestApexModel;
-
-public class TestApexBasicModel {
-    private Connection connection;
-    TestApexModel<AxModel> testApexModel;
-
-    @Before
-    public void setup() throws Exception {
-        Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
-        connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
-        testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator());
-    }
-
-    @After
-    public void teardown() throws Exception {
-        connection.close();
-        new File("derby.log").delete();
-    }
-
-    @Test
-    public void testModelValid() throws Exception {
-        AxValidationResult result = testApexModel.testApexModelValid();
-        assertTrue(result.toString().equals(VALID_MODEL_STRING));
-    }
-
-    @Test
-    public void testApexModelVaidateObservation() throws Exception {
-        try {
-            testApexModel.testApexModelVaidateObservation();
-        }
-        catch (ApexException e) {
-            assertEquals("model should have observations", e.getMessage());
-        }
-    }
-
-    @Test
-    public void testApexModelVaidateWarning() throws Exception {
-        AxValidationResult result = testApexModel.testApexModelVaidateWarning();
-        assertTrue(result.toString().equals(WARNING_MODEL_STRING));
-    }
-
-    @Test
-    public void testModelVaidateInvalidModel() throws Exception {
-        AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
-        assertTrue(result.toString().equals(INVALID_MODEL_STRING));
-    }
-
-    @Test
-    public void testModelVaidateMalstructured() throws Exception {
-        AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
-        assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
-    }
-
-    @Test
-    public void testModelWriteReadXML() throws Exception {
-        testApexModel.testApexModelWriteReadXML();
-    }
-
-    @Test
-    public void testModelWriteReadJSON() throws Exception {
-        testApexModel.testApexModelWriteReadJSON();
-    }
-
-    @Test
-    public void testModelWriteReadJPA() throws Exception {
-        DAOParameters daoParameters = new DAOParameters();
-        daoParameters.setPluginClass("org.onap.apex.model.basicmodel.dao.impl.DefaultApexDao");
-        daoParameters.setPersistenceUnit("DAOTest");
-
-        testApexModel.testApexModelWriteReadJPA(daoParameters);
-    }
-
-    // As there are no real concepts in a basic model, this is as near to a valid model as we can get
-    private static final String VALID_MODEL_STRING = "\n" +
-            "***warnings issued during validation of model***\n" +
-            "AxArtifactKey:(name=FloatKIKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "AxArtifactKey:(name=IntegerKIKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "********************************";
-
-    private static final String WARNING_MODEL_STRING = "\n" +
-            "***warnings issued during validation of model***\n" +
-            "AxArtifactKey:(name=FloatKIKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "AxArtifactKey:(name=IntegerKIKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "AxArtifactKey:(name=Unref0,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "AxArtifactKey:(name=Unref1,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n" +
-            "********************************";
-
-    private static final String INVALID_MODEL_STRING = "\n" +
-            "***validation of model failed***\n" +
-            "AxArtifactKey:(name=BasicModelKey,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=KeyInfoMapKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxKeyInfo:OBSERVATION:description is blank\n" +
-            "AxArtifactKey:(name=KeyInfoMapKey,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=KeyInfoMapKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxKeyInformation:INVALID:duplicate UUID found on keyInfoMap entry AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):00000000-0000-0000-0000-000000000000\n" +
-            "********************************";
-
-    private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" +
-            "***validation of model failed***\n" +
-            "AxArtifactKey:(name=BasicModelKey,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=BasicModelKey,version=0.0.1):org.onap.apex.model.basicmodel.concepts.AxModel:INVALID:key information not found for key AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1)\n" +
-            "********************************";
-}
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/AxKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
similarity index 92%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/AxKeyTest.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
index a454aaf..6ac46b1 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/AxKeyTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -27,11 +27,11 @@
 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.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxKey.Compatibility;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey.Compatibility;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxKeyInfo.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxKeyInfo.java
similarity index 94%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxKeyInfo.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxKeyInfo.java
index 6af662b..8368634 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxKeyInfo.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxKeyInfo.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -29,9 +29,9 @@
 import java.util.UUID;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
+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.AxValidationResult;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxReferenceKey.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxReferenceKey.java
similarity index 94%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxReferenceKey.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxReferenceKey.java
index 7ec3cbb..dbc925d 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestAxReferenceKey.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestAxReferenceKey.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -27,10 +27,10 @@
 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.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestEntity.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java
similarity index 91%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestEntity.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java
index 3e821f7..6ba380b 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestEntity.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestEntity.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import java.util.Arrays;
 import java.util.List;
@@ -29,11 +29,11 @@
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.onap.apex.model.basicmodel.concepts.AxConcept;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
+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.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
 
 @Entity
 @Table(name = "TestEntity")
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestExceptions.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestExceptions.java
similarity index 89%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestExceptions.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestExceptions.java
index 1d37cd8..1fc5209 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestExceptions.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestExceptions.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -26,10 +26,10 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexConceptException;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.ApexRuntimeException;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexConceptException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestValidation.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestValidation.java
similarity index 90%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestValidation.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestValidation.java
index e8eff52..93eb78b 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/TestValidation.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/TestValidation.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -26,11 +26,11 @@
 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.AxReferenceKey;
-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.AxReferenceKey;
+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;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/testKeyUse.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/testKeyUse.java
similarity index 87%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/testKeyUse.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/testKeyUse.java
index ca1e5c1..10706f3 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/concepts/testKeyUse.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/testKeyUse.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.basicmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -27,11 +27,11 @@
 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.AxKeyUse;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxKey.Compatibility;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey.Compatibility;
 
 public class testKeyUse {
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/EntityTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
similarity index 87%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/EntityTest.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
index 8777984..e5d5973 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/EntityTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.dao;
+package org.onap.policy.apex.model.basicmodel.dao;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -38,14 +38,11 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.TestEntity;
-import org.onap.apex.model.basicmodel.dao.ApexDao;
-import org.onap.apex.model.basicmodel.dao.ApexDaoFactory;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+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.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.TestEntity;
 
 /**
  * JUnit test class
@@ -75,16 +72,14 @@
         try {
             apexDao.init(null);
             fail("Test should throw an exception here");
-        }
-        catch (final Exception e) {
+        } catch (final Exception e) {
             assertEquals("Apex persistence unit parameter not set", e.getMessage());
         }
 
         try {
             apexDao.init(daoParameters);
             fail("Test should throw an exception here");
-        }
-        catch (final Exception e) {
+        } catch (final Exception e) {
             assertEquals("Apex persistence unit parameter not set", e.getMessage());
         }
 
@@ -93,15 +88,13 @@
         try {
             apexDao.init(daoParameters);
             fail("Test should throw an exception here");
-        }
-        catch (final Exception e) {
+        } catch (final Exception e) {
             assertEquals("Creation of Apex persistence unit \"Dorothy\" failed", e.getMessage());
         }
         try {
             apexDao.create(new AxArtifactKey());
             fail("Test should throw an exception here");
-        }
-        catch (final Exception e) {
+        } catch (final Exception e) {
             assertEquals("Apex DAO has not been initialized", e.getMessage());
         }
         apexDao.close();
@@ -110,7 +103,7 @@
     @Test
     public void testEntityTestAllOpsJPA() throws ApexException {
         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");
 
         apexDao = new ApexDaoFactory().createApexDao(daoParameters);
@@ -123,7 +116,7 @@
     @Test
     public void testEntityTestBadVals() throws ApexException {
         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");
 
         apexDao = new ApexDaoFactory().createApexDao(daoParameters);
@@ -163,13 +156,16 @@
         apexDao.close();
     }
 
-    private void testAllOps(){
-        final AxArtifactKey  aKey0    = new AxArtifactKey("A-KEY0", "0.0.1");
-        final AxArtifactKey  aKey1    = new AxArtifactKey("A-KEY1", "0.0.1");
-        final AxArtifactKey  aKey2    = new AxArtifactKey("A-KEY2", "0.0.1");
-        final AxKeyInfo      keyInfo0 = new AxKeyInfo(aKey0, UUID.fromString("00000000-0000-0000-0000-000000000000"), "key description 0");
-        final AxKeyInfo      keyInfo1 = new AxKeyInfo(aKey1, UUID.fromString("00000000-0000-0000-0000-000000000001"), "key description 1");
-        final AxKeyInfo      keyInfo2 = new AxKeyInfo(aKey2, UUID.fromString("00000000-0000-0000-0000-000000000002"), "key description 2");
+    private void testAllOps() {
+        final AxArtifactKey aKey0 = new AxArtifactKey("A-KEY0", "0.0.1");
+        final AxArtifactKey aKey1 = new AxArtifactKey("A-KEY1", "0.0.1");
+        final AxArtifactKey aKey2 = new AxArtifactKey("A-KEY2", "0.0.1");
+        final AxKeyInfo keyInfo0 =
+                new AxKeyInfo(aKey0, UUID.fromString("00000000-0000-0000-0000-000000000000"), "key description 0");
+        final AxKeyInfo keyInfo1 =
+                new AxKeyInfo(aKey1, UUID.fromString("00000000-0000-0000-0000-000000000001"), "key description 1");
+        final AxKeyInfo keyInfo2 =
+                new AxKeyInfo(aKey2, UUID.fromString("00000000-0000-0000-0000-000000000002"), "key description 2");
 
         apexDao.create(keyInfo0);
 
@@ -182,7 +178,7 @@
         final AxKeyInfo keyInfoBack1 = apexDao.getArtifact(AxKeyInfo.class, aKey0);
         assertTrue(keyInfoBack0.equals(keyInfoBack1));
 
-        final AxKeyInfo keyInfoBack2 = apexDao.getArtifact(AxKeyInfo.class,  new AxArtifactKey("A-KEY3", "0.0.1"));
+        final AxKeyInfo keyInfoBack2 = apexDao.getArtifact(AxKeyInfo.class, new AxArtifactKey("A-KEY3", "0.0.1"));
         assertNull(keyInfoBack2);
 
         final Set<AxKeyInfo> keyInfoSetIn = new TreeSet<AxKeyInfo>();
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/TestDaoMisc.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/TestDaoMisc.java
similarity index 73%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/TestDaoMisc.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/TestDaoMisc.java
index 9109bc2..9f5b72d 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/dao/TestDaoMisc.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/TestDaoMisc.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.dao;
+package org.onap.policy.apex.model.basicmodel.dao;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -27,10 +27,8 @@
 import java.util.Properties;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.dao.ApexDaoFactory;
-import org.onap.apex.model.basicmodel.dao.DAOParameters;
-import org.onap.apex.model.basicmodel.dao.converters.CDATAConditioner;
-import org.onap.apex.model.basicmodel.dao.converters.UUID2String;
+import org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner;
+import org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
@@ -39,7 +37,7 @@
 
     @Test
     public void testUUID2StringMopUp() {
-        UUID2String uuid2String = new UUID2String();
+        final UUID2String uuid2String = new UUID2String();
         assertEquals("", uuid2String.convertToDatabaseColumn(null));
     }
 
@@ -47,45 +45,47 @@
     public void testCDataConditionerMopUp() {
         assertNull(CDATAConditioner.clean(null));
     }
-    
+
     @Test
     public void testDaoFactory() {
-        DAOParameters daoParameters = new DAOParameters();
+        final DAOParameters daoParameters = new DAOParameters();
 
         daoParameters.setPluginClass("somewhere.over.the.rainbow");
         try {
             new ApexDaoFactory().createApexDao(daoParameters);
             fail("test shold throw an exception here");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("Apex DAO class not found for DAO plugin \"somewhere.over.the.rainbow\"", e.getMessage());
         }
-        
+
         daoParameters.setPluginClass("java.lang.String");
         try {
             new ApexDaoFactory().createApexDao(daoParameters);
             fail("test shold throw an exception here");
-        }
-        catch (Exception e) {
-            assertEquals("Specified Apex DAO plugin class \"java.lang.String\" does not implement the ApexDao interface", e.getMessage());
+        } catch (final Exception e) {
+            assertEquals(
+                    "Specified Apex DAO plugin class \"java.lang.String\" does not implement the ApexDao interface",
+                    e.getMessage());
         }
     }
-    
+
     @Test
     public void testDaoParameters() {
-        DAOParameters pars = new DAOParameters();
+        final DAOParameters pars = new DAOParameters();
         pars.setJdbcProperties(new Properties());
         assertEquals(0, pars.getJdbcProperties().size());
-        
+
         pars.setJdbcProperty("name", "Dorothy");
         assertEquals("Dorothy", pars.getJdbcProperty("name"));
-        
+
         pars.setPersistenceUnit("Kansas");
         assertEquals("Kansas", pars.getPersistenceUnit());
-        
+
         pars.setPluginClass("somewhere.over.the.rainbow");
         assertEquals("somewhere.over.the.rainbow", pars.getPluginClass());
-        
-        assertEquals("DAOParameters [pluginClass=somewhere.over.the.rainbow, persistenceUnit=Kansas, jdbcProperties={name=Dorothy}]", pars.toString());
+
+        assertEquals(
+                "DAOParameters [pluginClass=somewhere.over.the.rainbow, persistenceUnit=Kansas, jdbcProperties={name=Dorothy}]",
+                pars.toString());
     }
 }
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/AxModelWithReferences.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java
similarity index 85%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/AxModelWithReferences.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java
index e08b448..3835905 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/AxModelWithReferences.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/AxModelWithReferences.java
@@ -18,15 +18,15 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
 
 public class AxModelWithReferences extends AxModel {
     private static final long serialVersionUID = -8194956638511120008L;
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModel.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModel.java
new file mode 100644
index 0000000..d0423eb
--- /dev/null
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModel.java
@@ -0,0 +1,133 @@
+/*-
+ * ============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.basicmodel.handling;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+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.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
+
+public class TestApexBasicModel {
+    private Connection connection;
+    TestApexModel<AxModel> testApexModel;
+
+    @Before
+    public void setup() throws Exception {
+        Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+        connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
+
+        testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator());
+    }
+
+    @After
+    public void teardown() throws Exception {
+        connection.close();
+        new File("derby.log").delete();
+    }
+
+    @Test
+    public void testModelValid() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelValid();
+        assertTrue(result.toString().equals(VALID_MODEL_STRING));
+    }
+
+    @Test
+    public void testApexModelVaidateObservation() throws Exception {
+        try {
+            testApexModel.testApexModelVaidateObservation();
+        } catch (final ApexException e) {
+            assertEquals("model should have observations", e.getMessage());
+        }
+    }
+
+    @Test
+    public void testApexModelVaidateWarning() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateWarning();
+        assertTrue(result.toString().equals(WARNING_MODEL_STRING));
+    }
+
+    @Test
+    public void testModelVaidateInvalidModel() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
+        assertTrue(result.toString().equals(INVALID_MODEL_STRING));
+    }
+
+    @Test
+    public void testModelVaidateMalstructured() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
+        assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
+    }
+
+    @Test
+    public void testModelWriteReadXML() throws Exception {
+        testApexModel.testApexModelWriteReadXML();
+    }
+
+    @Test
+    public void testModelWriteReadJSON() throws Exception {
+        testApexModel.testApexModelWriteReadJSON();
+    }
+
+    @Test
+    public void testModelWriteReadJPA() throws Exception {
+        final DAOParameters daoParameters = new DAOParameters();
+        daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+        daoParameters.setPersistenceUnit("DAOTest");
+
+        testApexModel.testApexModelWriteReadJPA(daoParameters);
+    }
+
+    // As there are no real concepts in a basic model, this is as near to a valid model as we can get
+    private static final String VALID_MODEL_STRING = "\n" + "***warnings issued during validation of model***\n"
+            + "AxArtifactKey:(name=FloatKIKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "AxArtifactKey:(name=IntegerKIKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "********************************";
+
+    private static final String WARNING_MODEL_STRING = "\n" + "***warnings issued during validation of model***\n"
+            + "AxArtifactKey:(name=FloatKIKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "AxArtifactKey:(name=IntegerKIKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "AxArtifactKey:(name=Unref0,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "AxArtifactKey:(name=Unref1,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:WARNING:key not found for key information entry\n"
+            + "********************************";
+
+    private static final String INVALID_MODEL_STRING = "\n" + "***validation of model failed***\n"
+            + "AxArtifactKey:(name=BasicModelKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:WARNING:UUID is a zero UUID: 00000000-0000-0000-0000-000000000000\n"
+            + "AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:OBSERVATION:description is blank\n"
+            + "AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:WARNING:UUID is a zero UUID: 00000000-0000-0000-0000-000000000000\n"
+            + "AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation:INVALID:duplicate UUID found on keyInfoMap entry AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):00000000-0000-0000-0000-000000000000\n"
+            + "********************************";
+
+    private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n"
+            + "AxArtifactKey:(name=BasicModelKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo:WARNING:UUID is a zero UUID: 00000000-0000-0000-0000-000000000000\n"
+            + "AxArtifactKey:(name=BasicModelKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxModel:INVALID:key information not found for key AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1)\n"
+            + "********************************";
+}
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java
similarity index 85%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java
index 9d29c08..1ab7a26 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelConcepts.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -31,17 +31,17 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.apex.model.basicmodel.concepts.AxKeyUse;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
-import org.onap.apex.model.basicmodel.service.ModelService;
-import org.onap.apex.model.basicmodel.test.TestApexModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+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.concepts.AxKeyUse;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+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.service.ModelService;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
 
 public class TestApexBasicModelConcepts {
     TestApexModel<AxModel> testApexModel;
@@ -53,7 +53,7 @@
 
     @Test
     public void testModelConcepts() {
-        AxModel model = testApexModel.getModel();
+        final AxModel model = testApexModel.getModel();
         assertNotNull(model);
         model.clean();
         assertNotNull(model);
@@ -65,7 +65,7 @@
         model.register();
         assertEquals(model.getKeyInformation(), ModelService.getModel(AxKeyInformation.class));
 
-        AxModel clonedModel = new AxModel(model);
+        final AxModel clonedModel = new AxModel(model);
         assertTrue(clonedModel.toString().startsWith("AxModel:(key=AxArtifactKey:(name=BasicModel"));
 
         assertFalse(model.hashCode() == 0);
@@ -91,8 +91,8 @@
         model.getKeyInformation().generateKeyInfo(model);
         assertNotNull(model.getKeyInformation());
 
-        AxKeyInformation keyI = model.getKeyInformation();
-        AxKeyInformation clonedKeyI = new AxKeyInformation(keyI);
+        final AxKeyInformation keyI = model.getKeyInformation();
+        final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI);
 
         assertFalse(keyI.equals(null));
         assertFalse(keyI.equals(new AxArtifactKey()));
@@ -177,7 +177,7 @@
         result = clonedKeyI.validate(result);
         assertEquals(ValidationResult.VALID, result.getValidationResult());
 
-        AxKeyInfo mk = clonedKeyI.get(new AxArtifactKey("BasicModel", "0.0.1"));
+        final AxKeyInfo mk = clonedKeyI.get(new AxArtifactKey("BasicModel", "0.0.1"));
         assertNotNull(mk);
         mk.setKey(AxArtifactKey.getNullKey());
         result = new AxValidationResult();
@@ -189,7 +189,7 @@
         result = new AxValidationResult();
         result = clonedKeyI.validate(result);
         assertEquals(ValidationResult.VALID, result.getValidationResult());
-        
+
         clonedModel.setKey(AxArtifactKey.getNullKey());
         result = new AxValidationResult();
         result = clonedModel.validate(result);
@@ -200,14 +200,14 @@
         result = clonedKeyI.validate(result);
         assertEquals(ValidationResult.VALID, result.getValidationResult());
     }
-    
+
     @Test
     public void testModelConceptsWithReferences() {
-        AxModelWithReferences mwr = new TestApexBasicModelCreator().getModelWithReferences();
+        final AxModelWithReferences mwr = new TestApexBasicModelCreator().getModelWithReferences();
         assertNotNull(mwr);
         mwr.getKeyInformation().getKeyInfoMap().clear();
         mwr.getKeyInformation().generateKeyInfo(mwr);
-        
+
         AxValidationResult result = new AxValidationResult();
         result = mwr.validate(result);
         assertEquals(ValidationResult.VALID, result.getValidationResult());
@@ -235,7 +235,7 @@
         assertEquals(ValidationResult.VALID, result.getValidationResult());
 
         // Duplicate Reference Key
-        AxReferenceKey rKey = new AxReferenceKey(mwr.getKey(), "LocalName");
+        final AxReferenceKey rKey = new AxReferenceKey(mwr.getKey(), "LocalName");
         mwr.addKey(rKey);
         mwr.addKey(rKey);
         result = new AxValidationResult();
@@ -247,9 +247,9 @@
         result = new AxValidationResult();
         result = mwr.validate(result);
         assertEquals(ValidationResult.VALID, result.getValidationResult());
-        
+
         // Key Use is legal
-        AxKeyUse keyU = new AxKeyUse(mwr.getKey());
+        final AxKeyUse keyU = new AxKeyUse(mwr.getKey());
         mwr.addKey(keyU);
         result = new AxValidationResult();
         result = mwr.validate(result);
@@ -257,7 +257,7 @@
         mwr.removeKey(keyU);
 
         // Key Use on bad artifact key
-        AxKeyUse keyBU = new AxKeyUse(new AxArtifactKey("SomeKey", "0.0.1"));
+        final AxKeyUse keyBU = new AxKeyUse(new AxArtifactKey("SomeKey", "0.0.1"));
         mwr.addKey(keyBU);
         result = new AxValidationResult();
         result = mwr.validate(result);
@@ -265,7 +265,7 @@
         mwr.removeKey(keyBU);
 
         // Key Use on bad reference key
-        AxKeyUse keyBRU = new AxKeyUse(new AxReferenceKey("SomeKey", "0.0.1", "Local"));
+        final AxKeyUse keyBRU = new AxKeyUse(new AxReferenceKey("SomeKey", "0.0.1", "Local"));
         mwr.addKey(keyBRU);
         result = new AxValidationResult();
         result = mwr.validate(result);
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelCreator.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java
similarity index 92%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelCreator.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java
index fca6c44..762c755 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexBasicModelCreator.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexBasicModelCreator.java
@@ -18,15 +18,15 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.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.concepts.AxModel;
-import org.onap.apex.model.basicmodel.test.TestApexModelCreator;
+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.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
 
 public class TestApexBasicModelCreator implements TestApexModelCreator<AxModel> {
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator0.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java
similarity index 83%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator0.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java
index 4b3c002..ff95837 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator0.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator0.java
@@ -18,13 +18,13 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
-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.concepts.AxModel;
-import org.onap.apex.model.basicmodel.test.TestApexModelCreator;
+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.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
 
 public class TestApexTestModelCreator0 implements TestApexModelCreator<AxModel> {
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator1.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java
similarity index 85%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator1.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java
index e208bd8..d2aa738 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator1.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator1.java
@@ -18,15 +18,15 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.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.concepts.AxModel;
-import org.onap.apex.model.basicmodel.test.TestApexModelCreator;
+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.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
 
 public class TestApexTestModelCreator1 implements TestApexModelCreator<AxModel> {
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator2.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java
similarity index 83%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator2.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java
index 9b9eb13..85751bf 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestApexTestModelCreator2.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestApexTestModelCreator2.java
@@ -18,13 +18,13 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
-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.concepts.AxModel;
-import org.onap.apex.model.basicmodel.test.TestApexModelCreator;
+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.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
 
 public class TestApexTestModelCreator2 implements TestApexModelCreator<AxModel> {
 
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestBasicModelTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestBasicModelTest.java
similarity index 75%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestBasicModelTest.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestBasicModelTest.java
index ea5433f..9ddd3cc 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestBasicModelTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestBasicModelTest.java
@@ -1,33 +1,33 @@
-/*
+/*-
  * ============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.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.test.TestApexModel;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
@@ -36,14 +36,14 @@
 
     @Test
     public void testNormalModelCreator() throws ApexException {
-        TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator());
+        final TestApexModel<AxModel> testApexModel =
+                new TestApexModel<AxModel>(AxModel.class, new TestApexBasicModelCreator());
 
         testApexModel.testApexModelValid();
         try {
             testApexModel.testApexModelVaidateObservation();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("model should have observations", e.getMessage());
         }
         testApexModel.testApexModelVaidateWarning();
@@ -56,100 +56,94 @@
 
     @Test
     public void testModelCreator0() throws ApexException {
-        TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator0());
+        final TestApexModel<AxModel> testApexModel =
+                new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator0());
 
         testApexModel.testApexModelValid();
         try {
             testApexModel.testApexModelVaidateObservation();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("model should have observations", e.getMessage());
         }
         try {
             testApexModel.testApexModelVaidateWarning();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("model should have warnings", e.getMessage());
         }
         try {
             testApexModel.testApexModelVaidateInvalidModel();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("should not be valid ***validation of model successful***", e.getMessage());
         }
         try {
             testApexModel.testApexModelVaidateMalstructured();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("should not be valid ***validation of model successful***", e.getMessage());
         }
     }
 
     @Test
     public void testModelCreator1() throws ApexException {
-        TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator1());
+        final TestApexModel<AxModel> testApexModel =
+                new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator1());
 
         try {
             testApexModel.testApexModelValid();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(e.getMessage().startsWith("model is invalid"));
         }
         try {
             testApexModel.testApexModelVaidateObservation();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(e.getMessage().startsWith("model is invalid"));
         }
         try {
             testApexModel.testApexModelVaidateWarning();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(e.getMessage().startsWith("model is invalid"));
         }
         testApexModel.testApexModelVaidateInvalidModel();
         testApexModel.testApexModelVaidateMalstructured();
     }
-    
+
     @Test
     public void testModelCreator2() throws ApexException {
-        TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator2());
+        final TestApexModel<AxModel> testApexModel =
+                new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator2());
 
         testApexModel.testApexModelValid();
         testApexModel.testApexModelVaidateObservation();
         try {
             testApexModel.testApexModelVaidateWarning();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertEquals("model should have warnings", e.getMessage());
         }
     }
-    
+
     @Test
     public void testModelCreator1XMLJSON() throws ApexException {
-        TestApexModel<AxModel> testApexModel = new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator1());
+        final TestApexModel<AxModel> testApexModel =
+                new TestApexModel<AxModel>(AxModel.class, new TestApexTestModelCreator1());
 
         try {
             testApexModel.testApexModelWriteReadJSON();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(e.getMessage().startsWith("error processing file"));
         }
 
         try {
             testApexModel.testApexModelWriteReadXML();
             fail("Test should throw an exception");
-        }
-        catch (Exception e) {
+        } catch (final Exception e) {
             assertTrue(e.getMessage().startsWith("error processing file"));
         }
     }
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestConceptGetter.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestConceptGetter.java
similarity index 96%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestConceptGetter.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestConceptGetter.java
index a6ff9dc..83545bf 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestConceptGetter.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestConceptGetter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -30,12 +30,12 @@
 import java.util.UUID;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelFileWriter;
-import org.onap.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+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.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestExceptions.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestExceptions.java
similarity index 92%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestExceptions.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestExceptions.java
index 0dd271f..5c89227 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestExceptions.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestExceptions.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -26,7 +26,7 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelFileWriter.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelFileWriter.java
similarity index 94%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelFileWriter.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelFileWriter.java
index c2116a1..ec4d0a5 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelFileWriter.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelFileWriter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -27,9 +27,9 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelFileWriter;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelReader.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelReader.java
similarity index 94%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelReader.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelReader.java
index 134f6ff..140817e 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelReader.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelReader.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -34,10 +34,10 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelReader;
-import org.onap.apex.model.basicmodel.handling.ApexModelWriter;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelSaver.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelSaver.java
similarity index 87%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelSaver.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelSaver.java
index 182d341..08f123c 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelSaver.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelSaver.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import java.io.File;
 import java.io.IOException;
@@ -26,9 +26,9 @@
 import java.nio.file.Path;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelSaver;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelStringWriter.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelStringWriter.java
similarity index 91%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelStringWriter.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelStringWriter.java
index 2f4fcd2..d2a5046 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelStringWriter.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelStringWriter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -28,10 +28,10 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelStringWriter;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelWriter.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelWriter.java
similarity index 92%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelWriter.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelWriter.java
index a21c148..8e5af45 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestModelWriter.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestModelWriter.java
@@ -18,7 +18,7 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -29,9 +29,9 @@
 import java.io.IOException;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.ApexException;
-import org.onap.apex.model.basicmodel.concepts.AxModel;
-import org.onap.apex.model.basicmodel.handling.ApexModelWriter;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestSchemaGenerator.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestSchemaGenerator.java
similarity index 84%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestSchemaGenerator.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestSchemaGenerator.java
index 2e10b51..cdf3b46 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/handling/TestSchemaGenerator.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/TestSchemaGenerator.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.handling;
+package org.onap.policy.apex.model.basicmodel.handling;
 
 import static org.junit.Assert.assertTrue;
 
@@ -30,7 +30,6 @@
 import java.io.PrintStream;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.handling.ApexSchemaGenerator;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
@@ -41,50 +40,51 @@
     public void test() throws IOException {
         final ByteArrayOutputStream baos0 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos0));
-        
+
         final String[] args0 = {};
         ApexSchemaGenerator.main(args0);
         assertTrue(baos0.toString().contains("usage: ApexSchemaGenerator apex-root-class [schema-file-name]"));
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
-        
+
         final ByteArrayOutputStream baos1 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos1));
-        
-        final String[] args1 = {"hello", "goodbye", "here"};
+
+        final String[] args1 = { "hello", "goodbye", "here" };
         ApexSchemaGenerator.main(args1);
         assertTrue(baos1.toString().contains("usage: ApexSchemaGenerator apex-root-class [schema-file-name]"));
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
-        
+
         final ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos2));
-        
-        final String[] args2 = {"hello", "goodbye"};
+
+        final String[] args2 = { "hello", "goodbye" };
         ApexSchemaGenerator.main(args2);
         assertTrue(baos2.toString().contains("error on Apex schema output"));
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
-        
+
         final ByteArrayOutputStream baos3 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos3));
-        
-        final String[] args3 = {"hello"};
+
+        final String[] args3 = { "hello" };
         ApexSchemaGenerator.main(args3);
         assertTrue(baos3.toString().contains("could not create JAXB context, root class hello not found"));
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
-        
+
         final ByteArrayOutputStream baos4 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos4));
-        
-        final String[] args4 = {"org.onap.apex.model.basicmodel.concepts.AxModel"};
+
+        final String[] args4 = { "org.onap.policy.apex.model.basicmodel.concepts.AxModel" };
         ApexSchemaGenerator.main(args4);
-        assertTrue(baos4.toString().contains("targetNamespace=\"http://www.ericsson.com/apex\""));
+        assertTrue(baos4.toString().contains("targetNamespace=\"http://www.onap.org/policy/apex-pdp\""));
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
-        
+
         final ByteArrayOutputStream baos5 = new ByteArrayOutputStream();
         System.setOut(new PrintStream(baos5));
-        
+
         final File tempFile = File.createTempFile("ApexSchemaGeneratorTest", "xsd");
-        final String[] args5 = {"org.onap.apex.model.basicmodel.concepts.AxModel", tempFile.getCanonicalPath()};
-        
+        final String[] args5 =
+                { "org.onap.policy.apex.model.basicmodel.concepts.AxModel", tempFile.getCanonicalPath() };
+
         ApexSchemaGenerator.main(args5);
         assertTrue(tempFile.length() > 100);
         System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/IllegalParameters.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/IllegalParameters.java
similarity index 89%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/IllegalParameters.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/IllegalParameters.java
index 3cb4808..3a7fdf5 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/IllegalParameters.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/IllegalParameters.java
@@ -18,9 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
-import org.onap.apex.model.basicmodel.service.AbstractParameters;
+import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/LegalParameters.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/LegalParameters.java
similarity index 89%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/LegalParameters.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/LegalParameters.java
index 2bab6fd..3de3ecb 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/LegalParameters.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/LegalParameters.java
@@ -18,9 +18,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
-import org.onap.apex.model.basicmodel.service.AbstractParameters;
+import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestAbstractParameters.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestAbstractParameters.java
similarity index 69%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestAbstractParameters.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestAbstractParameters.java
index e9a0e2f..7afa144 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestAbstractParameters.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestAbstractParameters.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -35,17 +35,21 @@
     public void testAbstractParameters() {
         final LegalParameters parameters = new LegalParameters();
         assertNotNull(parameters);
-        assertEquals("AbstractParameters [parameterClassName=org.onap.apex.model.basicmodel.service.LegalParameters]", parameters.toString());
+        assertEquals(
+                "AbstractParameters [parameterClassName=org.onap.policy.apex.model.basicmodel.service.LegalParameters]",
+                parameters.toString());
 
         assertEquals(LegalParameters.class, parameters.getParameterClass());
-        assertEquals("org.onap.apex.model.basicmodel.service.LegalParameters", parameters.getParameterClassName());
-        
+        assertEquals("org.onap.policy.apex.model.basicmodel.service.LegalParameters",
+                parameters.getParameterClassName());
+
         try {
             new IllegalParameters();
             fail("test should throw an exception here");
-        }
-        catch (final Exception e) {
-            assertEquals("class \"somewhere.over.the.rainbow\" not found or not an instance of \"org.onap.apex.model.basicmodel.service.IllegalParameters\"", e.getMessage());
+        } catch (final Exception e) {
+            assertEquals(
+                    "class \"somewhere.over.the.rainbow\" not found or not an instance of \"org.onap.policy.apex.model.basicmodel.service.IllegalParameters\"",
+                    e.getMessage());
         }
     }
 }
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestModelService.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestModelService.java
similarity index 64%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestModelService.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestModelService.java
index 51af9ba..9c20d83 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestModelService.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestModelService.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -26,9 +26,8 @@
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.apex.model.basicmodel.handling.TestApexBasicModelCreator;
-import org.onap.apex.model.basicmodel.service.ModelService;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
+import org.onap.policy.apex.model.basicmodel.handling.TestApexBasicModelCreator;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
@@ -42,36 +41,41 @@
         assertFalse(ModelService.existsModel(AxKeyInformation.class));
         try {
             ModelService.getModel(AxKeyInformation.class);
+        } catch (final Exception e) {
+            assertEquals(
+                    "Model for org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation not found in model service",
+                    e.getMessage());
         }
-        catch (Exception e) {
-            assertEquals("Model for org.onap.apex.model.basicmodel.concepts.AxKeyInformation not found in model service", e.getMessage());
-        }
-        
-        ModelService.registerModel(AxKeyInformation.class, new TestApexBasicModelCreator().getModel().getKeyInformation());
+
+        ModelService.registerModel(AxKeyInformation.class,
+                new TestApexBasicModelCreator().getModel().getKeyInformation());
         assertTrue(ModelService.existsModel(AxKeyInformation.class));
         assertNotNull(ModelService.getModel(AxKeyInformation.class));
-        
+
         ModelService.deregisterModel(AxKeyInformation.class);
-       
+
         assertFalse(ModelService.existsModel(AxKeyInformation.class));
         try {
             ModelService.getModel(AxKeyInformation.class);
-        }
-        catch (Exception e) {
-            assertEquals("Model for org.onap.apex.model.basicmodel.concepts.AxKeyInformation not found in model service", e.getMessage());
+        } catch (final Exception e) {
+            assertEquals(
+                    "Model for org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation not found in model service",
+                    e.getMessage());
         }
 
-        ModelService.registerModel(AxKeyInformation.class, new TestApexBasicModelCreator().getModel().getKeyInformation());
+        ModelService.registerModel(AxKeyInformation.class,
+                new TestApexBasicModelCreator().getModel().getKeyInformation());
         assertTrue(ModelService.existsModel(AxKeyInformation.class));
         assertNotNull(ModelService.getModel(AxKeyInformation.class));
-        
+
         ModelService.clear();
         assertFalse(ModelService.existsModel(AxKeyInformation.class));
         try {
             ModelService.getModel(AxKeyInformation.class);
-        }
-        catch (Exception e) {
-            assertEquals("Model for org.onap.apex.model.basicmodel.concepts.AxKeyInformation not found in model service", e.getMessage());
+        } catch (final Exception e) {
+            assertEquals(
+                    "Model for org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation not found in model service",
+                    e.getMessage());
         }
 
     }
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestParameterService.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestParameterService.java
similarity index 76%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestParameterService.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestParameterService.java
index ff2a9c8..e84b3e2 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/service/TestParameterService.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/service/TestParameterService.java
@@ -1,24 +1,24 @@
-/*
+/*-
  * ============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.basicmodel.service;
+package org.onap.policy.apex.model.basicmodel.service;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -26,7 +26,6 @@
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.service.ParameterService;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
@@ -40,38 +39,41 @@
         assertFalse(ParameterService.existsParameters(LegalParameters.class));
         try {
             ParameterService.getParameters(LegalParameters.class);
-        }
-        catch (final Exception e) {
-            assertEquals("Parameters for org.onap.apex.model.basicmodel.service.LegalParameters not found in parameter service", e.getMessage());
-        }
-        
-        ParameterService.registerParameters(LegalParameters.class, new LegalParameters());
-        assertTrue(ParameterService.existsParameters(LegalParameters.class));
-        assertNotNull(ParameterService.getParameters(LegalParameters.class));
-        
-        ParameterService.deregisterParameters(LegalParameters.class);
-       
-        assertFalse(ParameterService.existsParameters(LegalParameters.class));
-        try {
-            ParameterService.getParameters(LegalParameters.class);
-        }
-        catch (final Exception e) {
-            assertEquals("Parameters for org.onap.apex.model.basicmodel.service.LegalParameters not found in parameter service", e.getMessage());
+        } catch (final Exception e) {
+            assertEquals(
+                    "Parameters for org.onap.policy.apex.model.basicmodel.service.LegalParameters not found in parameter service",
+                    e.getMessage());
         }
 
         ParameterService.registerParameters(LegalParameters.class, new LegalParameters());
         assertTrue(ParameterService.existsParameters(LegalParameters.class));
         assertNotNull(ParameterService.getParameters(LegalParameters.class));
-        
+
+        ParameterService.deregisterParameters(LegalParameters.class);
+
+        assertFalse(ParameterService.existsParameters(LegalParameters.class));
+        try {
+            ParameterService.getParameters(LegalParameters.class);
+        } catch (final Exception e) {
+            assertEquals(
+                    "Parameters for org.onap.policy.apex.model.basicmodel.service.LegalParameters not found in parameter service",
+                    e.getMessage());
+        }
+
+        ParameterService.registerParameters(LegalParameters.class, new LegalParameters());
+        assertTrue(ParameterService.existsParameters(LegalParameters.class));
+        assertNotNull(ParameterService.getParameters(LegalParameters.class));
+
         assertNotNull(ParameterService.getAll());
         ParameterService.clear();
         assertFalse(ParameterService.existsParameters(LegalParameters.class));
         try {
             ParameterService.getParameters(LegalParameters.class);
+        } catch (final Exception e) {
+            assertEquals(
+                    "Parameters for org.onap.policy.apex.model.basicmodel.service.LegalParameters not found in parameter service",
+                    e.getMessage());
         }
-        catch (final Exception e) {
-            assertEquals("Parameters for org.onap.apex.model.basicmodel.service.LegalParameters not found in parameter service", e.getMessage());
-        }
-        
+
     }
 }
diff --git a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java
similarity index 88%
rename from model/basic-model/src/test/java/org/onap/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java
rename to model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java
index b723439..bde0956 100644
--- a/model/basic-model/src/test/java/org/onap/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/TestAxReferenceKeyAdapter.java
@@ -18,14 +18,14 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.apex.model.basicmodel.xml;
+package org.onap.policy.apex.model.basicmodel.xml;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
-import org.onap.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
 
 /**
  * @author Liam Fallon (liam.fallon@ericsson.com)
diff --git a/model/basic-model/src/test/resources/META-INF/persistence.xml b/model/basic-model/src/test/resources/META-INF/persistence.xml
index 5d02906..a7bf1f6 100644
--- a/model/basic-model/src/test/resources/META-INF/persistence.xml
+++ b/model/basic-model/src/test/resources/META-INF/persistence.xml
@@ -23,14 +23,14 @@
     <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.AxReferenceKey</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.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.AxReferenceKey</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>
 
         <properties>
             <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
diff --git a/model/basic-model/src/test/resources/logback-test.xml b/model/basic-model/src/test/resources/logback-test.xml
index d9d77f7..4ece820 100644
--- a/model/basic-model/src/test/resources/logback-test.xml
+++ b/model/basic-model/src/test/resources/logback-test.xml
@@ -44,8 +44,7 @@
         <appender-ref ref="STDOUT" />
     </logger>
 
-    <appender name="FILE"
-        class="ch.qos.logback.core.FileAppender">
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
         <file>${LOG_DIR}/apex.log</file>
         <encoder>
             <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
@@ -53,8 +52,7 @@
         </encoder>
     </appender>
 
-    <appender name="CTXT_FILE"
-        class="ch.qos.logback.core.FileAppender">
+    <appender name="CTXT_FILE" class="ch.qos.logback.core.FileAppender">
         <file>${LOG_DIR}/apex_ctxt.log</file>
         <encoder>
             <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
@@ -62,11 +60,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>
diff --git a/model/context-model/pom.xml b/model/context-model/pom.xml
index 9f7766c..b7ee5b4 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
similarity index 81%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbum.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbum.java
index 045ea0a..27f9b8b 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.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 @@
     // @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 @@
 
     /**
      * Copy constructor
-     * 
+     *
      * @param copyConcept the concept to copy from
      */
     public AxContextAlbum(final AxContextAlbum copyConcept) {
@@ -134,9 +133,9 @@
     }
 
     /**
-     * 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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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
similarity index 79%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextAlbums.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextAlbums.java
index e48d064..f9d34ce 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.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 @@
     // @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 @@
 
     /**
      * Copy constructor
-     * 
+     *
      * @param copyConcept the concept to copy from
      */
     public AxContextAlbums(final AxContextAlbums copyConcept) {
@@ -101,8 +100,8 @@
     }
 
     /**
-     * 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 @@
     }
 
     /**
-     * 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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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
similarity index 80%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextModel.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextModel.java
index dcd3818..2aa6fc7 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.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 @@
     // @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 @@
 
     /**
      * Copy constructor
-     * 
+     *
      * @param copyConcept the concept to copy from
      */
     public AxContextModel(final AxContextModel copyConcept) {
@@ -112,8 +111,8 @@
     }
 
     /**
-     * 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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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
similarity index 79%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchema.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchema.java
index 852e3f5..3abcebe 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.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 @@
     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 @@
 
     /**
      * Copy constructor
-     * 
+     *
      * @param copyConcept the concept to copy from
      */
     public AxContextSchema(final AxContextSchema copyConcept) {
@@ -120,9 +117,8 @@
     }
 
     /**
-     * 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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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
similarity index 80%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/AxContextSchemas.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/AxContextSchemas.java
index b4a7e4a..df94a87 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.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 @@
     // @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 @@
 
     /**
      * Copy constructor
-     * 
+     *
      * @param copyConcept the concept to copy from
      */
     public AxContextSchemas(final AxContextSchemas copyConcept) {
@@ -104,8 +102,8 @@
     }
 
     /**
-     * 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 @@
     }
 
     /**
-     * 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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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 @@
     /*
      * (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
similarity index 87%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/concepts/package-info.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/concepts/package-info.java
index f89f2f8..a7aa3a5 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
similarity index 85%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/ContextComparer.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparer.java
index 8d654be..7a5ebfd 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
similarity index 94%
rename from model/context-model/src/main/java/org/onap/apex/model/contextmodel/handling/package-info.java
rename to model/context-model/src/main/java/org/onap/policy/apex/model/contextmodel/handling/package-info.java
index bfc44f7..ec1fa89 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 b53d8d0..0000000
--- 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/handling/TestContextComparisonFactory.java b/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparisonFactory.java
deleted file mode 100644
index 1850c22..0000000
--- a/model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparisonFactory.java
+++ /dev/null
@@ -1,122 +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 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;
-
-/**
- * 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 AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema00A.getKey(), testContextSchema00A);
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
-
-        contextModel.getAlbums().getAlbumsMap().put(externalContextAlbum.getKey(), externalContextAlbum);
-        contextModel.getAlbums().getAlbumsMap().put(globalContextAlbum.getKey(), globalContextAlbum);
-        contextModel.getAlbums().getAlbumsMap().put(policy0ContextAlbum.getKey(), policy0ContextAlbum);
-        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
-
-        return contextModel;
-    }
-
-    public AxContextModel getEmptyModel() {
-        return new AxContextModel(new AxArtifactKey("Context", "0.0.1"));
-    }
-
-    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 AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema00A.getKey(), testContextSchema00A);
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
-
-        return contextModel;
-    }
-
-    public AxContextModel getSingleEntryModel() {
-        final AxContextSchema testContextSchema000 = new AxContextSchema(new AxArtifactKey("TestContextSchema000", "0.0.1"), "JAVA",
-                "com.ericsson.apex.concept.TestContextSchema000");
-
-        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);
-
-        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
-
-        return contextModel;
-    }
-
-    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 AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
-        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
-
-        contextModel.getAlbums().getAlbumsMap().put(externalContextAlbum.getKey(), externalContextAlbum);
-        contextModel.getAlbums().getAlbumsMap().put(policy0ContextAlbum.getKey(), policy0ContextAlbum);
-        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
-
-        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
similarity index 95%
rename from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextAlbums.java
rename to model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextAlbums.java
index 476cda9..710c44e 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.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
similarity index 91%
rename from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextModel.java
rename to model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextModel.java
index cab40f3..163e500 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.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
similarity index 94%
rename from model/context-model/src/test/java/org/onap/apex/model/contextmodel/concepts/TestContextSchemas.java
rename to model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/TestContextSchemas.java
index 1e81c5a..e9e9564 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.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
similarity index 70%
rename from model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestApexContextModel.java
rename to model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestApexContextModel.java
index 0723a68..477755c 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 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 @@
     @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 @@
 
     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 0000000..4e8d8d5
--- /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
similarity index 95%
rename from model/context-model/src/test/java/org/onap/apex/model/contextmodel/handling/TestContextComparison.java
rename to model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparison.java
index fe87509..794cfa9 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/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java
new file mode 100644
index 0000000..2c6f8e1
--- /dev/null
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/TestContextComparisonFactory.java
@@ -0,0 +1,132 @@
+/*-
+ * ============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 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",
+                        "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);
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema00A.getKey(), testContextSchema00A);
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
+
+        contextModel.getAlbums().getAlbumsMap().put(externalContextAlbum.getKey(), externalContextAlbum);
+        contextModel.getAlbums().getAlbumsMap().put(globalContextAlbum.getKey(), globalContextAlbum);
+        contextModel.getAlbums().getAlbumsMap().put(policy0ContextAlbum.getKey(), policy0ContextAlbum);
+        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
+
+        return contextModel;
+    }
+
+    public AxContextModel getEmptyModel() {
+        return new AxContextModel(new AxArtifactKey("Context", "0.0.1"));
+    }
+
+    public AxContextModel getShellModel() {
+        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);
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema00A.getKey(), testContextSchema00A);
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
+
+        return contextModel;
+    }
+
+    public AxContextModel getSingleEntryModel() {
+        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 AxContextModel contextModel = new AxContextModel(new AxArtifactKey("ContextModel", "0.0.1"));
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema000.getKey(), testContextSchema000);
+
+        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
+
+        return contextModel;
+    }
+
+    public AxContextModel getNoGlobalContextModel() {
+        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);
+        contextModel.getSchemas().getSchemasMap().put(testContextSchema00C.getKey(), testContextSchema00C);
+
+        contextModel.getAlbums().getAlbumsMap().put(externalContextAlbum.getKey(), externalContextAlbum);
+        contextModel.getAlbums().getAlbumsMap().put(policy0ContextAlbum.getKey(), policy0ContextAlbum);
+        contextModel.getAlbums().getAlbumsMap().put(policy1ContextAlbum.getKey(), policy1ContextAlbum);
+
+        return contextModel;
+    }
+}
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 d9203b4..ec93578 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 cbaabc6..2c93ef1 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 07bc025..628f023 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>
diff --git a/model/event-model/pom.xml b/model/event-model/pom.xml
new file mode 100644
index 0000000..8e60a8b
--- /dev/null
+++ b/model/event-model/pom.xml
@@ -0,0 +1,67 @@
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 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=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.policy.apex-pdp.model</groupId>
+        <artifactId>model</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>event-model</artifactId>
+    <name>${project.artifactId}</name>
+    <description>Event Models used in Apex</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.policy.apex-pdp.model</groupId>
+            <artifactId>context-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-xml-schema</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>java</goal>
+                        </goals>
+                        <configuration>
+                            <mainClass>org.onap.policy.apex.model.basicmodel.handling.ApexSchemaGenerator</mainClass>
+                            <classpathScope>compile</classpathScope>
+                            <arguments>
+                                <argument>org.onap.policy.apex.model.eventmodel.concepts.AxEventModel</argument>
+                                <argument>${project.build.directory}/model/xml/apex-event-model.xsd</argument>
+                            </arguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java
new file mode 100644
index 0000000..4944f1b
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvent.java
@@ -0,0 +1,560 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+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.utilities.Assertions;
+
+/**
+ * This class defines an Apex event. An {@link AxEvent} is used to kick off execution of policies in Apex and is emitted
+ * by policies when they completer execution. In addition, Apex uses {@link AxEvent} instances internally to pass
+ * control from one Apex state to the next during execution.
+ * <p>
+ * The {@link AxArtifactKey} of an event uniquely identifies it in an Apex system and the name field in the key is the
+ * name of the event.
+ * <p>
+ * Each {@link AxEvent} has a name space, which is usually set to identify the domain of application of an event. For
+ * example a 4G cell power event might have the name space {@code org.onap.radio.4g} and the name {@code PowerEvent}.
+ * The source and target of the event are reserved to hold an identifier that defines the sender and receiver of an
+ * event respectively. The definition and structure of these fields is reserved for future use and their use by
+ * applications is currently not recommended.
+ * <p>
+ * The parameters that an event has are defined as a map of {@link AxField} instances.
+ * <p>
+ * Validation checks that the event key is valid. If name space is a blank string, a warning is issued. Blank source or
+ * target fields result in observations being issued. An event may not have any parameters. If it has parameters, the
+ * name and value of each parameter entry is checked to ensure they are not null. Then the local name of each parameter
+ * is checked to ensure it matches the event parameter key on the event. Finally, the parent key of each parameter is
+ * checked to ensure it matches the event key.
+ */
+@Entity
+@Table(name = "AxEvent")
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "apexEvent", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxEvent", namespace = "http://www.onap.org/policy/apex-pdp",
+        propOrder = { "key", "nameSpace", "source", "target", "parameterMap" })
+
+public class AxEvent extends AxConcept {
+    private static final long serialVersionUID = -1460388382582984269L;
+
+    private static final String WHITESPACE_REGEXP = "\\s+$";
+
+    /** The key of the event, unique in the Apex system. */
+    @EmbeddedId
+    @XmlElement(name = "key", required = true)
+    // CHECKSTYLE:OFF: checkstyle:VisibilityMonitor
+    protected AxArtifactKey key;
+    // CHECKSTYLE:ON: checkstyle:VisibilityMonitor
+
+    @Column(name = "nameSpace")
+    @XmlElement(required = true)
+    private String nameSpace;
+
+    @Column(name = "source")
+    @XmlElement(required = true)
+    private String source;
+
+    @Column(name = "target")
+    @XmlElement(required = true)
+    private String target;
+
+    @OneToMany(cascade = CascadeType.ALL)
+    @XmlElement(name = "parameter", required = true)
+    private Map<String, AxField> parameterMap;
+
+    /**
+     * The default constructor creates an event with a null artifact key. The event name space, source, and target are
+     * all defined as empty strings and the parameter map is initialized as an empty map.
+     */
+    public AxEvent() {
+        this(new AxArtifactKey());
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxEvent(final AxEvent copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * The default constructor creates an event with the given artifact key. The event name space, source, and target
+     * are all defined as empty strings and the parameter map is initialized as an empty map.
+     *
+     * @param key the key of the event
+     */
+    public AxEvent(final AxArtifactKey key) {
+        this(key, "", "", "", new TreeMap<String, AxField>());
+    }
+
+    /**
+     * This constructor creates an event with the given artifact key and name space. The event source, and target are
+     * all defined as empty strings and the parameter map is initialized as an empty map.
+     *
+     * @param key the key of the event
+     * @param nameSpace the name space of the event
+     */
+    public AxEvent(final AxArtifactKey key, final String nameSpace) {
+        this(key, nameSpace, "", "", new TreeMap<String, AxField>());
+    }
+
+    /**
+     * This constructor creates an event with the given artifact key, name space, source and target. The parameter map
+     * is initialized as an empty map.
+     *
+     * @param key the key of the event
+     * @param nameSpace the name space of the event
+     * @param source the source of the event
+     * @param target the target of the event
+     */
+    public AxEvent(final AxArtifactKey key, final String nameSpace, final String source, final String target) {
+        this(key, nameSpace, source, target, new TreeMap<String, AxField>());
+    }
+
+    /**
+     * This constructor creates an event with all its fields defined.
+     *
+     * @param key the key of the event
+     * @param nameSpace the name space of the event
+     * @param source the source of the event
+     * @param target the target of the event
+     * @param parameterMap the map of parameters that the event has
+     */
+    public AxEvent(final AxArtifactKey key, final String nameSpace, final String source, final String target,
+            final SortedMap<String, AxField> parameterMap) {
+        super();
+        Assertions.argumentNotNull(key, "key may not be null");
+        Assertions.argumentNotNull(nameSpace, "nameSpace may not be null");
+        Assertions.argumentNotNull(source, "source may not be null");
+        Assertions.argumentNotNull(target, "target may not be null");
+        Assertions.argumentNotNull(parameterMap, "parameterMap may not be null");
+
+        this.key = key;
+        this.nameSpace = nameSpace;
+        this.source = source;
+        this.target = target;
+        this.parameterMap = parameterMap;
+    }
+
+    /**
+     * This method checks that an event has all the fields in the {@code otherFieldSet} set defined on it.
+     *
+     * @param otherFieldSet the set of fields to check for existence on this event
+     * @return true, if all the {@code otherFieldSet} fields are defined on this event
+     */
+    public boolean hasFields(final Set<AxField> otherFieldSet) {
+        return parameterMap.values().containsAll(otherFieldSet);
+    }
+
+    /**
+     * When an event is unmarshalled from disk or from the database, the parent key in the reference keys in its
+     * parameter map are not set. This method is called by JAXB after unmarshaling and is used to set the parent key of
+     * the {@link AxField} instances in the parameter map to be the key of the event that contains them.
+     *
+     * @param u the unmarshaler that is unmarshaling the model
+     * @param parent the parent object of this object in the unmarshaler
+     */
+    public void afterUnmarshal(final Unmarshaller u, final Object parent) {
+        for (final AxField parameter : parameterMap.values()) {
+            parameter.getKey().setParentArtifactKey(key);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+     */
+    @Override
+    public AxArtifactKey getKey() {
+        return key;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = key.getKeys();
+
+        for (final AxField field : parameterMap.values()) {
+            keyList.addAll(field.getKeys());
+        }
+        return keyList;
+    }
+
+    /**
+     * Sets the key of the event.
+     *
+     * @param key the key of the event
+     */
+    public void setKey(final AxArtifactKey key) {
+        Assertions.argumentNotNull(key, "key may not be null");
+        this.key = key;
+
+        for (final AxField parameter : parameterMap.values()) {
+            parameter.getKey().setParentArtifactKey(key);
+        }
+    }
+
+    /**
+     * Gets the name space of the event.
+     *
+     * @return the name space of the event
+     */
+    public String getNameSpace() {
+        return nameSpace;
+    }
+
+    /**
+     * Sets the name space of the event.
+     *
+     * @param nameSpace the name space of the event
+     */
+    public void setNameSpace(final String nameSpace) {
+        Assertions.argumentNotNull(nameSpace, "nameSpace may not be null");
+        this.nameSpace = nameSpace.trim();
+    }
+
+    /**
+     * Gets the source of the event.
+     *
+     * @return the source of the event
+     */
+    public String getSource() {
+        return source;
+    }
+
+    /**
+     * Sets the source of the event.
+     *
+     * @param source the source of the event
+     */
+    public void setSource(final String source) {
+        Assertions.argumentNotNull(source, "source may not be null");
+        this.source = source.trim();
+    }
+
+    /**
+     * Gets the target of the event.
+     *
+     * @return the target of the event
+     */
+    public String getTarget() {
+        return target;
+    }
+
+    /**
+     * Sets the target of the event.
+     *
+     * @param target the target of the event
+     */
+    public void setTarget(final String target) {
+        Assertions.argumentNotNull(target, "target may not be null");
+        this.target = target.trim();
+    }
+
+    /**
+     * Gets the event parameter map.
+     *
+     * @return the event parameter map
+     */
+    public Map<String, AxField> getParameterMap() {
+        return parameterMap;
+    }
+
+    /**
+     * Gets the fields defined on the event as a set.
+     *
+     * @return the fields defined on the event as a set
+     */
+    public Set<AxField> getFields() {
+        return new TreeSet<>(parameterMap.values());
+    }
+
+    /**
+     * Sets the event parameter map, containing all the fields of the event.
+     *
+     * @param parameterMap the event parameter map
+     */
+    public void setParameterMap(final Map<String, AxField> parameterMap) {
+        Assertions.argumentNotNull(parameterMap, "parameterMap may not be null");
+        this.parameterMap = parameterMap;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult resultIn) {
+        AxValidationResult result = resultIn;
+
+        if (key.equals(AxArtifactKey.getNullKey())) {
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+        }
+
+        result = key.validate(result);
+
+        if (nameSpace.replaceAll(WHITESPACE_REGEXP, "").length() == 0) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.WARNING,
+                    "nameSpace on event is blank"));
+        }
+
+        if (source.replaceAll(WHITESPACE_REGEXP, "").length() == 0) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.OBSERVATION,
+                    "source on event is blank"));
+        }
+
+        if (target.replaceAll(WHITESPACE_REGEXP, "").length() == 0) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.OBSERVATION,
+                    "target on event is blank"));
+        }
+
+        for (final Entry<String, AxField> eventParameterEntry : parameterMap.entrySet()) {
+            if (eventParameterEntry.getKey() == null || eventParameterEntry.getKey().equals(AxKey.NULL_KEY_NAME)) {
+                result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                        "key on parameter " + eventParameterEntry.getKey() + " may not be the null key"));
+            } else if (eventParameterEntry.getValue() == null) {
+                result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                        "value on parameter " + eventParameterEntry.getKey() + " may not be null"));
+            } else {
+                result = vaidateEventParameters(eventParameterEntry, result);
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * Validate an event parameter entry
+     *
+     * @param eventParameterEntry the event parameter entry
+     * @param result the validation result to append to
+     * @return The validation result
+     */
+    private AxValidationResult vaidateEventParameters(final Entry<String, AxField> eventParameterEntry,
+            final AxValidationResult result) {
+        if (!eventParameterEntry.getKey().equals(eventParameterEntry.getValue().getKey().getLocalName())) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "key on parameter " + eventParameterEntry.getKey() + " does not equal parameter field local name "
+                            + eventParameterEntry.getValue().getKey().getLocalName()));
+        }
+
+        if (!eventParameterEntry.getValue().getKey().getParentArtifactKey().equals(key)) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "parent key on parameter field " + eventParameterEntry.getValue().getKey()
+                            + " does not equal event key"));
+        }
+
+        return eventParameterEntry.getValue().validate(result);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+     */
+    @Override
+    public void clean() {
+        key.clean();
+        nameSpace = nameSpace.trim();
+        source = source.trim();
+        target = target.trim();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append("key=");
+        builder.append(key);
+        builder.append(",nameSpace=");
+        builder.append(nameSpace);
+        builder.append(",source=");
+        builder.append(source);
+        builder.append(",target=");
+        builder.append(target);
+        builder.append(",parameter=");
+        builder.append(parameterMap);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept targetObject) {
+        Assertions.argumentNotNull(targetObject, "targetObject may not be null");
+
+        final Object copyObject = targetObject;
+        Assertions.instanceOf(copyObject, AxEvent.class);
+
+        final AxEvent copy = (AxEvent) copyObject;
+
+        final Map<String, AxField> newParameterMap = new TreeMap<>();
+        for (final Entry<String, AxField> eventParameterMapEntry : parameterMap.entrySet()) {
+            newParameterMap.put(eventParameterMapEntry.getKey(), new AxField(eventParameterMapEntry.getValue()));
+        }
+        copy.setParameterMap(newParameterMap);
+
+        copy.setKey(new AxArtifactKey(key));
+        copy.setNameSpace(nameSpace);
+        copy.setSource(source);
+        copy.setTarget(target);
+
+        return copy;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + key.hashCode();
+        result = prime * result + nameSpace.hashCode();
+        result = prime * result + source.hashCode();
+        result = prime * result + target.hashCode();
+        result = prime * result + parameterMap.hashCode();
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        final AxEvent other = (AxEvent) obj;
+        if (!key.equals(other.key)) {
+            return false;
+        }
+        if (!nameSpace.equals(other.nameSpace)) {
+            return false;
+        }
+        if (!source.equals(other.source)) {
+            return false;
+        }
+        if (!target.equals(other.target)) {
+            return false;
+        }
+        return parameterMap.equals(other.parameterMap);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        if (otherObj == null) {
+            return -1;
+        }
+        if (this == otherObj) {
+            return 0;
+        }
+        if (getClass() != otherObj.getClass()) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxEvent other = (AxEvent) otherObj;
+        if (!key.equals(other.key)) {
+            return key.compareTo(other.key);
+        }
+        if (!nameSpace.equals(other.nameSpace)) {
+            return nameSpace.compareTo(other.nameSpace);
+        }
+        if (!source.equals(other.source)) {
+            return target.compareTo(other.source);
+        }
+        if (!target.equals(other.target)) {
+            return target.compareTo(other.target);
+        }
+        if (!parameterMap.equals(other.parameterMap)) {
+            return (parameterMap.hashCode() - other.parameterMap.hashCode());
+        }
+
+        return 0;
+    }
+}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java
new file mode 100644
index 0000000..3447ff8
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEventModel.java
@@ -0,0 +1,330 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+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.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.utilities.Assertions;
+
+/**
+ * A container class for an Apex event model. This class is a container class that allows an Apex model to be
+ * constructed that contains events and context and the key information for those events and context. The model contains
+ * schema definitions and the definitions of events that use those schemas.
+ * <p>
+ * Validation runs {@link AxModel} validation on the model. In addition, the {@link AxContextSchemas} and
+ * {@link AxEvents} validation is run on the context schemas and events in the model.
+ */
+
+@Entity
+@Table(name = "AxEventModel")
+
+@XmlRootElement(name = "apexEventModel", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AxEventModel", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "schemas", "events" })
+
+public class AxEventModel extends AxModel {
+    private static final long serialVersionUID = 8800599637708309945L;
+
+    // @formatter:off
+    @OneToOne(cascade = CascadeType.ALL)
+    @JoinColumns({ @JoinColumn(name = "schemasName", referencedColumnName = "name"),
+            @JoinColumn(name = "schemasVersion", referencedColumnName = "version") })
+    @XmlElement(name = "schemas", required = true)
+    private AxContextSchemas schemas;
+
+    @OneToOne(cascade = CascadeType.ALL)
+    @JoinColumns({ @JoinColumn(name = "eventsName", referencedColumnName = "name"),
+            @JoinColumn(name = "eventsVersion", referencedColumnName = "version") })
+    @XmlElement(name = "events", required = true)
+    private AxEvents events;
+    // @formatter:on
+
+    /**
+     * The Default Constructor creates a {@link AxEventModel} object with a null artifact key and creates an empty event
+     * model.
+     */
+    public AxEventModel() {
+        this(new AxArtifactKey());
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxEventModel(final AxEventModel copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * The Key Constructor creates a {@link AxEventModel} object with the given artifact key and creates an empty event
+     * model.
+     *
+     * @param key the event model key
+     */
+    public AxEventModel(final AxArtifactKey key) {
+        this(key, new AxContextSchemas(new AxArtifactKey(key.getName() + "_Schemas", key.getVersion())),
+                new AxKeyInformation(new AxArtifactKey(key.getName() + "_KeyInfo", key.getVersion())),
+                new AxEvents(new AxArtifactKey(key.getName() + "_Events", key.getVersion())));
+    }
+
+    /**
+     * Constructor that initiates a {@link AxEventModel} with all its fields.
+     *
+     * @param key the event model key
+     * @param schemas the schemas for events in the event model
+     * @param keyInformation the key information for context schemas and events in the event model
+     * @param events the events in the event model
+     */
+    public AxEventModel(final AxArtifactKey key, final AxContextSchemas schemas, final AxKeyInformation keyInformation,
+            final AxEvents events) {
+        super(key, keyInformation);
+        Assertions.argumentNotNull(events, "events may not be null");
+
+        this.schemas = schemas;
+        this.events = events;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#register()
+     */
+    @Override
+    public void register() {
+        super.register();
+        ModelService.registerModel(AxContextSchemas.class, getSchemas());
+        ModelService.registerModel(AxEvents.class, getEvents());
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = super.getKeys();
+
+        keyList.addAll(schemas.getKeys());
+        keyList.addAll(events.getKeys());
+
+        return keyList;
+    }
+
+    /**
+     * Gets the context schemas.
+     *
+     * @return the context schemas
+     */
+    public AxContextSchemas getSchemas() {
+        return schemas;
+    }
+
+    /**
+     * Sets the context schemas.
+     *
+     * @param schemas the context schemas
+     */
+    public void setSchemas(final AxContextSchemas schemas) {
+        Assertions.argumentNotNull(schemas, "schemas may not be null");
+        this.schemas = schemas;
+    }
+
+    /**
+     * Gets the events from the model.
+     *
+     * @return the events
+     */
+    public AxEvents getEvents() {
+        return events;
+    }
+
+    /**
+     * Sets the events in the model.
+     *
+     * @param events the events
+     */
+    public void setEvents(final AxEvents events) {
+        Assertions.argumentNotNull(events, "events may not be null");
+        this.events = events;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxModel#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult resultIn) {
+        AxValidationResult result = resultIn;
+
+        result = super.validate(result);
+        result = schemas.validate(result);
+        return events.validate(result);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#clean()
+     */
+    @Override
+    public void clean() {
+        super.clean();
+        schemas.clean();
+        events.clean();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append(super.toString());
+        builder.append(",schemas=");
+        builder.append(schemas);
+        builder.append(",events=");
+        builder.append(events);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept targetObject) {
+        Assertions.argumentNotNull(targetObject, "target may not be null");
+
+        final Object copyObject = targetObject;
+        Assertions.instanceOf(copyObject, AxEventModel.class);
+
+        final AxEventModel copy = ((AxEventModel) copyObject);
+        super.copyTo(targetObject);
+        copy.setSchemas(new AxContextSchemas(schemas));
+        copy.setEvents(new AxEvents(events));
+
+        return copy;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + super.hashCode();
+        result = prime * result + schemas.hashCode();
+        result = prime * result + events.hashCode();
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxModel#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            throw new IllegalArgumentException("comparison object may not be null");
+        }
+
+        if (this == obj) {
+            return true;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        final AxEventModel other = (AxEventModel) obj;
+        if (!super.equals(other)) {
+            return false;
+        }
+        if (!schemas.equals(other.schemas)) {
+            return false;
+        }
+        return events.equals(other.events);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxModel#compareTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        Assertions.argumentNotNull(otherObj, "comparison object may not be null");
+
+        if (this == otherObj) {
+            return 0;
+        }
+        if (getClass() != otherObj.getClass()) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxEventModel other = (AxEventModel) otherObj;
+        if (!super.equals(other)) {
+            return super.compareTo(other);
+        }
+        if (!schemas.equals(other.schemas)) {
+            return schemas.compareTo(other.schemas);
+        }
+        return events.compareTo(other.events);
+    }
+}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java
new file mode 100644
index 0000000..df398c2
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxEvents.java
@@ -0,0 +1,420 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.NavigableMap;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.persistence.CascadeType;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.Table;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+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 an event container and holds a map of the events for an entire Apex model. All Apex models that use
+ * events must have an {@link AxEvents} field. The {@link AxEvents} class implements the helper methods of the
+ * {@link AxConceptGetter} interface to allow {@link AxEvents} 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 events are defined in the container.
+ * Each event 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 event entry is then validated individually.
+ */
+@Entity
+@Table(name = "AxEvents")
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AxEvents", namespace = "http://www.onap.org/policy/apex-pdp", propOrder = { "key", "eventMap" })
+
+public class AxEvents extends AxConcept implements AxConceptGetter<AxEvent> {
+    private static final long serialVersionUID = 4290442590545820316L;
+
+    @EmbeddedId
+    @XmlElement(name = "key", required = true)
+    private AxArtifactKey key;
+
+    // @formatter:off
+    @ManyToMany(cascade = CascadeType.ALL)
+    @JoinTable(
+            joinColumns = { @JoinColumn(name = "eventMapName", referencedColumnName = "name"),
+                    @JoinColumn(name = "eventMapVersion", referencedColumnName = "version") },
+            inverseJoinColumns = { @JoinColumn(name = "eventName", referencedColumnName = "name"),
+                    @JoinColumn(name = "eventVersion", referencedColumnName = "version") })
+    @XmlElement(required = true)
+    private Map<AxArtifactKey, AxEvent> eventMap;
+    // @formatter:on
+
+    /**
+     * The Default Constructor creates a {@link AxEvents} object with a null artifact key and creates an empty event
+     * map.
+     */
+    public AxEvents() {
+        this(new AxArtifactKey());
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxEvents(final AxEvents copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * The Key Constructor creates a {@link AxEvents} object with the given artifact key and creates an empty event map.
+     *
+     * @param key the event container key
+     */
+    public AxEvents(final AxArtifactKey key) {
+        this(key, new TreeMap<AxArtifactKey, AxEvent>());
+    }
+
+    /**
+     * This Constructor creates an event container with all of its fields defined.
+     *
+     * @param key the event container key
+     * @param eventMap the events to be stored in the event container
+     */
+    public AxEvents(final AxArtifactKey key, final Map<AxArtifactKey, AxEvent> eventMap) {
+        super();
+        Assertions.argumentNotNull(key, "key may not be null");
+        Assertions.argumentNotNull(eventMap, "eventMap may not be null");
+
+        this.key = key;
+        this.eventMap = new TreeMap<>();
+        this.eventMap.putAll(eventMap);
+    }
+
+    /**
+     * When a model is unmarshalled from disk or from the database, the event 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
+     */
+    public void afterUnmarshal(final Unmarshaller u, final Object parent) {
+        // The map must be navigable to allow name and version searching, unmarshaling returns a hash map
+        final NavigableMap<AxArtifactKey, AxEvent> navigableEventMap = new TreeMap<>();
+        navigableEventMap.putAll(eventMap);
+        eventMap = navigableEventMap;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+     */
+    @Override
+    public AxArtifactKey getKey() {
+        return key;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = key.getKeys();
+
+        for (final AxEvent event : eventMap.values()) {
+            keyList.addAll(event.getKeys());
+        }
+
+        return keyList;
+    }
+
+    /**
+     * Sets the key of the event container.
+     *
+     * @param key the event container key
+     */
+    public void setKey(final AxArtifactKey key) {
+        Assertions.argumentNotNull(key, "key may not be null");
+        this.key = key;
+    }
+
+    /**
+     * Gets the event map containing the events in the event container.
+     *
+     * @return the event map with all the events in the event container
+     */
+    public Map<AxArtifactKey, AxEvent> getEventMap() {
+        return eventMap;
+    }
+
+    /**
+     * Sets the event map containing the events in the event container.
+     *
+     * @param eventMap the event map containing the events in the event container
+     */
+    public void setEventMap(final Map<AxArtifactKey, AxEvent> eventMap) {
+        Assertions.argumentNotNull(eventMap, "eventMap may not be null");
+        this.eventMap = new TreeMap<>();
+        this.eventMap.putAll(eventMap);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult resultIn) {
+        AxValidationResult result = resultIn;
+
+        if (key.equals(AxArtifactKey.getNullKey())) {
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+        }
+
+        result = key.validate(result);
+
+        if (eventMap.size() == 0) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "eventMap may not be empty"));
+        } else {
+            for (final Entry<AxArtifactKey, AxEvent> eventEntry : eventMap.entrySet()) {
+                if (eventEntry.getKey().equals(AxArtifactKey.getNullKey())) {
+                    result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                            "key on event entry " + eventEntry.getKey() + " may not be the null key"));
+                } else if (eventEntry.getValue() == null) {
+                    result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                            "value on event entry " + eventEntry.getKey() + " may not be null"));
+                } else {
+                    if (!eventEntry.getKey().equals(eventEntry.getValue().getKey())) {
+                        result.addValidationMessage(new AxValidationMessage(key, this.getClass(),
+                                ValidationResult.INVALID, "key on event entry key " + eventEntry.getKey()
+                                        + " does not equal event value key " + eventEntry.getValue().getKey()));
+                    }
+
+                    result = eventEntry.getValue().validate(result);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+     */
+    @Override
+    public void clean() {
+        key.clean();
+        for (final Entry<AxArtifactKey, AxEvent> eventEntry : eventMap.entrySet()) {
+            eventEntry.getKey().clean();
+            eventEntry.getValue().clean();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append("key=");
+        builder.append(key);
+        builder.append(",eventMap=");
+        builder.append(eventMap);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept targetObject) {
+        Assertions.argumentNotNull(targetObject, "target may not be null");
+
+        final Object copyObject = targetObject;
+        Assertions.instanceOf(copyObject, AxEvents.class);
+
+        final AxEvents copy = (AxEvents) copyObject;
+        copy.setKey(new AxArtifactKey(key));
+        final Map<AxArtifactKey, AxEvent> newEventMap = new TreeMap<>();
+        for (final Entry<AxArtifactKey, AxEvent> eventMapEntry : eventMap.entrySet()) {
+            newEventMap.put(new AxArtifactKey(eventMapEntry.getKey()), new AxEvent(eventMapEntry.getValue()));
+        }
+        copy.setEventMap(newEventMap);
+
+        return copy;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + key.hashCode();
+        result = prime * result + eventMap.hashCode();
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+
+        final AxEvents other = (AxEvents) obj;
+        if (!key.equals(other.key)) {
+            return false;
+        }
+        return eventMap.equals(other.eventMap);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        if (otherObj == null) {
+            return -1;
+        }
+        if (this == otherObj) {
+            return 0;
+        }
+        if (getClass() != otherObj.getClass()) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxEvents other = (AxEvents) otherObj;
+        if (!key.equals(other.key)) {
+            return key.compareTo(other.key);
+        }
+        if (!eventMap.equals(other.eventMap)) {
+            return (eventMap.hashCode() - other.eventMap.hashCode());
+        }
+
+        return 0;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(org.onap.policy.apex.model.basicmodel.
+     * concepts. AxArtifactKey)
+     */
+    @Override
+    public AxEvent get(final AxArtifactKey conceptKey) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxEvent>) eventMap).get(conceptKey);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String)
+     */
+    @Override
+    public AxEvent get(final String conceptKeyName) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxEvent>) eventMap).get(conceptKeyName);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#get(java.lang.String, java.lang.String)
+     */
+    @Override
+    public AxEvent get(final String conceptKeyName, final String conceptKeyVersion) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxEvent>) eventMap).get(conceptKeyName,
+                conceptKeyVersion);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String)
+     */
+    @Override
+    public Set<AxEvent> getAll(final String conceptKeyName) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxEvent>) eventMap).getAll(conceptKeyName);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConceptGetter#getAll(java.lang.String, java.lang.String)
+     */
+    @Override
+    public Set<AxEvent> getAll(final String conceptKeyName, final String conceptKeyVersion) {
+        return new AxConceptGetterImpl<>((NavigableMap<AxArtifactKey, AxEvent>) eventMap).getAll(conceptKeyName,
+                conceptKeyVersion);
+    }
+}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java
new file mode 100644
index 0000000..4aee0eb
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxField.java
@@ -0,0 +1,406 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import java.util.List;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.AttributeOverrides;
+import javax.persistence.Column;
+import javax.persistence.Embedded;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+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.AxReferenceKey;
+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.xml.AxReferenceKeyAdapter;
+import org.onap.policy.apex.model.utilities.Assertions;
+
+/**
+ * In Apex, a field is an input or output parameter to or from a concept. For example, the parameters of an event are
+ * fields and the input and output of a task is defined as a collection of fields.
+ * <p>
+ * A field has an {@link AxReferenceKey} key that defines its name and parent, and a {@link AxArtifactKey} key to a
+ * context schema that defines the structure of the data atom that holds the value of the field. Fields can be specified
+ * as being optional but are mandatory by default.
+ * <p>
+ * Validation checks that the field key and the field schema reference key are not null.
+ */
+@Entity
+@Table(name = "AxField")
+@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "apexField", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxField", namespace = "http://www.onap.org/policy/apex-pdp",
+        propOrder = { "key", "fieldSchemaKey", "optional" })
+
+public class AxField extends AxConcept {
+    private static final String KEY_MAY_NOT_BE_NULL = "key may not be null";
+    private static final String FIELD_SCHEMA_KEY_MAY_NOT_BE_NULL = "fieldSchemaKey may not be null";
+
+    private static final long serialVersionUID = -6443016863162692288L;
+
+    private static final int HASH_PRIME_0 = 1231;
+    private static final int HASH_PRIME_1 = 1237;
+
+    @EmbeddedId()
+    @XmlElement(name = "key", required = true)
+    @XmlJavaTypeAdapter(AxReferenceKeyAdapter.class)
+    private AxReferenceKey key;
+
+    // @formatter:off
+    @Embedded
+    @AttributeOverrides({ @AttributeOverride(name = "name", column = @Column(name = "fieldSchemaName")),
+            @AttributeOverride(name = "version", column = @Column(name = "fieldSchemaVersion")) })
+    @Column(name = "fieldSchemaKey")
+    @XmlElement(required = true)
+    private AxArtifactKey fieldSchemaKey;
+    // @formatter:on
+
+    @Column(name = "optional")
+    @XmlElement(required = false)
+    private boolean optional;
+
+    /**
+     * The default constructor creates a field with a null artifact and schema key.
+     */
+    public AxField() {
+        this(new AxReferenceKey());
+        optional = false;
+    }
+
+    /**
+     * The default constructor creates a field with the given artifact key and a null schema key.
+     *
+     * @param key the field key
+     */
+    public AxField(final AxReferenceKey key) {
+        this(key, new AxArtifactKey());
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param copyConcept the concept to copy from
+     */
+    public AxField(final AxField copyConcept) {
+        super(copyConcept);
+    }
+
+    /**
+     * Constructor to create the field with both its keys defined.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey) {
+        super();
+        Assertions.argumentNotNull(key, KEY_MAY_NOT_BE_NULL);
+        Assertions.argumentNotNull(fieldSchemaKey, FIELD_SCHEMA_KEY_MAY_NOT_BE_NULL);
+
+        this.key = key;
+        this.fieldSchemaKey = fieldSchemaKey;
+    }
+
+    /**
+     * Constructor to create the field with all its fields defined.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     * @param optional true if this field is optional
+     */
+    public AxField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey, final boolean optional) {
+        super();
+        Assertions.argumentNotNull(key, KEY_MAY_NOT_BE_NULL);
+        Assertions.argumentNotNull(fieldSchemaKey, FIELD_SCHEMA_KEY_MAY_NOT_BE_NULL);
+
+        this.key = key;
+        this.fieldSchemaKey = fieldSchemaKey;
+        this.optional = optional;
+    }
+
+    /**
+     * Constructor to create the field with the local name of its reference key defined and its schema key defined.
+     *
+     * @param localName the local name of the field reference key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxField(final String localName, final AxArtifactKey fieldSchemaKey) {
+        super();
+        Assertions.argumentNotNull(localName, "localName may not be null");
+        Assertions.argumentNotNull(fieldSchemaKey, FIELD_SCHEMA_KEY_MAY_NOT_BE_NULL);
+
+        key = new AxReferenceKey();
+        key.setLocalName(localName);
+        this.fieldSchemaKey = fieldSchemaKey;
+    }
+
+    /**
+     * Constructor to create the field with the local name of its reference key defined, its schema key and optionality
+     * defined.
+     *
+     * @param localName the local name of the field reference key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     * @param optional true if this field is optional
+     */
+    public AxField(final String localName, final AxArtifactKey fieldSchemaKey, final boolean optional) {
+        super();
+        Assertions.argumentNotNull(localName, "localName may not be null");
+        Assertions.argumentNotNull(fieldSchemaKey, FIELD_SCHEMA_KEY_MAY_NOT_BE_NULL);
+
+        key = new AxReferenceKey();
+        key.setLocalName(localName);
+        this.fieldSchemaKey = fieldSchemaKey;
+        this.optional = optional;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+     */
+    @Override
+    public AxReferenceKey getKey() {
+        return key;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+     */
+    @Override
+    public List<AxKey> getKeys() {
+        final List<AxKey> keyList = key.getKeys();
+        keyList.add(new AxKeyUse(fieldSchemaKey));
+        return keyList;
+    }
+
+    /**
+     * Sets the reference key of the field.
+     *
+     * @param key the field reference key
+     */
+    public void setKey(final AxReferenceKey key) {
+        Assertions.argumentNotNull(key, KEY_MAY_NOT_BE_NULL);
+        this.key = key;
+    }
+
+    /**
+     * Gets the key of the field schema.
+     *
+     * @return the field schema key
+     */
+    public AxArtifactKey getSchema() {
+        return fieldSchemaKey;
+    }
+
+    /**
+     * Sets the key of the field schema.
+     *
+     * @param schema the field schema key
+     */
+    public void setSchema(final AxArtifactKey schema) {
+        Assertions.argumentNotNull(schema, "schema may not be null");
+        this.fieldSchemaKey = schema;
+    }
+
+    /**
+     * Gets the optionality of the field.
+     *
+     * @return the field optional flag
+     */
+    public boolean getOptional() {
+        return optional;
+    }
+
+    /**
+     * Sets the optionality of the field.
+     *
+     * @param optional the optionality of the field
+     */
+    public void setOptional(final boolean optional) {
+        this.optional = optional;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxValidationResult)
+     */
+    @Override
+    public AxValidationResult validate(final AxValidationResult resultIn) {
+        AxValidationResult result = resultIn;
+
+        if (key.equals(AxReferenceKey.getNullKey())) {
+            result.addValidationMessage(
+                    new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID, "key is a null key"));
+        }
+
+        result = key.validate(result);
+
+        if (fieldSchemaKey.equals(AxArtifactKey.getNullKey())) {
+            result.addValidationMessage(new AxValidationMessage(key, this.getClass(), ValidationResult.INVALID,
+                    "fieldSchemaKey is a null key: " + fieldSchemaKey));
+        }
+        return fieldSchemaKey.validate(result);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+     */
+    @Override
+    public void clean() {
+        key.clean();
+        fieldSchemaKey.clean();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+     */
+    @Override
+    public String toString() {
+        final StringBuilder builder = new StringBuilder();
+        builder.append(this.getClass().getSimpleName());
+        builder.append(":(");
+        builder.append("key=");
+        builder.append(key);
+        builder.append(",fieldSchemaKey=");
+        builder.append(fieldSchemaKey);
+        builder.append(",optional=");
+        builder.append(optional);
+        builder.append(")");
+        return builder.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+     * AxConcept)
+     */
+    @Override
+    public AxConcept copyTo(final AxConcept targetObject) {
+        Assertions.argumentNotNull(targetObject, "target may not be null");
+
+        final Object copyObject = targetObject;
+        Assertions.instanceOf(copyObject, AxField.class);
+
+        final AxField copy = ((AxField) copyObject);
+        copy.setKey(new AxReferenceKey(key));
+        copy.setSchema(new AxArtifactKey(fieldSchemaKey));
+        copy.setOptional(optional);
+        return copy;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + key.hashCode();
+        result = prime * result + fieldSchemaKey.hashCode();
+        result = prime * result + (optional ? HASH_PRIME_0 : HASH_PRIME_1);
+        return result;
+    }
+
+    /*
+     * (nonJavadoc)
+     *
+     * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+
+        if (!(obj instanceof AxField)) {
+            return false;
+        }
+
+        final AxField other = (AxField) obj;
+        if (!key.getLocalName().equals(other.key.getLocalName())) {
+            return false;
+        }
+        if (optional != other.optional) {
+            return false;
+        }
+        return fieldSchemaKey.equals(other.fieldSchemaKey);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    @Override
+    public int compareTo(final AxConcept otherObj) {
+        if (otherObj == null) {
+            return 1;
+        }
+        if (this == otherObj) {
+            return 0;
+        }
+        if (!(otherObj instanceof AxField)) {
+            return this.hashCode() - otherObj.hashCode();
+        }
+
+        final AxField other = (AxField) otherObj;
+        if (!key.getLocalName().equals(other.key.getLocalName())) {
+            return key.getLocalName().compareTo(other.key.getLocalName());
+        }
+        if (optional != other.optional) {
+            return (optional ? 1 : -1);
+        }
+        return fieldSchemaKey.compareTo(other.fieldSchemaKey);
+    }
+}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java
new file mode 100644
index 0000000..e7a9a2a
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxInputField.java
@@ -0,0 +1,104 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+
+/**
+ * This class specializes the {@link AxField} class for use as input fields on events.
+ */
+@Entity
+@Table(name = "AxInputField")
+@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "apexInputField", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxInputField", namespace = "http://www.onap.org/policy/apex-pdp")
+
+public class AxInputField extends AxField {
+    private static final long serialVersionUID = 2090324845463750391L;
+
+    /**
+     * The default constructor creates a field with a null artifact and schema key.
+     */
+    public AxInputField() {
+        super();
+    }
+
+    /**
+     * The default constructor creates a field with the given artifact key and a null schema key.
+     *
+     * @param key the field key
+     */
+    public AxInputField(final AxReferenceKey key) {
+        super(key);
+    }
+
+    /**
+     * Constructor to create the field with both its keys defined.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxInputField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey) {
+        super(key, fieldSchemaKey);
+    }
+
+    /**
+     * Constructor to create the field with both its keys defined and optional flag specified.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     * @param optional true if the task field is optional, false otherwise
+     */
+    public AxInputField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey, final boolean optional) {
+        super(key, fieldSchemaKey, optional);
+    }
+
+    /**
+     * Constructor to create the field with the local name of its reference key defined and its schema key defined.
+     *
+     * @param localName the local name of the field reference key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxInputField(final String localName, final AxArtifactKey fieldSchemaKey) {
+        super(localName, fieldSchemaKey);
+    }
+
+    /**
+     * Copy constructor, create an input field as a copy of another input field.
+     *
+     * @param field the input field to copy from
+     */
+    public AxInputField(final AxInputField field) {
+        super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()));
+    }
+}
diff --git a/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java
new file mode 100644
index 0000000..1dd2ecb
--- /dev/null
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/AxOutputField.java
@@ -0,0 +1,104 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+
+/**
+ * This class specializes the {@link AxField} class for use as output fields on events.
+ */
+@Entity
+@Table(name = "AxOutputField")
+@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "apexOutputField", namespace = "http://www.onap.org/policy/apex-pdp")
+@XmlType(name = "AxOutputField", namespace = "http://www.onap.org/policy/apex-pdp")
+
+public class AxOutputField extends AxField {
+    private static final long serialVersionUID = 2090324845463750391L;
+
+    /**
+     * The default constructor creates a field with a null artifact and schema key.
+     */
+    public AxOutputField() {
+        super();
+    }
+
+    /**
+     * The default constructor creates a field with the given artifact key and a null schema key.
+     *
+     * @param key the field key
+     */
+    public AxOutputField(final AxReferenceKey key) {
+        super(key);
+    }
+
+    /**
+     * Constructor to create the field with both its keys defined.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxOutputField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey) {
+        super(key, fieldSchemaKey);
+    }
+
+    /**
+     * Constructor to create the field with both its keys defined and optional flag specified.
+     *
+     * @param key the field key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     * @param optional true if the task field is optional, false otherwise
+     */
+    public AxOutputField(final AxReferenceKey key, final AxArtifactKey fieldSchemaKey, final boolean optional) {
+        super(key, fieldSchemaKey, optional);
+    }
+
+    /**
+     * Constructor to create the field with the local name of its reference key defined and its schema key defined.
+     *
+     * @param localName the local name of the field reference key
+     * @param fieldSchemaKey the key of the field schema to use for this field
+     */
+    public AxOutputField(final String localName, final AxArtifactKey fieldSchemaKey) {
+        super(localName, fieldSchemaKey);
+    }
+
+    /**
+     * Copy constructor, create an output field as a copy of another output field.
+     *
+     * @param field the output field to copy from
+     */
+    public AxOutputField(final AxOutputField field) {
+        super(new AxReferenceKey(field.getKey()), new AxArtifactKey(field.getSchema()));
+    }
+}
diff --git a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/package-info.java
similarity index 73%
copy from model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java
copy to model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/package-info.java
index 4d5c91c..7b20b39 100644
--- a/model/basic-model/src/main/java/org/onap/apex/model/basicmodel/concepts/package-info.java
+++ b/model/event-model/src/main/java/org/onap/policy/apex/model/eventmodel/concepts/package-info.java
@@ -1,33 +1,33 @@
-/*
+/*-
  * ============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=========================================================
  */
 
 /**
- * This package contains the fundamental concepts for all APEX models.
- * 
+ * Contains the concepts required to manage events in APEX. It defines the main Apex concepts of events and fields.
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 
-@XmlSchema(namespace = "http://www.ericsson.com/apex", elementFormDefault = XmlNsForm.QUALIFIED, xmlns = {
-        @XmlNs(namespaceURI = "http://www.ericsson.com/apex", prefix = "") })
+@XmlSchema(namespace = "http://www.onap.org/policy/apex-pdp", elementFormDefault = XmlNsForm.QUALIFIED,
+        xmlns = { @XmlNs(namespaceURI = "http://www.onap.org/policy/apex-pdp", prefix = "") })
 
-package org.onap.apex.model.basicmodel.concepts;
+package org.onap.policy.apex.model.eventmodel.concepts;
 
 import javax.xml.bind.annotation.XmlNs;
 import javax.xml.bind.annotation.XmlNsForm;
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEventModel.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEventModel.java
new file mode 100644
index 0000000..dbff066
--- /dev/null
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEventModel.java
@@ -0,0 +1,89 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+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.AxContextSchemas;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEventModel;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestEventModel {
+
+    @Test
+    public void testEventModel() {
+        assertNotNull(new AxEventModel());
+        assertNotNull(new AxEventModel(new AxArtifactKey()));
+        assertNotNull(
+                new AxEventModel(new AxArtifactKey(), new AxContextSchemas(), new AxKeyInformation(), new AxEvents()));
+
+        final AxArtifactKey modelKey = new AxArtifactKey("ModelKey", "0.0.1");
+        final AxArtifactKey schemasKey = new AxArtifactKey("SchemasKey", "0.0.1");
+        final AxArtifactKey eventsKey = new AxArtifactKey("EventsKey", "0.0.1");
+        final AxArtifactKey keyInfoKey = new AxArtifactKey("SchemasKey", "0.0.1");
+        final AxEventModel model = new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey));
+        model.register();
+
+        model.clean();
+        assertNotNull(model);
+        assertEquals("AxEventModel:(AxEventModel:(key=AxArtifactKey:(nam", model.toString().substring(0, 50));
+
+        final AxEventModel clonedModel = new AxEventModel(model);
+
+        assertFalse(model.hashCode() == 0);
+
+        assertTrue(model.equals(model));
+        assertTrue(model.equals(clonedModel));
+        assertFalse(model.equals("Hello"));
+        assertFalse(model.equals(new AxEventModel(new AxArtifactKey())));
+        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
+                new AxEvents(eventsKey))));
+        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
+                new AxEvents(eventsKey))));
+        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents())));
+        assertTrue(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey))));
+
+        assertEquals(0, model.compareTo(model));
+        assertEquals(0, model.compareTo(clonedModel));
+        assertNotEquals(0, model.compareTo(new AxArtifactKey()));
+        assertNotEquals(0, model.compareTo(new AxEventModel(modelKey, new AxContextSchemas(),
+                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey))));
+        assertNotEquals(0, model.compareTo(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(), new AxEvents(eventsKey))));
+        assertNotEquals(0, model.compareTo(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents())));
+        assertEquals(0, model.compareTo(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey))));
+    }
+}
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEvents.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEvents.java
new file mode 100644
index 0000000..5456dfa
--- /dev/null
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestEvents.java
@@ -0,0 +1,298 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+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.eventmodel.concepts.AxEvent;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
+import org.onap.policy.apex.model.eventmodel.concepts.AxField;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestEvents {
+
+    @Test
+    public void testEvents() {
+        final TreeMap<String, AxField> parameterMap = new TreeMap<>();
+        final TreeMap<String, AxField> parameterMapEmpty = new TreeMap<>();
+
+        assertNotNull(new AxEvent());
+        assertNotNull(new AxEvent(new AxArtifactKey()));
+        assertNotNull(new AxEvent(new AxArtifactKey(), "namespace"));
+        assertNotNull(new AxEvent(new AxArtifactKey(), "namespace", "source", "target"));
+        assertNotNull(new AxEvent(new AxArtifactKey(), "namespace", "source", "target"));
+        assertNotNull(new AxEvent(new AxArtifactKey(), "namespace", "source", "target", parameterMap));
+
+        final AxEvent event = new AxEvent();
+
+        final AxArtifactKey eventKey = new AxArtifactKey("EventName", "0.0.1");
+        event.setKey(eventKey);
+        assertEquals("EventName:0.0.1", event.getKey().getID());
+        assertEquals("EventName:0.0.1", event.getKeys().get(0).getID());
+
+        event.setNameSpace("namespace");
+        assertEquals("namespace", event.getNameSpace());
+
+        event.setSource("source");
+        assertEquals("source", event.getSource());
+
+        event.setTarget("target");
+        assertEquals("target", event.getTarget());
+
+        event.setParameterMap(parameterMap);
+        assertEquals(0, event.getParameterMap().size());
+
+        final AxField eventField =
+                new AxField(new AxReferenceKey(eventKey, "Field0"), new AxArtifactKey("Field0Schema", "0.0.1"));
+        event.getParameterMap().put(eventField.getKey().getLocalName(), eventField);
+        assertEquals(1, event.getParameterMap().size());
+
+        final AxField eventFieldBadParent =
+                new AxField(new AxReferenceKey(new AxArtifactKey("OtherEvent", "0.0.01"), "Field0"),
+                        new AxArtifactKey("Field0Schema", "0.0.1"));
+
+        final AxArtifactKey newEventKey = new AxArtifactKey("NewEventName", "0.0.1");
+        event.setKey(newEventKey);
+        assertEquals("NewEventName:0.0.1", event.getKey().getID());
+        assertEquals("NewEventName:0.0.1", event.getKeys().get(0).getID());
+        assertEquals("NewEventName:0.0.1",
+                event.getParameterMap().get("Field0").getKey().getParentArtifactKey().getID());
+        event.setKey(eventKey);
+        assertEquals("EventName:0.0.1", event.getKey().getID());
+        assertEquals("EventName:0.0.1", event.getKeys().get(0).getID());
+
+        assertTrue("Field0", event.getFields().contains(eventField));
+        assertTrue(event.hasFields(new TreeSet<AxField>(parameterMap.values())));
+
+        AxValidationResult result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(AxValidationResult.ValidationResult.VALID, result.getValidationResult());
+
+        event.setKey(AxArtifactKey.getNullKey());
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        event.setKey(eventKey);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.setNameSpace("");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.WARNING, result.getValidationResult());
+
+        event.setNameSpace("namespace");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.setSource("");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.OBSERVATION, result.getValidationResult());
+
+        event.setSource("source");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.setTarget("");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.OBSERVATION, result.getValidationResult());
+
+        event.setTarget("target");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.getParameterMap().put(AxKey.NULL_KEY_NAME, null);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        event.getParameterMap().remove(AxKey.NULL_KEY_NAME);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.getParameterMap().put("NullField", null);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        event.getParameterMap().remove("NullField");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.getParameterMap().put("NullField", eventField);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        event.getParameterMap().remove("NullField");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.getParameterMap().put("BadParent", eventFieldBadParent);
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        event.getParameterMap().remove("BadParent");
+        result = new AxValidationResult();
+        result = event.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        event.clean();
+        event.afterUnmarshal(null, null);
+
+        final AxEvent clonedEvent = new AxEvent(event);
+        assertEquals("AxEvent:(key=AxArtifactKey:(name=EventName,version=0.0.1),nameSpace=namespace",
+                clonedEvent.toString().substring(0, 77));
+
+        assertFalse(event.hashCode() == 0);
+
+        assertTrue(event.equals(event));
+        assertTrue(event.equals(clonedEvent));
+        assertFalse(event.equals(null));
+        assertFalse(event.equals("Hello"));
+        assertFalse(
+                event.equals(new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap)));
+        assertFalse(event.equals(new AxEvent(eventKey, "namespace1", "source", "target", parameterMap)));
+        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source2", "target", parameterMap)));
+        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source", "target3", parameterMap)));
+        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source", "target", parameterMapEmpty)));
+        assertTrue(event.equals(new AxEvent(eventKey, "namespace", "source", "target", parameterMap)));
+
+        assertEquals(0, event.compareTo(event));
+        assertEquals(0, event.compareTo(clonedEvent));
+        assertNotEquals(0, event.compareTo(new AxArtifactKey()));
+        assertNotEquals(0, event.compareTo(null));
+        assertNotEquals(0, event
+                .compareTo(new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap)));
+        assertNotEquals(0, event.compareTo(new AxEvent(eventKey, "namespace1", "source", "target", parameterMap)));
+        assertNotEquals(0, event.compareTo(new AxEvent(eventKey, "namespace", "source2", "target", parameterMap)));
+        assertNotEquals(0, event.compareTo(new AxEvent(eventKey, "namespace", "source", "target3", parameterMap)));
+        assertNotEquals(0, event.compareTo(new AxEvent(eventKey, "namespace", "source", "target", parameterMapEmpty)));
+        assertEquals(0, event.compareTo(new AxEvent(eventKey, "namespace", "source", "target", parameterMap)));
+
+        assertNotNull(event.getKeys());
+
+        final AxEvents events = new AxEvents();
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        // Invalid, no events in event map
+        events.setKey(new AxArtifactKey("EventsKey", "0.0.1"));
+        assertEquals("EventsKey:0.0.1", events.getKey().getID());
+
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        events.getEventMap().put(eventKey, event);
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        events.getEventMap().put(AxArtifactKey.getNullKey(), null);
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        events.getEventMap().remove(AxArtifactKey.getNullKey());
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        events.getEventMap().put(new AxArtifactKey("NullValueKey", "0.0.1"), null);
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        events.getEventMap().remove(new AxArtifactKey("NullValueKey", "0.0.1"));
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        events.getEventMap().put(new AxArtifactKey("BadEventKey", "0.0.1"), event);
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        events.getEventMap().remove(new AxArtifactKey("BadEventKey", "0.0.1"));
+        result = new AxValidationResult();
+        result = events.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        events.clean();
+        events.afterUnmarshal(null, null);
+
+        final AxEvents clonedEvents = new AxEvents(events);
+        assertEquals("AxEvents:(key=AxArtifactKey:(name=EventsKey,version=0.0.1),e",
+                clonedEvents.toString().substring(0, 60));
+
+        assertFalse(events.hashCode() == 0);
+
+        assertTrue(events.equals(events));
+        assertTrue(events.equals(clonedEvents));
+        assertFalse(events.equals(null));
+        assertFalse(events.equals("Hello"));
+        assertFalse(events.equals(new AxEvents(new AxArtifactKey())));
+
+        assertEquals(0, events.compareTo(events));
+        assertEquals(0, events.compareTo(clonedEvents));
+        assertNotEquals(0, events.compareTo(null));
+        assertNotEquals(0, events.compareTo(new AxArtifactKey()));
+        assertNotEquals(0, events.compareTo(new AxEvents(new AxArtifactKey())));
+
+        clonedEvents.get(eventKey).setSource("AnotherSource");
+        assertNotEquals(0, events.compareTo(clonedEvents));
+
+        assertEquals(events.getKey(), events.getKeys().get(0));
+
+        assertEquals("EventName", events.get("EventName").getKey().getName());
+        assertEquals("EventName", events.get("EventName", "0.0.1").getKey().getName());
+        assertEquals(1, events.getAll("EventName", "0.0.1").size());
+        assertEquals(0, events.getAll("NonExistantEventsName").size());
+    }
+}
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestField.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestField.java
new file mode 100644
index 0000000..11b8b74
--- /dev/null
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/TestField.java
@@ -0,0 +1,136 @@
+/*-
+ * ============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.eventmodel.concepts;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+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.eventmodel.concepts.AxField;
+import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
+import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestField {
+
+    @Test
+    public void testField() {
+        assertNotNull(new AxField());
+        assertNotNull(new AxField(new AxReferenceKey()));
+        assertNotNull(new AxField(new AxReferenceKey(), new AxArtifactKey()));
+        assertNotNull(new AxField(new AxReferenceKey(), new AxArtifactKey(), false));
+        assertNotNull(new AxField("LocalName", new AxArtifactKey(), false));
+        assertNotNull(new AxField("LocalName", new AxArtifactKey()));
+        assertNotNull(new AxField("LocalName", new AxArtifactKey(), false));
+
+        assertNotNull(new AxInputField());
+        assertNotNull(new AxInputField(new AxReferenceKey()));
+        assertNotNull(new AxInputField(new AxReferenceKey(), new AxArtifactKey()));
+        assertNotNull(new AxInputField(new AxReferenceKey(), new AxArtifactKey(), true));
+        assertNotNull(new AxInputField("LocalName", new AxArtifactKey()));
+        assertNotNull(new AxInputField(new AxInputField()));
+
+        assertNotNull(new AxOutputField());
+        assertNotNull(new AxOutputField(new AxReferenceKey()));
+        assertNotNull(new AxOutputField(new AxReferenceKey(), new AxArtifactKey()));
+        assertNotNull(new AxOutputField(new AxReferenceKey(), new AxArtifactKey(), false));
+        assertNotNull(new AxOutputField("LocalName", new AxArtifactKey()));
+        assertNotNull(new AxOutputField(new AxOutputField()));
+
+        final AxField field = new AxField();
+
+        final AxReferenceKey fieldKey = new AxReferenceKey("FieldName", "0.0.1", "PLN", "LN");
+        field.setKey(fieldKey);
+        assertEquals("FieldName:0.0.1:PLN:LN", field.getKey().getID());
+        assertEquals("FieldName:0.0.1:PLN:LN", field.getKeys().get(0).getID());
+
+        final AxArtifactKey schemaKey = new AxArtifactKey("SchemaName", "0.0.1");
+        field.setSchema(schemaKey);
+        assertEquals("SchemaName:0.0.1", field.getSchema().getID());
+
+        assertEquals(false, field.getOptional());
+        field.setOptional(true);
+        assertEquals(true, field.getOptional());
+
+        AxValidationResult result = new AxValidationResult();
+        result = field.validate(result);
+        assertEquals(AxValidationResult.ValidationResult.VALID, result.getValidationResult());
+
+        field.setKey(AxReferenceKey.getNullKey());
+        result = new AxValidationResult();
+        result = field.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        field.setKey(fieldKey);
+        result = new AxValidationResult();
+        result = field.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        field.setSchema(AxArtifactKey.getNullKey());
+        result = new AxValidationResult();
+        result = field.validate(result);
+        assertEquals(ValidationResult.INVALID, result.getValidationResult());
+
+        field.setSchema(schemaKey);
+        result = new AxValidationResult();
+        result = field.validate(result);
+        assertEquals(ValidationResult.VALID, result.getValidationResult());
+
+        field.clean();
+
+        final AxField clonedField = new AxField(field);
+        assertEquals(
+                "AxField:(key=AxReferenceKey:(parentKeyName=FieldName,parentKeyVersion=0.0.1,parentLocalName=PLN,localName=LN),fieldSchemaKey=AxArtifactKey:(name=SchemaName,version=0.0.1),optional=true)",
+                clonedField.toString());
+
+        assertFalse(field.hashCode() == 0);
+
+        assertTrue(field.equals(field));
+        assertTrue(field.equals(clonedField));
+        assertFalse(field.equals(null));
+        assertFalse(field.equals("Hello"));
+        assertFalse(field.equals(new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false)));
+        assertFalse(field.equals(new AxField(fieldKey, AxArtifactKey.getNullKey(), false)));
+        assertFalse(field.equals(new AxField(fieldKey, schemaKey, false)));
+        assertTrue(field.equals(new AxField(fieldKey, schemaKey, true)));
+
+        assertEquals(0, field.compareTo(field));
+        assertEquals(0, field.compareTo(clonedField));
+        assertNotEquals(0, field.compareTo(new AxArtifactKey()));
+        assertNotEquals(0, field.compareTo(null));
+        assertNotEquals(0,
+                field.compareTo(new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false)));
+        assertNotEquals(0, field.compareTo(new AxField(fieldKey, AxArtifactKey.getNullKey(), false)));
+        assertNotEquals(0, field.compareTo(new AxField(fieldKey, schemaKey, false)));
+        assertEquals(0, field.compareTo(new AxField(fieldKey, schemaKey, true)));
+
+        assertNotNull(field.getKeys());
+    }
+}
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModel.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModel.java
new file mode 100644
index 0000000..ee2638a
--- /dev/null
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModel.java
@@ -0,0 +1,184 @@
+/*-
+ * ============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.eventmodel.handling;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEventModel;
+
+public class TestApexEventModel {
+    private Connection connection;
+    TestApexModel<AxEventModel> testApexModel;
+
+    @Before
+    public void setup() throws Exception {
+        Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+        connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
+
+        testApexModel = new TestApexModel<AxEventModel>(AxEventModel.class, new TestApexEventModelCreator());
+    }
+
+    @After
+    public void teardown() throws Exception {
+        connection.close();
+        new File("derby.log").delete();
+    }
+
+    @Test
+    public void testModelValid() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelValid();
+        assertTrue(result.toString().equals(VALID_MODEL_STRING));
+    }
+
+    @Test
+    public void testApexModelVaidateObservation() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateObservation();
+        assertTrue(result.toString().equals(OBSERVATION_MODEL_STRING));
+    }
+
+    @Test
+    public void testApexModelVaidateWarning() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateWarning();
+        assertTrue(result.toString().equals(WARNING_MODEL_STRING));
+    }
+
+    @Test
+    public void testModelVaidateInvalidModel() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
+        assertTrue(result.toString().equals(INVALID_MODEL_STRING));
+    }
+
+    @Test
+    public void testModelVaidateMalstructured() throws Exception {
+        final AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
+        assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
+    }
+
+    @Test
+    public void testModelWriteReadXML() throws Exception {
+        testApexModel.testApexModelWriteReadXML();
+    }
+
+    @Test
+    public void testModelWriteReadJSON() throws Exception {
+        testApexModel.testApexModelWriteReadJSON();
+    }
+
+    @Test
+    public void testModelWriteReadJPA() throws Exception {
+        final DAOParameters daoParameters = new DAOParameters();
+        daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+        daoParameters.setPersistenceUnit("DAOTest");
+
+        testApexModel.testApexModelWriteReadJPA(daoParameters);
+    }
+
+    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=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event2,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event2,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "********************************";
+
+    private static final String WARNING_MODEL_STRING = "\n" + "***warnings issued during validation of model***\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:WARNING:nameSpace on event is blank\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:WARNING:nameSpace on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event2,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:WARNING:nameSpace on event is blank\n"
+            + "AxArtifactKey:(name=event2,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event2,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "********************************";
+
+    private static final String INVALID_MODEL_STRING = "\n" + "***validation of model failed***\n"
+            + "AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation:INVALID:keyInfoMap may not be empty\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=smallEventModel,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=Schemas,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=BigIntType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=BooleanType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=IntType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=MapType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=SetType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=StringType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=smallEventMap,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=event0,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par0)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par2)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par3)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par4)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par5)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=par6)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:duplicate key AxArtifactKey:(name=event1,version=0.0.1) found\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:duplicate key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar) found\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar)\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event0,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:INVALID:parent key on parameter field AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar) does not equal event key\n"
+            + "AxArtifactKey:(name=smallEventMap,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvents:INVALID:key on event entry key AxArtifactKey:(name=event2,version=0.0.1) does not equal event value key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:INVALID:parent key on parameter field AxReferenceKey:(parentKeyName=event0,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar) does not equal event key\n"
+            + "********************************";
+
+    private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n"
+            + "AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1):org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation:INVALID:keyInfoMap may not be empty\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=smallEventModel,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=KeyInfoMapKey,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=Schemas,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=SetType,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=smallEventMap,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event1,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:duplicate key AxArtifactKey:(name=event1,version=0.0.1) found\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:duplicate key AxReferenceKey:(parentKeyName=event1,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar) found\n"
+            + "AxArtifactKey:(name=smallEventModel,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEventModel:INVALID:key information not found for parent key of key AxReferenceKey:(parentKeyName=event1,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=theOnlyPar)\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "AxArtifactKey:(name=smallEventMap,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvents:INVALID:key on event entry key AxArtifactKey:(name=event2,version=0.0.1) does not equal event value key AxArtifactKey:(name=event1,version=0.0.1)\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:source on event is blank\n"
+            + "AxArtifactKey:(name=event1,version=0.0.1):org.onap.policy.apex.model.eventmodel.concepts.AxEvent:OBSERVATION:target on event is blank\n"
+            + "********************************";
+}
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModelCreator.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModelCreator.java
new file mode 100644
index 0000000..039d230
--- /dev/null
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/TestApexEventModelCreator.java
@@ -0,0 +1,309 @@
+/*-
+ * ============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.eventmodel.handling;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEventModel;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
+import org.onap.policy.apex.model.eventmodel.concepts.AxField;
+
+public class TestApexEventModelCreator implements TestApexModelCreator<AxEventModel> {
+
+    @Override
+    public AxEventModel getModel() {
+        final AxContextSchema axSchema0 =
+                new AxContextSchema(new AxArtifactKey("BooleanType", "0.0.1"), "Java", "java.lang.Boolean");
+        final AxContextSchema axSchema1 =
+                new AxContextSchema(new AxArtifactKey("IntType", "0.0.1"), "Java", "java.lang.Integer");
+        final AxContextSchema axSchema2 =
+                new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java", "java.lang.String");
+        final AxContextSchema axSchema3 = new AxContextSchema(new AxArtifactKey("KeyType", "0.0.1"), "Java",
+                "org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey");
+        final AxContextSchema axSchema4 = new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java",
+                "org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation");
+        final AxContextSchema axSchema5 =
+                new AxContextSchema(new AxArtifactKey("BigIntType", "0.0.1"), "Java", "java.math.BigInteger");
+        final AxContextSchema axSchema6 = new AxContextSchema(new AxArtifactKey("ModelType", "0.0.1"), "Java",
+                "org.onap.policy.apex.model.basicmodel.concepts.AxModel");
+
+        final AxContextSchemas dataTypes = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        dataTypes.getSchemasMap().put(axSchema0.getKey(), axSchema0);
+        dataTypes.getSchemasMap().put(axSchema1.getKey(), axSchema1);
+        dataTypes.getSchemasMap().put(axSchema2.getKey(), axSchema2);
+        dataTypes.getSchemasMap().put(axSchema3.getKey(), axSchema3);
+        dataTypes.getSchemasMap().put(axSchema4.getKey(), axSchema4);
+        dataTypes.getSchemasMap().put(axSchema5.getKey(), axSchema5);
+        dataTypes.getSchemasMap().put(axSchema6.getKey(), axSchema6);
+
+        final AxEvents eventMap = new AxEvents(new AxArtifactKey("smallEventMap", "0.0.1"));
+
+        final AxEvent event0 = new AxEvent(new AxArtifactKey("event0", "0.0.1"),
+                "org.onap.policy.apex.model.eventmodel.events", "Source", "Target");
+        event0.getParameterMap().put("par0",
+                new AxField(new AxReferenceKey(event0.getKey(), "par0"), axSchema0.getKey()));
+        event0.getParameterMap().put("par1",
+                new AxField(new AxReferenceKey(event0.getKey(), "par1"), axSchema1.getKey()));
+        event0.getParameterMap().put("par2",
+                new AxField(new AxReferenceKey(event0.getKey(), "par2"), axSchema2.getKey()));
+        event0.getParameterMap().put("par3",
+                new AxField(new AxReferenceKey(event0.getKey(), "par3"), axSchema6.getKey()));
+        event0.getParameterMap().put("par4",
+                new AxField(new AxReferenceKey(event0.getKey(), "par4"), axSchema4.getKey()));
+        event0.getParameterMap().put("par5",
+                new AxField(new AxReferenceKey(event0.getKey(), "par5"), axSchema5.getKey()));
+        event0.getParameterMap().put("par6",
+                new AxField(new AxReferenceKey(event0.getKey(), "par6"), axSchema5.getKey()));
+        eventMap.getEventMap().put(event0.getKey(), event0);
+
+        final AxEvent event1 = new AxEvent(new AxArtifactKey("event1", "0.0.1"),
+                "org.onap.policy.apex.model.eventmodel.events", "Source", "Target");
+        event1.getParameterMap().put("theOnlyPar",
+                new AxField(new AxReferenceKey(event1.getKey(), "theOnlyPar"), axSchema3.getKey()));
+        eventMap.getEventMap().put(event1.getKey(), event1);
+
+        final AxEvent event2 = new AxEvent(new AxArtifactKey("event2", "0.0.1"),
+                "org.onap.policy.apex.model.eventmodel.events", "Source", "Target");
+        eventMap.getEventMap().put(event2.getKey(), event2);
+
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+
+        final AxEventModel eventModel =
+                new AxEventModel(new AxArtifactKey("EventModel", "0.0.1"), dataTypes, keyInformation, eventMap);
+        keyInformation.generateKeyInfo(eventModel);
+
+        eventModel.validate(new AxValidationResult());
+        return eventModel;
+    }
+
+    @Override
+    public AxEventModel getInvalidModel() {
+        final AxContextSchema axSchema0 =
+                new AxContextSchema(new AxArtifactKey("BooleanType", "0.0.1"), "Java", "java.lang.Zoolean");
+        final AxContextSchema axSchema1 =
+                new AxContextSchema(new AxArtifactKey("IntType", "0.0.1"), "Java", "java.lang.Integer");
+        final AxContextSchema axSchema2 =
+                new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java", "java.lang.String");
+        final AxContextSchema axSchema3 =
+                new AxContextSchema(new AxArtifactKey("SetType", "0.0.1"), "Java", "java.util.Set");
+        final AxContextSchema axSchema4 =
+                new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java", "java.util.Map");
+        final AxContextSchema axSchema5 =
+                new AxContextSchema(new AxArtifactKey("BigIntType", "0.0.1"), "Java", "java.math.BigInteger");
+
+        final AxContextSchemas dataTypes = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        dataTypes.getSchemasMap().put(axSchema0.getKey(), axSchema0);
+        dataTypes.getSchemasMap().put(axSchema1.getKey(), axSchema1);
+        dataTypes.getSchemasMap().put(axSchema2.getKey(), axSchema2);
+        dataTypes.getSchemasMap().put(axSchema3.getKey(), axSchema3);
+        dataTypes.getSchemasMap().put(axSchema4.getKey(), axSchema4);
+        dataTypes.getSchemasMap().put(axSchema5.getKey(), axSchema5);
+
+        final AxEvents eventMap = new AxEvents(new AxArtifactKey("smallEventMap", "0.0.1"));
+
+        final AxEvent event0 =
+                new AxEvent(new AxArtifactKey("event0", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        event0.getParameterMap().put("par0",
+                new AxField(new AxReferenceKey(event0.getKey(), "par0"), axSchema0.getKey()));
+        event0.getParameterMap().put("par1",
+                new AxField(new AxReferenceKey(event0.getKey(), "par1"), axSchema1.getKey()));
+        event0.getParameterMap().put("par2",
+                new AxField(new AxReferenceKey(event0.getKey(), "par2"), axSchema2.getKey()));
+        event0.getParameterMap().put("par3",
+                new AxField(new AxReferenceKey(event0.getKey(), "par3"), axSchema3.getKey()));
+        event0.getParameterMap().put("par4",
+                new AxField(new AxReferenceKey(event0.getKey(), "par4"), axSchema4.getKey()));
+        event0.getParameterMap().put("par5",
+                new AxField(new AxReferenceKey(event0.getKey(), "par5"), axSchema5.getKey()));
+        event0.getParameterMap().put("par6",
+                new AxField(new AxReferenceKey(event0.getKey(), "par6"), axSchema5.getKey()));
+        eventMap.getEventMap().put(event0.getKey(), event0);
+
+        final AxEvent event1 =
+                new AxEvent(new AxArtifactKey("event1", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        event1.getParameterMap().put("theOnlyPar",
+                new AxField(new AxReferenceKey(event0.getKey(), "theOnlyPar"), axSchema3.getKey()));
+        eventMap.getEventMap().put(event1.getKey(), event1);
+
+        final AxEvent event2 =
+                new AxEvent(new AxArtifactKey("event2", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        eventMap.getEventMap().put(event2.getKey(), event1);
+
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+
+        final AxEventModel eventModel =
+                new AxEventModel(new AxArtifactKey("smallEventModel", "0.0.1"), dataTypes, keyInformation, eventMap);
+
+        return eventModel;
+    }
+
+    @Override
+    public AxEventModel getMalstructuredModel() {
+        final AxContextSchema axSchema3 =
+                new AxContextSchema(new AxArtifactKey("SetType", "0.0.1"), "Java", "java.util.Set");
+        final AxContextSchemas dataTypes = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        dataTypes.getSchemasMap().put(axSchema3.getKey(), axSchema3);
+
+        final AxEvents eventMap = new AxEvents(new AxArtifactKey("smallEventMap", "0.0.1"));
+
+        final AxEvent event1 =
+                new AxEvent(new AxArtifactKey("event1", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        event1.getParameterMap().put("theOnlyPar",
+                new AxField(new AxReferenceKey(event1.getKey(), "theOnlyPar"), axSchema3.getKey()));
+        eventMap.getEventMap().put(event1.getKey(), event1);
+
+        final AxEvent event2 =
+                new AxEvent(new AxArtifactKey("event2", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        eventMap.getEventMap().put(event2.getKey(), event1);
+
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+
+        final AxEventModel eventModel =
+                new AxEventModel(new AxArtifactKey("smallEventModel", "0.0.1"), dataTypes, keyInformation, eventMap);
+
+        eventModel.validate(new AxValidationResult());
+
+        return eventModel;
+    }
+
+    @Override
+    public AxEventModel getWarningModel() {
+        final AxContextSchema axSchema0 =
+                new AxContextSchema(new AxArtifactKey("BooleanType", "0.0.1"), "Java", "java.lang.Boolean");
+        final AxContextSchema axSchema1 =
+                new AxContextSchema(new AxArtifactKey("IntType", "0.0.1"), "Java", "java.lang.Integer");
+        final AxContextSchema axSchema2 =
+                new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java", "java.lang.String");
+        final AxContextSchema axSchema3 =
+                new AxContextSchema(new AxArtifactKey("SetType", "0.0.1"), "Java", "java.util.Set");
+        final AxContextSchema axSchema4 =
+                new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java", "java.util.Map");
+        final AxContextSchema axSchema5 =
+                new AxContextSchema(new AxArtifactKey("BigIntType", "0.0.1"), "Java", "java.math.BigInteger");
+        final AxContextSchemas dataTypes = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        dataTypes.getSchemasMap().put(axSchema0.getKey(), axSchema0);
+        dataTypes.getSchemasMap().put(axSchema1.getKey(), axSchema1);
+        dataTypes.getSchemasMap().put(axSchema2.getKey(), axSchema2);
+        dataTypes.getSchemasMap().put(axSchema3.getKey(), axSchema3);
+        dataTypes.getSchemasMap().put(axSchema4.getKey(), axSchema4);
+        dataTypes.getSchemasMap().put(axSchema5.getKey(), axSchema5);
+
+        final AxEvents eventMap = new AxEvents(new AxArtifactKey("smallEventMap", "0.0.1"));
+
+        final AxEvent event0 = new AxEvent(new AxArtifactKey("event0", "0.0.1"), "");
+        event0.getParameterMap().put("par0",
+                new AxField(new AxReferenceKey(event0.getKey(), "par0"), axSchema0.getKey()));
+        event0.getParameterMap().put("par1",
+                new AxField(new AxReferenceKey(event0.getKey(), "par1"), axSchema1.getKey()));
+        event0.getParameterMap().put("par2",
+                new AxField(new AxReferenceKey(event0.getKey(), "par2"), axSchema2.getKey()));
+        event0.getParameterMap().put("par3",
+                new AxField(new AxReferenceKey(event0.getKey(), "par3"), axSchema3.getKey()));
+        event0.getParameterMap().put("par4",
+                new AxField(new AxReferenceKey(event0.getKey(), "par4"), axSchema4.getKey()));
+        event0.getParameterMap().put("par5",
+                new AxField(new AxReferenceKey(event0.getKey(), "par5"), axSchema5.getKey()));
+        eventMap.getEventMap().put(event0.getKey(), event0);
+
+        final AxEvent event1 = new AxEvent(new AxArtifactKey("event1", "0.0.1"), "");
+        event1.getParameterMap().put("theOnlyPar",
+                new AxField(new AxReferenceKey(event1.getKey(), "theOnlyPar"), axSchema3.getKey()));
+        eventMap.getEventMap().put(event1.getKey(), event1);
+
+        final AxEvent event2 = new AxEvent(new AxArtifactKey("event2", "0.0.1"), "");
+        eventMap.getEventMap().put(event2.getKey(), event2);
+
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+
+        final AxEventModel eventModel =
+                new AxEventModel(new AxArtifactKey("smallEventModel", "0.0.1"), dataTypes, keyInformation, eventMap);
+        eventModel.getKeyInformation().generateKeyInfo(eventModel);
+        eventModel.validate(new AxValidationResult());
+
+        return eventModel;
+    }
+
+    @Override
+    public AxEventModel getObservationModel() {
+        final AxContextSchema axSchema0 =
+                new AxContextSchema(new AxArtifactKey("BooleanType", "0.0.1"), "Java", "java.lang.Boolean");
+        final AxContextSchema axSchema1 =
+                new AxContextSchema(new AxArtifactKey("IntType", "0.0.1"), "Java", "java.lang.Integer");
+        final AxContextSchema axSchema2 =
+                new AxContextSchema(new AxArtifactKey("StringType", "0.0.1"), "Java", "java.lang.String");
+        final AxContextSchema axSchema3 =
+                new AxContextSchema(new AxArtifactKey("SetType", "0.0.1"), "Java", "java.util.Set");
+        final AxContextSchema axSchema4 =
+                new AxContextSchema(new AxArtifactKey("MapType", "0.0.1"), "Java", "java.util.Map");
+        final AxContextSchema axSchema5 =
+                new AxContextSchema(new AxArtifactKey("BigIntType", "0.0.1"), "Java", "java.math.BigInteger");
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        schemas.getSchemasMap().put(axSchema0.getKey(), axSchema0);
+        schemas.getSchemasMap().put(axSchema1.getKey(), axSchema1);
+        schemas.getSchemasMap().put(axSchema2.getKey(), axSchema2);
+        schemas.getSchemasMap().put(axSchema3.getKey(), axSchema3);
+        schemas.getSchemasMap().put(axSchema4.getKey(), axSchema4);
+        schemas.getSchemasMap().put(axSchema5.getKey(), axSchema5);
+
+        final AxEvents eventMap = new AxEvents(new AxArtifactKey("smallEventMap", "0.0.1"));
+
+        final AxEvent event0 =
+                new AxEvent(new AxArtifactKey("event0", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        event0.getParameterMap().put("par0",
+                new AxField(new AxReferenceKey(event0.getKey(), "par0"), axSchema0.getKey()));
+        event0.getParameterMap().put("par1",
+                new AxField(new AxReferenceKey(event0.getKey(), "par1"), axSchema1.getKey()));
+        event0.getParameterMap().put("par2",
+                new AxField(new AxReferenceKey(event0.getKey(), "par2"), axSchema2.getKey()));
+        event0.getParameterMap().put("par3",
+                new AxField(new AxReferenceKey(event0.getKey(), "par3"), axSchema3.getKey()));
+        event0.getParameterMap().put("par4",
+                new AxField(new AxReferenceKey(event0.getKey(), "par4"), axSchema4.getKey()));
+        event0.getParameterMap().put("par5",
+                new AxField(new AxReferenceKey(event0.getKey(), "par5"), axSchema5.getKey()));
+        eventMap.getEventMap().put(event0.getKey(), event0);
+
+        final AxEvent event1 =
+                new AxEvent(new AxArtifactKey("event1", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        event1.getParameterMap().put("theOnlyPar",
+                new AxField(new AxReferenceKey(event1.getKey(), "theOnlyPar"), axSchema3.getKey()));
+        eventMap.getEventMap().put(event1.getKey(), event1);
+
+        final AxEvent event2 =
+                new AxEvent(new AxArtifactKey("event2", "0.0.1"), "org.onap.policy.apex.model.eventmodel.events");
+        eventMap.getEventMap().put(event2.getKey(), event2);
+
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+
+        final AxEventModel eventModel =
+                new AxEventModel(new AxArtifactKey("smallEventModel", "0.0.1"), schemas, keyInformation, eventMap);
+        eventModel.getKeyInformation().generateKeyInfo(eventModel);
+        eventModel.validate(new AxValidationResult());
+
+        return eventModel;
+    }
+}
diff --git a/model/event-model/src/test/resources/META-INF/persistence.xml b/model/event-model/src/test/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..db32612
--- /dev/null
+++ b/model/event-model/src/test/resources/META-INF/persistence.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============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=========================================================
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
+    <persistence-unit name="DAOTest" transaction-type="RESOURCE_LOCAL">
+        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+
+        <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner</class>
+        <class>org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String</class>
+        <class>org.onap.policy.apex.model.basicmodel.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>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxField</class>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxInputField</class>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxOutputField</class>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxEvent</class>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxEvents</class>
+        <class>org.onap.policy.apex.model.eventmodel.concepts.AxEventModel</class>
+
+        <properties>
+            <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
+            <property name="javax.persistence.target-database" value="Derby" />
+            <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
+
+            <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
+            <property name="eclipselink.ddl-generation.output-mode" value="database" />
+            <property name="eclipselink.logging.level" value="INFO" />
+        </properties>
+    </persistence-unit>
+</persistence>
diff --git a/model/event-model/src/test/resources/logback-test.xml b/model/event-model/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..dfafb04
--- /dev/null
+++ b/model/event-model/src/test/resources/logback-test.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============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=========================================================
+-->
+
+<configuration>
+
+    <contextName>Apex</contextName>
+    <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
+    <property name="LOG_DIR" value="${java.io.tmpdir}/apex_logging/" />
+
+	<!-- USE FOR STD OUT ONLY -->
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="STDOUT" />
+    </root>
+
+    <logger name="org.infinispan" level="INFO" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="org.apache.zookeeper.ClientCnxn" level="OFF" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="org.onap.policy.apex.core" level="TRACE" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+        <file>${LOG_DIR}/apex.log</file>
+        <encoder>
+            <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+                %logger{26} - %msg %n %ex{full}</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="CTXT_FILE" class="ch.qos.logback.core.FileAppender">
+        <file>${LOG_DIR}/apex_ctxt.log</file>
+        <encoder>
+            <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+                %logger{26} - %msg %n %ex{full}</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="org.onap.policy.apex.core.context.impl.monitoring" level="TRACE" additivity="false">
+        <appender-ref ref="CTXT_FILE" />
+    </logger>
+
+    <logger name="org.onap.policy.apex.core.context" level="INFO" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+</configuration>
diff --git a/model/pom.xml b/model/pom.xml
index 722a442..5e6a52a 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -25,7 +25,7 @@
         <artifactId>apex-pdp</artifactId>
         <version>2.0.0-SNAPSHOT</version>
     </parent>
-    
+
     <groupId>org.onap.policy.apex-pdp.model</groupId>
     <artifactId>model</artifactId>
     <packaging>pom</packaging>
@@ -33,9 +33,19 @@
     <name>${project.artifactId}</name>
     <description>The model for Apex, it comtains definitions of all Apex concepts and also has handling for Apex models.</description>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>${version.derby}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
     <modules>
         <module>utilities</module>
         <module>basic-model</module>
         <module>context-model</module>
+        <module>event-model</module>
     </modules>
 </project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 24ac99f..fecf5e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,12 +33,13 @@
     <version>2.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <name>Apex PDP engine</name>
+    <name>policy-apex-pdp</name>
     <description>Packaging for all the Apex components, the engine, the WAR service, and the editor.</description>
 
     <properties>
         <encoding>UTF-8</encoding>
         <file.encoding>UTF-8</file.encoding>
+        <version.derby>10.13.1.1</version.derby>
     </properties>
 
     <distributionManagement>
