aboutsummaryrefslogtreecommitdiffstats
path: root/model/model-api/src/test/resources/models
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@ericsson.com>2018-05-28 10:58:07 +0100
committerwaqas.ikram <waqas.ikram@ericsson.com>2018-05-28 14:35:30 +0100
commit55d93a12cc5575c872724f48585304b5eec77fea (patch)
treeac5e44c5670bbcc5e68cceb1694f87348c371e1b /model/model-api/src/test/resources/models
parent6029d25f5f3ad43fe02ffe1a4beb1eda0a6ae5e3 (diff)
Adding policy-model, model-api & engine-model
Change-Id: I56702b8f0953457d493f894d155b2a6ddc87b10c Issue-ID: POLICY-856 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
Diffstat (limited to 'model/model-api/src/test/resources/models')
-rw-r--r--model/model-api/src/test/resources/models/PolicyModel.json708
-rw-r--r--model/model-api/src/test/resources/models/PolicyModel.junk9
-rw-r--r--model/model-api/src/test/resources/models/PolicyModel.xml759
3 files changed, 1476 insertions, 0 deletions
diff --git a/model/model-api/src/test/resources/models/PolicyModel.json b/model/model-api/src/test/resources/models/PolicyModel.json
new file mode 100644
index 000000000..81c222609
--- /dev/null
+++ b/model/model-api/src/test/resources/models/PolicyModel.json
@@ -0,0 +1,708 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "PolicyModel",
+ "version" : "0.0.1"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "KeyInfoMapKey",
+ "version" : "0.0.1"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "ContextSchemas",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ContextSchemas",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e000",
+ "description" : "Generated description for concept referred to by key \"ContextSchemas:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "KeyInfoMapKey",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "KeyInfoMapKey",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e001",
+ "description" : "Generated description for concept referred to by key \"KeyInfoMapKey:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MapType",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MapType",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e002",
+ "description" : "Generated description for concept referred to by key \"MapType:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PolicyModel",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PolicyModel",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e003",
+ "description" : "Generated description for concept referred to by key \"PolicyModel:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "StringType",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "StringType",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e004",
+ "description" : "Generated description for concept referred to by key \"StringType:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "context",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "context",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e005",
+ "description" : "Generated description for concept referred to by key \"context:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e006",
+ "description" : "Generated description for concept referred to by key \"contextAlbum0:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e007",
+ "description" : "Generated description for concept referred to by key \"contextAlbum1:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e008",
+ "description" : "Generated description for concept referred to by key \"eventContextItem0:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e009",
+ "description" : "Generated description for concept referred to by key \"eventContextItem1:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "events",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "events",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e010",
+ "description" : "Generated description for concept referred to by key \"events:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "inEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "inEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e011",
+ "description" : "Generated description for concept referred to by key \"inEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "outEvent0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "outEvent0",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e012",
+ "description" : "Generated description for concept referred to by key \"outEvent0:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "outEvent1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "outEvent1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e013",
+ "description" : "Generated description for concept referred to by key \"outEvent1:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "policies",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "policies",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e014",
+ "description" : "Generated description for concept referred to by key \"policies:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "policy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "policy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e015",
+ "description" : "Generated description for concept referred to by key \"policy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e016",
+ "description" : "Generated description for concept referred to by key \"task:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "tasks",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "tasks",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ce9168c-e6df-414f-9646-6da464b6e017",
+ "description" : "Generated description for concept referred to by key \"tasks:0.0.1\""
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "policies",
+ "version" : "0.0.1"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "policy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "policy",
+ "version" : "0.0.1"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "state",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "policy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "state"
+ },
+ "trigger" : {
+ "name" : "inEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "stateOutput0",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "policy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "state",
+ "localName" : "stateOutput0"
+ },
+ "outgoingEvent" : {
+ "name" : "outEvent0",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ }, {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ } ],
+ "taskSelectionLogic" : {
+ "key" : "taskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "Some TS logic"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "policy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "state",
+ "localName" : "task"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "policy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "state",
+ "localName" : "stateOutput0"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "state"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "tasks",
+ "version" : "0.0.1"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "task",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "IEPAR0",
+ "value" : {
+ "key" : "IEPAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "IEPAR1",
+ "value" : {
+ "key" : "IEPAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "OE0PAR0",
+ "value" : {
+ "key" : "OE0PAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE0PAR1",
+ "value" : {
+ "key" : "OE0PAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE1PAR0",
+ "value" : {
+ "key" : "OE1PAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE1PAR1",
+ "value" : {
+ "key" : "OE1PAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ {
+ "key" : "taskParameter0",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "task",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "taskParameter0"
+ },
+ "defaultValue" : "Task parameter 0 value"
+ }
+ }, {
+ "key" : "taskParameter1",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "task",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "taskParameter1"
+ },
+ "defaultValue" : "Task parameter 1 value"
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ }, {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "taskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "Some task logic"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "events",
+ "version" : "0.0.1"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "inEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "inEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.model.policymodel.events",
+ "source" : "Source",
+ "target" : "Target",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "IEPAR0",
+ "value" : {
+ "key" : "IEPAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "IEPAR1",
+ "value" : {
+ "key" : "IEPAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "outEvent0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "outEvent0",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.model.policymodel.events",
+ "source" : "Source",
+ "target" : "Target",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "OE0PAR0",
+ "value" : {
+ "key" : "OE0PAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE0PAR1",
+ "value" : {
+ "key" : "OE0PAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE1PAR0",
+ "value" : {
+ "key" : "OE1PAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE1PAR1",
+ "value" : {
+ "key" : "OE1PAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "outEvent1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "outEvent1",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.model.policymodel.events",
+ "source" : "Source",
+ "target" : "Target",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "OE1PAR0",
+ "value" : {
+ "key" : "OE1PAR0",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : "OE1PAR1",
+ "value" : {
+ "key" : "OE1PAR1",
+ "fieldSchemaKey" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "context",
+ "version" : "0.0.1"
+ },
+ "albums" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "contextAlbum0",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "MapType",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "contextAlbum1",
+ "version" : "0.0.1"
+ },
+ "scope" : "GLOBAL",
+ "isWritable" : false,
+ "itemSchema" : {
+ "name" : "StringType",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "ContextSchemas",
+ "version" : "0.0.1"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "MapType",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MapType",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.model.policymodel.concepts.TestContextItem00A"
+ }
+ }, {
+ "key" : {
+ "name" : "StringType",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "StringType",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.model.policymodel.concepts.TestContextItem000"
+ }
+ }, {
+ "key" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "eventContextItem0",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "eventContextItem1",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/model/model-api/src/test/resources/models/PolicyModel.junk b/model/model-api/src/test/resources/models/PolicyModel.junk
new file mode 100644
index 000000000..613a36ad8
--- /dev/null
+++ b/model/model-api/src/test/resources/models/PolicyModel.junk
@@ -0,0 +1,9 @@
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse cursus suscipit faucibus. Pellentesque sagittis, erat placerat ultricies maximus, erat nulla efficitur ex, quis hendrerit tellus urna quis libero. Nullam vitae nisl ut nisl condimentum suscipit. Aenean sagittis condimentum nisi quis condimentum. Suspendisse potenti. Aliquam eget purus a risus viverra volutpat eu eu neque. Phasellus in libero id turpis lobortis malesuada. Praesent dignissim tellus imperdiet faucibus interdum. Donec volutpat, eros non lobortis consectetur, felis arcu consequat purus, a pharetra velit nisi at ante. Etiam ut sem imperdiet justo aliquet tempus at ornare quam.
+
+Integer sed maximus tellus. Nulla venenatis congue massa nec vestibulum. Duis ultrices quis neque ultrices semper. Morbi rhoncus gravida nibh, ut consequat ex. Proin eget ex vel lectus luctus varius. Integer nec consectetur ante. Cras ac aliquam nibh, in fermentum metus. Praesent nec ipsum tristique, ultrices arcu vel, bibendum libero. Curabitur ac odio eget felis blandit accumsan viverra vitae nibh. Integer efficitur eros lectus, et convallis elit consectetur nec. Vivamus tellus sem, vestibulum ut faucibus ut, maximus nec nulla. Donec ex eros, tempus ac justo at, posuere finibus purus. Pellentesque lacinia eu eros nec dignissim. Vestibulum tempus lectus in placerat imperdiet. Sed a diam vitae lorem gravida commodo.
+
+Sed at dolor felis. Ut at luctus libero. Ut faucibus elementum sem. Praesent aliquet tempus magna, eget bibendum nisi ultricies eu. Aenean dictum libero dui, et finibus metus consequat sed. Nullam lobortis diam ut sem imperdiet, nec posuere mauris aliquet. Etiam nec laoreet leo. Vestibulum nec turpis ante. Vivamus imperdiet commodo velit in ultricies. Maecenas facilisis maximus odio vel vestibulum.
+
+Aenean dapibus mi eget eros sodales rhoncus. Mauris dolor mi, feugiat quis egestas id, vestibulum at augue. Vivamus sit amet enim metus. Donec nec ultricies felis. Phasellus aliquam urna lectus, mollis rutrum libero ornare nec. Quisque dictum ante ac dapibus placerat. Ut euismod euismod elit eget commodo. Aenean vestibulum tempus elit quis vestibulum. Integer dapibus ultricies bibendum. Vivamus iaculis egestas magna, a ornare lacus eleifend eu. Fusce non massa ut sapien volutpat molestie vel sit amet sapien. Phasellus hendrerit felis magna, quis pharetra dui finibus sed. Praesent quis accumsan purus, hendrerit viverra felis. Pellentesque semper pretium nisl, in auctor enim interdum ut. Nullam placerat erat vel lacus vestibulum vehicula. Morbi at augue in enim luctus feugiat.
+
+Nunc aliquam auctor turpis id pretium. Donec placerat egestas tortor quis blandit. Curabitur sagittis elit eu varius gravida. Fusce eget diam eu sapien convallis pellentesque. Donec ultrices odio id leo pellentesque, eget tempus erat efficitur. Pellentesque ac ultricies purus, ut condimentum libero. Pellentesque pulvinar urna vel sollicitudin commodo. Sed tincidunt sed nulla sed auctor. \ No newline at end of file
diff --git a/model/model-api/src/test/resources/models/PolicyModel.xml b/model/model-api/src/test/resources/models/PolicyModel.xml
new file mode 100644
index 000000000..a89f73db2
--- /dev/null
+++ b/model/model-api/src/test/resources/models/PolicyModel.xml
@@ -0,0 +1,759 @@
+<?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=========================================================
+-->
+
+<apexPolicyModel xmlns="http://www.onap.org/policy/apex-pdp">
+ <key>
+ <name>PolicyModel</name>
+ <version>0.0.1</version>
+ </key>
+ <keyInformation>
+ <key>
+ <name>KeyInfoMapKey</name>
+ <version>0.0.1</version>
+ </key>
+ <keyInfoMap>
+ <entry>
+ <key>
+ <name>ContextSchemas</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>ContextSchemas</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e000</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "ContextSchemas:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>KeyInfoMapKey</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>KeyInfoMapKey</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e001</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "KeyInfoMapKey:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>MapType</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>MapType</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e002</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "MapType:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>PolicyModel</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>PolicyModel</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e003</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "PolicyModel:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>StringType</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>StringType</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e004</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "StringType:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>context</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>context</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e005</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "context:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>contextAlbum0</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>contextAlbum0</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e006</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "contextAlbum0:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>contextAlbum1</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>contextAlbum1</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e007</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "contextAlbum1:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e008</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "eventContextItem0:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e009</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "eventContextItem1:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>events</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>events</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e010</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "events:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>inEvent</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>inEvent</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e011</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "inEvent:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>outEvent0</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>outEvent0</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e012</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "outEvent0:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>outEvent1</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>outEvent1</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e013</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "outEvent1:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>policies</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>policies</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e014</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "policies:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>policy</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>policy</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e015</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "policy:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>task</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>task</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e016</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "task:0.0.1"]]></description>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>tasks</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>tasks</name>
+ <version>0.0.1</version>
+ </key>
+ <UUID>0ce9168c-e6df-414f-9646-6da464b6e017</UUID>
+ <description><![CDATA[Generated description for concept referred to by key "tasks:0.0.1"]]></description>
+ </value>
+ </entry>
+ </keyInfoMap>
+ </keyInformation>
+ <policies>
+ <key>
+ <name>policies</name>
+ <version>0.0.1</version>
+ </key>
+ <policyMap>
+ <entry>
+ <key>
+ <name>policy</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <policyKey>
+ <name>policy</name>
+ <version>0.0.1</version>
+ </policyKey>
+ <template>FREEFORM</template>
+ <state>
+ <entry>
+ <key>state</key>
+ <value>
+ <stateKey>
+ <parentKeyName>policy</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>NULL</parentLocalName>
+ <localName>state</localName>
+ </stateKey>
+ <trigger>
+ <name>inEvent</name>
+ <version>0.0.1</version>
+ </trigger>
+ <stateOutputs>
+ <entry>
+ <key>stateOutput0</key>
+ <value>
+ <key>
+ <parentKeyName>policy</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>state</parentLocalName>
+ <localName>stateOutput0</localName>
+ </key>
+ <outgoingEvent>
+ <name>outEvent0</name>
+ <version>0.0.1</version>
+ </outgoingEvent>
+ <nextState>
+ <parentKeyName>NULL</parentKeyName>
+ <parentKeyVersion>0.0.0</parentKeyVersion>
+ <parentLocalName>NULL</parentLocalName>
+ <localName>NULL</localName>
+ </nextState>
+ </value>
+ </entry>
+ </stateOutputs>
+ <contextAlbumReference>
+ <name>contextAlbum0</name>
+ <version>0.0.1</version>
+ </contextAlbumReference>
+ <contextAlbumReference>
+ <name>contextAlbum1</name>
+ <version>0.0.1</version>
+ </contextAlbumReference>
+ <taskSelectionLogic>
+ <key>taskSelectionLogic</key>
+ <logicFlavour>MVEL</logicFlavour>
+ <logic><![CDATA[Some TS logic]]></logic>
+ </taskSelectionLogic>
+ <defaultTask>
+ <name>task</name>
+ <version>0.0.1</version>
+ </defaultTask>
+ <taskReferences>
+ <entry>
+ <key>
+ <name>task</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <parentKeyName>policy</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>state</parentLocalName>
+ <localName>task</localName>
+ </key>
+ <outputType>DIRECT</outputType>
+ <output>
+ <parentKeyName>policy</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>state</parentLocalName>
+ <localName>stateOutput0</localName>
+ </output>
+ </value>
+ </entry>
+ </taskReferences>
+ </value>
+ </entry>
+ </state>
+ <firstState>state</firstState>
+ </value>
+ </entry>
+ </policyMap>
+ </policies>
+ <tasks>
+ <key>
+ <name>tasks</name>
+ <version>0.0.1</version>
+ </key>
+ <taskMap>
+ <entry>
+ <key>
+ <name>task</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>task</name>
+ <version>0.0.1</version>
+ </key>
+ <inputFields>
+ <entry>
+ <key>IEPAR0</key>
+ <value>
+ <key>IEPAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>IEPAR1</key>
+ <value>
+ <key>IEPAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ </inputFields>
+ <outputFields>
+ <entry>
+ <key>OE0PAR0</key>
+ <value>
+ <key>OE0PAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE0PAR1</key>
+ <value>
+ <key>OE0PAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE1PAR0</key>
+ <value>
+ <key>OE1PAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE1PAR1</key>
+ <value>
+ <key>OE1PAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ </outputFields>
+ <taskParameters>
+ <entry>
+ <key>taskParameter0</key>
+ <value>
+ <key>
+ <parentKeyName>task</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>NULL</parentLocalName>
+ <localName>taskParameter0</localName>
+ </key>
+ <defaultValue>Task parameter 0 value</defaultValue>
+ </value>
+ </entry>
+ <entry>
+ <key>taskParameter1</key>
+ <value>
+ <key>
+ <parentKeyName>task</parentKeyName>
+ <parentKeyVersion>0.0.1</parentKeyVersion>
+ <parentLocalName>NULL</parentLocalName>
+ <localName>taskParameter1</localName>
+ </key>
+ <defaultValue>Task parameter 1 value</defaultValue>
+ </value>
+ </entry>
+ </taskParameters>
+ <contextAlbumReference>
+ <name>contextAlbum0</name>
+ <version>0.0.1</version>
+ </contextAlbumReference>
+ <contextAlbumReference>
+ <name>contextAlbum1</name>
+ <version>0.0.1</version>
+ </contextAlbumReference>
+ <taskLogic>
+ <key>taskLogic</key>
+ <logicFlavour>MVEL</logicFlavour>
+ <logic><![CDATA[Some task logic]]></logic>
+ </taskLogic>
+ </value>
+ </entry>
+ </taskMap>
+ </tasks>
+ <events>
+ <key>
+ <name>events</name>
+ <version>0.0.1</version>
+ </key>
+ <eventMap>
+ <entry>
+ <key>
+ <name>inEvent</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>inEvent</name>
+ <version>0.0.1</version>
+ </key>
+ <nameSpace>org.onap.policy.apex.model.policymodel.events</nameSpace>
+ <source>Source</source>
+ <target>Target</target>
+ <parameter>
+ <entry>
+ <key>IEPAR0</key>
+ <value>
+ <key>IEPAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>IEPAR1</key>
+ <value>
+ <key>IEPAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ </parameter>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>outEvent0</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>outEvent0</name>
+ <version>0.0.1</version>
+ </key>
+ <nameSpace>org.onap.policy.apex.model.policymodel.events</nameSpace>
+ <source>Source</source>
+ <target>Target</target>
+ <parameter>
+ <entry>
+ <key>OE0PAR0</key>
+ <value>
+ <key>OE0PAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE0PAR1</key>
+ <value>
+ <key>OE0PAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE1PAR0</key>
+ <value>
+ <key>OE1PAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE1PAR1</key>
+ <value>
+ <key>OE1PAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ </parameter>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name>outEvent1</name>
+ <version>0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name>outEvent1</name>
+ <version>0.0.1</version>
+ </key>
+ <nameSpace>org.onap.policy.apex.model.policymodel.events</nameSpace>
+ <source>Source</source>
+ <target>Target</target>
+ <parameter>
+ <entry>
+ <key>OE1PAR0</key>
+ <value>
+ <key>OE1PAR0</key>
+ <fieldSchemaKey>
+ <name>eventContextItem0</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ <entry>
+ <key>OE1PAR1</key>
+ <value>
+ <key>OE1PAR1</key>
+ <fieldSchemaKey>
+ <name>eventContextItem1</name>
+ <version>0.0.1</version>
+ </fieldSchemaKey>
+ </value>
+ </entry>
+ </parameter>
+ </value>
+ </entry>
+ </eventMap>
+ </events>
+ <albums>
+ <key xmlns="">
+ <name xmlns="http://www.onap.org/policy/apex-pdp">context</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <albums xmlns="">
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">contextAlbum0</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">contextAlbum0</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <scope>APPLICATION</scope>
+ <isWritable>true</isWritable>
+ <itemSchema>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">MapType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </itemSchema>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">contextAlbum1</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">contextAlbum1</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <scope>GLOBAL</scope>
+ <isWritable>false</isWritable>
+ <itemSchema>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">StringType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </itemSchema>
+ </value>
+ </entry>
+ </albums>
+ </albums>
+ <schemas>
+ <key xmlns="">
+ <name xmlns="http://www.onap.org/policy/apex-pdp">ContextSchemas</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <schemas xmlns="">
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">MapType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">MapType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <schemaFlavour>Java</schemaFlavour>
+ <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem00A</schemaDefinition>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">StringType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">StringType</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <schemaFlavour>Java</schemaFlavour>
+ <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem000</schemaDefinition>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">eventContextItem0</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">eventContextItem0</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <schemaFlavour>Java</schemaFlavour>
+ <schemaDefinition>java.lang.String</schemaDefinition>
+ </value>
+ </entry>
+ <entry>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">eventContextItem1</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <value>
+ <key>
+ <name xmlns="http://www.onap.org/policy/apex-pdp">eventContextItem1</name>
+ <version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
+ </key>
+ <schemaFlavour>Java</schemaFlavour>
+ <schemaDefinition>java.lang.Long</schemaDefinition>
+ </value>
+ </entry>
+ </schemas>
+ </schemas>
+</apexPolicyModel>