dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01289
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 371: Created schema for dxf import/export format
------------------------------------------------------------
revno: 371
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Fri 2009-06-12 17:00:35 +0100
message:
Created schema for dxf import/export format
dxf.rng is the authoritative source.
dxf.rnc and dxf.xsd converted using trang http://www.thaiopensource.com/relaxng/trang.html
added:
docs/dxf_v1_schema/
docs/dxf_v1_schema/dxf.rnc
docs/dxf_v1_schema/dxf.rng
docs/dxf_v1_schema/dxf.xsd
modified:
dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/WeeklyPeriodTypeTest.java
=== modified file 'dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/WeeklyPeriodTypeTest.java'
--- dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/WeeklyPeriodTypeTest.java 2009-06-10 22:25:07 +0000
+++ dhis-2/dhis-api/src/test/java/org/hisp/dhis/period/WeeklyPeriodTypeTest.java 2009-06-12 16:00:35 +0000
@@ -39,61 +39,56 @@
* @author Bob Jolliffe
* @version $Id$
*/
-public class WeeklyPeriodTypeTest
-{
-
- /**
- * Test method for
- * {@link org.hisp.dhis.period.WeeklyPeriodType#generatePeriods(org.hisp.dhis.period.Period)}
- * .
- */
- @Ignore // Fails
- @Test
- public void testGeneratePeriods()
- {
- // get calendar of default locale
- Calendar testCal = Calendar.getInstance();
- WeeklyPeriodType wpt = new WeeklyPeriodType();
- for ( int year = 1990; year < 2020; year++ )
- {
- for ( int day = -7; day < 7; day++ )
- {
- testCal.set( year, 0, 1 ); // 1st day of year
- testCal.add( Calendar.DATE, day );
- // System.err.println("testing "+testCal.getTime());
- Period p1 = wpt.createPeriod( testCal.getTime() );
- List<Period> generatedPeriods = wpt.generatePeriods( p1 );
- assertTrue( "Period " + p1 + " in generated set", generatedPeriods.contains( p1 ) );
- }
- }
-
- }
-
- /**
- * Test method for
- * {@link org.hisp.dhis.period.WeeklyPeriodType#createPeriod(Calendar)}.
- */
- @Test
- public void testCreatePeriod()
- {
- Calendar testCal = Calendar.getInstance();
- Calendar startCal = Calendar.getInstance();
- Calendar endCal = Calendar.getInstance();
-
- // arbitrary instance - should increase coverage
- testCal.set( 2009, 4, 27 ); // Wednesday
- WeeklyPeriodType wpt = new WeeklyPeriodType();
-
- Period p = wpt.createPeriod( testCal.getTime() );
- startCal.setTime( p.getStartDate() );
- endCal.setTime( p.getEndDate() );
-
- assertFalse( "start date after given date", startCal.after( testCal ) );
- assertFalse( "end date before given date", endCal.before( testCal ) );
-
- assertTrue( startCal.get( Calendar.DAY_OF_WEEK ) == Calendar.MONDAY );
- assertTrue( endCal.get( Calendar.DAY_OF_WEEK ) == Calendar.SUNDAY );
-
- }
+public class WeeklyPeriodTypeTest {
+
+
+ /**
+ * Test method for {@link org.hisp.dhis.period.WeeklyPeriodType#generatePeriods(org.hisp.dhis.period.Period)}.
+ */
+ @Test
+ public void testGeneratePeriods() {
+ // get calendar of default locale
+ Calendar testCal = Calendar.getInstance();
+ WeeklyPeriodType wpt = new WeeklyPeriodType();
+ for (int year = 1990; year<2020; year++) {
+ for (int day=-7; day<7; day++)
+ {
+ testCal.set(year, 0, 1); // 1st day of year
+ testCal.add(Calendar.DATE, day);
+ // System.err.println("testing "+testCal.getTime());
+ Period p1 = wpt.createPeriod(testCal.getTime());
+ List<Period> generatedPeriods = wpt.generatePeriods(p1);
+ assertTrue("Period "+p1+" in generated set",generatedPeriods.contains(p1));
+ }
+ }
+
+ }
+
+ /**
+ * Test method for {@link org.hisp.dhis.period.WeeklyPeriodType#createPeriod(Calendar)}.
+ */
+ @Test
+ public void testCreatePeriod() {
+ Calendar testCal = Calendar.getInstance();
+ Calendar startCal = Calendar.getInstance();
+ Calendar endCal = Calendar.getInstance();
+
+ // arbitrary instance - should increase coverage
+ testCal.set(2009, 4, 27); // Wednesday
+ WeeklyPeriodType wpt = new WeeklyPeriodType();
+
+
+ Period p = wpt.createPeriod(testCal.getTime());
+ startCal.setTime(p.getStartDate());
+ endCal.setTime(p.getEndDate());
+
+ assertFalse("start date after given date",startCal.after(testCal));
+ assertFalse("end date before given date", endCal.before(testCal));
+
+ assertTrue(startCal.get(Calendar.DAY_OF_WEEK)==Calendar.MONDAY);
+ assertTrue(endCal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY);
+
+
+ }
}
=== added directory 'docs/dxf_v1_schema'
=== added file 'docs/dxf_v1_schema/dxf.rnc'
--- docs/dxf_v1_schema/dxf.rnc 1970-01-01 00:00:00 +0000
+++ docs/dxf_v1_schema/dxf.rnc 2009-06-12 16:00:35 +0000
@@ -0,0 +1,173 @@
+# TODO:
+
+# ns="http://www.dhis.org/schema/dxf" >
+
+# Toplevel elements of dxf format
+start =
+ element dxf {
+ # Metadata elements
+ categoryOptions,
+ categories,
+ categoryCombos,
+ categoryOptionCombos,
+ categoryCategoryOptionAssociations,
+ categoryComboCategoryAssociations,
+ dataElements,
+ dataSets,
+ dataSetMembers,
+ organisationUnits,
+ organisationUnitRelationships,
+ dataSetSourceAssociations,
+ periods,
+ completeDataSetRegistrations,
+ # DataValues
+ dataValues?
+ }
+# Metadata sections
+
+# Categories
+categoryOptions =
+ element categoryOptions {
+ element categoryOption {
+ element id { xsd:integer },
+ element name { text }
+ }+
+ }
+categories =
+ element categories {
+ element category {
+ element id { xsd:integer },
+ element name { text }
+ }+
+ }
+categoryCombos = element categoryCombos { categoryCombo+ }
+categoryCombo =
+ element categoryCombo {
+ element id { xsd:integer },
+ element name { text }
+ }
+categoryOptionCombos =
+ element categoryOptionCombos {
+ element categoryOptionCombo {
+ element id { xsd:integer },
+ categoryCombo,
+ categoryOptions
+ }*
+ }
+categoryCategoryOptionAssociations =
+ element categoryCategoryOptionAssociations {
+ categoryCategoryOptionAssociation*
+ }
+categoryCategoryOptionAssociation =
+ element categoryCategoryOptionAssociation {
+ element category { xsd:integer },
+ element categoryOption { xsd:integer }
+ }
+categoryComboCategoryAssociations =
+ element categoryComboCategoryAssociations {
+ categoryComboCategoryAssociation*
+ }
+categoryComboCategoryAssociation =
+ element categoryComboCategoryAssociation {
+ (element categoryCombo { xsd:integer },
+ element category { xsd:integer })*
+ }
+# Data elements
+dataElements = element dataElements { dataElement* }
+dataElement =
+ element dataElement {
+ element id { xsd:integer },
+ element uuid { text },
+ element name { text },
+ element alternativeName { text },
+ element shortName { text },
+ element code { text },
+ element description { text },
+ element active { text },
+ element type { text },
+ element aggregationOperator { text },
+ element categoryCombo { xsd:integer }
+ }
+dataSets = element dataSets { dataSet* }
+dataSet =
+ element dataSet {
+ element id { xsd:integer },
+ element name { text },
+ element shortName { text },
+ element code { text },
+ element periodType { text }
+ }
+dataSetMembers =
+ element dataSetMembers {
+ # TODO: check dataSetMembers
+ anyElements
+ }
+organisationUnits = element organisationUnits { organisationUnit* }
+organisationUnit =
+ element organisationUnit {
+ element id { xsd:integer },
+ element uuid { text },
+ element name { text },
+ element shortName { text },
+ element code { text },
+ element openingDate { xsd:date },
+ # TODO: accept Date or nothing
+ element closedDate { text },
+ element active { text },
+ element comment { text },
+ element geoCode { text }
+ # TODO: URL in dxf?
+
+ }
+organisationUnitRelationships =
+ element organisationUnitRelationships {
+ element organisationUnitRelationship {
+ element parent { xsd:integer },
+ element child { xsd:integer }
+ }*
+ }
+dataSetSourceAssociations =
+ element dataSetSourceAssociations {
+ element dataSetSourceAssociation {
+ element dataSet { xsd:integer },
+ element source { xsd:integer }
+ }*
+ }
+# Periods
+periods =
+ element periods {
+ element period {
+ element id { xsd:integer },
+ element periodType { text },
+ element startDate { xsd:date },
+ element endDate { xsd:date }
+ }*
+ }
+completeDataSetRegistrations =
+ element completeDataSetRegistrations {
+ # TODO: check completeDataSetRegistrations
+ anyElements
+ }
+# DataValue Section
+dataValues =
+ element dataValues {
+ element dataValue {
+ element dataElement { xsd:integer },
+ element period { xsd:integer },
+ element source { xsd:integer },
+ element value { text },
+ # TODO: Don't use storedBy
+ element storedBy { xsd:integer? },
+ element timeStamp { text },
+ element comment { text },
+ element categoryOptionCombo { xsd:integer }
+ }*
+ }
+# Convenience (from odf spec) for filling in the "dark spots"
+anyAttListOrElements =
+ attribute * { text }*,
+ anyElements
+anyElements =
+ element * {
+ mixed { anyAttListOrElements }
+ }*
=== added file 'docs/dxf_v1_schema/dxf.rng'
--- docs/dxf_v1_schema/dxf.rng 1970-01-01 00:00:00 +0000
+++ docs/dxf_v1_schema/dxf.rng 2009-06-12 16:00:35 +0000
@@ -0,0 +1,311 @@
+<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
+ xmlns="http://relaxng.org/ns/structure/1.0" >
+
+ <!-- TODO: -->
+ <!-- ns="http://www.dhis.org/schema/dxf" > -->
+
+
+ <!-- Toplevel elements of dxf format -->
+ <start>
+ <element name="dxf" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" >
+ <!-- Metadata elements -->
+ <ref name="categoryOptions" />
+ <ref name="categories" />
+ <ref name="categoryCombos" />
+ <ref name="categoryOptionCombos" />
+ <ref name="categoryCategoryOptionAssociations" />
+ <ref name="categoryComboCategoryAssociations" />
+
+ <ref name="dataElements" />
+ <ref name="dataSets" />
+ <ref name="dataSetMembers" />
+
+ <ref name="organisationUnits" />
+ <ref name="organisationUnitRelationships" />
+ <ref name="dataSetSourceAssociations" />
+
+ <ref name="periods" />
+
+ <ref name="completeDataSetRegistrations" />
+
+ <!-- DataValues -->
+ <optional>
+ <ref name="dataValues" />
+ </optional>
+
+ </element>
+ </start>
+
+
+<!-- Metadata sections -->
+
+
+<!-- Categories -->
+
+ <define name="categoryOptions">
+ <element name="categoryOptions">
+ <oneOrMore>
+ <element name="categoryOption">
+ <element name="id">
+ <data type="integer" />
+ </element>
+ <element name="name">
+ <text />
+ </element>
+ </element>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="categories">
+ <element name="categories">
+ <oneOrMore>
+ <element name="category">
+ <element name="id">
+ <data type="integer" />
+ </element>
+ <element name="name">
+ <text />
+ </element>
+ </element>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="categoryCombos">
+ <element name="categoryCombos">
+ <oneOrMore>
+ <ref name="categoryCombo"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="categoryCombo">
+ <element name="categoryCombo">
+ <element name="id">
+ <data type="integer" />
+ </element>
+ <element name="name">
+ <text />
+ </element>
+ </element>
+ </define>
+
+ <define name="categoryOptionCombos">
+ <element name="categoryOptionCombos">
+ <zeroOrMore>
+ <element name="categoryOptionCombo">
+ <element name="id">
+ <data type="integer" />
+ </element>
+ <ref name="categoryCombo" />
+ <ref name="categoryOptions" />
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="categoryCategoryOptionAssociations" >
+ <element name="categoryCategoryOptionAssociations">
+ <zeroOrMore>
+ <ref name="categoryCategoryOptionAssociation"/>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="categoryCategoryOptionAssociation" >
+ <element name="categoryCategoryOptionAssociation">
+ <element name="category">
+ <data type="integer" />
+ </element>
+ <element name="categoryOption">
+ <data type="integer" />
+ </element>
+ </element>
+ </define>
+
+ <define name="categoryComboCategoryAssociations" >
+ <element name="categoryComboCategoryAssociations">
+ <zeroOrMore>
+ <ref name="categoryComboCategoryAssociation"/>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="categoryComboCategoryAssociation" >
+ <element name="categoryComboCategoryAssociation">
+ <zeroOrMore>
+ <element name="categoryCombo" >
+ <data type="integer" />
+ </element>
+ <element name="category" >
+ <data type="integer" />
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+
+ <!-- Data elements -->
+ <define name="dataElements">
+ <element name="dataElements" >
+ <zeroOrMore>
+ <ref name="dataElement" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+
+ <define name="dataElement">
+ <element name="dataElement" >
+ <element name="id"><data type="integer" /></element>
+ <element name="uuid"><text /></element>
+ <element name="name"><text /></element>
+ <element name="alternativeName"><text /></element>
+ <element name="shortName"><text /></element>
+ <element name="code"><text /></element>
+ <element name="description"><text /></element>
+ <element name="active"><text /></element>
+ <element name="type"><text /></element>
+ <element name="aggregationOperator"><text /></element>
+ <element name="categoryCombo"><data type="integer" /></element>
+ </element>
+ </define>
+
+
+ <define name="dataSets">
+ <element name="dataSets">
+ <zeroOrMore>
+ <ref name="dataSet" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="dataSet">
+ <element name="dataSet">
+ <element name="id"><data type="integer" /></element>
+ <element name="name"><text /></element>
+ <element name="shortName"><text /></element>
+ <element name="code"><text /></element>
+ <element name="periodType"><text /></element>
+ </element>
+ </define>
+
+ <define name="dataSetMembers">
+ <element name="dataSetMembers">
+ <!-- TODO: check dataSetMembers -->
+ <ref name="anyElements"/>
+ </element>
+ </define>
+
+ <define name="organisationUnits">
+ <element name="organisationUnits">
+ <zeroOrMore>
+ <ref name="organisationUnit" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="organisationUnit">
+ <element name="organisationUnit">
+ <element name="id"><data type="integer" /></element>
+ <element name="uuid"><text /></element>
+ <element name="name"><text /></element>
+ <element name="shortName"><text /></element>
+ <element name="code"><text /></element>
+ <element name="openingDate"><data type="date"/></element>
+ <!-- TODO: accept Date or nothing -->
+ <element name="closedDate"><text /></element>
+ <element name="active"><text /></element>
+ <element name="comment"><text /></element>
+ <element name="geoCode"><text /></element>
+ <!-- TODO: URL in dxf? -->
+ </element>
+ </define>
+
+ <define name="organisationUnitRelationships">
+ <element name="organisationUnitRelationships">
+ <zeroOrMore>
+ <element name="organisationUnitRelationship">
+ <element name="parent"><data type="integer" /></element>
+ <element name="child"><data type="integer" /></element>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="dataSetSourceAssociations">
+ <element name="dataSetSourceAssociations">
+ <zeroOrMore>
+ <element name="dataSetSourceAssociation">
+ <element name="dataSet"><data type="integer" /></element>
+ <element name="source"><data type="integer" /></element>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <!-- Periods -->
+ <define name="periods">
+ <element name="periods">
+ <zeroOrMore>
+ <element name="period">
+ <element name="id"><data type="integer" /></element>
+ <element name="periodType"><text /></element>
+ <element name="startDate"><data type="date" /></element>
+ <element name="endDate"><data type="date"/></element>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="completeDataSetRegistrations">
+ <element name="completeDataSetRegistrations">
+ <!-- TODO: check completeDataSetRegistrations -->
+ <ref name="anyElements" />
+ </element>
+ </define>
+
+
+<!-- DataValue Section -->
+
+ <define name="dataValues">
+ <element name="dataValues">
+ <zeroOrMore>
+ <element name="dataValue">
+ <element name="dataElement"><data type="integer" /></element>
+ <element name="period"><data type="integer" /></element>
+ <element name="source"><data type="integer" /></element>
+ <element name="value"><text /></element>
+ <!-- TODO: Don't use storedBy -->
+ <element name="storedBy"><optional><data type="integer" /></optional></element>
+ <element name="timeStamp"><text /></element>
+ <element name="comment"><text /></element>
+ <element name="categoryOptionCombo"><data type="integer" /></element>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <!-- Convenience (from odf spec) for filling in the "dark spots" -->
+ <define name="anyAttListOrElements">
+ <zeroOrMore>
+ <attribute>
+ <anyName/>
+ <text/>
+ </attribute>
+ </zeroOrMore>
+ <ref name="anyElements"/>
+ </define>
+ <define name="anyElements">
+ <zeroOrMore>
+ <element>
+ <anyName/>
+ <mixed>
+ <ref name="anyAttListOrElements"/>
+ </mixed>
+ </element>
+ </zeroOrMore>
+ </define>
+
+</grammar>
\ No newline at end of file
=== added file 'docs/dxf_v1_schema/dxf.xsd'
--- docs/dxf_v1_schema/dxf.xsd 1970-01-01 00:00:00 +0000
+++ docs/dxf_v1_schema/dxf.xsd 2009-06-12 16:00:35 +0000
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <!-- TODO: -->
+ <!-- ns="http://www.dhis.org/schema/dxf" > -->
+ <!-- Toplevel elements of dxf format -->
+ <xs:element name="dxf">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="categoryOptions"/>
+ <xs:element ref="categories"/>
+ <xs:element ref="categoryCombos"/>
+ <xs:element ref="categoryOptionCombos"/>
+ <xs:element ref="categoryCategoryOptionAssociations"/>
+ <xs:element ref="categoryComboCategoryAssociations"/>
+ <xs:element ref="dataElements"/>
+ <xs:element ref="dataSets"/>
+ <xs:element ref="dataSetMembers"/>
+ <xs:element ref="organisationUnits"/>
+ <xs:element ref="organisationUnitRelationships"/>
+ <xs:element ref="dataSetSourceAssociations"/>
+ <xs:element ref="periods"/>
+ <xs:element ref="completeDataSetRegistrations"/>
+ <xs:element minOccurs="0" ref="dataValues"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- Metadata sections -->
+ <!-- Categories -->
+ <xs:element name="categoryOptions">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" name="categoryOption">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="name"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="id" type="xs:integer"/>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="categories">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" name="category">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="name"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryCombos">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="categoryCombo"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryCombo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="name"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryOptionCombos">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="categoryOptionCombo">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="categoryCombo"/>
+ <xs:element ref="categoryOptions"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryCategoryOptionAssociations">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="categoryCategoryOptionAssociation"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryCategoryOptionAssociation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="category" type="xs:integer"/>
+ <xs:element name="categoryOption" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryComboCategoryAssociations">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="categoryComboCategoryAssociation"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="categoryComboCategoryAssociation">
+ <xs:complexType>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="categoryCombo" type="xs:integer"/>
+ <xs:element name="category" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- Data elements -->
+ <xs:element name="dataElements">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="dataElement"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dataElement">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="uuid"/>
+ <xs:element ref="name"/>
+ <xs:element ref="alternativeName"/>
+ <xs:element ref="shortName"/>
+ <xs:element ref="code"/>
+ <xs:element ref="description"/>
+ <xs:element ref="active"/>
+ <xs:element ref="type"/>
+ <xs:element ref="aggregationOperator"/>
+ <xs:element name="categoryCombo" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="uuid" type="xs:string"/>
+ <xs:element name="alternativeName" type="xs:string"/>
+ <xs:element name="shortName" type="xs:string"/>
+ <xs:element name="code" type="xs:string"/>
+ <xs:element name="description" type="xs:string"/>
+ <xs:element name="active" type="xs:string"/>
+ <xs:element name="type" type="xs:string"/>
+ <xs:element name="aggregationOperator" type="xs:string"/>
+ <xs:element name="dataSets">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="dataSet"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dataSet">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="name"/>
+ <xs:element ref="shortName"/>
+ <xs:element ref="code"/>
+ <xs:element ref="periodType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="periodType" type="xs:string"/>
+ <xs:element name="dataSetMembers">
+ <xs:complexType>
+ <xs:group ref="anyElements"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="organisationUnits">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="organisationUnit"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="organisationUnit">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="uuid"/>
+ <xs:element ref="name"/>
+ <xs:element ref="shortName"/>
+ <xs:element ref="code"/>
+ <xs:element ref="openingDate"/>
+ <xs:element ref="closedDate"/>
+ <xs:element ref="active"/>
+ <xs:element ref="comment"/>
+ <xs:element ref="geoCode"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="openingDate" type="xs:date"/>
+ <xs:element name="closedDate" type="xs:string"/>
+ <xs:element name="comment" type="xs:string"/>
+ <xs:element name="geoCode" type="xs:string"/>
+ <xs:element name="organisationUnitRelationships">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="organisationUnitRelationship"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="organisationUnitRelationship">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="parent"/>
+ <xs:element ref="child"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="parent" type="xs:integer"/>
+ <xs:element name="child" type="xs:integer"/>
+ <xs:element name="dataSetSourceAssociations">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="dataSetSourceAssociation"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dataSetSourceAssociation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="dataSet" type="xs:integer"/>
+ <xs:element ref="source"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="source" type="xs:integer"/>
+ <!-- Periods -->
+ <xs:element name="periods">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="period">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="id"/>
+ <xs:element ref="periodType"/>
+ <xs:element ref="startDate"/>
+ <xs:element ref="endDate"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="startDate" type="xs:date"/>
+ <xs:element name="endDate" type="xs:date"/>
+ <xs:element name="completeDataSetRegistrations">
+ <xs:complexType>
+ <xs:group ref="anyElements"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- DataValue Section -->
+ <xs:element name="dataValues">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="dataValue"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="dataValue">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="dataElement" type="xs:integer"/>
+ <xs:element name="period" type="xs:integer"/>
+ <xs:element ref="source"/>
+ <xs:element ref="value"/>
+ <xs:element ref="storedBy"/>
+ <xs:element ref="timeStamp"/>
+ <xs:element ref="comment"/>
+ <xs:element name="categoryOptionCombo" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="value" type="xs:string"/>
+ <xs:element name="storedBy">
+ <xs:simpleType>
+ <xs:union memberTypes="xs:integer">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:length value="0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="timeStamp" type="xs:string"/>
+ <!-- Convenience (from odf spec) for filling in the "dark spots" -->
+ <xs:group name="anyAttListOrElements">
+ <xs:sequence>
+ <xs:group ref="anyElements"/>
+ </xs:sequence>
+ </xs:group>
+ <xs:attributeGroup name="anyAttListOrElements">
+ <xs:anyAttribute processContents="skip"/>
+ </xs:attributeGroup>
+ <xs:group name="anyElements">
+ <xs:sequence>
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
+ </xs:sequence>
+ </xs:group>
+</xs:schema>
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.