2 xmlns:xs="http://www.w3.org/2001/XMLSchema"
3 targetNamespace="http://ns.ecomp.com/asdc/sequencer"
4 xmlns:s="http://ns.ecomp.com/asdc/sequencer"
5 attributeFormDefault="unqualified"
6 elementFormDefault="unqualified">
10 https://github.com/highsource/jsonix-schema-compiler/wiki/JSON-Schema-Generation
12 npm install -x-save-dev json-schema-generation
14 java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar \
16 -d ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/ \
17 -p asdc_sequencer_schema \
18 ./src/main/webapp/lib/ecomp/asdc/sequencer/schema/asdc-sequencer-meta-schema.xsd
22 <xs:element name="diagram">
26 Diagram meta-schema, defining what diagram documents may look like.
28 The main difference between the metaschema (this) and the schema, is that
29 the metaschema describes what's *allowed* rather than what *is*.
33 1. The metaschema exists primarily to constrain lifelines; to declare any
34 that are predefined, to prescribe cardinality, order and whether or not
35 ad hoc lifelines may be created by the user.
36 2. The metaschema doesn't constrain messages at all. This may come along later,
37 but for now they're freetext, and can be defined between any legal pair
39 3. The metaschema doesn't have @ref attributes; its @id attributes are the
40 target of @ref attributes in the instance schema.m
46 <xs:element name="metadata" type="s:metadataType"/>
47 <xs:element name="lifelines" type="s:lifelinesType"/>
52 <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
54 <xs:complexType name="entityType" abstract="true">
57 Common attributes, most importantly @id, which every entity must have.
61 <xs:element name="notes" minOccurs="0">
64 <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
69 <xs:attribute name="id" use="required" type="xs:string">
72 Schema definition identifier.
76 <xs:attribute name="name" use="required" type="xs:string">
85 <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
87 <xs:complexType name="metadataType">
90 Diagram metadata, including:
91 - Unique ID, referenced by @ref attributes in instance documents.
92 - Human-readable description, displayed on-screen.
96 <xs:extension base="s:entityType"/>
100 <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
102 <xs:complexType name="lifelineType">
105 Metadata concerning a single lifeline.
109 <xs:extension base="s:entityType">
110 <xs:attribute name="mandatory" type="xs:boolean" use="optional" default="false">
113 Whether an instance may omit this lifeline. Only takes effect
114 where the lifelines setting is @delete=true.
122 <!-- /////////////////////////////////////////////////////////////////////////////////////// -->
124 <xs:complexType name="lifelinesType">
127 Metadata concerning allowed lifelines. Somewhat more strict that
132 <xs:extension base="s:entityType">
134 <xs:element name="lifeline" type="s:lifelineType" minOccurs="0" maxOccurs="unbounded"/>
135 <xs:element name="constraints">
137 <xs:attribute name="create" type="xs:boolean" use="required">
140 Whether the user may create their own lifelines.
144 <xs:attribute name="delete" type="xs:boolean" use="required">
147 Whether declared lifelines may be deleted.
148 See also @mandatory on lifeline.
152 <xs:attribute name="reorder" type="xs:boolean" use="required">
155 Whether lifelines may be reordered.