Skip to content

Commit

Permalink
Update VTL SDMX use case
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoLaval committed Oct 25, 2024
1 parent b80dd24 commit a66915c
Showing 1 changed file with 134 additions and 2 deletions.
136 changes: 134 additions & 2 deletions vtl-sdmx/src/test/resources/DSD_BPE_CENSUS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
<str:Concept urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_COM" id="NB_COM">
<com:Name xml:lang="fr">Nombre de communes</com:Name>
</str:Concept>
<str:Concept urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_EQUIPEMENT" id="NB_EQUIPEMENT">
<com:Name xml:lang="fr">Nombre d'équipement</com:Name>
</str:Concept>
<str:Concept urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_GENERALISTES_PAR_HABITANTS" id="NB_GENERALISTES_PAR_HABITANTS">
<com:Name xml:lang="fr">Nombre de médecins généralistes pour 10 OOO habitants</com:Name>
</str:Concept>
<str:Concept urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).POP_MUNI" id="POP_MUNI">
<com:Name xml:lang="fr">Population municipale</com:Name>
</str:Concept>
Expand Down Expand Up @@ -195,6 +201,120 @@
</str:MeasureList>
</str:DataStructureComponents>
</str:DataStructure>
<str:DataStructure urn="urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_MUNICIPALITY(1.0)"
isExternalReference="false"
agencyID="FR1"
id="BPE_MUNICIPALITY"
version="1.0">
<com:Name xml:lang="en">Cube BPE par ville</com:Name>
<str:DataStructureComponents>
<str:DimensionList urn="urn:sdmx:org.sdmx.infomodel.datastructure.DimensionDescriptor=FR1:BPE_MUNICIPALITY(1.0).DimensionDescriptor"
id="DimensionDescriptor">
<str:Dimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dimension=FR1:BPE_MUNICIPALITY(1.0).municipality"
id="municipality"
position="1">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).MUNICIPALITY</str:ConceptIdentity>
<str:LocalRepresentation>
<str:Enumeration>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=FR1:CL_DEPCOM(1.0)</str:Enumeration>
</str:LocalRepresentation>
</str:Dimension>
<str:TimeDimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.TimeDimension=FR1:BPE_MUNICIPALITY(1.0).year"
id="year">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).REF_YEAR</str:ConceptIdentity>
<str:LocalRepresentation>
<str:TextFormat textType="ObservationalTimePeriod"/>
</str:LocalRepresentation>
</str:TimeDimension>
<str:Dimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dimension=FR1:BPE_MUNICIPALITY(1.0).facility_type"
id="facility_type"
position="1">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).TYPE_EQUIPEMENT</str:ConceptIdentity>
<str:LocalRepresentation>
<str:Enumeration>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=FR1:CL_TYPEQU(1.0)</str:Enumeration>
</str:LocalRepresentation>
</str:Dimension>
</str:DimensionList>
<str:MeasureList urn="urn:sdmx:org.sdmx.infomodel.datastructure.MeasureDescriptor=FR1:BPE_MUNICIPALITY(1.0).MeasureDescriptor"
id="MeasureDescriptor">
<str:Measure urn="urn:sdmx:org.sdmx.infomodel.datastructure.Measure=FR1:BPE_MUNICIPALITY(1.0).nb"
id="nb"
usage="mandatory">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_EQUIPEMENT</str:ConceptIdentity>
</str:Measure>
</str:MeasureList>
</str:DataStructureComponents>
</str:DataStructure>
<str:DataStructure urn="urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_NUTS3(1.0)"
isExternalReference="false"
agencyID="FR1"
id="BPE_NUTS3"
version="1.0">
<com:Name xml:lang="en">Cube BPE par nuts 3</com:Name>
<str:DataStructureComponents>
<str:DimensionList urn="urn:sdmx:org.sdmx.infomodel.datastructure.DimensionDescriptor=FR1:BPE_NUTS3(1.0).DimensionDescriptor"
id="DimensionDescriptor">
<str:Dimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dimension=FR1:BPE_NUTS3(1.0).nuts3"
id="nuts3"
position="1">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).REF_AREA</str:ConceptIdentity>
<str:LocalRepresentation>
<str:Enumeration>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=FR1:CL_REF_AREA(1.0)</str:Enumeration>
</str:LocalRepresentation>
</str:Dimension>
<str:TimeDimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.TimeDimension=FR1:BPE_NUTS3(1.0).year"
id="year">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).REF_YEAR</str:ConceptIdentity>
<str:LocalRepresentation>
<str:TextFormat textType="ObservationalTimePeriod"/>
</str:LocalRepresentation>
</str:TimeDimension>
<str:Dimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dimension=FR1:BPE_NUTS3(1.0).facility_type"
id="facility_type"
position="1">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).TYPE_EQUIPEMENT</str:ConceptIdentity>
<str:LocalRepresentation>
<str:Enumeration>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=FR1:CL_TYPEQU(1.0)</str:Enumeration>
</str:LocalRepresentation>
</str:Dimension>
</str:DimensionList>
<str:MeasureList urn="urn:sdmx:org.sdmx.infomodel.datastructure.MeasureDescriptor=FR1:BPE_NUTS3(1.0).MeasureDescriptor"
id="MeasureDescriptor">
<str:Measure urn="urn:sdmx:org.sdmx.infomodel.datastructure.Measure=FR1:BPE_NUTS3(1.0).nb"
id="nb"
usage="mandatory">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_EQUIPEMENT</str:ConceptIdentity>
</str:Measure>
</str:MeasureList>
</str:DataStructureComponents>
</str:DataStructure>
<str:DataStructure urn="urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_CENSUS_NUTS3_2021(1.0)"
isExternalReference="false"
agencyID="FR1"
id="BPE_CENSUS_NUTS3_2021"
version="1.0">
<com:Name xml:lang="en">Cube médecins généralistes par habitants ventillé par nuts 3 en 2010</com:Name>
<str:DataStructureComponents>
<str:DimensionList urn="urn:sdmx:org.sdmx.infomodel.datastructure.DimensionDescriptor=FR1:BPE_CENSUS_NUTS3_2021(1.0).DimensionDescriptor"
id="DimensionDescriptor">
<str:Dimension urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dimension=FR1:BPE_CENSUS_NUTS3_2021(1.0).nuts3"
id="nuts3"
position="1">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).REF_AREA</str:ConceptIdentity>
<str:LocalRepresentation>
<str:Enumeration>urn:sdmx:org.sdmx.infomodel.codelist.Codelist=FR1:CL_REF_AREA(1.0)</str:Enumeration>
</str:LocalRepresentation>
</str:Dimension>
</str:DimensionList>
<str:MeasureList urn="urn:sdmx:org.sdmx.infomodel.datastructure.MeasureDescriptor=FR1:BPE_CENSUS_NUTS3_2021(1.0).MeasureDescriptor"
id="MeasureDescriptor">
<str:Measure urn="urn:sdmx:org.sdmx.infomodel.datastructure.Measure=FR1:BPE_CENSUS_NUTS3_2021(1.0).pract_per_10000_inhabitants"
id="pract_per_10000_inhabitants"
usage="mandatory">
<str:ConceptIdentity>urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=FR1:INSEE_CONCEPTS(1.0).NB_GENERALISTES_PAR_HABITANTS</str:ConceptIdentity>
</str:Measure>
</str:MeasureList>
</str:DataStructureComponents>
</str:DataStructure>
</str:DataStructures>
<str:Dataflows>
<str:Dataflow urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=FR1:BPE_DETAIL(1.0)" agencyID="FR1" id="BPE_DETAIL" version="1.0">
Expand All @@ -205,6 +325,18 @@
<com:Name xml:lang="en">Dataflow for BPE_CENSUS</com:Name>
<str:Structure>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:LEGAL_POP(1.0)</str:Structure>
</str:Dataflow>
<str:Dataflow urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=FR1:BPE_MUNICIPALITY(1.0)" agencyID="FR1" id="BPE_MUNICIPALITY" version="1.0">
<com:Name xml:lang="en">Dataflow for BPE_MUNICIPALITY</com:Name>
<str:Structure>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_MUNICIPALITY(1.0)</str:Structure>
</str:Dataflow>
<str:Dataflow urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=FR1:BPE_NUTS3(1.0)" agencyID="FR1" id="BPE_NUTS3" version="1.0">
<com:Name xml:lang="en">Dataflow for BPE_NUTS3</com:Name>
<str:Structure>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_NUTS3(1.0)</str:Structure>
</str:Dataflow>
<str:Dataflow urn="urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=FR1:BPE_CENSUS_NUTS3_2021(1.0)" agencyID="FR1" id="BPE_CENSUS_NUTS3_2021" version="1.0">
<com:Name xml:lang="en">Dataflow for BPE_CENSUS_NUTS3_2021</com:Name>
<str:Structure>urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=FR1:BPE_CENSUS_NUTS3_2021(1.0)</str:Structure>
</str:Dataflow>
</str:Dataflows>
<str:VtlMappingSchemes>
<str:VtlMappingScheme agencyID="FR1" id="BPE_DETAIL" version="1.0">
Expand All @@ -223,15 +355,15 @@
<str:RulesetDefinition>
define datapoint ruleset UNIQUE_MUNICIPALITY (valuedomain CL_DEPCOM) is
MUNICIPALITY_FORMAT_RULE : match_characters(CL_DEPCOM, "[0-9]{5}|2[A-B][0-9]{3}") errorcode "Municipality code is not in the correct format"
end datapoint ruleset
end datapoint ruleset;
</str:RulesetDefinition>
</str:Ruleset>
<str:Ruleset id="NUTS3_TYPES" rulesetScope="variable" rulesetType="datapoint">
<com:Name xml:lang="en">Datapoint Ruleset NUTS3_TYPES</com:Name>
<str:RulesetDefinition>
define datapoint ruleset NUTS3_TYPES (variable facility_type, nb) is
BOWLING_ALLEY_RULE : when facility_type = "F102" then nb > 10 errorcode "Not enough bowling alleys"
end datapoint ruleset
end datapoint ruleset;
</str:RulesetDefinition>
</str:Ruleset>
</str:RulesetScheme>
Expand Down

0 comments on commit a66915c

Please sign in to comment.