How to create your MM?
- Sebastien REBIERE
- Audrey Fertier
Owned by Sebastien REBIERE
XSD to respect (Â Â )
metamodel.xsd Expand source
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.gind.emac.fr/modeler/metaModel" xmlns:tns="http://www.gind.emac.fr/modeler/metaModel" elementFormDefault="qualified"> <element name="canvasProperties"> <complexType> <sequence> <element name="width" type="int"></element> <element name="height" type="int"></element> </sequence> </complexType> </element> <element name="metaModel"> <complexType> <sequence> <element name="name" type="QName"></element> <element name="version" type="string"></element> <element name="domain" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="category" type="string" minOccurs="0"></element> <element name="icon" type="anyURI"></element> <element name="fileExtension" type="string" minOccurs="0"></element> <element name="reorganizeJavascriptFunction" type="string" minOccurs="0"></element> <element name="backgroundColor" type="string"></element> <element name="globalProperties" minOccurs="0"> <complexType> <sequence> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element ref="tns:canvasProperties" minOccurs="0"></element> <element ref="tns:import" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:importedNode" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:node" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:edge" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:rules"></element> <element name="extensions" minOccurs="0"> <complexType> <sequence> <any minOccurs="0" maxOccurs="unbounded"></any> </sequence> </complexType> </element> </sequence> <attribute name="targetNamespace" type="anyURI" use="optional" /> </complexType> </element> <element name="effectiveMetaModel"> <complexType> <sequence> <element name="name" type="QName"></element> <element name="version" type="string"></element> <element name="icon" type="anyURI"></element> <element name="domain" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="category" type="string" minOccurs="0"></element> <element name="fileExtension" type="string" minOccurs="0"></element> <element name="reorganizeJavascriptFunction" type="string" minOccurs="0"></element> <element name="backgroundColor" type="string"></element> <element name="globalProperties" minOccurs="0"> <complexType> <sequence> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="mergedMetaModel" type="QName" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:canvasProperties" minOccurs="0"></element> <element ref="tns:node" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:edge" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:rules"></element> <element name="extensions" minOccurs="0"> <complexType> <sequence> <any minOccurs="0" maxOccurs="unbounded"></any> </sequence> </complexType> </element> </sequence> <attribute name="targetNamespace" type="anyURI" use="optional" /> </complexType> </element> <element name="paletteView"> <complexType> <sequence> <element name="mode"> <simpleType> <restriction base="string"> <enumeration value="MANUAL" /> <enumeration value="AUTOMATIC" /> </restriction> </simpleType> </element> <element name="ordering"> <simpleType> <restriction base="string"> <enumeration value="FLAT" /> <enumeration value="BY_CATEGORY" /> </restriction> </simpleType> </element> </sequence> </complexType> </element> <element name="importedNode"> <complexType> <sequence> <element name="redefine"> <complexType> <sequence> <element name="category" type="string" minOccurs="0"></element> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> </sequence> <attribute name="ref" type="QName"></attribute> </complexType> </element> <element name="import"> <complexType> <attribute name="namespace" type="anyURI" use="required" /> <attribute name="location" type="anyURI" use="required" /> </complexType> </element> <element name="node"> <complexType> <sequence> <element name="type" type="QName"></element> <element name="extends" type="QName" minOccurs="0"></element> <element name="abstract" type="boolean" minOccurs="0" default="false"></element> <element name="couldHaveARef" type="boolean" minOccurs="0" ></element> <element name="view" minOccurs="0"> <complexType> <sequence> <element name="url" type="string"></element> </sequence> <attribute name="width" type="double" default="0"></attribute> <attribute name="height" type="double" default="0"></attribute> </complexType> </element> <element name="icon" type="anyURI" minOccurs="0"></element> <element name="hasRotatingPoint" type="boolean" minOccurs="0" default="false"></element> <element name="lockScaleX" type="boolean" minOccurs="0" default="true"></element> <element name="lockScaleY" type="boolean" minOccurs="0" default="true"></element> <element name="role" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="category" type="string" minOccurs="0"></element> <element ref="tns:magnets" minOccurs="0"></element> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"></element> <element name="description" type="string" minOccurs="0"></element> <element ref="tns:tooltip" minOccurs="0"></element> <element name="geoLocalisation" minOccurs="0"> <complexType> <sequence> <choice> <element name="point"> <complexType> <sequence> <element name="image" type="string" minOccurs="0"></element> </sequence> </complexType> </element> <element name="polyline"> <complexType> <sequence> </sequence> <attribute name="strokeColor" type="string"></attribute> <attribute name="strokeWidth" type="double"></attribute> <attribute name="strokeDashArray" type="string"></attribute> <attribute name="strokeOpacity" type="double"></attribute> <attribute name="fillColor" type="string"></attribute> <attribute name="fillOpacity" type="double"></attribute> </complexType> </element> <element name="area"> <complexType> <sequence> </sequence> <attribute name="strokeColor" type="string"></attribute> <attribute name="strokeWidth" type="double"></attribute> <attribute name="strokeDashArray" type="string"></attribute> <attribute name="strokeOpacity" type="double"></attribute> <attribute name="fillColor" type="string"></attribute> <attribute name="fillOpacity" type="double"></attribute> </complexType> </element> <element name="predefinedShape"> <complexType> <sequence> <choice> <element name="circle"> <complexType> <attribute name="defaultRadius" type="float"></attribute> </complexType> </element> <element name="rect"> <complexType> <attribute name="defaultWidth" type="float"></attribute> <attribute name="defaultHeight" type="float"></attribute> </complexType> </element> </choice> </sequence> <attribute name="strokeColor" type="string"></attribute> <attribute name="strokeWidth" type="double"></attribute> <attribute name="strokeDashArray" type="string"></attribute> <attribute name="strokeOpacity" type="double"></attribute> <attribute name="fillColor" type="string"></attribute> <attribute name="fillOpacity" type="double"></attribute> </complexType> </element> </choice> </sequence> </complexType> </element> </sequence> </complexType> </element> <element name="tooltip"> <complexType> <sequence> <element name="showType" type="boolean" minOccurs="0"></element> <element name="showRole" type="boolean" minOccurs="0"></element> <element name="showCategory" type="boolean" minOccurs="0"></element> <element name="showProperty" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> </sequence> <attribute name="propertyName" type="string"></attribute> </complexType> </element> <element name="action" type="string" minOccurs="0"></element> </sequence> </complexType> </element> <simpleType name="PathEdgeType"> <restriction base="string"> <enumeration value="LINE"></enumeration> <enumeration value="CURVE"></enumeration> </restriction> </simpleType> <element name="edge"> <complexType> <sequence> <element name="type" type="QName"></element> <element name="pathType" type="tns:PathEdgeType" minOccurs="0" default="CURVE"></element> <element name="strokeColor" type="string"></element> <element name="strokeWidth" type="integer"></element> <element name="strokeDashArray" type="string" minOccurs="0"></element> <element name="startConnectorView" type="tns:connectorViewType" minOccurs="0"></element> <element name="endConnectorView" type="tns:connectorViewType" minOccurs="0"></element> <element name="icon" type="string" minOccurs="0"></element> <element name="role" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="category" type="string"></element> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"></element> <element name="description" type="string" minOccurs="0"></element> </sequence> </complexType> </element> <complexType name="connectorViewType"> <sequence> <element name="shape" type="tns:shapeType"></element> <element name="size" type="int"></element> <element name="backgroundColor" type="string"></element> </sequence> </complexType> <simpleType name="shapeType"> <restriction base="string"> <enumeration value="TRIANGLE"></enumeration> <enumeration value="CIRCLE"></enumeration> <enumeration value="SQUARE"></enumeration> </restriction> </simpleType> <simpleType name="formtypeType"> <restriction base="string"> <!-- primitive type --> <enumeration value="text"></enumeration> <enumeration value="color"></enumeration> <enumeration value="email"></enumeration> <enumeration value="number"></enumeration> <enumeration value="password"></enumeration> <enumeration value="textarea"></enumeration> <enumeration value="url"></enumeration> <enumeration value="hypertext"></enumeration> <enumeration value="tel"></enumeration> <enumeration value="file"></enumeration> <!-- date type --> <enumeration value="date"></enumeration> <enumeration value="time"></enumeration> <enumeration value="datetime-local"></enumeration> <!-- single choice (text derived) --> <enumeration value="combobox"></enumeration> <enumeration value="radio"></enumeration> <!-- multiple choice (text derived) --> <enumeration value="checkbox"></enumeration> <!-- multiple choice (number derived) --> <enumeration value="slider"></enumeration> <!-- complex type --> <enumeration value="table"></enumeration> <enumeration value="button"></enumeration> </restriction> </simpleType> <complexType name="MetaModelPropertyType"> <sequence> <element name="description" type="string" minOccurs="0"></element> <element ref="tns:values" minOccurs="0"></element> <element name="formatter" type="string"></element> <element name="onSaveInForm" type="string"></element> <element name="onChangeInForm" type="string"></element> <element name="conditionInForm" minOccurs="0"> <complexType> <attribute name="visibleIf" type="string"></attribute> <attribute name="dynamicType" type="string"></attribute> <!-- TODO: <attribute name="enableIf" type="string"></attribute> --> </complexType> </element> <element name="conditionInObjectModelTable" minOccurs="0"> <complexType> <attribute name="visibleIf" type="string"></attribute> </complexType> </element> <!-- property for table input type --> <element name="objectModel" minOccurs="0"> <complexType> <sequence> <element ref="tns:property" minOccurs="0" maxOccurs="unbounded"> </element> <element name="othersButton"> <complexType> <attribute name="buttonName" type="string"></attribute> <attribute name="buttonAction" type="string"></attribute> </complexType> </element> <element name="disabledValues" type="string"></element> </sequence> <attribute name="editable" type="boolean" default="true"></attribute> <attribute name="delete" type="boolean" default="true"></attribute> <attribute name="onDeleteFunction" type="string"></attribute> <attribute name="add" type="boolean" default="true"></attribute> <attribute name="titleAdd" type="string"></attribute> <attribute name="titleEdit" type="string"></attribute> <attribute name="selectable" type="boolean" default="false"></attribute> <attribute name="multipleSelection" type="boolean" default="false"></attribute> <attribute name="filtering" type="boolean" default="true"></attribute> <attribute name="pagination" type="string" default="[5, 10, 25, 100]"></attribute> <attribute name="maxRows" type="int" default="100"></attribute> <attribute name="showParentPropertyName" type="boolean" default="true"></attribute> <attribute name="find" type="string" use="optional"></attribute> <attribute name="cellTableStyleExpression" type="string" use="optional"></attribute> <attribute name="cellTableEditableExpression" type="string" use="optional"></attribute> </complexType> </element> <!-- property for file type --> <element name="uploadOnSelect" minOccurs="0"> <complexType> <sequence> <element name="function" type="string"></element> </sequence> </complexType> </element> <!-- property for button type --> <element name="buttons" minOccurs="0"> <complexType> <sequence> <element name="button" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="jsonResultValue" type="string"></element> </sequence> <attribute name="buttonIcon" type="string"></attribute> <attribute name="buttonIconType" type="tns:ButtonIconType"></attribute> <attribute name="buttonBackgroundMatColor" type="tns:ButtonMatColor"></attribute> <!-- TODO: <attribute name="buttonFontMatColor" type="tns:ButtonMatColor"></attribute> --> <attribute name="buttonName" type="string"></attribute> <attribute name="buttonAction" type="string"></attribute> <attribute name="buttonTooltip" type="string"></attribute> </complexType> </element> </sequence> </complexType> </element> <!-- property for hypertext (optional) --> <element name="hyperlinks" minOccurs="0"> <complexType> <sequence> <element name="link" minOccurs="0" maxOccurs="unbounded"> <complexType> <attribute name="url" type="string"></attribute> <attribute name="routerLink" type="string"></attribute> <attribute name="queryParams" type="string"></attribute> <attribute name="name" type="string"></attribute> <attribute name="target" type="string" default="_self"></attribute> </complexType> </element> </sequence> </complexType> </element> </sequence> <attribute name="name" type="string"></attribute> <attribute name="category" type="string"></attribute> <attribute name="defaultValue" type="string"></attribute> <attribute name="type" type="tns:formtypeType"></attribute> <attribute name="readonly" type="boolean" default="false"></attribute> <attribute name="required" type="boolean" default="false"></attribute> <attribute name="placeholder" type="string"></attribute> <attribute name="textAreaRows" type="integer"></attribute> <!-- property for number input type --> <attribute name="min" type="float" default="-10000"></attribute> <attribute name="max" type="float" default="+10000"></attribute> <attribute name="decimal" type="float" default="1"></attribute> <attribute name="step" type="float" default="1"></attribute> <!-- for slider number --> <!-- property for file --> <attribute name="loadingAction" type="string"></attribute> <!-- view property: fabricjs --> <attribute name="visible" type="boolean" default="false"></attribute> <attribute name="visibleIfExpression" type="string" ></attribute> <attribute name="posXFromParentCenter" type="string" ></attribute> <attribute name="posYFromParentCenter" type="string" ></attribute> <attribute name="rotate" type="integer"></attribute> <attribute name="showName" type="boolean" default="false"></attribute> <attribute name="maxSizeLimit" type="integer"></attribute> <attribute name="fontFamily" type="string"></attribute> <attribute name="fontSize" type="integer"></attribute> <attribute name="fontWeight" type="string"></attribute> <attribute name="fontStyle" type="string"></attribute> <attribute name="shadow" type="string"></attribute> <attribute name="stroke" type="string"></attribute> <attribute name="strokeWidth" type="integer"></attribute> <attribute name="textAlign" type="string"></attribute> <attribute name="lineHeight" type="string"></attribute> <attribute name="textBackgroundColor" type="string"></attribute> <!-- property for risk --> <attribute name="isImpactable" type="boolean" default="false"></attribute> </complexType> <element name="property" type="tns:MetaModelPropertyType"> </element> <element name="values"> <complexType> <choice> <element ref="tns:fixedValues"></element> <element ref="tns:conditionalFixedValues"></element> <element ref="tns:automaticValues"></element> </choice> </complexType> </element> <element name="automaticValues"> <complexType> <sequence> <element name="javascriptFunction" > <complexType> <sequence> <element name="definition" type="string"></element> <element name="invocation" type="string"></element> </sequence> </complexType> </element> <element name="activeRefreshButton" type="boolean" default="false" ></element> </sequence> </complexType> </element> <element name="fixedValues"> <complexType> <sequence> <element name="value" minOccurs="0" maxOccurs="unbounded"> <complexType> <attribute name="content" type="string"></attribute> <attribute name="icon" type="string"></attribute> </complexType> </element> </sequence> </complexType> </element> <element name="conditionalFixedValues"> <complexType> <sequence> <element name="possibleValues" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="value" minOccurs="0" maxOccurs="unbounded"> <complexType> <attribute name="content" type="string"></attribute> <attribute name="icon" type="string"></attribute> </complexType> </element> </sequence> <attribute name="condition" type="string"></attribute> </complexType> </element> </sequence> </complexType> </element> <element name="magnets"> <complexType> <choice> <element name="managedPosition" type="tns:ManagedPositionType"></element> <element ref="tns:customPositions"></element> </choice> </complexType> </element> <simpleType name="ManagedPositionType"> <restriction base="string"> <enumeration value="CROSS"></enumeration> <enumeration value="RECT"></enumeration> </restriction> </simpleType> <simpleType name="ButtonIconType"> <restriction base="string"> <enumeration value="URL"></enumeration> <enumeration value="MAT_ICON"></enumeration> </restriction> </simpleType> <simpleType name="ButtonMatColor"> <restriction base="string"> <enumeration value="PRIMARY"></enumeration> <enumeration value="ACCENT"></enumeration> <enumeration value="WARN"></enumeration> </restriction> </simpleType> <element name="customPositions"> <complexType> <sequence> <element ref="tns:magnet" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="magnet"> <complexType> <sequence> <element name="x" type="float"></element> <element name="y" type="float"></element> </sequence> </complexType> </element> <element name="rules"> <complexType> <sequence> <element ref="tns:connectionRule" minOccurs="0" maxOccurs="unbounded"></element> <element ref="tns:containmentRule" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="connectionRule"> <complexType> <sequence> <element name="role" type="string"></element> <element ref="tns:connect" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="connect"> <complexType> <sequence> <element name="from" type="string"></element> <element name="to" type="string"></element> <element name="exclude" type="string" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="containmentRule"> <complexType> <sequence> <element name="role" type="string"></element> <element name="isSubProcess" type="boolean" minOccurs="0" default="false"></element> <element name="contain" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="exclude" type="string" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="htmlExtensions"> <complexType> <sequence> <element name="javascriptOrCss" type="string" minOccurs="0" maxOccurs="unbounded"></element> <element name="directive" type="string" minOccurs="0" maxOccurs="unbounded"></element> </sequence> </complexType> </element> <element name="layersManagement"> <complexType> <sequence> <element name="byProperty" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="defaultValuesArrayFunction" type="string"></element> </sequence> <attribute name="name" type="string"> </attribute> <attribute name="label" type="string" use="optional"> </attribute> </complexType> </element> </sequence> </complexType> </element> </schema>