Skip to content

Commit

Permalink
Merge pull request #77 from InseeFr/develop
Browse files Browse the repository at this point in the history
lunatic v2 master
  • Loading branch information
ORogel authored Oct 19, 2022
2 parents d217ae7 + 926a4ef commit 88868c3
Show file tree
Hide file tree
Showing 10 changed files with 11,116 additions and 5,354 deletions.
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<groupId>fr.insee.lunatic</groupId>
<artifactId>lunatic-model</artifactId>
<packaging>jar</packaging>
<version>2.2.10</version>

<version>2.3.1</version>

<name>Lunatic Model</name>
<description>Classes and converters for the Lunatic model</description>
<url>http://www.insee.fr</url>
Expand Down
96 changes: 72 additions & 24 deletions src/main/resources/xsd/LunaticModel.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<xs:element name="components" type="ComponentType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="suggesters" type="SuggesterType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="variables" type="IVariableType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="cleaning" type="CleaningType" minOccurs="0" maxOccurs="1"/>
<xs:element name="missingBlock" type="MissingType" minOccurs="0" maxOccurs="1"/>
<xs:element name="resizing" type="MissingType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down Expand Up @@ -59,7 +62,7 @@
<xs:complexType name="Options">
<xs:sequence>
<xs:element name="value" type="xs:string"/>
<xs:element name="label" type="xs:string"/>
<xs:element name="label" type="labelType"/>
</xs:sequence>
</xs:complexType>

Expand All @@ -70,30 +73,33 @@
<xs:element name="loopDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="lines" type="LinesLoop" minOccurs="0"/>
<xs:element name="components" type="ComponentType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="iterations" type="labelType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="maxPage" type="xs:string"/>
<xs:attribute name="iterations" type="xs:string"/>
<xs:attribute name="depth" type="xs:integer"/>
<xs:attribute name="paginatedLoop" type="xs:boolean"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="LinesLoop">
<xs:attribute name="min" type="xs:string" use="required"/>
<xs:attribute name="max" type="xs:string" use="required"/>
<xs:sequence>
<xs:element name="min" type="labelType"/>
<xs:element name="max" type="labelType"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ConditionFilterType">
<xs:sequence>
<xs:element name="value" type="xs:string"/>
<xs:element name="type" type="xs:string"/>
<xs:element name="bindingDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ComponentType" abstract="true">
<xs:sequence>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="label" type="labelType" minOccurs="0"/>
<xs:element name="declarations" type="DeclarationType" minOccurs="0" maxOccurs="unbounded"/>
<!-- Warning : To validate the name -->
<xs:element name="conditionFilter" type="ConditionFilterType" minOccurs="0"/>
Expand All @@ -110,6 +116,13 @@
<xs:attribute name="page" type="xs:string"/>
</xs:complexType>

<xs:complexType name="labelType">
<xs:sequence>
<xs:element name="value" type="xs:string" minOccurs="0"/>
<xs:element name="type" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="hierarchy">
<xs:sequence>
<xs:element name="sequence" type="sequenceDescription" minOccurs="0"/>
Expand All @@ -119,7 +132,7 @@

<xs:complexType name="sequenceDescription">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="label" type="labelType"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="page" type="xs:string"/>
Expand Down Expand Up @@ -222,7 +235,7 @@
<xs:sequence>
<xs:element name="value" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="values" type="ValuesType" minOccurs="0" maxOccurs="1"/>
<xs:element name="expression" type="xs:string" minOccurs="0"/>
<xs:element name="expression" type="labelType" minOccurs="0"/>
<xs:element name="bindingDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="shapeFrom" type="xs:string" minOccurs="0"/>
<xs:element name="inFilter" type="xs:string" minOccurs="0"/>
Expand Down Expand Up @@ -423,8 +436,8 @@
<xs:extension base="ComponentType">
<xs:sequence>
<xs:element name="lines" type="LinesRoster" minOccurs="0" maxOccurs="1"/>
<xs:element name="headers" type="CellsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="components" type="CellsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="header" type="HeaderType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="components" type="BodyLine" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="positioning" type="xs:string"/>
</xs:extension>
Expand All @@ -436,24 +449,34 @@
<xs:extension base="ComponentType">
<xs:sequence>
<xs:element name="lines" type="LinesRoster" minOccurs="0" maxOccurs="1"/>
<xs:element name="cells" type="CellsLines" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="header" type="HeaderType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="body" type="BodyType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="positioning" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="CellsLines">
<xs:complexType name="BodyType">
<xs:sequence>
<xs:element name="bodyLine" type="BodyLine" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="HeaderType">
<xs:sequence>
<xs:element name="cells" type="CellsType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="label" type="labelType" minOccurs="0" maxOccurs="1"/>
<xs:element name="options" type="Options" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="type" use="optional"/>
<xs:attribute name="colspan" type="xs:integer" use="optional"/>
<xs:attribute name="rowspan" type="xs:integer" use="optional"/>
</xs:complexType>

<xs:complexType name="CellsType">
<xs:complexType name="BodyLine">
<xs:sequence>
<xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="label" type="labelType" minOccurs="0" maxOccurs="1"/>
<xs:element name="format" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="dateFormat" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="unit" type="xs:string" minOccurs="0" maxOccurs="1"/>
Expand All @@ -466,28 +489,29 @@
<xs:attribute name="min" type="xs:double" use="optional"/>
<xs:attribute name="max" type="xs:double" use="optional"/>
<xs:attribute name="decimals" type="xs:integer" use="optional"/>
<xs:attribute name="headerCell" type="xs:boolean" use="optional"/>
<xs:attribute name="colspan" type="xs:integer" use="optional"/>
<xs:attribute name="rowspan" type="xs:integer" use="optional"/>
<xs:attribute name="id" type="xs:ID" use="optional"/>
</xs:complexType>

<xs:complexType name="LinesRoster">
<xs:attribute name="min" type="xs:integer" use="required"/>
<xs:attribute name="max" type="xs:integer" use="required"/>
<xs:sequence>
<xs:element name="min" type="labelType"/>
<xs:element name="max" type="labelType"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ResponsesCheckboxGroup">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="label" type="labelType"/>
<xs:element name="response" type="ResponseType"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>

<xs:complexType name="DeclarationType">
<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="label" type="labelType"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="declarationType" type="DeclarationTypeEnum"/>
Expand All @@ -513,14 +537,14 @@
<xs:enumeration value="DETACHABLE"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="ControlType">
<xs:sequence>
<xs:element name="control" type="xs:string"/>
<xs:element name="errorMessage" type="xs:string"/>
<xs:element name="control" type="labelType"/>
<xs:element name="errorMessage" type="labelType"/>
<xs:element name="bindingDependencies" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" />
<xs:attribute name="typeOfControl" type="ControlTypeOfControlEnum"/>
<xs:attribute name="criticality" type="ControlCriticityEnum"/>
</xs:complexType>
<xs:simpleType name="ControlCriticityEnum">
Expand All @@ -530,5 +554,29 @@
<xs:enumeration value="ERROR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ControlTypeOfControlEnum">
<xs:restriction base="xs:token">
<xs:enumeration value="FORMAT"/>
<xs:enumeration value="CONSISTENCY"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="CleaningType">
<xs:sequence maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="MissingType">
<xs:sequence maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="ResizingType">
<xs:sequence maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
</xs:complexType>

</xs:schema>
Loading

0 comments on commit 88868c3

Please sign in to comment.