-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VOSICapabilities / TAPRegExt / VOResource (#25)
Addition of VOSI Capabilities, TAPRegExt and VOResource standards
- Loading branch information
1 parent
5ead16e
commit 58f02c5
Showing
32 changed files
with
4,776 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _tapregext_api: | ||
|
||
TAPRegExt API | ||
-------------- | ||
|
||
Models | ||
^^^^^^ | ||
|
||
.. automodule:: vo_models.tapregext.models | ||
:members: | ||
:no-inherited-members: | ||
:exclude-members: model_config, model_fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _tapregext: | ||
|
||
TAPRegExt | ||
---------- | ||
|
||
TAPRegExt is an IVOA XML encoding standard for describing TAP service metadata. It is used by the TAP standard to describe the capabilities of a TAP service. | ||
|
||
`vo-models` currently supports the full TAPRegExt v1.0 standard. The key model is the ``TableAccess`` model, which represents the capabilities of a TAP server: | ||
|
||
Models | ||
^^^^^^ | ||
|
||
TableAccess | ||
*********** | ||
|
||
This model represents the capabilities of a TAP server, used as part of the VOSI Capabilities standard. | ||
|
||
.. grid:: 2 | ||
:gutter: 2 | ||
|
||
.. grid-item-card:: Model | ||
|
||
.. literalinclude:: ../../../../examples/snippets/tapregext/tapregext.py | ||
:language: python | ||
:start-after: TableAccess-model-start | ||
:end-before: TableAccess-model-end | ||
|
||
.. grid-item-card:: XML Output | ||
|
||
.. literalinclude:: ../../../../examples/snippets/tapregext/tapregext.py | ||
:language: xml | ||
:lines: 2- | ||
:start-after: TableAccess-xml-start | ||
:end-before: TableAccess-xml-end | ||
|
||
See the :ref:`tapregext_api` documentation for more information on the models and types available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
.. _voresource: | ||
|
||
VOResource | ||
---------- | ||
|
||
VOResource is an IVOA XML encoding standard for describing resource metadata. It is used by various IVOA standards, such as VODataService, VOSI, and TAPRegExt to describe resources and the services that provide access to them. | ||
|
||
`vo-models` currently supports the full VOResource v1.1 standard. Some of the key elements include: | ||
|
||
Models | ||
^^^^^^ | ||
|
||
Resource | ||
******** | ||
|
||
Any entity or component of a VO application that is describable and identifiable by an IVOA Identifier. | ||
|
||
.. grid:: 2 | ||
:gutter: 2 | ||
|
||
.. grid-item-card:: Model | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: python | ||
:start-after: Resource-model-start | ||
:end-before: Resource-model-end | ||
|
||
.. grid-item-card:: XML Output | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: xml | ||
:lines: 2- | ||
:start-after: Resource-xml-start | ||
:end-before: Resource-xml-end | ||
|
||
Service | ||
******* | ||
|
||
A resource that can be invoked by a client to perform some action on its behalf. | ||
|
||
.. grid:: 2 | ||
:gutter: 2 | ||
|
||
.. grid-item-card:: Model | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: python | ||
:start-after: Service-model-start | ||
:end-before: Service-model-end | ||
|
||
.. grid-item-card:: XML Output | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: xml | ||
:lines: 2- | ||
:start-after: Service-xml-start | ||
:end-before: Service-xml-end | ||
|
||
Capability | ||
********** | ||
|
||
A description of what the service does (in terms of context-specific behavior), and how to use it (in terms of an interface). | ||
|
||
.. grid:: 2 | ||
:gutter: 2 | ||
|
||
.. grid-item-card:: Model | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: python | ||
:start-after: Capability-model-start | ||
:end-before: Capability-model-end | ||
|
||
.. grid-item-card:: XML Output | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: xml | ||
:lines: 2- | ||
:start-after: Capability-xml-start | ||
:end-before: Capability-xml-end | ||
|
||
Interface | ||
********* | ||
|
||
A description of a service interface. | ||
|
||
.. grid:: 2 | ||
:gutter: 2 | ||
|
||
.. grid-item-card:: Model | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: python | ||
:start-after: Interface-model-start | ||
:end-before: Interface-model-end | ||
|
||
.. grid-item-card:: XML Output | ||
|
||
.. literalinclude:: ../../../../examples/snippets/voresource/voresource.py | ||
:language: xml | ||
:lines: 2- | ||
:start-after: Interface-xml-start | ||
:end-before: Interface-xml-end | ||
|
||
See the :ref:`voresource_api` documentation for more information on the available models and types. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
"""Snippets for TAPRegExt models and XML serialization.""" | ||
from vo_models.tapregext.models import ( | ||
DataLimits, | ||
DataModelType, | ||
Language, | ||
LanguageFeature, | ||
LanguageFeatureList, | ||
OutputFormat, | ||
TableAccess, | ||
TimeLimits, | ||
Version, | ||
) | ||
|
||
# pylint: disable=invalid-name | ||
|
||
# [TableAccess-model-start] | ||
table_access_model = TableAccess( | ||
data_model=[DataModelType(value="VOTable", ivo_id="ivo://ivoa.net/std/VOTable")], | ||
language=[ | ||
Language( | ||
name="ADQL", | ||
version=[Version(value="2.0", ivo_id="ivo://ivoa.net/std/ADQL-2.0")], | ||
description="Astronomical Data Query Language", | ||
language_features=[ | ||
LanguageFeatureList( | ||
feature=[ | ||
LanguageFeature(form="Formal notation", description="A description"), | ||
LanguageFeature(form="Informal notation", description="Another description"), | ||
], | ||
type="adql-some-feature", | ||
) | ||
], | ||
) | ||
], | ||
output_format=[ | ||
OutputFormat( | ||
mime="application/x-votable+xml", | ||
alias=["VOTABLE"], | ||
) | ||
], | ||
retention_period=TimeLimits(default=10, hard=100), | ||
output_limit=DataLimits( | ||
default={"value": 10, "unit": "row"}, | ||
hard={"value": 100, "unit": "row"}, | ||
), | ||
) | ||
# [TableAccess-model-end] | ||
|
||
# [TableAccess-xml-start] | ||
table_access_xml = """ | ||
<capability standardID="ivo://ivoa.net/std/TAP"> | ||
<dataModel ivo-id='ivo://ivoa.net/std/VOTable'>VOTable</dataModel> | ||
<language> | ||
<name>ADQL</name> | ||
<version ivo-id="ivo://ivoa.net/std/ADQL-2.0">2.0</version> | ||
<description>Astronomical Data Query Language</description> | ||
<languageFeatures type="adql-some-feature"> | ||
<feature> | ||
<form>Formal notation</form> | ||
<description>A description</description> | ||
</feature> | ||
<feature> | ||
<form>Informal notation</form> | ||
<description>Another description</description> | ||
</feature> | ||
</languageFeatures> | ||
</language> | ||
<outputFormat> | ||
<mime>application/x-votable+xml</mime> | ||
<alias>VOTABLE</alias> | ||
</outputFormat> | ||
<retentionPeriod> | ||
<default>10</default> | ||
<hard>100</hard> | ||
</retentionPeriod> | ||
<outputLimit> | ||
<default unit="row">10</default> | ||
<hard unit="row">100</hard> | ||
</outputLimit> | ||
</capability> | ||
""" # [TableAccess-xml-end] |
Oops, something went wrong.