Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uniform tab/spaces in WPS templates #690

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions pywps/templates/1.0.0/execute/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% if wsdl %}
<wps:WSDL xlink:href="{{ process.wsdl }}"/>
{% endif %}
</wps:Process>
</wps:Process>
<wps:Status creationTime="{{ status.time }}">
{% if status.status == "accepted" %}
<wps:ProcessAccepted percentCompleted="{{ status.percent_done }}">{{ status.message }}</wps:ProcessAccepted>
Expand All @@ -29,39 +29,39 @@
</wps:ExceptionReport>
</wps:ProcessFailed>
{% endif %}
</wps:Status>
</wps:Status>
{% if lineage %}
{% if input_definitions %}
<wps:DataInputs>
<wps:DataInputs>
{% for input in input_definitions %}
<wps:Input>
<wps:Input>
<ows:Identifier>{{ input.identifier }}</ows:Identifier>
<ows:Title>{{ get_translation(input, "title", language) }}</ows:Title>
<ows:Abstract>{{ get_translation(input, "abstract", language) }}</ows:Abstract>
{% if input.type == "complex" %}
<wps:Data>
<wps:Data>
<wps:ComplexData mimeType="{{ input.mimetype }}" encoding="{{ input.encoding }}" schema="{{ input.schema }}">{{ input.data | safe }}</wps:ComplexData>
</wps:Data>
</wps:Data>
{% elif input.type == "literal" %}
<wps:Data>
<wps:Data>
<wps:LiteralData {% if input.uom %}uom="{{ input.uom.reference }}"{% endif %}>{{ input.data }}</wps:LiteralData>
</wps:Data>
</wps:Data>
{% elif input.type == "bbox" %}
<wps:Data>
<wps:Data>
<wps:BoundingBoxData crs="{{ input.crs }}" dimensions="{{ input.dimensions }}">
<ows:LowerCorner>{% for c in input.ll %} {{ c }} {% endfor %}</ows:LowerCorner>
<ows:UpperCorner>{% for c in input.ur %} {{ c }} {% endfor %}</ows:UpperCorner>
</wps:BoundingBoxData>
</wps:Data>
</wps:Data>
{% elif input.type == "reference" %}
<wps:Reference xlink:href="{{ input.href }}" method="{{ input.method }}" mimeType="{{ input.mimetype }}" encoding="{{ input.encoding }}" schema="{{ input.schema }}"/>
{% endif %}
</wps:Input>
</wps:Input>
{% endfor %}
</wps:DataInputs>
</wps:DataInputs>
{% endif %}
{% if output_definitions %}
<wps:OutputDefinitions>
<wps:OutputDefinitions>
{% for output in output_definitions %}
{% if output.type in ["complex", "reference"] %}
<wps:Output mimeType="{{ output.mimetype }}" encoding="{{ output.encoding }}" schema="{{ output.schema }}" asReference="{{ output.asreference }}">
Expand All @@ -71,38 +71,38 @@
<ows:Identifier>{{ output.identifier }}</ows:Identifier>
<ows:Title>{{ get_translation(output, "title", language) }}</ows:Title>
<ows:Abstract>{{ get_translation(output, "abstract", language) }}</ows:Abstract>
</wps:Output>
</wps:Output>
{% endfor %}
</wps:OutputDefinitions>
</wps:OutputDefinitions>
{% endif %}
{% endif %}
{% if outputs %}
<wps:ProcessOutputs>
<wps:ProcessOutputs>
{% for output in outputs %}
<wps:Output>
<wps:Output>
<ows:Identifier>{{ output.identifier }}</ows:Identifier>
<ows:Title>{{ get_translation(output, "title", language) }}</ows:Title>
<ows:Abstract>{{ get_translation(output, "abstract", language) }}</ows:Abstract>
{% if output.type == "reference" %}
<wps:Reference href="{{ output.href }}" mimeType="{{ output.mimetype }}" encoding="{{ output.encoding }}" schema="{{ output.schema }}"/>
{% elif output.type == "complex" %}
<wps:Data>
<wps:Data>
<wps:ComplexData mimeType="{{ output.mimetype }}" encoding="{{ output.encoding }}" schema="{{ output.schema }}">{{ output.data | safe }}</wps:ComplexData>
</wps:Data>
</wps:Data>
{% elif output.type == "literal" %}
<wps:Data>
<wps:Data>
<wps:LiteralData {% if output.uom %}uom="{{ output.uom.reference }}"{% endif %} dataType="{{ output.data_type }}">{{ output.data }}</wps:LiteralData>
</wps:Data>
</wps:Data>
{% elif output.type == "bbox" %}
<wps:Data>
<wps:Data>
<wps:BoundingBoxData crs="{{ output.crs }}" dimensions="{{ output.dimensions }}">
<ows:LowerCorner>{% for c in output.ll %} {{ c }} {% endfor %}</ows:LowerCorner>
<ows:UpperCorner>{% for c in output.ur %} {{ c }} {% endfor %}</ows:UpperCorner>
</wps:BoundingBoxData>
</wps:Data>
</wps:Data>
{% endif %}
</wps:Output>
</wps:Output>
{% endfor %}
</wps:ProcessOutputs>
</wps:ProcessOutputs>
{% endif %}
</wps:ExecuteResponse>
120 changes: 60 additions & 60 deletions pywps/templates/2.0.0/capabilities/main.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- PyWPS {{ pywps_version }} -->
<wps:Capabilities xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:wps="http://www.opengis.net/wps/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/2.0 ../wps.xsd" service="WPS" version="2.0.0">
<ows:ServiceIdentification>
<ows:ServiceIdentification>
<ows:Title>{{ title }}</ows:Title>
<ows:Abstract>{{ abstract }}</ows:Abstract>
<ows:Keywords>{% for keyword in keywords %}
<ows:Keyword>{{ keyword }}</ows:Keyword>{% endfor %}
</ows:Keywords>
<ows:ServiceType>WPS</ows:ServiceType>
<ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
</ows:Keywords>
<ows:ServiceType>WPS</ows:ServiceType>
<ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
<ows:Fees>{{ fees }}</ows:Fees>
<ows:AccessConstraints>{% for ac in accessconstraints %}{{ ac }} {% endfor %}</ows:AccessConstraints>
</ows:ServiceIdentification>
<ows:ServiceProvider>
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName>{{ provider.name }}</ows:ProviderName>
<ows:ProviderSite xlink:href="{{ provider.site }}"/>
<ows:ServiceContact>
<ows:ServiceContact>
<ows:individualname>{{ provider.individual }}</ows:individualname>
<ows:positionname>{{ provider.position }}</ows:positionname>
<ows:ContactInfo>
<ows:ContactInfo>
<ows:Phone>
<ows:Voice>{{ provider.voice }}</ows:Voice>
<ows:Facsimile>{{ provider.fascimile }}</ows:Facsimile>
Expand All @@ -31,76 +31,76 @@
<ows:Country>{{ provider.address.country }}</ows:Country>
<ows:ElectronicMailAddress>{{ provider.address.email }}</ows:ElectronicMailAddress>
</ows:Address>
</ows:ContactInfo>
</ows:ServiceContact>
</ows:ServiceProvider>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
</ows:ContactInfo>
</ows:ServiceContact>
</ows:ServiceProvider>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="{{ serviceurl }}"/>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="DescribeProcess">
<ows:DCP>
<ows:HTTP>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="DescribeProcess">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="{{ serviceurl }}"/>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="Execute">
<ows:DCP>
<ows:HTTP>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="Execute">
<ows:DCP>
<ows:HTTP>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetStatus">
<ows:DCP>
<ows:HTTP>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetStatus">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="{{ serviceurl }}"/>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetResult">
<ows:DCP>
<ows:HTTP>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetResult">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="{{ serviceurl }}"/>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="Dismiss">
<ows:DCP>
<ows:HTTP>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="Dismiss">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="{{ serviceurl }}"/>
<ows:Post xlink:href="{{ serviceurl }}"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<wps:Contents>{% for process in processes %}
<wps:ProcessSummary jobControlOptions="{% for option in process.control_options %}{{ option }} {% endfor %}" wps:processVersion="{{ process.version }}">

<ows:Title>process.title</ows:Title>
<ows:Identifier>process.identifier</ows:Identifier>
<ows:Title>process.title</ows:Title>
<ows:Identifier>process.identifier</ows:Identifier>
<ows:Abstract>{{ process.abstract }}</ows:Abstract>{% for metadata in process.metadata %}
<ows:Metadata xlink:title="{{ metadata.title }}" xlink:type="{{ metadata.type }}"
{% if metadata.href != None %}
xlink:href="{{ metadata.href }}"
{% endif %}
{% if metadata.role != None %}
xlink:role="{{ metadata.role }}"
{% endif %}
/>
{% endfor %}
{% if metadata.href != None %}
xlink:href="{{ metadata.href }}"
{% endif %}
{% if metadata.role != None %}
xlink:role="{{ metadata.role }}"
{% endif %}
/>
{% endfor %}
<ows:Keywords>{% for keyword in process.keywords %}
<ows:Keyword>{{ keyword }}</ows:Keyword>{% endfor %}
</ows:Keywords>
</wps:ProcessSummary>{% endfor %}
</wps:Contents>
</wps:Contents>
</wps:Capabilities>