UMLSeqLifelineView
@constructor
@extends UMLGeneralNodeView
172300
function UMLSeqLifelineView() {
        UMLGeneralNodeView.apply(this, arguments);
        this.movable = Core.MM_HORZ;

        /** @member {UMLLinePartView} */
        this.linePart = new UMLLinePartView();
        this.addSubView(this.linePart);

        this.fillColor = PreferenceManager.get("uml.lifeline.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
    }
296623
protected void visit(Object value, BioPAXElement parent,
			Model newModel, PropertyEditor editor)
	{
			if(editor != null && editor.isUnknown(value)) {
				return;
			}

			String parentType = parent.getModelInterface().getSimpleName();
			BioPAXElement newParent = null;
			Object newValue = value;
			String newProp = propsmap.getProperty(editor.getProperty());

			// special case (PATHWAY-COMPONENTS maps to pathwayComponent or pathwayOrder)
			if(parent instanceof pathway && value instanceof pathwayStep
					&& editor.getProperty().equals("PATHWAY-COMPONENTS")) {
				newProp = "pathwayOrder";
			}

			// for pEPs, getting the corresponding simple PE or Complex is different
			if(parent instanceof physicalEntityParticipant) {
				newParent = getMappedPE((physicalEntityParticipant) parent, newModel);
			} else {
				newParent = newModel.getByID(parent.getUri());
			}

			// bug check!
			if(newParent == null) {
				throw new IllegalAccessError("Of " + value +
					", parent " + parentType + " : " + parent +
					" is not yet in the new model: ");
			}

			PropertyEditor newEditor =
				SimpleEditorMap.L3.getEditorForProperty(newProp, newParent.getModelInterface());

			if(value instanceof Level2Element)
			// not a String, Enum, or primitive type
			{
				// when pEP, create/add stoichiometry!
				if(value instanceof physicalEntityParticipant)
				{
					physicalEntityParticipant pep = (physicalEntityParticipant) value;
					newValue = getMappedPE(pep, newModel);

					float coeff = (float) pep.getSTOICHIOMETRIC_COEFFICIENT();
					if (coeff > 1 ) { //!= BioPAXElement.UNKNOWN_DOUBLE) {
					  if(parent instanceof conversion || parent instanceof complex) {
						PhysicalEntity pe3 = (PhysicalEntity) newValue;
						Stoichiometry stoichiometry = factory
							.create(Stoichiometry.class,
                                    pe3.getUri() + "-stoichiometry" + Math.random());
						stoichiometry.setStoichiometricCoefficient(coeff);
						stoichiometry.setPhysicalEntity(pe3);
						//System.out.println("parent=" + parent + "; phy.ent.=" + pep + "; coeff=" + coeff);
						if (parent instanceof conversion) {
							// (pep) value participates in the conversion interaction
							Conversion conv = (Conversion) newModel
								.getByID(parent.getUri());
							conv.addParticipantStoichiometry(stoichiometry);	
						} else {
							// this (pep) value is component of the complex
							Complex cplx = (Complex) newModel.getByID(parent.getUri());
							cplx.addComponentStoichiometry(stoichiometry);
						} 
						
						newModel.add(stoichiometry);
						
					  } else {
						if (log.isDebugEnabled())
							log.debug(pep + " STOICHIOMETRIC_COEFFICIENT is "
								+ coeff	+ ", but the pEP's parent is not a conversion or complex - " + parent);
					  }
					}
					
					traverse(pep, newModel);
				}
				else if(value instanceof openControlledVocabulary) 
				{
					// create the proper type ControlledVocabulary instance	
					newValue = convertAndAddVocabulary((openControlledVocabulary)value, 
						(Level2Element)parent, newModel, newEditor);
				}
				else
				{
					String id = ((Level2Element) value).getUri();
					newValue = newModel.getByID(id);
				}
			}
			else if (value.getClass().isEnum())
			{
				newValue = getMatchingEnum(value);
			}
			else
			{
				// relationshipXref.RELATIONSHIP-TYPE range changed (String -> RelationshipTypeVocabulaty)
				if(parent instanceof relationshipXref && editor.getProperty().equals("RELATIONSHIP-TYPE")) {
					String id = URLEncoder.encode(value.toString());
					if(!newModel.containsID(id)) {
						RelationshipTypeVocabulary cv = (RelationshipTypeVocabulary) 
							newModel.addNew(newEditor.getRange(), id);
						cv.addTerm(value.toString().toLowerCase());
						newValue = cv;
					} else {
						newValue = newModel.getByID(id);
					}
				}
			}
			
			if(newValue == null) {
				log.debug("Skipped for  " + parent + "." + editor.getProperty()
					+ "=" + value + " ==> " + newParent.getUri() + "." + newProp	+ " = NULL");
				return;
			}
			
			if (newProp != null) {
				if (newEditor != null){
					setNewProperty(newParent, newValue, newEditor);
				} else if(parent instanceof physicalEntity) {
					// Special mapping for 'AVAILABILITY' and 'DATA-SOURCE'
					// find parent pEP(s)
					Set<physicalEntityParticipant> ppeps = ((physicalEntity)parent).isPHYSICAL_ENTITYof();
					// if several pEPs use the same phy.entity, we get this property/value cloned...
					for(physicalEntityParticipant pep: ppeps) {
						//find proper L3 physical entity
						newParent = getMappedPE(pep, newModel);
						if(newParent != null) {
							newEditor = SimpleEditorMap.L3.getEditorForProperty(newProp, newParent.getModelInterface());
							setNewProperty(newParent, newValue, newEditor);
						} else { // bug!
							log.error("Cannot find converted PE to map the property " 
								+ editor.getProperty() + " of physicalEntity " + parent + " (" + parentType + ")");
						}
					}
				} else {
					log.debug("Skipped property " + editor.getProperty() + " in " + parentType + " to " +
						newParent.getModelInterface().getSimpleName() + " conversion (" + parent + ")");
				}
			} else {
				log.warn("No mapping defined for property: " + parentType + "." + editor.getProperty());
			} 
		}
505434
function initViews () {
    // list of views - may be empty
    this.modelViews = []
    // if view is false no model views will be applied overriding any defaults
    if (this.args.view === false) {
        return
    }
    // get view from args or default
    var viewArg = defined(this.args.view) ? this.args.view : this.model.views.default
    // skip unless view arg is set from args or default
    if (!defined(viewArg)) {
        return
    }
    // list of views to apply to model
    var views
    // if view is string then convert to array
    if (typeof viewArg === 'string') {
        views = [viewArg]
    }
    // if view is array use it
    else if (Array.isArray(viewArg)) {
        views = viewArg
    }
    // invalid argument
    else {
        throw this.error('invalid view argument')
    }
    // iterate over views getting model view objects
    _.each(views, view => {
        var modelView = requireValidModelView(view, this.model.views, true)
        // if result is array then add all
        if (Array.isArray(modelView)) {
            _.each(modelView, modelView => this.modelViews.push(modelView))
        }
        // otherwise add object
        else {
            this.modelViews.push(modelView)
        }
    })
    // instantiate model view engine if there are views
    if (this.modelViews.length > 0) {
        this.modelViewEngine = new ImmutableCoreModelViewEngine({query: this})
    }
}
649086
function UMLUseCaseView() {
        UMLClassifierView.apply(this, arguments);
        this.iconRatio = USECASE_RATIO_PERCENT;

        /** @member {UMLExtensionPointCompartmentView} */
        this.extensionPointCompartment = new UMLExtensionPointCompartmentView();
        this.extensionPointCompartment.parentStyle = true;
        this.addSubView(this.extensionPointCompartment);

        this.fillColor = PreferenceManager.get("uml.usecase.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.usecase.stereotypeDisplay", UML.SD_LABEL);
        this.suppressAttributes = PreferenceManager.get("uml.usecase.suppressAttributes", true);
        this.suppressOperations = PreferenceManager.get("uml.usecase.suppressOperations", true);
    }
807454
function UMLArtifactView() {
        UMLClassifierView.apply(this, arguments);
        this.iconRatio = ARTIFACT_RATIO_PERCENT;
        // mixin UMLArtifactViewMixin
        _.extend(UMLArtifactView.prototype, UMLArtifactViewMixin);

        this.fillColor  = PreferenceManager.get("uml.artifact.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.artifact.stereotypeDisplay", UML.SD_ICON);
        this.suppressAttributes = PreferenceManager.get("uml.artifact.suppressAttributes", true);
        this.suppressOperations = PreferenceManager.get("uml.artifact.suppressOperations", true);
    }
366751
function()
	{
		var l;
		var clonedSubview;
		var options = this.options;

		options.parentView = null;
		options.env = this.env;
		options._clone = true;

		var clonedView = new this.constructor(options);

		if(this.subviews !== null)
		{
			l = this.subviews.length;
			clonedView.subviews = new Array(l);
			while(l--)
			{
				clonedSubview = this.subviews[l]._clone();
				clonedView.subviews[l] = clonedSubview;
			}
		}

		if(this._subviewsStruct !== null)
		{
			clonedView._subviewsStruct = this._subviewsStruct.slice();
		}
		if(this._explicitSubviewsStruct !== null)
		{
			clonedView._explicitSubviewsStruct = this._explicitSubviewsStruct.slice();
		}

		if(this._collectionBinder)
		{
			clonedView._collectionBinder = new CollectionBinder(
			{
				view: clonedView,
				keyPath: this._collectionBinder.keyPath,
				animate: this._collectionBinder.animate,
				keyProp: this._collectionBinder.keyProp,
				collection: null,
				collectionPathArray: this._collectionBinder.collectionPathArray
			});
		}

		if(this._modelBindersMap)
		{
			clonedView._modelBindersMap = this._modelBindersMap.clone();
			clonedView._modelBindersMap.setView(clonedView);
		}
		clonedView._itemAlias = this._itemAlias;

		return clonedView;
	}
971515
function UMLMessage() {
        UMLDirectedRelationship.apply(this, arguments);

        /** @member {string} */
        this.messageSort = MS_SYNCHCALL;

        /** @member {UMLOperation} */
        this.signature = null;

        /** @member {UMLConnector} */
        this.connector = null;

        /** @member {string} */
        this["arguments"] = '';

        /** @member {string} */
        this.assignmentTarget = '';

        /** @member {string} */
        this.guard = '';

        /** @member {string} */
        this.iteration = '';

        /** @member {boolean} */
        this.isConcurrentIteration = false;
    }
135867
function UMLAssociationView() {
        UMLUndirectedRelationshipView.apply(this, arguments);

        /** @member {} */
        this.tailQualifiersCompartment = new UMLQualifierCompartmentView();
        this.addSubView(this.tailQualifiersCompartment);

        /** @member {} */
        this.headQualifiersCompartment = new UMLQualifierCompartmentView();
        this.addSubView(this.headQualifiersCompartment);
    }
1137983
function UMLEnumerationView() {
        UMLClassifierView.apply(this, arguments);

        /** @member {boolean} */
        this.suppressLiterals = false;

        /** @member {UMLEnumerationLiteralCompartmentView} */
        this.enumerationLiteralCompartment = new UMLEnumerationLiteralCompartmentView();
        this.enumerationLiteralCompartment.parentStyle = true;
        this.addSubView(this.enumerationLiteralCompartment);

        this.fillColor  = PreferenceManager.get("uml.enumeration.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.enumeration.stereotypeDisplay", UML.SD_LABEL);
        this.suppressAttributes = PreferenceManager.get("uml.enumeration.suppressAttributes", true);
        this.suppressOperations = PreferenceManager.get("uml.enumeration.suppressOperations", true);
        this.suppressLiterals   = PreferenceManager.get("uml.enumeration.suppressLiterals", false);
    }
610043
function UMLConnector() {
        UMLUndirectedRelationship.apply(this, arguments);

        /** @member {UMLConnectorEnd} */
        this.end1 = new UMLConnectorEnd();
        this.end1._parent = this;

        /** @member {UMLConnectorEnd} */
        this.end2 = new UMLConnectorEnd();
        this.end2._parent = this;

        /** @member {UMLAssociation} */
        this.type = null;

        /** @member {UMLConnectorKind} */
        this.kind = CK_ASSEMBLY;
    }
114408
function AppView(options) {
        View.apply(this, arguments);

        // Init
        this.transitionable = new Transitionable(0);
        this.modifier = new StateModifier();
        this.renderable = this.add(this.modifier);

        // Create rows
        this._createRows();
        this._createCounter();
        this._createEndScreen();
        this._createLagometer();

        // Reset
        this.reset();
    }
677732
function NodeView() {
        View.apply(this, arguments);

        /** @member {number} */
        this.left = 0;

        /** @member {number} */
        this.top = 0;

        /** @member {number} */
        this.width = 0;

        /** @member {number} */
        this.height = 0;

        /** @member {number} */
        this.minWidth = 0;

        /** @member {number} */
        this.minHeight = 0;

        /** @member {number} */
        this.sizable = SZ_FREE;

        /** @member {number} */
        this.movable = MM_FREE;

        /** @member {Boolean} */
        this.autoResize = false;
    }
121856
function UMLActorView() {
        UMLClassifierView.apply(this, arguments);
        this.iconRatio = ACTOR_RATIO_PERCENT;

        this.fillColor = PreferenceManager.get("uml.actor.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.actor.stereotypeDisplay", UML.SD_LABEL);
        this.suppressAttributes = PreferenceManager.get("uml.actor.suppressAttributes", true);
        this.suppressOperations = PreferenceManager.get("uml.actor.suppressOperations", true);
    }
671735
function createControls(node) {
			// differentiate between SAPUI5 and plain-HTML children
			if (node.namespaceURI === "http://www.w3.org/1999/xhtml" || node.namespaceURI === "http://www.w3.org/2000/svg" ) {
				var id = node.attributes['id'] ? node.attributes['id'].textContent || node.attributes['id'].text : null;

				if (bEnrichFullIds) {
					return XMLTemplateProcessor.enrichTemplateIdsPromise(node, oView, bAsync).then(function(){
						// do not create controls
						return [];
					});
				} else {
					// plain HTML node - create a new View control
					// creates a view instance, but makes sure the new view receives the correct owner component
					var fnCreateView = function (oViewClass) {
						var mViewParameters = {
							id: id ? getId(oView, node, id) : undefined,
							xmlNode: node,
							containingView: oView._oContainingView,
							processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
						};
						// running with owner component
						if (oView.fnScopedRunWithOwner) {
							return oView.fnScopedRunWithOwner(function () {
								return new oViewClass(mViewParameters);
							});
						}
						// no owner component
						// (or fully sync path, which handles the owner propagation on a higher level)
						return new oViewClass(mViewParameters);
					};

					if (bAsync) {
						return new Promise(function (resolve, reject) {
							sap.ui.require(["sap/ui/core/mvc/XMLView"], function(XMLView) {
								resolve([fnCreateView(XMLView)]);
							});
						});
					} else {
						var XMLView = sap.ui.requireSync("sap/ui/core/mvc/XMLView");
						return SyncPromise.resolve([fnCreateView(XMLView)]);
					}
				}

			} else {
				// non-HTML (SAPUI5) control
				return createControlOrExtension(node);
			}
		}
290368
function UMLMessageEndpointView() {
        NodeView.apply(this, arguments);
        this.sizable = Core.SZ_NONE;
        this.movable = Core.MM_HORZ;
    }
1069885
function UMLClassView() {
        UMLClassifierView.apply(this, arguments);
        this.fillColor  = PreferenceManager.get("uml.class.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
        this.stereotypeDisplay  = PreferenceManager.get("uml.class.stereotypeDisplay", UML.SD_LABEL);
        this.suppressAttributes = PreferenceManager.get("uml.class.suppressAttributes", false);
        this.suppressOperations = PreferenceManager.get("uml.class.suppressOperations", false);
    }
1178768
function View(primaryModel, relatedModels, attributes) {
  if (false === (this instanceof View)) throw new Error('new operator required');
  if (!(primaryModel instanceof Model)) throw new Error('argument must be a Model');
  if (typeof relatedModels != 'object') throw new Error('object expected');
  if (!(attributes instanceof Array)) throw new Error('array of attributes expected');
  this.primaryModel = primaryModel;
  this.relatedModels = relatedModels;
  this.attributes = attributes;
  var id = new Attribute('id', 'ID');
  id.model = primaryModel;
  this.attributes.unshift(id);

  /**
   * Make sure relatedModels valid
   */
  for (var relatedModel in relatedModels) {
    if (relatedModels.hasOwnProperty(relatedModel)) {
      var obj = relatedModels[relatedModel];
      //console.log('relatedModel ' + relatedModel);
      //console.log('obj ' + JSON.stringify(obj));
      if (typeof obj != 'object') throw new Error('relatedModel key values expect object');
      if (obj.id === undefined) throw new Error('relatedModel key values expect object with id key');
      if (obj.model === undefined) throw new Error('relatedModel key values expect object with model key');
      if (!(obj.id instanceof Attribute)) throw new Error('relatedModel id must be a Attribute');
      if (!(obj.model instanceof Model)) throw new Error('relatedModel model must be a Model');
    }
  }
  /**
   * Check attributes
   */
  for (var i = 0; i < attributes.length; i++) {
    var attribute = attributes[i];
    if (!(attribute instanceof Attribute)) throw new Error('attribute array must contain Attributes');
    if (!(attribute.model instanceof Model)) {
      throw new Error('attribute array must contain Attributes with model references');
    }

  }
}