voruby 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +339 -0
- data/REQUIREMENTS +4 -0
- data/Rakefile.rb +296 -0
- data/lib/voruby/adql/adql.rb +2735 -0
- data/lib/voruby/adql/ext.rb +15 -0
- data/lib/voruby/adql/loader.rb +5 -0
- data/lib/voruby/adql/operations.rb +54 -0
- data/lib/voruby/adql/parser.rb +160 -0
- data/lib/voruby/adql/transforms.rb +573 -0
- data/lib/voruby/ext.rb +17 -0
- data/lib/voruby/loader.rb +4 -0
- data/lib/voruby/misc/propertyfile.rb +36 -0
- data/lib/voruby/plastic/applications.rb +174 -0
- data/lib/voruby/plastic/constants.rb +30 -0
- data/lib/voruby/plastic/loader.rb +10 -0
- data/lib/voruby/plastic/plastic.rb +1 -0
- data/lib/voruby/resources/conesearch/conesearch.rb +9 -0
- data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +55 -0
- data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +50 -0
- data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +72 -0
- data/lib/voruby/resources/conesearch/loader.rb +4 -0
- data/lib/voruby/resources/loader.rb +50 -0
- data/lib/voruby/resources/nodes.rb +190 -0
- data/lib/voruby/resources/openskynode/loader.rb +4 -0
- data/lib/voruby/resources/openskynode/openskynode.rb +9 -0
- data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +54 -0
- data/lib/voruby/resources/sia/loader.rb +5 -0
- data/lib/voruby/resources/sia/sia.rb +9 -0
- data/lib/voruby/resources/sia/sia_v0_6.rb +90 -0
- data/lib/voruby/resources/sia/sia_v0_7.rb +89 -0
- data/lib/voruby/resources/sia/sia_v1_0.rb +122 -0
- data/lib/voruby/resources/stsci.rb +59 -0
- data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +195 -0
- data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +158 -0
- data/lib/voruby/resources/vodataservice/loader.rb +5 -0
- data/lib/voruby/resources/vodataservice/vodataservice.rb +9 -0
- data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +189 -0
- data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +163 -0
- data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +221 -0
- data/lib/voruby/resources/voregistry/loader.rb +4 -0
- data/lib/voruby/resources/voregistry/voregistry.rb +9 -0
- data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +40 -0
- data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +30 -0
- data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +86 -0
- data/lib/voruby/resources/voresource/loader.rb +17 -0
- data/lib/voruby/resources/voresource/voresource.rb +9 -0
- data/lib/voruby/resources/voresource/voresource_v0_10.rb +322 -0
- data/lib/voruby/resources/voresource/voresource_v0_9.rb +405 -0
- data/lib/voruby/resources/voresource/voresource_v1_0.rb +230 -0
- data/lib/voruby/services/ext.rb +11 -0
- data/lib/voruby/services/gestalt/footprint.rb +95 -0
- data/lib/voruby/services/gestalt/wcs_fixer.rb +105 -0
- data/lib/voruby/services/gestalt/wesix.rb +155 -0
- data/lib/voruby/services/loader.rb +7 -0
- data/lib/voruby/services/registry/registry.rb +53 -0
- data/lib/voruby/services/resolver/resolver.rb +35 -0
- data/lib/voruby/sesame/loader.rb +6 -0
- data/lib/voruby/sesame/sesame_v1_0.rb +64 -0
- data/lib/voruby/simple/loader.rb +6 -0
- data/lib/voruby/simple/parameters.rb +196 -0
- data/lib/voruby/simple/sap.rb +446 -0
- data/lib/voruby/spacetime/loader.rb +3 -0
- data/lib/voruby/spacetime/spacetime.rb +607 -0
- data/lib/voruby/stc/coords_v1_20.rb +900 -0
- data/lib/voruby/stc/loader.rb +55 -0
- data/lib/voruby/stc/region_v1_20.rb +274 -0
- data/lib/voruby/stc/stc_v1_20.rb +1196 -0
- data/lib/voruby/util.rb +27 -0
- data/lib/voruby/voevent/loader.rb +7 -0
- data/lib/voruby/voevent/voevent_v1_0.rb +213 -0
- data/lib/voruby/voevent/voevent_v1_1.rb +196 -0
- data/lib/voruby/votables/chandra.rb +410 -0
- data/lib/voruby/votables/cnoc.rb +393 -0
- data/lib/voruby/votables/data.rb +179 -0
- data/lib/voruby/votables/galex.rb +390 -0
- data/lib/voruby/votables/hst.rb +391 -0
- data/lib/voruby/votables/int.rb +391 -0
- data/lib/voruby/votables/libxml_parser.rb +411 -0
- data/lib/voruby/votables/libxml_votable.rb +67 -0
- data/lib/voruby/votables/loader.rb +10 -0
- data/lib/voruby/votables/meta.rb +763 -0
- data/lib/voruby/votables/misc.rb +51 -0
- data/lib/voruby/votables/nsa.rb +393 -0
- data/lib/voruby/votables/nsar3.rb +410 -0
- data/lib/voruby/votables/rexml_parser.rb +408 -0
- data/lib/voruby/votables/rexml_votable.rb +67 -0
- data/lib/voruby/votables/sdss.rb +393 -0
- data/lib/voruby/votables/transforms.rb +388 -0
- data/lib/voruby/votables/tree.rb +45 -0
- data/lib/voruby/votables/types.rb +391 -0
- data/lib/voruby/votables/votable.rb +630 -0
- data/lib/voruby/votables/xmm.rb +394 -0
- data/test/adql/test1.adql +49 -0
- data/test/adql/test2.adql +51 -0
- data/test/adql/test3.adql +81 -0
- data/test/adql/test4.adql +53 -0
- data/test/adql/test5.adql +55 -0
- data/test/adql/test6.adql +18 -0
- data/test/adql/test7.adql +48 -0
- data/test/adql/unittest.rb +1672 -0
- data/test/plastic/test.rb +44 -0
- data/test/plastic/test.vot +5385 -0
- data/test/plastic/unittest.rb +66 -0
- data/test/resources/conesearch/conesearch_v0_3.xml +31 -0
- data/test/resources/conesearch/conesearch_v1_0.xml +86 -0
- data/test/resources/conesearch/unittest_v0_3.rb +22 -0
- data/test/resources/conesearch/unittest_v1_0.rb +24 -0
- data/test/resources/openskynode/open_sky_node_v0_1.xml +32 -0
- data/test/resources/openskynode/unittest_v0_1.rb +31 -0
- data/test/resources/sia/simple_image_access_v0_7.xml +36 -0
- data/test/resources/sia/simple_image_access_v1_0.xml +122 -0
- data/test/resources/sia/unittest_v0_7.rb +24 -0
- data/test/resources/sia/unittest_v1_0.rb +29 -0
- data/test/resources/stsci.xml +336 -0
- data/test/resources/unittest_stsci.rb +25 -0
- data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +128 -0
- data/test/resources/vodataservice/data_collection_resource_v0_5.xml +54 -0
- data/test/resources/vodataservice/data_collection_resource_v1_0.xml +117 -0
- data/test/resources/vodataservice/data_service_resource_v1_0.xml +115 -0
- data/test/resources/vodataservice/sky_service_resource_v0_10.xml +45 -0
- data/test/resources/vodataservice/table_service_resource_v1_0.xml +122 -0
- data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +60 -0
- data/test/resources/vodataservice/unittest_v0_5.rb +126 -0
- data/test/resources/vodataservice/unittest_v1_0.rb +151 -0
- data/test/resources/voregistry/authority_resource_v0_3.xml +20 -0
- data/test/resources/voregistry/authority_resource_v1_0.xml +82 -0
- data/test/resources/voregistry/registry_service_v0_3.xml +20 -0
- data/test/resources/voregistry/registry_service_v1_0.xml +107 -0
- data/test/resources/voregistry/unittest_v0_3.rb +31 -0
- data/test/resources/voregistry/unittest_v1_0.rb +34 -0
- data/test/resources/voresource/organisation_resource_v1_0.xml +90 -0
- data/test/resources/voresource/resource_organisation_v0_10.xml +22 -0
- data/test/resources/voresource/resource_service_v0_10.xml +19 -0
- data/test/resources/voresource/resource_v0_10.xml +19 -0
- data/test/resources/voresource/resource_v1_0.xml +79 -0
- data/test/resources/voresource/service_resource_v1_0.xml +91 -0
- data/test/resources/voresource/unittest_v0_10.rb +61 -0
- data/test/resources/voresource/unittest_v0_9.rb +4 -0
- data/test/resources/voresource/unittest_v1_0.rb +190 -0
- data/test/services/gestalt/unittest.rb +74 -0
- data/test/services/registry/unittest.rb +34 -0
- data/test/services/resolver/unittest.rb +38 -0
- data/test/simple/unittest.rb +46 -0
- data/test/spacetime/unittest.rb +39 -0
- data/test/stc/catalog_entry_location_v1_20.xml +112 -0
- data/test/stc/obs_data_location_v1_20.xml +108 -0
- data/test/stc/search_location_v1_20.xml +54 -0
- data/test/stc/stc_resource_profile_v1_20.xml +60 -0
- data/test/stc/unittest_v1_20.rb +620 -0
- data/test/voevent/unittest_v1_0.rb +79 -0
- data/test/voevent/unittest_v1_1.rb +70 -0
- data/test/voevent/voevent_v1_0.xml +96 -0
- data/test/voevent/voevent_v1_1.xml +76 -0
- data/test/votables/test.vot +366 -0
- data/test/votables/unittest.rb +54 -0
- metadata +256 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'voruby/resources/openskynode/loader'
|
2
|
+
|
3
|
+
require 'voruby/resources/voresource/voresource_v0_10'
|
4
|
+
require 'voruby/resources/vodataservice/vodataservice_v0_5'
|
5
|
+
|
6
|
+
include VORuby::Resources::VOResource::V0_10
|
7
|
+
include VORuby::Resources::VODataService::V0_5
|
8
|
+
|
9
|
+
module VORuby
|
10
|
+
module Resources
|
11
|
+
module OpenSkyNode
|
12
|
+
module V0_1
|
13
|
+
|
14
|
+
# Forward declarations
|
15
|
+
class OpenSkyNode < TabularSkyService; end
|
16
|
+
class OSNCapRestriction < Capability; end
|
17
|
+
class OSNCapability < OSNCapRestriction; end
|
18
|
+
|
19
|
+
|
20
|
+
# Registry data for the standard openskynode service.
|
21
|
+
class OpenSkyNode
|
22
|
+
object_node :capability, 'capability', :class => OSNCapability, :optional => false
|
23
|
+
end
|
24
|
+
|
25
|
+
# An abstract capability that sets the standardURL to the OpenSkyNode standard definition.
|
26
|
+
class OSNCapRestriction
|
27
|
+
object_node :standard_id, 'StandardID', :class => IdentifierURI, :optional => true
|
28
|
+
object_node :standard_url, 'StandardURL', :class => AnyURI, :optional => true,
|
29
|
+
:default_value => 'http://www.ivoa.net/internal/IVOA/IvoaVOQL/SkyNodeInterface-0.7.4.pdf'
|
30
|
+
end
|
31
|
+
|
32
|
+
# The capabilities of an OpenSkyNode implementation. It includes required parameters for OpenSkyQuery portal.
|
33
|
+
class OSNCapability
|
34
|
+
# indicates level of compliance: full, basic, partial for OSN. A full node
|
35
|
+
# must implement all the methods of the Spec including ExecutePlan.
|
36
|
+
# A Basic node only needs performQuery, tables, columns and availability.
|
37
|
+
text_node :compliance, 'Compliance', :optional => false
|
38
|
+
# table name which contains the main positions and key - used by the query builder on the portal
|
39
|
+
text_node :primary_table, 'PrimaryTable', :optional => false
|
40
|
+
# the primary key of the primary Table - used by the query builder on the portal
|
41
|
+
text_node :primary_key, 'PrimaryKey', :optional => false
|
42
|
+
|
43
|
+
# the latitude Earth position of archive (GPS)
|
44
|
+
numeric_node :latitude, 'Latitude', :optional => false
|
45
|
+
# the longitude Earth position of archive (GPS)
|
46
|
+
numeric_node :longitude, 'Longitude', :optional => false
|
47
|
+
# maximum records the service will return
|
48
|
+
numeric_node :max_records, 'MaxRecords', :optional => false
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'voruby/resources/sia/loader'
|
2
|
+
|
3
|
+
require 'voruby/resources/voresource/voresource_v0_9'
|
4
|
+
require 'voruby/resources/vodataservice/vodataservice_v0_3'
|
5
|
+
|
6
|
+
include VORuby::Resources::VOResource::V0_9
|
7
|
+
include VORuby::Resources::VODataService::V0_3
|
8
|
+
|
9
|
+
module VORuby
|
10
|
+
module Resources
|
11
|
+
module SIA
|
12
|
+
module V0_6
|
13
|
+
|
14
|
+
# Forward declarations
|
15
|
+
class SimpleImageAccessType < Capability; end
|
16
|
+
class SimpleImageAccess < SimpleImageAccessType; end
|
17
|
+
class MaxRecords; end
|
18
|
+
class MaxFileSize; end
|
19
|
+
class MaxQueryRegionSize; end
|
20
|
+
class MaxImageExtent; end
|
21
|
+
class MaxImageSize; end
|
22
|
+
class ImageServiceType; end
|
23
|
+
|
24
|
+
# The capabilities of an SIA implementation. It includes
|
25
|
+
# the listing of the columns that appear in image query
|
26
|
+
# output VOTable and SIA-specific metadata.
|
27
|
+
class SimpleImageAccess; end
|
28
|
+
class SimpleImageAccessType
|
29
|
+
object_node :image_service_type, 'ImageServiceType', :class => ImageServiceType, :optional => false
|
30
|
+
object_node :max_query_region_size, 'MaxQueryRegionSize', :class => MaxQueryRegionSize, :optional => false
|
31
|
+
object_node :max_image_extent, 'MaxImageExtent', :class => MaxImageExtent, :optional => false
|
32
|
+
object_node :max_image_size, 'MaxImageSize', :class => MaxImageSize, :optional => false
|
33
|
+
object_node :max_file_size, 'MaxFileSize', :class => MaxFileSize, :optional => false
|
34
|
+
object_node :max_records, 'MaxRecords', :class => MaxRecords, :optional => false
|
35
|
+
end
|
36
|
+
|
37
|
+
# The largest number of records that the Image Query web method will return.
|
38
|
+
class MaxRecords
|
39
|
+
include XML::Mapping
|
40
|
+
|
41
|
+
numeric_node :value, '', :optional => false
|
42
|
+
end
|
43
|
+
|
44
|
+
# The maximum image file size in bytes.
|
45
|
+
class MaxFileSize
|
46
|
+
include XML::Mapping
|
47
|
+
|
48
|
+
numeric_node :value, '', :optional => false
|
49
|
+
end
|
50
|
+
|
51
|
+
# The maximum image query region size, expressed in decimal
|
52
|
+
# degrees. A value of 360 degrees indicates that there is no limit
|
53
|
+
# and the entire data collection (entire sky) can be queried.
|
54
|
+
class MaxQueryRegionSize
|
55
|
+
include XML::Mapping
|
56
|
+
|
57
|
+
numeric_node :long, 'long', :optional => false
|
58
|
+
numeric_node :lat, 'lat', :optional => false
|
59
|
+
end
|
60
|
+
|
61
|
+
# The maximum image query region size, expressed in decimal
|
62
|
+
# degrees. A value of 360 degrees indicates that there is no limit
|
63
|
+
# and the entire data collection (entire sky) can be requested.
|
64
|
+
class MaxImageExtent
|
65
|
+
include XML::Mapping
|
66
|
+
|
67
|
+
numeric_node :long, 'long', :optional => false
|
68
|
+
numeric_node :lat, 'lat', :optional => false
|
69
|
+
end
|
70
|
+
|
71
|
+
# The largest image (in terms of pixels) that can be requested.
|
72
|
+
class MaxImageSize
|
73
|
+
include XML::Mapping
|
74
|
+
|
75
|
+
numeric_node :long, 'long', :optional => false
|
76
|
+
numeric_node :lat, 'lat', :optional => false
|
77
|
+
end
|
78
|
+
|
79
|
+
# The class of image service: Cutout, Mosaic, Atlas, Pointed.
|
80
|
+
class ImageServiceType
|
81
|
+
include XML::Mapping
|
82
|
+
|
83
|
+
text_enumeration_node :value, '', :optional => false,
|
84
|
+
:choices => ['Cutout', 'Mosaic', 'Atlas', 'Pointed']
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'voruby/resources/sia/loader'
|
2
|
+
|
3
|
+
require 'voruby/resources/voresource/voresource_v0_10'
|
4
|
+
require 'voruby/resources/vodataservice/vodataservice_v0_5'
|
5
|
+
|
6
|
+
include VORuby::Resources::VOResource::V0_10
|
7
|
+
include VORuby::Resources::VODataService::V0_5
|
8
|
+
|
9
|
+
module VORuby
|
10
|
+
module Resources
|
11
|
+
module SIA
|
12
|
+
module V0_7
|
13
|
+
|
14
|
+
# Forward declarations
|
15
|
+
class SimpleImageAccess < TabularSkyService; end
|
16
|
+
class SIACapRestriction < Capability; end
|
17
|
+
class SIACapability < SIACapRestriction; end
|
18
|
+
class SkySize; end
|
19
|
+
class ImageSize; end
|
20
|
+
class ImageServiceType; end
|
21
|
+
|
22
|
+
# The capabilities of an SIA implementation. It includes
|
23
|
+
# the listing of the columns that appear in image query
|
24
|
+
# output VOTable and SIA-specific metadata.
|
25
|
+
class SimpleImageAccess
|
26
|
+
# a description of the behavior and limitations of the SIA implementation
|
27
|
+
object_node :capability, 'capability', :class => SIACapability, :optional => false
|
28
|
+
end
|
29
|
+
|
30
|
+
# An abstract capability that sets the standardURL to the ConeSearch standard definition,
|
31
|
+
class SIACapRestriction
|
32
|
+
object_node :standard_id, '@standardID', :class => IdentifierURI, :optional => true
|
33
|
+
object_node :standard_url, '@standardURL', :class => AnyURI, :optional => true,
|
34
|
+
:default_value => 'http://www.us-vo.org/metadata/sia.html'
|
35
|
+
end
|
36
|
+
|
37
|
+
# The capabilities of an SIA implementation.
|
38
|
+
class SIACapability
|
39
|
+
# the class of image service: Cutout, Mosaic, Atlas, Pointed
|
40
|
+
object_node :image_service_type, 'imageServiceType', :class => ImageServiceType, :optional => false
|
41
|
+
# the maximum image query region size, expressed in
|
42
|
+
# decimal degrees. A value of 360 degrees indicates that
|
43
|
+
# there is no limit and the entire data collection
|
44
|
+
# (entire sky) can be queried.
|
45
|
+
object_node :max_query_region_size, 'maxQueryRegionSize', :class => SkySize, :optional => false
|
46
|
+
# the maximum image query region size, expressed in
|
47
|
+
# decimal degrees. A value of 360 degrees indicates
|
48
|
+
# that there is no limit and the entire data collection
|
49
|
+
# (entire sky) can be requested.
|
50
|
+
object_node :max_image_extent, 'maxImageExtent', :class => SkySize, :optional => false
|
51
|
+
# the largest image (in terms of pixels) that can be requested.
|
52
|
+
object_node :max_image_size, 'maxImageSize', :class => ImageSize, :optional => false
|
53
|
+
|
54
|
+
# the maximum image file size in bytes
|
55
|
+
numeric_node :max_file_size, 'maxFileSize', :optional => false
|
56
|
+
# the largest number of records that the Image Query web method will return
|
57
|
+
numeric_node :max_records, 'maxRecords', :optional => false
|
58
|
+
end
|
59
|
+
|
60
|
+
class SkySize
|
61
|
+
include XML::Mapping
|
62
|
+
|
63
|
+
# the maximum size in the longitude (R.A.) direction
|
64
|
+
numeric_node :long, 'long', :optional => false
|
65
|
+
# the maximum size in the latitdude (Dec.) direction
|
66
|
+
numeric_node :lat, 'lat', :optional => false
|
67
|
+
end
|
68
|
+
|
69
|
+
class ImageSize
|
70
|
+
include XML::Mapping
|
71
|
+
|
72
|
+
# the image size in the longitude (R.A.) direction in pixels
|
73
|
+
numeric_node :long, 'long', :optional => false
|
74
|
+
# the image size in the latitdude (Dec.) direction in pixels
|
75
|
+
numeric_node :lat, 'lat', :optional => false
|
76
|
+
end
|
77
|
+
|
78
|
+
# the class of image service: Cutout, Mosaic, Atlas, Pointed
|
79
|
+
class ImageServiceType
|
80
|
+
include XML::Mapping
|
81
|
+
|
82
|
+
text_enumeration_node :value, '', :optional => false,
|
83
|
+
:choices => ['Cutout', 'Mosaic', 'Atlas', 'Pointed']
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
require 'voruby/resources/sia/loader'
|
2
|
+
|
3
|
+
require 'voruby/resources/voresource/voresource_v1_0'
|
4
|
+
require 'voruby/resources/vodataservice/vodataservice_v1_0'
|
5
|
+
|
6
|
+
include VORuby::Resources::VOResource::V1_0
|
7
|
+
include VORuby::Resources::VODataService::V1_0
|
8
|
+
|
9
|
+
module VORuby
|
10
|
+
module Resources
|
11
|
+
module SIA
|
12
|
+
module V1_0
|
13
|
+
|
14
|
+
# Forward declarations
|
15
|
+
class SIACapRestriction < Capability; end
|
16
|
+
class SimpleImageAccess < SIACapRestriction; end
|
17
|
+
class SkySize; end
|
18
|
+
class SkyPos; end
|
19
|
+
class ImageSize; end
|
20
|
+
class ImageServiceType; end
|
21
|
+
class Query; end
|
22
|
+
|
23
|
+
# An abstract capability that fixes the standardID to the IVOA ID for the ConeSearch standard.
|
24
|
+
class SIACapRestriction
|
25
|
+
text_node :description, 'description', :optional => true
|
26
|
+
text_node :standard_id, 'standardID', :class => IdentifierURI, :optional => false,
|
27
|
+
:default_value => 'ivo://ivoa.net/std/SIA'
|
28
|
+
|
29
|
+
array_node :validation_levels, 'validationLevel', :class => Validation, :optional => true, :default_value => []
|
30
|
+
array_node :interfaces, 'interface', :class => Interface, :optional => true, :default_value => []
|
31
|
+
|
32
|
+
def standard_id
|
33
|
+
id = IdentifierURI.new
|
34
|
+
id.value = 'ivo://ivoa.net/std/SIA'
|
35
|
+
|
36
|
+
return id
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# The capabilities of an SIA implementation.
|
41
|
+
class SimpleImageAccess
|
42
|
+
# the class of image service: Cutout, Mosaic, Atlas, Pointed
|
43
|
+
object_node :image_service_type, 'imageServiceType', :class => ImageServiceType, :optional => false
|
44
|
+
# the maximum image query region size, expressed in
|
45
|
+
# decimal degrees. A value of 360 degrees indicates that
|
46
|
+
# there is no limit and the entire data collection
|
47
|
+
# (entire sky) can be queried.
|
48
|
+
object_node :max_query_region_size, 'maxQueryRegionSize', :class => SkySize, :optional => false
|
49
|
+
# the maximum image query region size, expressed in
|
50
|
+
# decimal degrees. A value of 360 degrees indicates
|
51
|
+
# that there is no limit and the entire data collection
|
52
|
+
# (entire sky) can be requested.
|
53
|
+
object_node :max_image_extent, 'maxImageExtent', :class => SkySize, :optional => false
|
54
|
+
# the largest image (in terms of pixels) that can be requested
|
55
|
+
object_node :max_image_size, 'maxImageSize', :class => ImageSize, :optional => false
|
56
|
+
# a set of query parameters that is expected to produce at least one matched record which
|
57
|
+
# can be used to test the service.
|
58
|
+
object_node :test_query, 'testQuery', :class => Query, :optional => true
|
59
|
+
|
60
|
+
# the maximum image file size in bytes
|
61
|
+
numeric_node :max_file_size, 'maxFileSize', :optional => false
|
62
|
+
numeric_node :max_records, 'maxRecords', :optional => false
|
63
|
+
end
|
64
|
+
|
65
|
+
class SkySize
|
66
|
+
include XML::Mapping
|
67
|
+
|
68
|
+
# the maximum size in the longitude (R.A.) direction
|
69
|
+
numeric_node :long, 'long', :optional => false
|
70
|
+
# the maximum size in the latitdude (Dec.) direction
|
71
|
+
numeric_node :lat, 'lat', :optional => false
|
72
|
+
end
|
73
|
+
|
74
|
+
class SkyPos
|
75
|
+
include XML::Mapping
|
76
|
+
|
77
|
+
# the sky position in the longitude (R.A.) direction
|
78
|
+
numeric_node :long, 'long', :optional => false
|
79
|
+
# the sky position in the latitdude (Dec.) direction
|
80
|
+
numeric_node :lat, 'lat', :optional => false
|
81
|
+
end
|
82
|
+
|
83
|
+
class ImageSize
|
84
|
+
include XML::Mapping
|
85
|
+
|
86
|
+
# the image size in the longitude (R.A.) direction in pixels
|
87
|
+
numeric_node :long, 'long', :optional => false
|
88
|
+
# the image size in the latitdude (Dec.) direction in pixels
|
89
|
+
numeric_node :lat, 'lat', :optional => false
|
90
|
+
end
|
91
|
+
|
92
|
+
# The class of image service: Cutout, Mosaic, Atlas, Pointed.
|
93
|
+
class ImageServiceType
|
94
|
+
include XML::Mapping
|
95
|
+
|
96
|
+
text_enumeration_node :value, '', :optional => false,
|
97
|
+
:choices => ['Cutout', 'Mosaic', 'Atlas', 'Pointed']
|
98
|
+
end
|
99
|
+
|
100
|
+
# A query to be sent to the service.
|
101
|
+
class Query
|
102
|
+
include XML::Mapping
|
103
|
+
|
104
|
+
# the right ascension of the search cone's center in decimal degrees
|
105
|
+
object_node :pos, 'pos', :class => SkyPos, :optional => true
|
106
|
+
# the declination of the search cone's center in decimal degrees
|
107
|
+
object_node :size, 'size', :class => SkySize, :optional => true
|
108
|
+
|
109
|
+
# the verbosity level to use where 0 means the bare
|
110
|
+
# minimum set of columns and 3 means the full set of available columns
|
111
|
+
numeric_node :verb, 'verb', :optional => true
|
112
|
+
|
113
|
+
# any extra (particularly non-standard) parameters that must
|
114
|
+
# be provided (apart from what is part of base URL given by
|
115
|
+
# the accessURL element).
|
116
|
+
text_node :extras, 'extras', :optional => true
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'xml/mapping'
|
3
|
+
|
4
|
+
require 'voruby/resources/loader'
|
5
|
+
|
6
|
+
# STScI's registry uses the following resource versions...
|
7
|
+
require 'voruby/resources/voresource/voresource_v0_10'
|
8
|
+
require 'voruby/resources/vodataservice/vodataservice_v0_5'
|
9
|
+
require 'voruby/resources/voregistry/voregistry_v0_3'
|
10
|
+
require 'voruby/resources/conesearch/conesearch_v0_3'
|
11
|
+
require 'voruby/resources/openskynode/openskynode_v0_1'
|
12
|
+
require 'voruby/resources/sia/sia_v0_7'
|
13
|
+
|
14
|
+
module VORuby
|
15
|
+
module Resources
|
16
|
+
module STScI
|
17
|
+
|
18
|
+
# Forward declarations
|
19
|
+
class ArrayOfResource; end
|
20
|
+
|
21
|
+
$ResourceUnmarshaller = Resources::namespace_dispatcher(
|
22
|
+
'VORuby::Resources::VOResource::V0_10', 'Resource', Resource
|
23
|
+
)
|
24
|
+
|
25
|
+
class ArrayOfResource
|
26
|
+
include XML::Mapping
|
27
|
+
|
28
|
+
array_node :resources, 'Resource', :unmarshaller => $ResourceUnmarshaller, :optional => false, :default_value => []
|
29
|
+
end
|
30
|
+
|
31
|
+
# STScI's registry has some quirks which we'd like to clean up a bit.
|
32
|
+
def self.clean(doc)
|
33
|
+
return STScI::remove_empty_elements(STScI::remove_invalid_ivo_ids(doc))
|
34
|
+
end
|
35
|
+
|
36
|
+
# STScI occasionally puts 'NOT PROVIDED' or '' in the ivo-id attribute of (in particular) the publisher element which is not valid.
|
37
|
+
# This removes the ivo-id in that situation.
|
38
|
+
def self.remove_invalid_ivo_ids(doc)
|
39
|
+
doc.elements.each('//*[@ivo-id="NOT PROVIDED" or @ivo-id=""]'){ |el|
|
40
|
+
el.delete_attribute('ivo-id')
|
41
|
+
}
|
42
|
+
|
43
|
+
return doc
|
44
|
+
end
|
45
|
+
|
46
|
+
# Sometimes STScI puts empty elements (no attributes at all) into its resource definitions
|
47
|
+
# (particularly in the curation element). I don't think this is valid--if an element exists at all, it
|
48
|
+
# should have *some* kind of content. Therefore I remove all elements who have no attributes and no children.
|
49
|
+
def self.remove_empty_elements(doc)
|
50
|
+
doc.elements.each('//*'){ |el|
|
51
|
+
el.parent.delete_element(el) if !el.has_attributes? and !el.has_elements? and !el.has_text?
|
52
|
+
}
|
53
|
+
|
54
|
+
return doc
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
require 'voruby/resources/vodataservice/loader'
|
2
|
+
|
3
|
+
module VORuby
|
4
|
+
module Resources
|
5
|
+
module VODataServiceCoverage
|
6
|
+
module V0_2
|
7
|
+
|
8
|
+
# Forward declarations
|
9
|
+
class Coverage < CoverageType; end
|
10
|
+
class SpatialType; end
|
11
|
+
class Spatial < SpatialType; end
|
12
|
+
class RegionType; end
|
13
|
+
class Region < RegionType; end
|
14
|
+
class AllSky < RegionType; end
|
15
|
+
class CoordFrameType; end
|
16
|
+
class CoordFrame < CoordFrameType; end
|
17
|
+
class CoordRangeType < RegionType; end
|
18
|
+
class CircleRegionType < RegionType; end
|
19
|
+
class CircleRegion < CirlceRegionType; end
|
20
|
+
class PositionType; end
|
21
|
+
class CenterPosition < PositionType; end
|
22
|
+
class SpatialResolution; end
|
23
|
+
class RegionOfRegard; end
|
24
|
+
class TemporalType; end
|
25
|
+
class Temporal < TemporalType; end
|
26
|
+
class StartTime; end
|
27
|
+
class EndTime; end
|
28
|
+
class TemporalResolution; end
|
29
|
+
class SpectralType; end
|
30
|
+
class Spectral < SpectralType; end
|
31
|
+
class WavebandType; end
|
32
|
+
class Waveband < WavebandType; end
|
33
|
+
class WavelengthRangeType; end
|
34
|
+
class WavelengthRange < WavelengthRangeType; end
|
35
|
+
class SpectralResolution; end
|
36
|
+
class MinMaxRange; end
|
37
|
+
|
38
|
+
# Extent of the content of the resource over space, time, and frequency.
|
39
|
+
class Coverage; end
|
40
|
+
class CoverageType
|
41
|
+
include XML::Mapping
|
42
|
+
|
43
|
+
object_node :spatial, 'Spatial', :class => Spatial, :optional => true
|
44
|
+
object_node :spectral, 'Spectral', :class => Spectral, :optional => true
|
45
|
+
object_node :temporal, 'Temporal', :class => Temporal, :optional => true
|
46
|
+
end
|
47
|
+
|
48
|
+
# The spatial coverage of a resource.
|
49
|
+
class Spatial; end
|
50
|
+
class SpatialType
|
51
|
+
include XML::Mapping
|
52
|
+
|
53
|
+
object_node :spatial_resolution, 'SpatialResolution', :class => SpatialResolution, :optional => true
|
54
|
+
object_node :region_of_regard, 'RegionOfRegard', :class => RegionOfRegard, :optional => true
|
55
|
+
|
56
|
+
array_node :regions, 'Region', :class => Region, :optional => true, :default_value => []
|
57
|
+
end
|
58
|
+
|
59
|
+
# A coverage area of the sky.
|
60
|
+
class Region; end
|
61
|
+
class RegionType
|
62
|
+
include XML::Mapping
|
63
|
+
end
|
64
|
+
|
65
|
+
# A coverage area covering the entire sky.
|
66
|
+
class AllSky; end
|
67
|
+
|
68
|
+
# A coordinate system frame.
|
69
|
+
class CoordFrame; end
|
70
|
+
class CoordFrameType
|
71
|
+
include XML::Mapping
|
72
|
+
|
73
|
+
text_enumeration_node :value, '', :optional => false,
|
74
|
+
:choices => ['ICRS', 'FK5', 'FK4', 'ECL', 'GAL', 'SGAL']
|
75
|
+
end
|
76
|
+
|
77
|
+
# A coverage area of the sky characterized by a range of longitude and latitude.
|
78
|
+
class CoordRange; end
|
79
|
+
class CoordRangeType
|
80
|
+
object_node :coord_frame, 'CoordFrame', :class => CoordFrame, :optional => false
|
81
|
+
object_node :long, 'long', :class => MinMaxRange, :optional => false
|
82
|
+
object_node :lat, 'lat', :class => MinMaxRange, :optional => false
|
83
|
+
end
|
84
|
+
|
85
|
+
class MinMaxRange
|
86
|
+
require XML::Mapping
|
87
|
+
|
88
|
+
numeric_node :min, 'min', :optional => false
|
89
|
+
numeric_node :max, 'max', :optional => false
|
90
|
+
end
|
91
|
+
|
92
|
+
# A coverage area of the sky characterized by a central position and angular radius.
|
93
|
+
class CircleRegion; end
|
94
|
+
class CircleRegionType
|
95
|
+
numeric_node :radius, 'radius', :optional => false
|
96
|
+
|
97
|
+
object_node :coord_frame, 'CoordFrame', :class => CoordFrame, :optional => false
|
98
|
+
object_node :center_position, 'CenterPosition', :class => CenterPosition, :optional => false
|
99
|
+
end
|
100
|
+
|
101
|
+
# The position of the center of some region of the sky.
|
102
|
+
class CenterPosition; end
|
103
|
+
class PositionType
|
104
|
+
include XML::Mapping
|
105
|
+
|
106
|
+
numeric_node :long, 'long', :optional => false
|
107
|
+
numeric_node :lat, 'lat', :optional => false
|
108
|
+
end
|
109
|
+
|
110
|
+
# The spatial (angular) resolution that is typical of the observations of interest, in decimal degrees.
|
111
|
+
class SpatialResolution
|
112
|
+
include XML::Mapping
|
113
|
+
|
114
|
+
numeric_node :value, '', :optional => false
|
115
|
+
end
|
116
|
+
|
117
|
+
# The intrinsic size scale, given in arcseconds, associated with data items contained in a resource.
|
118
|
+
class RegionOfRegard
|
119
|
+
include XML::Mapping
|
120
|
+
|
121
|
+
numeric_node :value, '', :optional => false
|
122
|
+
end
|
123
|
+
|
124
|
+
# The temporal coverage of a resource.
|
125
|
+
class Temporal; end
|
126
|
+
class TemporalType
|
127
|
+
include XML::Mapping
|
128
|
+
|
129
|
+
object_node :start_time, 'StartTime', :class => StartTime, :optional => true
|
130
|
+
object_node :end_time, 'EndTime', :class => EndTime, :optional => true
|
131
|
+
object_node :temporal_resolution, 'TemporalResolution', :class => TemporalResolution, :optional => true
|
132
|
+
end
|
133
|
+
|
134
|
+
# The earliest temporal coverage of the resource.
|
135
|
+
class StartTime
|
136
|
+
include XML::Mapping
|
137
|
+
|
138
|
+
date_time_node :value, '', :optional => false
|
139
|
+
end
|
140
|
+
|
141
|
+
# The latest temporal coverage of the resource.
|
142
|
+
class EndTime
|
143
|
+
include XML::Mapping
|
144
|
+
|
145
|
+
date_time_node :value, '', :optional => false
|
146
|
+
end
|
147
|
+
|
148
|
+
# The temporal resolution that is typical of the observations of interest, in seconds.
|
149
|
+
class TemporalResolution
|
150
|
+
include XML::Mapping
|
151
|
+
|
152
|
+
numeric_node :value, '', :optional => false
|
153
|
+
end
|
154
|
+
|
155
|
+
# The spectral coverage of a resource.
|
156
|
+
class Spectral; end
|
157
|
+
class SpectralType
|
158
|
+
include XML::Mapping
|
159
|
+
|
160
|
+
object_node :wavelength_range, 'WavelengthRange', :class => WavelengthRange, :optional => true
|
161
|
+
object_node :spectral_resolution, 'SpectralResolution', :class => SpectralResolution, :optional => true
|
162
|
+
|
163
|
+
array_node :wavebands, 'Waveband', :class => Waveband, :optional => true, :default_value => []
|
164
|
+
end
|
165
|
+
|
166
|
+
# A named spectral region of the electro-magnetic spectrum.
|
167
|
+
class Waveband; end
|
168
|
+
class WavebandType
|
169
|
+
include XML::Mapping
|
170
|
+
|
171
|
+
text_enumeration_node :value, '', :optional => false,
|
172
|
+
:choices => ['Radio', 'Millimeter', 'Infrared', 'Optical', 'UV', 'EUV', 'X-ray', 'Gamma-ray']
|
173
|
+
end
|
174
|
+
|
175
|
+
# A range of the electro-magnetic spectrum specified by a lower and upper wavelength limit.
|
176
|
+
class WavelengthRange; end
|
177
|
+
class WavelengthRangeType
|
178
|
+
include XML::Mapping
|
179
|
+
|
180
|
+
numeric_node :min, 'min', :optional => false
|
181
|
+
numeric_node :max, 'max', :optional => false
|
182
|
+
end
|
183
|
+
|
184
|
+
# The spectral resolution that is typical of the observations of interest, given as a ratio of the wavelength
|
185
|
+
# width (delta-lambda) to the observing wavelength (lambda).
|
186
|
+
class SpectralResolution
|
187
|
+
include XML::Mapping
|
188
|
+
|
189
|
+
numeric_node :value, '', :optional => false
|
190
|
+
end
|
191
|
+
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|