Skip to content

Commit

Permalink
v2_1 2013-08 files
Browse files Browse the repository at this point in the history
  • Loading branch information
airosa committed Jun 27, 2014
1 parent 0d4b4b1 commit d9396a8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
10 changes: 1 addition & 9 deletions v2_1/rest/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ WADL for the SDMX RESTful API specification.
File listing
- SDMXRestTypes.xsd: XSD for defining types of paramteres used in WADL. It is imported by the WADL file.
- sdmx-rest.wadl: The WADL file of the REST specifications
- RestTestClient.java sample client java code for the wadl2java tool.
- wadl.xsd: The XSD of the WADL file. It can be used for validating WADL files.
- xml.xsd: The XSD for the http://www.w3.org/XML/1998/namespace namespace. It is included so the schemas can be validated offline.

Builiding a client from WADL
Using the wadl2java it generates the appropriate client stubs in Java.
Sample command:
wadl2java -o src -p org.estat.rest -a sdmx-rest.wadl
To call these client stubs see the sample code in RestTestClient.java.

Resources
http://www.w3.org/Submission/wadl/
http://java.net/projects/wadl/
http://java.net/downloads/wadl/latest/
http://wadl.java.net/
15 changes: 9 additions & 6 deletions v2_1/rest/src/SDMXRestTypes.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,33 @@
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="([A-z0-9_@$\-]+)(\.(([A-z0-9_@$\-]+)(\+([A-z0-9_@$\-]+))*)?)*"/>
<!-- (common:IDType([+]common:IDType)*)?([.](common:IDType([+]common:IDType)*)?)* -->
<xs:pattern value="([A-Za-z0-9_@$\-]+([+][A-Za-z0-9_@$\-]+)*)?([.]([A-Za-z0-9_@$\-]+([+][A-Za-z0-9_@$\-]+)*)?)*"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ProviderRefType">
<xs:annotation>
<xs:documentation>A string identifying the provider. The syntax is agency id, provider id, separated by a “,”. For example: AGENCY_ID,PROVIDER_ID.
In case the string only contains one out of these 2 elements, it is considered to be the provider id, i.e. ALL,PROVIDER_ID.
In case the string only contains one out of these 2 elements, it is considered to be the provider id, i.e. all,PROVIDER_ID.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="([A-z][A-z0-9_\-]*(\.[A-z][A-z0-9_\-]*)*\,)?([A-z0-9_@$\-]+)"/>
<!-- (common:NestedNCNameIDType\,)?(common:IDType) -->
<xs:pattern value="([A-Za-z][A-Za-z0-9_\-]*(\.[A-Za-z][A-Za-z0-9_\-]*)*\,)?([A-Za-z0-9_@$\-]+)"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="FlowRefType">
<xs:annotation>
<xs:documentation>A string identifying the dataflow. The syntax is agency id, artefact id, version, separated by a “,”. For example: AGENCY_ID,FLOW_ID,VERSION
In case the string only contains one out of these 3 elements, it is considered to be the flow id, i.e. ALL,FLOW_ID,LATEST
In case the string only contains two out of these 3 elements, they are considered to be the agency id and the flow id, i.e. AGENCY_ID,FLOW_ID,LATEST
In case the string only contains one out of these 3 elements, it is considered to be the flow id, i.e. all,FLOW_ID,latest
In case the string only contains two out of these 3 elements, they are considered to be the agency id and the flow id, i.e. AGENCY_ID,FLOW_ID,latest
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="([A-z0-9_@$\-]+)|(([A-z][A-z0-9_\-]*(\.[A-z][A-z0-9_\-]*)*)(\,[A-z0-9_@$\-]+)(\,(latest|([0-9]+(\.[0-9]+)*)))?)"/>
<!-- (common:IDType)|((common:NestedNCNameIDType)(\,common:IDType)(\,(latest|(common:VersionType)))?) -->
<xs:pattern value="([A-Za-z0-9_@$\-]+)|(([A-Za-z][A-Za-z0-9_\-]*(\.[A-Za-z][A-Za-z0-9_\-]*)*)(\,[A-Za-z0-9_@$\-]+)(\,(latest|([0-9]+(\.[0-9]+)*)))?)"/>
</xs:restriction>
</xs:simpleType>

Expand Down
22 changes: 17 additions & 5 deletions v2_1/rest/src/sdmx-rest.wadl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@
<response status="200">
<representation mediaType="application/vnd.sdmx.schema+xml;version=2.1" element="xsd:schema"/>
</response>
<response status="400 401 404 413 500 501 503">
<response status="400 401 404 500 501 503">
<representation mediaType="*/*" />
</response>
<response status="413">
<representation mediaType="application/vnd.sdmx.error+xml;version=2.1" element="message:Error"/>
</response>
</method>
Expand Down Expand Up @@ -166,7 +169,10 @@
<representation mediaType="application/vnd.sdmx.generictimeseriesdata+xml;version=2.1" element="message:GenericTimeSeriesData"/>
<representation mediaType="application/vnd.sdmx.structurespecifictimeseriesdata+xml;version=2.1" element="message:StructureSpecificTimeSeriesData"/>
</response>
<response status="400 401 404 413 500 501 503">
<response status="400 401 404 500 501 503">
<representation mediaType="*/*" />
</response>
<response status="413">
<representation mediaType="application/vnd.sdmx.error+xml;version=2.1" element="message:Error"/>
</response>
</method>
Expand All @@ -187,7 +193,10 @@
<representation mediaType="application/vnd.sdmx.genericmetadata+xml;version=2.1" element="message:GenericMetadata"/>
<representation mediaType="application/vnd.sdmx.structurespecificmetadata+xml;version=2.1" element="message:StructureSpecificMetadata"/>
</response>
<response status="400 401 404 413 500 501 503">
<response status="400 401 404 500 501 503">
<representation mediaType="*/*" />
</response>
<response status="413">
<representation mediaType="application/vnd.sdmx.error+xml;version=2.1" element="message:Error"/>
</response>
</method>
Expand All @@ -205,9 +214,12 @@
<response status="200">
<representation mediaType="application/vnd.sdmx.structure+xml;version=2.1" element="message:Structure"/>
</response>
<response status="400 401 404 413 500 501 503">
<response status="400 401 404 500 501 503">
<representation mediaType="*/*" />
</response>
<response status="413">
<representation mediaType="application/vnd.sdmx.error+xml;version=2.1" element="message:Error"/>
</response>
</response>
</method>
</resource_type>

Expand Down

0 comments on commit d9396a8

Please sign in to comment.