summaryrefslogtreecommitdiffstats
path: root/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-02-19 12:57:33 +0200
committerMichael Lando <ml636r@att.com>2017-02-19 13:47:13 +0200
commitefa037d34be7b1570efdc767c79fad8d4005f10e (patch)
treecf1036ba2728dea8a61492b678fa91954e629403 /dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model
parentf5f13c4f6b6fe3b4d98e349dfd7db59339803436 (diff)
Add new code new version
Change-Id: Ic02a76313503b526f17c3df29eb387a29fe6a42a Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model')
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodel.js94
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodels.js87
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Model.js512
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/Scenarios.js110
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/BLANK.json16
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/DIMENSIONS.json16
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/ECOMP.json62
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/BLANK.json37
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/DIMENSIONS.json91
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/ECOMP.json514
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-meta-schema.xsd166
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-schema.xsd274
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_meta_schema.json332
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_schema.json582
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.metamodel.json17
-rw-r--r--dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.model.json11
16 files changed, 2921 insertions, 0 deletions
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodel.js b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodel.js
new file mode 100644
index 0000000000..82e8ada588
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodel.js
@@ -0,0 +1,94 @@
+/*!
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ */
+
+import _merge from 'lodash/merge';
+
+import Common from '../common/Common';
+
+/**
+ * Rules governing what a definition can contain.
+ */
+export default class Metamodel {
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Construct from JSON definition.
+ * @param json schema definition.
+ */
+ constructor(json) {
+ Common.assertType(json, 'Object');
+ const dfault = require('./templates/default.metamodel.json');
+ this.json = _merge({}, dfault, json);
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get schema identifier.
+ * @returns ID.
+ */
+ getId() {
+ return this.json.diagram.metadata.id;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get lifeline constraints.
+ * @returns {*}
+ */
+ getConstraints() {
+ return this.json.diagram.lifelines.constraints;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get lifeline metadata by lifeline ID.
+ * @param id sought lifeline.
+ * @returns lifeline if found.
+ */
+ getLifelineById(id) {
+ for (const lifeline of this.json.diagram.lifelines.lifelines) {
+ if (lifeline.id === id) {
+ return lifeline;
+ }
+ }
+ return undefined;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get original JSON.
+ * @returns JSON.
+ */
+ unwrap() {
+ return this.json;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get default schema.
+ * @returns Metamodel default (permissive) Metamodel.
+ */
+ static getDefault() {
+ return new Metamodel({});
+ }
+
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodels.js b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodels.js
new file mode 100644
index 0000000000..4ecfc0b5f7
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Metamodels.js
@@ -0,0 +1,87 @@
+/*!
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ */
+
+import Common from '../common/Common';
+import Metamodel from './Metamodel';
+
+/**
+ * A simple lookup for schemas by ID.
+ */
+export default class Metamodels {
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Construct metamodels from provided JSON definitions.
+ * @param metamodels JSON metamodel definitions.
+ */
+ constructor(metamodels) {
+
+ Common.assertType(metamodels, 'Array');
+
+ this.lookup = {};
+
+ // Save each metamodel. It's up to the Metamodel class to make sense of
+ // potentially nonsense metamodel definitions.
+
+ for (const json of metamodels) {
+ const metamodel = new Metamodel(json);
+ this.lookup[metamodel.getId()] = metamodel;
+ }
+
+ // Set (or override) the default metamodel with the inlined one.
+
+ this.lookup.$ = Metamodel.getDefault();
+ Common.assertInstanceOf(this.lookup.$, Metamodel);
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get Metamodel by its @id.
+ * @param id identifier.
+ * @returns Metamodel, or undefined if no matching metamodel found.
+ */
+ getMetamodel(id) {
+ return this.lookup[id];
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get the default (permissive) metamodel.
+ * @returns default Metamodel.
+ */
+ getDefault() {
+ return this.lookup.$;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get metamodel by its @id, falling back to the default.
+ * @param id identifier.
+ * @returns matching metamodel, or default.
+ */
+ getMetamodelOrDefault(id) {
+ const metamodel = this.getMetamodel(id);
+ if (metamodel) {
+ return metamodel;
+ }
+ return this.getDefault();
+ }
+
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Model.js b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Model.js
new file mode 100644
index 0000000000..1e68cd6034
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/Model.js
@@ -0,0 +1,512 @@
+/*!
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ */
+
+import _merge from 'lodash/merge';
+// import jsonschema from 'jsonschema';
+
+import Common from '../common/Common';
+import Metamodel from './Metamodel';
+
+/**
+ * A wrapper for a model instance.
+ */
+export default class Model {
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Construct model from model JSON. JSON is assumed to be in more or less
+ * the correct structure, but it's OK if it's missing IDs.
+ *
+ * @param json initial JSON; will be updated in situ.
+ * @param metamodel Metaobject definition.
+ */
+ constructor(json, metamodel) {
+
+ if (metamodel) {
+ Common.assertInstanceOf(metamodel, Metamodel);
+ }
+
+ this.metamodel = metamodel || Metamodel.getDefault();
+ Common.assertInstanceOf(this.metamodel, Metamodel);
+
+ this.jsonschema = require('./schema/asdc_sequencer_schema.json');
+ this.templates = {
+ defaultModel: require('./templates/default.model.json'),
+ defaultMetamodel: require('./templates/default.metamodel.json'),
+ };
+
+ this.model = this._preprocess(Common.assertType(json, 'Object'));
+ Common.assertPlainObject(this.model);
+
+ this.renumber();
+
+ this.addLifeline = this.addLifeline.bind(this);
+ this.addMessage = this.addMessage.bind(this);
+ this.renumber = this.renumber.bind(this);
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Unwrap to get model object.
+ * @returns {*}
+ */
+ unwrap() {
+ return Common.assertPlainObject(this.model);
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get the metamodel which defines valid states for this model.
+ * @returns Metamodel definition.
+ */
+ getMetamodel() {
+ return Common.assertInstanceOf(this.metamodel, Metamodel);
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Find lifeline by its ID.
+ * @param id lifeline ID.
+ * @returns lifeline object, if found.
+ */
+ getLifelineById(id) {
+ for (const lifeline of this.model.diagram.lifelines) {
+ if (lifeline.id === id) {
+ return lifeline;
+ }
+ }
+ return undefined;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get message by ID.
+ * @param id message ID.
+ * @returns message if matched.
+ */
+ getMessageById(id) {
+ Common.assertNotNull(id);
+ const step = this.getStepByMessageId(id);
+ if (step) {
+ return step.message;
+ }
+ return undefined;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get step by message ID.
+ * @param id step ID.
+ * @returns step if matched.
+ */
+ getStepByMessageId(id) {
+ Common.assertNotNull(id);
+ for (const step of this.model.diagram.steps) {
+ if (step.message && step.message.id === id) {
+ return step;
+ }
+ }
+ return undefined;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Add message to steps.
+ * @returns {{}}
+ */
+ addMessage(index) {
+ const d = this.model.diagram;
+ const step = {};
+ step.message = {};
+ step.message.id = Model._guid();
+ step.message.name = '[Unnamed Message]';
+ step.message.type = 'request';
+ step.message.from = d.lifelines.length > 0 ? d.lifelines[0].id : -1;
+ step.message.to = d.lifelines.length > 1 ? d.lifelines[1].id : -1;
+ if (index >= 0) {
+ d.steps.splice(index, 0, step);
+ } else {
+ d.steps.push(step);
+ }
+ this.renumber();
+ return step;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Delete message with ID.
+ * @param id to be deleted.
+ */
+ deleteMessageById(id) {
+ Common.assertNotNull(id);
+ const step = this.getStepByMessageId(id);
+ if (step) {
+ const index = this.model.diagram.steps.indexOf(step);
+ if (index !== -1) {
+ this.model.diagram.steps.splice(index, 1);
+ }
+ }
+ this.renumber();
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Add lifeline to lifelines.
+ * @param index optional index.
+ * @returns {{}}
+ */
+ addLifeline(index) {
+ const lifeline = {};
+ lifeline.id = Model._guid();
+ lifeline.name = '[Unnamed Lifeline]';
+ if (index >= 0) {
+ this.model.diagram.lifelines.splice(index, 0, lifeline);
+ } else {
+ this.model.diagram.lifelines.push(lifeline);
+ }
+ this.renumber();
+ return lifeline;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Delete lifeline with ID.
+ * @param id to be deleted.
+ */
+ deleteLifelineById(id) {
+ Common.assertNotNull(id);
+ this.deleteStepsByLifelineId(id);
+ const lifeline = this.getLifelineById(id);
+ if (lifeline) {
+ const index = this.model.diagram.lifelines.indexOf(lifeline);
+ if (index !== -1) {
+ this.model.diagram.lifelines.splice(index, 1);
+ }
+ }
+ this.renumber();
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Delete all steps corresponding to lifeline.
+ * @param id lifeline ID.
+ */
+ deleteStepsByLifelineId(id) {
+ Common.assertNotNull(id);
+ const steps = this.getStepsByLifelineId(id);
+ for (const step of steps) {
+ this.deleteMessageById(step.message.id);
+ }
+ this.renumber();
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get all steps corresponding to lifeline.
+ * @param id lifeline ID.
+ * @return steps from/to lifeline.
+ */
+ getStepsByLifelineId(id) {
+ Common.assertNotNull(id);
+ const steps = [];
+ for (const step of this.model.diagram.steps) {
+ if (step.message) {
+ if (step.message.from === id || step.message.to === id) {
+ steps.push(step);
+ }
+ }
+ }
+ return steps;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Validate model. Disabled, because we removed the jsonschema dependency.
+ * @returns {Array} of validation errors, if any.
+ */
+ validate() {
+ const errors = [];
+ return errors;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Reorder messages.
+ * @param index message index.
+ * @param afterIndex new (after) index.
+ */
+ reorderMessages(index, afterIndex) {
+ Common.assertType(index, 'Number');
+ Common.assertType(afterIndex, 'Number');
+ const steps = this.model.diagram.steps;
+ const element = steps[index];
+ steps.splice(index, 1);
+ steps.splice(afterIndex, 0, element);
+ this.renumber();
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Reorder lifelines.
+ * @param index lifeline index.
+ * @param afterIndex new (after) index.
+ */
+ reorderLifelines(index, afterIndex) {
+ Common.assertType(index, 'Number');
+ Common.assertType(afterIndex, 'Number');
+ const lifelines = this.model.diagram.lifelines;
+ const element = lifelines[index];
+ lifelines.splice(index, 1);
+ lifelines.splice(afterIndex, 0, element);
+ this.renumber();
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Renumber lifelines and messages.
+ */
+ renumber() {
+ const modelJSON = this.unwrap();
+ let stepIndex = 1;
+ let lifelineIndex = 1;
+ for (const step of modelJSON.diagram.steps) {
+ if (step.message) {
+ step.message.index = stepIndex++;
+ }
+ }
+ for (const lifeline of modelJSON.diagram.lifelines) {
+ lifeline.index = lifelineIndex++;
+ }
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Build a simple, navigable dataset describing fragments.
+ * @returns {{}}, indexed by (stop) message ID, describing fragments.
+ */
+ analyzeFragments() {
+
+ const fData = {};
+
+ let depth = 0;
+ const modelJSON = this.unwrap();
+ const open = [];
+
+ const getData = function g(stop, fragment) {
+ let data = fData[stop];
+ if (!data) {
+ data = { stop, start: [], fragment };
+ fData[stop] = data;
+ }
+ return data;
+ };
+
+ const fragmentsByStart = {};
+ for (const step of modelJSON.diagram.steps) {
+ if (step.message && step.message.fragment) {
+ const message = step.message;
+ const fragment = message.fragment;
+ if (fragment.start) {
+ fragmentsByStart[fragment.start] = fragment;
+ open.push(message.id);
+ depth++;
+ }
+ if (fragment.stop) {
+ if (open.length > 0) {
+ getData(message.id).start.push(open.pop());
+ }
+ depth = Math.max(depth - 1, 0);
+ }
+ }
+ }
+
+ if (open.length > 0) {
+ for (const o of open) {
+ getData(o, fragmentsByStart[o]).start.push(o);
+ }
+ }
+
+ return fData;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Build a simple, navigable dataset describing occurrences.
+ * @returns a map, indexed by lifeline ID, of objects containing {start:[],stop:[],active[]}.
+ * @private
+ */
+ analyzeOccurrences() {
+
+ const oData = {};
+
+ // A few inline functions. They make this method kinda lengthy, but they
+ // reduce clutter in the class and keep it coherent, so it's OK.
+
+ const getDataByLifelineId = function get(lifelineId) {
+ if (!oData[lifelineId]) {
+ oData[lifelineId] = { active: [], start: {}, stop: {} };
+ }
+ return oData[lifelineId];
+ };
+
+ const contains = function contains(array, value) {
+ return (array && (array.indexOf(value) !== -1));
+ };
+
+ const process = function process(message, lifelineId) {
+ const oRule = message.occurrences;
+ if (oRule) {
+
+ const oDataLifeline = getDataByLifelineId(lifelineId);
+ if (oDataLifeline) {
+
+ // Record all starts.
+
+ if (contains(oRule.start, lifelineId)) {
+ oDataLifeline.active.push(message.id);
+ oDataLifeline.start[message.id] = undefined;
+ }
+
+ // Reconcile with stops.
+
+ if (contains(oRule.stop, lifelineId)) {
+ const startMessageId = oDataLifeline.active.pop();
+ oDataLifeline.stop[message.id] = startMessageId;
+ if (startMessageId) {
+ oDataLifeline.start[startMessageId] = message.id;
+ }
+ }
+ }
+ }
+ };
+
+ // Analyze start and end.
+
+ const modelJSON = this.unwrap();
+ for (const step of modelJSON.diagram.steps) {
+ if (step.message) {
+ const message = step.message;
+ if (message.occurrences) {
+ process(message, message.from);
+ process(message, message.to);
+ }
+ }
+ }
+
+ // Reset active. (We used it, but it's not actually for us; it's for keeping
+ // track of active occurrences when rendering the diagram.)
+
+ for (const lifelineId of Object.keys(oData)) {
+ oData[lifelineId].active = [];
+ }
+
+ // Reconcile the start and end (message ID) maps for each lifeline,
+ // finding a "stop" for every start. Default to starting and stopping
+ // on the same message, which is the same as no occurrence.
+
+ for (const lifelineId of Object.keys(oData)) {
+ const lifelineData = oData[lifelineId];
+ for (const startId of Object.keys(lifelineData.start)) {
+ const stopId = lifelineData.start[startId];
+ if (!stopId) {
+ lifelineData.start[startId] = startId;
+ lifelineData.stop[startId] = startId;
+ }
+ }
+ }
+
+ return oData;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Preprocess model, adding IDs and whatnot.
+ * @param original to be preprocessed.
+ * @returns preprocessed JSON.
+ * @private
+ */
+ _preprocess(original) {
+
+ const json = _merge({}, this.templates.defaultModel, original);
+ const metamodel = this.metamodel.unwrap();
+ if (!json.diagram.metadata.ref) {
+ if (metamodel.diagram.metadata.id) {
+ json.diagram.metadata.ref = metamodel.diagram.metadata.id;
+ } else {
+ json.diagram.metadata.ref = '$';
+ }
+ }
+
+ for (const lifeline of json.diagram.lifelines) {
+ lifeline.id = lifeline.id || lifeline.name;
+ }
+
+ for (const step of json.diagram.steps) {
+ if (step.message) {
+ step.message.id = step.message.id || Model._guid();
+ const occurrences = step.message.occurrences;
+ if (occurrences) {
+ occurrences.start = occurrences.start || [];
+ occurrences.stop = occurrences.stop || [];
+ }
+ }
+ }
+
+ if (!json.diagram.metadata.id || json.diagram.metadata.id === '$') {
+ json.diagram.metadata.id = Model._guid();
+ }
+
+ return json;
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Create pseudo-UUID.
+ * @returns {string}
+ * @private
+ */
+ static _guid() {
+ function s4() {
+ return Math.floor((1 + Math.random()) * 0x10000)
+ .toString(16)
+ .substring(1);
+ }
+ return `${s4()}-${s4()}-${s4()}-${s4()}-${s4()}-${s4()}-${s4()}-${s4()}`;
+ }
+
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/Scenarios.js b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/Scenarios.js
new file mode 100644
index 0000000000..4130ec7ec3
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/Scenarios.js
@@ -0,0 +1,110 @@
+/*!
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.
+ */
+
+/**
+ * Example scenarios, for development, testing and demos.
+ */
+export default class Scenarios {
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Construct scenarios; read model and metamodel templates.
+ */
+ constructor() {
+ this.templates = {
+ model: {
+ ecomp: require('./model/ECOMP.json'),
+ blank: require('./model/BLANK.json'),
+ dimensions: require('./model/DIMENSIONS.json'),
+ },
+ metamodel: {
+ ecomp: require('./metamodel/ECOMP.json'),
+ blank: require('./metamodel/BLANK.json'),
+ },
+ };
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get ECOMP scenario.
+ * @return ECOMP scenario JSON.
+ */
+ getECOMP() {
+ return JSON.parse(JSON.stringify(this.templates.model.ecomp));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get ECOMP scenario metamodel.
+ * @return scenario metamodel JSON.
+ */
+ getECOMPMetamodel() {
+ return JSON.parse(JSON.stringify(this.templates.metamodel.ecomp));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get blank scenario.
+ * @return blank scenario JSON.
+ */
+ getBlank() {
+ return JSON.parse(JSON.stringify(this.templates.model.blank));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get empty scenario metamodel.
+ * @return empty metamodel JSON.
+ */
+ getBlankMetamodel() {
+ return JSON.parse(JSON.stringify(this.templates.metamodel.blank));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get scenario.
+ * @return scenario JSON.
+ */
+ getDimensions() {
+ return JSON.parse(JSON.stringify(this.templates.model.dimensions));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get scenario metamodel.
+ * @return metamodel JSON.
+ */
+ getDimensionsMetamodel() {
+ return JSON.parse(JSON.stringify(this.templates.metamodel.blank));
+ }
+
+ // ///////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Get demo metamodels.
+ * @returns {*[]}
+ */
+ getMetamodels() {
+ return [this.getBlankMetamodel(), this.getDimensionsMetamodel(), this.getECOMPMetamodel()];
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/BLANK.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/BLANK.json
new file mode 100644
index 0000000000..2853405883
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/BLANK.json
@@ -0,0 +1,16 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "BLANK",
+ "name": "Blank"
+ },
+ "lifelines": {
+ "lifelines": [],
+ "constraints": {
+ "create": true,
+ "delete": true,
+ "reorder": true
+ }
+ }
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/DIMENSIONS.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/DIMENSIONS.json
new file mode 100644
index 0000000000..f02111d0f3
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/DIMENSIONS.json
@@ -0,0 +1,16 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "DIMENSIONS",
+ "name": "Dimensions"
+ },
+ "lifelines": {
+ "lifelines": [],
+ "constraints": {
+ "create": true,
+ "delete": true,
+ "reorder": true
+ }
+ }
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/ECOMP.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/ECOMP.json
new file mode 100644
index 0000000000..939c1398b5
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/metamodel/ECOMP.json
@@ -0,0 +1,62 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "ECOMP",
+ "name": "ECOMP"
+
+ },
+ "lifelines": {
+ "lifelines": [{
+ "id": "1",
+ "name": "Customer"
+ }, {
+ "id": "2",
+ "name": "MSO"
+ }, {
+ "id": "3",
+ "name": "SDN"
+ }, {
+ "id": "4",
+ "name": "A&AI"
+ }, {
+ "id": "5",
+ "name": "IPE TOR"
+ }, {
+ "id": "6",
+ "name": "ORM"
+ }, {
+ "id": "7",
+ "name": "ORD"
+ }, {
+ "id": "8",
+ "name": "Heat"
+ }, {
+ "id": "9",
+ "name": "NovaAPI"
+ }, {
+ "id": "10",
+ "name": "Ntrn Contrl"
+ }, {
+ "id": "11",
+ "name": "RO"
+ }, {
+ "id": "12",
+ "name": "Nova Agent"
+ }, {
+ "id": "13",
+ "name": "VF Agent"
+ }, {
+ "id": "14",
+ "name": "Hypervisor"
+ }, {
+ "id": "15",
+ "name": "VF"
+ }],
+ "constraints": {
+ "create": true,
+ "delete": true,
+ "reorder": true
+ }
+ }
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/BLANK.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/BLANK.json
new file mode 100644
index 0000000000..784a80e820
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/BLANK.json
@@ -0,0 +1,37 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "$",
+ "ref": "BLANK",
+ "name": "New Sequence"
+ },
+ "lifelines": [
+ {
+ "id": "Alice",
+ "name": "Alice"
+ },
+ {
+ "id": "Bob",
+ "name": "Bob"
+ }
+ ],
+ "steps": [
+ {
+ "message": {
+ "from": "Alice",
+ "to": "Bob",
+ "label": "Sup Bob",
+ "type": "request"
+ }
+ },
+ {
+ "message": {
+ "from": "Bob",
+ "to": "Alice",
+ "label": "Yo Alice",
+ "type": "response"
+ }
+ }
+ ]
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/DIMENSIONS.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/DIMENSIONS.json
new file mode 100644
index 0000000000..642e34a785
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/DIMENSIONS.json
@@ -0,0 +1,91 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "DIMENSIONS1",
+ "name": "Dimensions Test",
+ "ref": "DIMENSIONS"
+ },
+ "lifelines": [
+ {
+ "id": "L01",
+ "name": "Lorum Ipsum"
+ },
+ {
+ "id": "L02",
+ "name": "Donec nisi urna, porttitor efficitur felis vel, efficitur consequat nunc"
+ },
+ {
+ "id": "L03",
+ "name": "Mauris dignissim SphymomanometerSphymomanometer enim non sapien tristique lacinia"
+ }
+ ],
+ "steps": [
+ {
+ "message": {
+ "id": "M01",
+ "from": "L01",
+ "to": "L02",
+ "name": "Morbi",
+ "type": "request",
+ "notes": [
+ "Proin non libero malesuada."
+ ],
+ "fragment": {
+ "operator": "alt",
+ "start": true,
+ "guard": "Curabitur sollicitudin nulla elit, et ultrices tortor faucibus quis"
+ },
+ "occurrences": {
+ "start": ["L01", "L02"],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M02",
+ "from": "L02",
+ "to": "L03",
+ "name": "Quisque pretium tellus sit amet congue dictum. Mauris ac rutrum arcu, et fringilla orci",
+ "type": "request",
+ "notes": [
+ "Nam quis felis hendrerit, lacinia ipsum vitae, faucibus elit. Morbi sit amet nunc eget massa vehicula rhoncus sit amet vel tellus. Aliquam accumsan eros elit, et sollicitudin lacus vehicula eu. Aenean rhoncus justo ut felis tincidunt, sit amet vulputate metus aliquet. Phasellus tellus est, consequat nec ex mollis, lacinia vestibulum justo. Nam quis felis hendrerit, lacinia ipsum vitae, faucibus elit. Morbi sit amet nunc eget massa vehicula rhoncus sit amet vel tellus. Aliquam accumsan eros elit, et sollicitudin lacus vehicula eu. Aenean rhoncus justo ut felis tincidunt, sit amet vulputate metus aliquet. Phasellus tellus est, consequat nec ex mollis, lacinia vestibulum justo."
+ ],
+ "occurrences": {
+ "start": [],
+ "stop": ["L02"]
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M03",
+ "from": "L01",
+ "to": "L03",
+ "name": "Nullam",
+ "type": "response",
+ "fragment": {
+ "stop": true
+ },
+ "occurrences": {
+ "start": [],
+ "stop": ["L01"]
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M04",
+ "from": "L01",
+ "to": "L03",
+ "name": "Etiam convallis augue est. ",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/ECOMP.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/ECOMP.json
new file mode 100644
index 0000000000..dd9bfc5eb0
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/demo/scenarios/model/ECOMP.json
@@ -0,0 +1,514 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "ECOMP1",
+ "name": "Detailed flow in Ecomp1",
+ "ref": "ECOMP"
+ },
+ "lifelines": [
+ {
+ "id": "L01",
+ "name": "Customer"
+ },
+ {
+ "id": "L02",
+ "name": "MSO"
+ },
+ {
+ "id": "L03",
+ "name": "SDN"
+ },
+ {
+ "id": "L04",
+ "name": "A&AI"
+ },
+ {
+ "id": "L05",
+ "name": "IPE TOR"
+ },
+ {
+ "id": "L06",
+ "name": "ORM"
+ },
+ {
+ "id": "L07",
+ "name": "ORD"
+ },
+ {
+ "id": "L08",
+ "name": "Heat"
+ },
+ {
+ "id": "L09",
+ "name": "NovaAPI"
+ },
+ {
+ "id": "L10",
+ "name": "Ntrn Contrl"
+ },
+ {
+ "id": "L11",
+ "name": "RO"
+ },
+ {
+ "id": "L12",
+ "name": "Nova Agent"
+ },
+ {
+ "id": "L13",
+ "name": "VF Agent"
+ },
+ {
+ "id": "L14",
+ "name": "Hypervisor"
+ },
+ {
+ "id": "L15",
+ "name": "VF"
+ }
+ ],
+ "steps": [
+ {
+ "message": {
+ "id": "M01",
+ "from": "L01",
+ "to": "L02",
+ "name": "Create",
+ "type": "request",
+ "notes": [
+ "This note is short."
+ ],
+ "occurrences": {
+ "start": ["L01", "L02"],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M02",
+ "from": "L02",
+ "to": "L04",
+ "name": "Check Tenant",
+ "type": "request",
+ "occurrences": {
+ "start": ["L02"],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M03",
+ "from": "L02",
+ "to": "L06",
+ "name": "Create Tenant",
+ "type": "request",
+ "fragment": {
+ "operator": "alt",
+ "start": true,
+ "guard": "Does not exist"
+ },
+ "occurrences": {
+ "start": ["L06"],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M04",
+ "from": "L06",
+ "to": "L07",
+ "name": "Distribute",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M05",
+ "from": "L06",
+ "to": "L02",
+ "name": "Async Response",
+ "type": "response",
+ "asynchronous": true,
+ "fragment": {
+ "stop": true
+ },
+ "occurrences": {
+ "start": [],
+ "stop": ["L02", "L06"]
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M06",
+ "from": "L07",
+ "to": "L08",
+ "name": "Push",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M07",
+ "from": "L08",
+ "to": "L02",
+ "name": "Tenant Complete",
+ "type": "response",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M08",
+ "from": "L02",
+ "to": "L03",
+ "name": "Service Topology",
+ "type": "request",
+ "occurrences": {
+ "start": ["L03"],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M09",
+ "from": "L03",
+ "to": "L05",
+ "name": "Pre-configs",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M10",
+ "from": "L03",
+ "to": "L04",
+ "name": "Retrieve and populate",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": ["L03"]
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M11",
+ "from": "L02",
+ "to": "L08",
+ "name": "VNF PreRequisite Heat Template",
+ "type": "request",
+ "notes": [
+ "I got up and made coffee and read my emails and answered them until I got frustrated and made a mental note to answer the others later and then looked out of the window for a while and then made more coffee."
+ ],
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M12",
+ "from": "L08",
+ "to": "L10",
+ "name": "Provider and OAM nw",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M13",
+ "from": "L02",
+ "to": "L08",
+ "name": "Get Stack Status",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M14",
+ "from": "L08",
+ "to": "L02",
+ "name": "Status complete",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M15",
+ "from": "L11",
+ "to": "L04",
+ "name": "Provider and OAM Inventory",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M16",
+ "from": "L02",
+ "to": "L08",
+ "name": "VNF Server Heat Template",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M17",
+ "from": "L08",
+ "to": "L10",
+ "name": "Show Port",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M18",
+ "from": "L11",
+ "to": "L02",
+ "name": "Async Response with Stack ID",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M19",
+ "from": "L10",
+ "to": "L08",
+ "name": "Response",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M20",
+ "from": "L08",
+ "to": "L09",
+ "name": "Nova VM",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M21",
+ "from": "L09",
+ "to": "L12",
+ "name": "Scheduler Picks Nova Agent",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M22",
+ "from": "L12",
+ "to": "L14",
+ "name": "Picks VF",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M23",
+ "from": "L12",
+ "to": "L10",
+ "name": "Retrieves Port Info",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M24",
+ "from": "L12",
+ "to": "L13",
+ "name": "Calls CF Agent",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M25",
+ "from": "L13",
+ "to": "L15",
+ "name": "Configure VF",
+ "type": "response",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M26",
+ "from": "L15",
+ "to": "L13",
+ "name": "Response",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M27",
+ "from": "L13",
+ "to": "L12",
+ "name": "Complete",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M28",
+ "from": "L12",
+ "to": "L08",
+ "name": "Response Complete",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M29",
+ "from": "L11",
+ "to": "L04",
+ "name": "VServer and Show Port Inventory",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M30",
+ "from": "L02",
+ "to": "L08",
+ "name": "Get Stack Status",
+ "type": "request",
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M31",
+ "from": "L08",
+ "to": "L02",
+ "name": "Stack Status Complete",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": []
+ }
+ }
+ },
+ {
+ "message": {
+ "id": "M32",
+ "from": "L02",
+ "to": "L01",
+ "name": "Done",
+ "type": "response",
+ "asynchronous": true,
+ "occurrences": {
+ "start": [],
+ "stop": ["L01", "L02"]
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-meta-schema.xsd b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-meta-schema.xsd
new file mode 100644
index 0000000000..f75063bed5
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-meta-schema.xsd
@@ -0,0 +1,166 @@
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://ns.ecomp.com/asdc/sequencer"
+ xmlns:s="http://ns.ecomp.com/asdc/sequencer"
+ attributeFormDefault="unqualified"
+ elementFormDefault="unqualified">
+
+ <!--
+
+ https://github.com/highsource/jsonix-schema-compiler/wiki/JSON-Schema-Generation
+
+ npm install -x-save-dev json-schema-generation
+
+ java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar \
+ -generateJsonSchema \
+ -d ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/ \
+ -p asdc_sequencer_schema \
+ ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/asdc-sequencer-meta-schema.xsd
+
+ -->
+
+ <xs:element name="diagram">
+ <xs:annotation>
+ <xs:documentation>
+
+ Diagram meta-schema, defining what diagram documents may look like.
+
+ The main difference between the metaschema (this) and the schema, is that
+ the metaschema describes what's *allowed* rather than what *is*.
+
+ Specific differences:
+
+ 1. The metaschema exists primarily to constrain lifelines; to declare any
+ that are predefined, to prescribe cardinality, order and whether or not
+ ad hoc lifelines may be created by the user.
+ 2. The metaschema doesn't constrain messages at all. This may come along later,
+ but for now they're freetext, and can be defined between any legal pair
+ of lifelines.
+ 3. The metaschema doesn't have @ref attributes; its @id attributes are the
+ target of @ref attributes in the instance schema.m
+
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="metadata" type="s:metadataType"/>
+ <xs:element name="lifelines" type="s:lifelinesType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="entityType" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ Common attributes, most importantly @id, which every entity must have.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="notes" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="id" use="required" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Schema definition identifier.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="name" use="required" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Human-readable name.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="metadataType">
+ <xs:annotation>
+ <xs:documentation>
+ Diagram metadata, including:
+ - Unique ID, referenced by @ref attributes in instance documents.
+ - Human-readable description, displayed on-screen.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType"/>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="lifelineType">
+ <xs:annotation>
+ <xs:documentation>
+ Metadata concerning a single lifeline.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType">
+ <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ Whether an instance may omit this lifeline. Only takes effect
+ where the lifelines setting is @delete=true.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="lifelinesType">
+ <xs:annotation>
+ <xs:documentation>
+ Metadata concerning allowed lifelines. Somewhat more strict that
+ instance data.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType">
+ <xs:sequence>
+ <xs:element name="lifeline" type="s:lifelineType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="constraints">
+ <xs:complexType>
+ <xs:attribute name="create" type="xs:boolean" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Whether the user may create their own lifelines.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="delete" type="xs:boolean" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Whether declared lifelines may be deleted.
+ See also @mandatory on lifeline.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="reorder" type="xs:boolean" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Whether lifelines may be reordered.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-schema.xsd b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-schema.xsd
new file mode 100644
index 0000000000..71a7d07cb1
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc-sequencer-schema.xsd
@@ -0,0 +1,274 @@
+<xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://ns.ecomp.com/asdc/sequencer"
+ xmlns:s="http://ns.ecomp.com/asdc/sequencer"
+ attributeFormDefault="unqualified"
+ elementFormDefault="unqualified">
+
+ <!--
+
+ https://github.com/highsource/jsonix-schema-compiler/wiki/JSON-Schema-Generation
+
+ npm install -x-save-dev json-schema-generation
+
+ java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar \
+ -generateJsonSchema \
+ -d ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/ \
+ -p asdc_sequencer_schema \
+ ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/asdc-sequencer-schema.xsd
+
+ -->
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:element name="diagram">
+ <xs:annotation>
+ <xs:documentation>
+ Diagram state.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="metadata" type="s:metadataType"/>
+ <xs:element name="lifelines" type="s:lifelinesType"/>
+ <xs:element name="steps" type="s:stepsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="entityType" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ Stuff common to all entities; an identifier, a name, an optional
+ schema reference, and some optional notes.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="notes" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="annotation" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Optional annotations; non-structural information attached to any entity.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="id" use="required" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Entity identifier.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="ref" use="optional" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Optional reference to schema definition, where this entity
+ corresponds to (and is constrained by) a schema entity.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="name" use="required" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Human-readable name.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="externalId" use="optional" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ ID of entity in originating system. For external use; not
+ used by the sequencer widget.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="metadataType">
+ <xs:annotation>
+ <xs:documentation>
+ Diagram metadata, including name, identifier and schema reference.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType"/>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="lifelineType">
+ <xs:annotation>
+ <xs:documentation>
+ Definition of a single lifeline.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType"/>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="lifelinesType">
+ <xs:annotation>
+ <xs:documentation>
+ A set of lifelines. May be top-level or in a fragment.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="lifeline" type="s:lifelineType"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="occurrencesType">
+ <xs:annotation>
+ <xs:documentation>
+ An occurrence at one or other end of a message.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="start" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:token"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="stop" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:token"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="fragmentType">
+ <xs:annotation>
+ <xs:documentation>
+ A fragment directive.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="start" type="xs:boolean" use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ Whether fragment starts; fragment activated when @start=true.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="stop" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ Indication of the last message in this fragment.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="operation" use="optional" default="alt">
+ <xs:annotation>
+ <xs:documentation>
+ Fragment operation. Start with the three everybody knows, but
+ there are others.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="alt"/>
+ <xs:enumeration value="opt"/>
+ <xs:enumeration value="loop"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="guard" type="xs:string" use="optional">
+ <xs:annotation>
+ <xs:documentation>
+ Guard condition.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="messageType">
+ <xs:annotation>
+ <xs:documentation>
+ A message between lifelines.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType">
+ <xs:sequence>
+ <xs:element name="occurrences" type="s:occurrencesType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="fragment" type="s:fragmentType" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="to" type="xs:string" use="required"/>
+ <xs:attribute name="from" type="xs:string" use="required"/>
+ <xs:attribute name="type">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="request"/>
+ <xs:enumeration value="response"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="asynchronous" type="xs:boolean" default="false"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="guardType">
+ <xs:annotation>
+ <xs:documentation>
+ Guard condition within a fragment. Some fragments have more than
+ one section, each with their own guard condition.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="guard" type="xs:string"/>
+ <xs:element name="steps" type="s:stepsType"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
+
+ <xs:complexType name="stepsType">
+ <xs:annotation>
+ <xs:documentation>
+ An ordered set of messages and subsequences.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="s:entityType">
+ <xs:sequence maxOccurs="unbounded">
+ <xs:choice>
+ <xs:element name="message" type="s:messageType"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_meta_schema.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_meta_schema.json
new file mode 100644
index 0000000000..cf4174ed35
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_meta_schema.json
@@ -0,0 +1,332 @@
+
+{
+ "id":"#",
+ "definitions":{
+ "LifelinesType.Constraints":{
+ "type":"object",
+ "title":"LifelinesType.Constraints",
+ "required":[
+ "create",
+ "delete",
+ "reorder"
+ ],
+ "properties":{
+ "create":{
+ "title":"create",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"create",
+ "namespaceURI":""
+ }
+ },
+ "delete":{
+ "title":"delete",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"delete",
+ "namespaceURI":""
+ }
+ },
+ "reorder":{
+ "title":"reorder",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"reorder",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "propertiesOrder":[
+ "create",
+ "delete",
+ "reorder"
+ ]
+ },
+ "LifelinesType":{
+ "required":[
+ "constraints"
+ ],
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"LifelinesType",
+ "properties":{
+ "lifeline":{
+ "title":"lifeline",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"#/definitions/LifelineType"
+ },
+ "minItems":0
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"lifeline",
+ "namespaceURI":""
+ }
+ },
+ "constraints":{
+ "title":"constraints",
+ "allOf":[
+ {
+ "$ref":"#/definitions/LifelinesType.Constraints"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"constraints",
+ "namespaceURI":""
+ }
+ }
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"lifelinesType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "lifeline",
+ "constraints"
+ ]
+ },
+ "EntityType.Notes":{
+ "type":"object",
+ "title":"EntityType.Notes",
+ "properties":{
+ "note":{
+ "title":"note",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ },
+ "minItems":0
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"note",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "propertiesOrder":[
+ "note"
+ ]
+ },
+ "MetadataType":{
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"MetadataType",
+ "properties":{
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"metadataType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ }
+ },
+ "EntityType":{
+ "type":"object",
+ "title":"EntityType",
+ "required":[
+ "id",
+ "name"
+ ],
+ "properties":{
+ "notes":{
+ "title":"notes",
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType.Notes"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"notes",
+ "namespaceURI":""
+ }
+ },
+ "id":{
+ "title":"id",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"id",
+ "namespaceURI":""
+ }
+ },
+ "name":{
+ "title":"name",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"name",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"entityType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "notes",
+ "id",
+ "name"
+ ]
+ },
+ "Diagram":{
+ "type":"object",
+ "title":"Diagram",
+ "required":[
+ "metadata",
+ "lifelines"
+ ],
+ "properties":{
+ "metadata":{
+ "title":"metadata",
+ "allOf":[
+ {
+ "$ref":"#/definitions/MetadataType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"metadata",
+ "namespaceURI":""
+ }
+ },
+ "lifelines":{
+ "title":"lifelines",
+ "allOf":[
+ {
+ "$ref":"#/definitions/LifelinesType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"lifelines",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "propertiesOrder":[
+ "metadata",
+ "lifelines"
+ ]
+ },
+ "LifelineType":{
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"LifelineType",
+ "properties":{
+ "mandatory":{
+ "title":"mandatory",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"mandatory",
+ "namespaceURI":""
+ }
+ }
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"lifelineType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "mandatory"
+ ]
+ }
+ },
+ "anyOf":[
+ {
+ "type":"object",
+ "properties":{
+ "name":{
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/QName"
+ },
+ {
+ "type":"object",
+ "properties":{
+ "localPart":{
+ "enum":[
+ "diagram"
+ ]
+ },
+ "namespaceURI":{
+ "enum":[
+ "http://ns.ecomp.com/asdc/sequencer"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "value":{
+ "$ref":"#/definitions/Diagram"
+ }
+ },
+ "elementName":{
+ "localPart":"diagram",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_schema.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_schema.json
new file mode 100644
index 0000000000..d655826290
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/schema/asdc_sequencer_schema.json
@@ -0,0 +1,582 @@
+
+{
+ "id":"#",
+ "definitions":{
+ "EntityType.Notes":{
+ "type":"object",
+ "title":"EntityType.Notes",
+ "properties":{
+ "note":{
+ "title":"note",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ },
+ "minItems":0
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"note",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "propertiesOrder":[
+ "note"
+ ]
+ },
+ "GuardType":{
+ "type":"object",
+ "title":"GuardType",
+ "required":[
+ "guard",
+ "steps"
+ ],
+ "properties":{
+ "guard":{
+ "title":"guard",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"guard",
+ "namespaceURI":""
+ }
+ },
+ "steps":{
+ "title":"steps",
+ "allOf":[
+ {
+ "$ref":"#/definitions/StepsType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"steps",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"guardType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "guard",
+ "steps"
+ ]
+ },
+ "MetadataType":{
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"MetadataType",
+ "properties":{
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"metadataType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ }
+ },
+ "OccurrencesType":{
+ "type":"object",
+ "title":"OccurrencesType",
+ "properties":{
+ "start":{
+ "title":"start",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"start",
+ "namespaceURI":""
+ }
+ },
+ "stop":{
+ "title":"stop",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"stop",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"occurrencesType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "start",
+ "stop"
+ ]
+ },
+ "Diagram":{
+ "type":"object",
+ "title":"Diagram",
+ "required":[
+ "metadata",
+ "lifelines",
+ "steps"
+ ],
+ "properties":{
+ "metadata":{
+ "title":"metadata",
+ "allOf":[
+ {
+ "$ref":"#/definitions/MetadataType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"metadata",
+ "namespaceURI":""
+ }
+ },
+ "lifelines":{
+ "title":"lifelines",
+ "allOf":[
+ {
+ "$ref":"#/definitions/LifelinesType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"lifelines",
+ "namespaceURI":""
+ }
+ },
+ "steps":{
+ "title":"steps",
+ "allOf":[
+ {
+ "$ref":"#/definitions/StepsType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"steps",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "propertiesOrder":[
+ "metadata",
+ "lifelines",
+ "steps"
+ ]
+ },
+ "LifelineType":{
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"LifelineType",
+ "properties":{
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"lifelineType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ }
+ },
+ "LifelinesType":{
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"LifelinesType",
+ "properties":{
+ "lifeline":{
+ "title":"lifeline",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"#/definitions/LifelineType"
+ },
+ "minItems":0
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"lifeline",
+ "namespaceURI":""
+ }
+ }
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"lifelinesType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "lifeline"
+ ]
+ },
+ "FragmentType":{
+ "type":"object",
+ "title":"FragmentType",
+ "properties":{
+ "start":{
+ "title":"start",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"start",
+ "namespaceURI":""
+ }
+ },
+ "stop":{
+ "title":"stop",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"stop",
+ "namespaceURI":""
+ }
+ },
+ "operation":{
+ "title":"operation",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"operation",
+ "namespaceURI":""
+ }
+ },
+ "guard":{
+ "title":"guard",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"guard",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"fragmentType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "start",
+ "stop",
+ "operation",
+ "guard"
+ ]
+ },
+ "StepsType":{
+ "required":[
+ "message"
+ ],
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"StepsType",
+ "properties":{
+ "message":{
+ "title":"message",
+ "allOf":[
+ {
+ "type":"array",
+ "items":{
+ "$ref":"#/definitions/MessageType"
+ },
+ "minItems":1
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"message",
+ "namespaceURI":""
+ }
+ }
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"stepsType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "message"
+ ]
+ },
+ "EntityType":{
+ "type":"object",
+ "title":"EntityType",
+ "required":[
+ "id",
+ "name"
+ ],
+ "properties":{
+ "notes":{
+ "title":"notes",
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType.Notes"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"notes",
+ "namespaceURI":""
+ }
+ },
+ "id":{
+ "title":"id",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"id",
+ "namespaceURI":""
+ }
+ },
+ "ref":{
+ "title":"ref",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"ref",
+ "namespaceURI":""
+ }
+ },
+ "name":{
+ "title":"name",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"name",
+ "namespaceURI":""
+ }
+ }
+ },
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"entityType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "notes",
+ "id",
+ "ref",
+ "name"
+ ]
+ },
+ "MessageType":{
+ "required":[
+ "to",
+ "from"
+ ],
+ "allOf":[
+ {
+ "$ref":"#/definitions/EntityType"
+ },
+ {
+ "type":"object",
+ "title":"MessageType",
+ "properties":{
+ "occurrences":{
+ "title":"occurrences",
+ "allOf":[
+ {
+ "$ref":"#/definitions/OccurrencesType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"occurrences",
+ "namespaceURI":""
+ }
+ },
+ "fragment":{
+ "title":"fragment",
+ "allOf":[
+ {
+ "$ref":"#/definitions/FragmentType"
+ }
+ ],
+ "propertyType":"element",
+ "elementName":{
+ "localPart":"fragment",
+ "namespaceURI":""
+ }
+ },
+ "to":{
+ "title":"to",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"to",
+ "namespaceURI":""
+ }
+ },
+ "from":{
+ "title":"from",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"from",
+ "namespaceURI":""
+ }
+ },
+ "type":{
+ "title":"type",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/string"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"type",
+ "namespaceURI":""
+ }
+ },
+ "asynchronous":{
+ "title":"asynchronous",
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/boolean"
+ }
+ ],
+ "propertyType":"attribute",
+ "attributeName":{
+ "localPart":"asynchronous",
+ "namespaceURI":""
+ }
+ }
+ }
+ }
+ ],
+ "typeType":"classInfo",
+ "typeName":{
+ "localPart":"messageType",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ },
+ "propertiesOrder":[
+ "occurrences",
+ "fragment",
+ "to",
+ "from",
+ "type",
+ "asynchronous"
+ ]
+ }
+ },
+ "anyOf":[
+ {
+ "type":"object",
+ "properties":{
+ "name":{
+ "allOf":[
+ {
+ "$ref":"http://www.jsonix.org/jsonschemas/w3c/2001/XMLSchema.jsonschema#/definitions/QName"
+ },
+ {
+ "type":"object",
+ "properties":{
+ "localPart":{
+ "enum":[
+ "diagram"
+ ]
+ },
+ "namespaceURI":{
+ "enum":[
+ "http://ns.ecomp.com/asdc/sequencer"
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "value":{
+ "$ref":"#/definitions/Diagram"
+ }
+ },
+ "elementName":{
+ "localPart":"diagram",
+ "namespaceURI":"http://ns.ecomp.com/asdc/sequencer"
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.metamodel.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.metamodel.json
new file mode 100644
index 0000000000..f6a28a8723
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.metamodel.json
@@ -0,0 +1,17 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "$",
+ "name": "Blank Sequence"
+
+ },
+ "lifelines": {
+ "lifelines": [],
+ "constraints": {
+ "create": true,
+ "delete": true,
+ "reorder": true
+ }
+ }
+ }
+}
diff --git a/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.model.json b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.model.json
new file mode 100644
index 0000000000..42edc5516b
--- /dev/null
+++ b/dox-sequence-diagram-ui/src/main/webapp/lib/ecomp/asdc/sequencer/model/templates/default.model.json
@@ -0,0 +1,11 @@
+{
+ "diagram": {
+ "metadata": {
+ "id": "$",
+ "name": "New Sequence"
+
+ },
+ "lifelines": [],
+ "steps": []
+ }
+}