voruby 1.1.1 → 2.0.0

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.
Files changed (257) hide show
  1. data/Rakefile.rb +107 -224
  2. data/lib/misc.rb +1 -0
  3. data/lib/misc/misc.rb +60 -0
  4. data/lib/misc/propertyfile.rb +31 -0
  5. data/lib/symphony.rb +1 -0
  6. data/lib/symphony/symphony.rb +247 -0
  7. data/lib/voruby.rb +186 -0
  8. data/lib/voruby/active_votable/active_votable.rb +468 -347
  9. data/lib/voruby/adql/1.0/adql.rb +2418 -0
  10. data/lib/voruby/adql/support.rb +2 -0
  11. data/lib/voruby/misc.rb +351 -0
  12. data/lib/voruby/misc/connection_monitor.rb +97 -0
  13. data/lib/voruby/misc/libxml_ext.rb +121 -0
  14. data/lib/voruby/misc/rexml_ext.rb +223 -0
  15. data/lib/voruby/resolver/resolver.rb +12 -0
  16. data/lib/voruby/resolver/sesame.rb +299 -0
  17. data/lib/voruby/sky_query/sky_query.rb +192 -0
  18. data/lib/voruby/stc/1.10/coords.rb +2272 -0
  19. data/lib/voruby/stc/1.10/region.rb +892 -0
  20. data/lib/voruby/stc/1.10/stc.rb +3271 -0
  21. data/lib/voruby/stc/1.30/stc.rb +8666 -0
  22. data/lib/voruby/stc/support.rb +2 -0
  23. data/lib/voruby/ucd/ucd.rb +173 -0
  24. data/lib/voruby/voevent/1.1/voevent.rb +1124 -0
  25. data/lib/voruby/voevent/support.rb +5 -0
  26. data/lib/voruby/votable/1.0/votable.rb +1807 -0
  27. data/lib/voruby/votable/1.1/votable.rb +2100 -0
  28. data/lib/voruby/votable/votable.rb +305 -0
  29. data/lib/voruby/wesix/wesix.rb +491 -0
  30. data/lib/voruby/xlink/1.2/xlink.rb +21 -0
  31. data/test/voruby/active_votable/complex.vot +60 -0
  32. data/test/voruby/active_votable/error.vot +6 -0
  33. data/test/voruby/active_votable/large.vot +130040 -0
  34. data/test/voruby/active_votable/simple1.vot +38 -0
  35. data/test/voruby/active_votable/simple2.vot +38 -0
  36. data/test/voruby/active_votable/test.rb +193 -0
  37. data/test/voruby/adql/1.0/adql-alias.sql +1 -0
  38. data/test/voruby/adql/1.0/adql-alias.xml +26 -0
  39. data/test/voruby/adql/1.0/adql-avg.sql +1 -0
  40. data/test/voruby/adql/1.0/adql-avg.xml +31 -0
  41. data/test/voruby/adql/1.0/adql-circle.sql +1 -0
  42. data/test/voruby/adql/1.0/adql-circle.xml +46 -0
  43. data/test/voruby/adql/1.0/adql-expr.sql +1 -0
  44. data/test/voruby/adql/1.0/adql-expr.xml +34 -0
  45. data/test/voruby/adql/1.0/adql-function.sql +1 -0
  46. data/test/voruby/adql/1.0/adql-function.xml +41 -0
  47. data/test/voruby/adql/1.0/adql-group.sql +1 -0
  48. data/test/voruby/adql/1.0/adql-group.xml +51 -0
  49. data/test/voruby/adql/1.0/adql-having.sql +1 -0
  50. data/test/voruby/adql/1.0/adql-having.xml +25 -0
  51. data/test/voruby/adql/1.0/adql-like.sql +1 -0
  52. data/test/voruby/adql/1.0/adql-like.xml +17 -0
  53. data/test/voruby/adql/1.0/adql-order.sql +1 -0
  54. data/test/voruby/adql/1.0/adql-order.xml +37 -0
  55. data/test/voruby/adql/1.0/adql-simple.sql +1 -0
  56. data/test/voruby/adql/1.0/adql-simple.xml +12 -0
  57. data/test/voruby/adql/1.0/adql-top.sql +1 -0
  58. data/test/voruby/adql/1.0/adql-top.xml +33 -0
  59. data/test/voruby/adql/1.0/test.rb +2220 -0
  60. data/test/voruby/misc/test.rb +32 -0
  61. data/test/voruby/resolver/sesame/test.rb +56 -0
  62. data/test/voruby/sky_query/test.rb +107 -0
  63. data/test/voruby/stc/1.10/coords_test.rb +3704 -0
  64. data/test/voruby/stc/1.10/region_test.rb +993 -0
  65. data/test/voruby/stc/1.10/stc-catalog-entry-location.xml +112 -0
  66. data/test/voruby/stc/1.10/stc-obs-data-location.xml +126 -0
  67. data/test/voruby/stc/1.10/stc-region-circle.xml +5 -0
  68. data/test/voruby/stc/1.10/stc-region-convex.xml +11 -0
  69. data/test/voruby/stc/1.10/stc-region-convexhull.xml +5 -0
  70. data/test/voruby/stc/1.10/stc-region-ellipse.xml +7 -0
  71. data/test/voruby/stc/1.10/stc-region-intersection.xml +25 -0
  72. data/test/voruby/stc/1.10/stc-region-negation.xml +7 -0
  73. data/test/voruby/stc/1.10/stc-region-polygon.xml +13 -0
  74. data/test/voruby/stc/1.10/stc-region-sector.xml +6 -0
  75. data/test/voruby/stc/1.10/stc-region-union.xml +25 -0
  76. data/test/voruby/stc/1.10/stc-resource-profile.xml +60 -0
  77. data/test/voruby/stc/1.10/stc-search-location.xml +54 -0
  78. data/test/voruby/stc/1.10/stc_test.rb +4626 -0
  79. data/test/voruby/stc/1.30/stc-catalog-entry-location.xml +210 -0
  80. data/test/voruby/stc/1.30/stc-obs-data-location-arecibo.xml +353 -0
  81. data/test/voruby/stc/1.30/stc-obs-data-location-fits.xml +250 -0
  82. data/test/voruby/stc/1.30/stc-obs-data-location-xlink.xml +63 -0
  83. data/test/voruby/stc/1.30/stc-obs-data-location.xml +216 -0
  84. data/test/voruby/stc/1.30/stc-resource-profile-unusual-ref-pos.xml +39 -0
  85. data/test/voruby/stc/1.30/stc-resource-profile.xml +129 -0
  86. data/test/voruby/stc/1.30/stc-search-location-arecibo.xml +86 -0
  87. data/test/voruby/stc/1.30/stc-search-location.xml +101 -0
  88. data/test/voruby/stc/1.30/test.rb +6274 -0
  89. data/test/voruby/ucd/test.rb +48 -0
  90. data/test/voruby/voevent/1.1/test.rb +812 -0
  91. data/test/{voevent/voevent_v1_1.xml → voruby/voevent/1.1/voevent.xml} +2 -2
  92. data/test/voruby/voregistry/0.3/test.rb +137 -0
  93. data/test/voruby/votable/1.0/test.rb +714 -0
  94. data/test/voruby/votable/1.0/votable.basic.xml +660 -0
  95. data/test/voruby/votable/1.0/votable.html +86 -0
  96. data/test/voruby/votable/1.0/votable.ns.xml +56 -0
  97. data/test/voruby/votable/1.1/test.rb +785 -0
  98. data/test/voruby/votable/1.1/votable.basic.xml +38 -0
  99. data/test/voruby/votable/1.1/votable.html +86 -0
  100. data/test/voruby/votable/1.1/votable.ns.xml +56 -0
  101. data/test/voruby/votable/test.rb +15 -0
  102. data/test/voruby/wesix/test.rb +268 -0
  103. data/test/voruby/wesix/testr.fits +28 -0
  104. metadata +234 -247
  105. data/REQUIREMENTS +0 -6
  106. data/lib/voruby/active_votable/loader.rb +0 -5
  107. data/lib/voruby/adql/adql.rb +0 -2787
  108. data/lib/voruby/adql/ext.rb +0 -14
  109. data/lib/voruby/adql/loader.rb +0 -6
  110. data/lib/voruby/adql/operations.rb +0 -54
  111. data/lib/voruby/adql/parser.rb +0 -160
  112. data/lib/voruby/adql/transforms.rb +0 -573
  113. data/lib/voruby/ext.rb +0 -17
  114. data/lib/voruby/loader.rb +0 -4
  115. data/lib/voruby/misc/propertyfile.rb +0 -36
  116. data/lib/voruby/plastic/applications.rb +0 -174
  117. data/lib/voruby/plastic/constants.rb +0 -30
  118. data/lib/voruby/plastic/loader.rb +0 -10
  119. data/lib/voruby/plastic/plastic.rb +0 -1
  120. data/lib/voruby/resources/conesearch/conesearch.rb +0 -9
  121. data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +0 -55
  122. data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +0 -50
  123. data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +0 -72
  124. data/lib/voruby/resources/conesearch/loader.rb +0 -4
  125. data/lib/voruby/resources/loader.rb +0 -50
  126. data/lib/voruby/resources/nodes.rb +0 -190
  127. data/lib/voruby/resources/openskynode/loader.rb +0 -4
  128. data/lib/voruby/resources/openskynode/openskynode.rb +0 -9
  129. data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +0 -54
  130. data/lib/voruby/resources/sia/loader.rb +0 -5
  131. data/lib/voruby/resources/sia/sia.rb +0 -9
  132. data/lib/voruby/resources/sia/sia_v0_6.rb +0 -90
  133. data/lib/voruby/resources/sia/sia_v0_7.rb +0 -89
  134. data/lib/voruby/resources/sia/sia_v1_0.rb +0 -122
  135. data/lib/voruby/resources/stsci.rb +0 -59
  136. data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +0 -195
  137. data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +0 -158
  138. data/lib/voruby/resources/vodataservice/loader.rb +0 -5
  139. data/lib/voruby/resources/vodataservice/vodataservice.rb +0 -9
  140. data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +0 -189
  141. data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +0 -163
  142. data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +0 -221
  143. data/lib/voruby/resources/voregistry/loader.rb +0 -4
  144. data/lib/voruby/resources/voregistry/voregistry.rb +0 -9
  145. data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +0 -40
  146. data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +0 -30
  147. data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +0 -86
  148. data/lib/voruby/resources/voresource/loader.rb +0 -17
  149. data/lib/voruby/resources/voresource/voresource.rb +0 -9
  150. data/lib/voruby/resources/voresource/voresource_v0_10.rb +0 -327
  151. data/lib/voruby/resources/voresource/voresource_v0_9.rb +0 -405
  152. data/lib/voruby/resources/voresource/voresource_v1_0.rb +0 -230
  153. data/lib/voruby/services/ext.rb +0 -11
  154. data/lib/voruby/services/gestalt/footprint.rb +0 -95
  155. data/lib/voruby/services/gestalt/wcs_fixer.rb +0 -105
  156. data/lib/voruby/services/gestalt/wesix.rb +0 -155
  157. data/lib/voruby/services/loader.rb +0 -7
  158. data/lib/voruby/services/registry/registry.rb +0 -53
  159. data/lib/voruby/services/resolver/resolver.rb +0 -35
  160. data/lib/voruby/services/schema/schema.rb +0 -644
  161. data/lib/voruby/sesame/loader.rb +0 -6
  162. data/lib/voruby/sesame/sesame_v1_0.rb +0 -64
  163. data/lib/voruby/simple/loader.rb +0 -6
  164. data/lib/voruby/simple/parameters.rb +0 -196
  165. data/lib/voruby/simple/sap.rb +0 -446
  166. data/lib/voruby/spacetime/loader.rb +0 -3
  167. data/lib/voruby/spacetime/spacetime.rb +0 -607
  168. data/lib/voruby/stc/coords_v1_20.rb +0 -900
  169. data/lib/voruby/stc/loader.rb +0 -55
  170. data/lib/voruby/stc/region_v1_20.rb +0 -274
  171. data/lib/voruby/stc/stc_v1_20.rb +0 -1196
  172. data/lib/voruby/util.rb +0 -27
  173. data/lib/voruby/voevent/loader.rb +0 -7
  174. data/lib/voruby/voevent/voevent_v1_0.rb +0 -213
  175. data/lib/voruby/voevent/voevent_v1_1.rb +0 -196
  176. data/lib/voruby/votables/chandra.rb +0 -373
  177. data/lib/voruby/votables/data.rb +0 -179
  178. data/lib/voruby/votables/galex.rb +0 -377
  179. data/lib/voruby/votables/int.rb +0 -354
  180. data/lib/voruby/votables/libxml_parser.rb +0 -411
  181. data/lib/voruby/votables/libxml_votable.rb +0 -67
  182. data/lib/voruby/votables/loader.rb +0 -10
  183. data/lib/voruby/votables/meta.rb +0 -763
  184. data/lib/voruby/votables/misc.rb +0 -51
  185. data/lib/voruby/votables/nsa.rb +0 -410
  186. data/lib/voruby/votables/rexml_parser.rb +0 -408
  187. data/lib/voruby/votables/rexml_votable.rb +0 -67
  188. data/lib/voruby/votables/sdss.rb +0 -356
  189. data/lib/voruby/votables/transforms.rb +0 -388
  190. data/lib/voruby/votables/tree.rb +0 -45
  191. data/lib/voruby/votables/types.rb +0 -391
  192. data/lib/voruby/votables/votable.rb +0 -687
  193. data/test/active_votable/database.yml +0 -6
  194. data/test/active_votable/test.vot +0 -168492
  195. data/test/active_votable/unittest.rb +0 -41
  196. data/test/adql/test1.adql +0 -49
  197. data/test/adql/test2.adql +0 -51
  198. data/test/adql/test3.adql +0 -81
  199. data/test/adql/test4.adql +0 -53
  200. data/test/adql/test5.adql +0 -55
  201. data/test/adql/test6.adql +0 -18
  202. data/test/adql/test7.adql +0 -48
  203. data/test/adql/unittest.rb +0 -1672
  204. data/test/plastic/test.rb +0 -44
  205. data/test/plastic/test.vot +0 -5385
  206. data/test/plastic/unittest.rb +0 -66
  207. data/test/resources/conesearch/conesearch_v0_3.xml +0 -31
  208. data/test/resources/conesearch/conesearch_v1_0.xml +0 -86
  209. data/test/resources/conesearch/unittest_v0_3.rb +0 -22
  210. data/test/resources/conesearch/unittest_v1_0.rb +0 -24
  211. data/test/resources/openskynode/open_sky_node_v0_1.xml +0 -32
  212. data/test/resources/openskynode/unittest_v0_1.rb +0 -31
  213. data/test/resources/sia/simple_image_access_v0_7.xml +0 -36
  214. data/test/resources/sia/simple_image_access_v1_0.xml +0 -122
  215. data/test/resources/sia/unittest_v0_7.rb +0 -24
  216. data/test/resources/sia/unittest_v1_0.rb +0 -29
  217. data/test/resources/stsci.xml +0 -336
  218. data/test/resources/unittest_stsci.rb +0 -25
  219. data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +0 -128
  220. data/test/resources/vodataservice/data_collection_resource_v0_5.xml +0 -54
  221. data/test/resources/vodataservice/data_collection_resource_v1_0.xml +0 -117
  222. data/test/resources/vodataservice/data_service_resource_v1_0.xml +0 -115
  223. data/test/resources/vodataservice/sky_service_resource_v0_10.xml +0 -45
  224. data/test/resources/vodataservice/table_service_resource_v1_0.xml +0 -122
  225. data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +0 -60
  226. data/test/resources/vodataservice/unittest_v0_5.rb +0 -126
  227. data/test/resources/vodataservice/unittest_v1_0.rb +0 -151
  228. data/test/resources/voregistry/authority_resource_v0_3.xml +0 -20
  229. data/test/resources/voregistry/authority_resource_v1_0.xml +0 -82
  230. data/test/resources/voregistry/registry_service_v0_3.xml +0 -20
  231. data/test/resources/voregistry/registry_service_v1_0.xml +0 -107
  232. data/test/resources/voregistry/unittest_v0_3.rb +0 -31
  233. data/test/resources/voregistry/unittest_v1_0.rb +0 -34
  234. data/test/resources/voresource/organisation_resource_v1_0.xml +0 -90
  235. data/test/resources/voresource/resource_organisation_v0_10.xml +0 -22
  236. data/test/resources/voresource/resource_service_v0_10.xml +0 -19
  237. data/test/resources/voresource/resource_v0_10.xml +0 -19
  238. data/test/resources/voresource/resource_v1_0.xml +0 -79
  239. data/test/resources/voresource/service_resource_v1_0.xml +0 -91
  240. data/test/resources/voresource/unittest_v0_10.rb +0 -61
  241. data/test/resources/voresource/unittest_v0_9.rb +0 -4
  242. data/test/resources/voresource/unittest_v1_0.rb +0 -190
  243. data/test/services/gestalt/unittest.rb +0 -74
  244. data/test/services/registry/unittest.rb +0 -34
  245. data/test/services/resolver/unittest.rb +0 -38
  246. data/test/simple/unittest.rb +0 -46
  247. data/test/spacetime/unittest.rb +0 -39
  248. data/test/stc/catalog_entry_location_v1_20.xml +0 -112
  249. data/test/stc/obs_data_location_v1_20.xml +0 -108
  250. data/test/stc/search_location_v1_20.xml +0 -54
  251. data/test/stc/stc_resource_profile_v1_20.xml +0 -60
  252. data/test/stc/unittest_v1_20.rb +0 -620
  253. data/test/voevent/unittest_v1_0.rb +0 -79
  254. data/test/voevent/unittest_v1_1.rb +0 -70
  255. data/test/voevent/voevent_v1_0.xml +0 -96
  256. data/test/votables/test.vot +0 -366
  257. data/test/votables/unittest.rb +0 -54
@@ -1,5 +0,0 @@
1
- require 'rubygems'
2
- require 'xml/mapping'
3
-
4
- require 'voruby/loader'
5
-
@@ -1,9 +0,0 @@
1
- require 'voruby/resources/vodataservice/vodataservice_v1_0'
2
-
3
- module VORuby
4
- module Resources
5
- module VODataService
6
- #include VODataService::V1_0
7
- end
8
- end
9
- end
@@ -1,189 +0,0 @@
1
- require 'voruby/resources/vodataservice/loader'
2
-
3
- require 'voruby/resources/voresource/voresource_v0_9'
4
- require 'voruby/resources/vodataservice/coverage_v0_2'
5
-
6
- include VORuby::Resources::VOResource::V0_9
7
- include VORuby::Resources::VODataServiceCoverage::V0_2
8
-
9
- module VORuby
10
- module Resources
11
- module VODataService
12
- module V0_4
13
-
14
- # Forward declarations
15
- class DataCollectionType < ResourceType; end
16
- class DataCollection < DataCollectionType; end
17
- class AccessType; end
18
- class Access < AccessType; end
19
- class FormatType; end
20
- class Format < FormatType; end
21
- class RightsType; end
22
- class Rights < Rights; end
23
- class SkyServiceType < ServiceType; end
24
- class SkyService < SkyServiceType; end
25
- class ExtendedInterfaceType < InterfaceType; end
26
- class ParamHTTPType < ExtendedInterfaceType; end
27
- class ParamHTTP < ParamHTTPType; end
28
- class HTTPQueryType; end
29
- class HTTPResults; end
30
- class VOTableColumns; end
31
- class TabularSkyServiceType < SkyServiceType; end
32
- class TabularSkyService < TabularSkyServiceType; end
33
- class TableType; end
34
- class Table < TableType; end
35
- class ParamType; end
36
- class Column < ParamType; end
37
- class DataType; end
38
- class Unit; end
39
- class UCD; end
40
- class CoverageType; end
41
-
42
- # A logical grouping of data which, in general, is composed of one or more accessible datasets.
43
- class DataCollection; end
44
- class DataCollectionType
45
- object_node :coverage, 'Coverage', :class => Coverage, :optional => true
46
- object_node :access, 'Access', :class => Access, :optional => true
47
-
48
- array_node :facilities, 'Facility', :class => ResourceType, :optional => true, :default_value => []
49
- array_node :instruments, 'Instrument', :class => Instrument, :optional => true, :default_value => []
50
- end
51
-
52
- # A description about how a data collection may be accessed.
53
- class Access; end
54
- class AccessType
55
- include XML::Mapping
56
-
57
- object_node :rights, 'Rights', :class => Rights, :optional => true
58
- object_node :access_url, 'AccessURL', :class => AccessURL, :optional => true
59
-
60
- array_node :format, 'Format', :class => Format, :optional => true, :default_value => []
61
- end
62
-
63
- # The physical or digital manifestation of the information supported by a resource.
64
- class Format; end
65
- class FormatType
66
- include XML::Mapping
67
-
68
- text_node :value, '', :optional => false
69
- boolean_node :is_mime_type, '@isMIMEType', 'true', 'false', :optional => true, :default_value => 'false'
70
- end
71
-
72
- # Information about rights held in and over the resource.
73
- class Rights; end
74
- class RightsType
75
- include XML::Mapping
76
-
77
- text_enumeration_node :value, '', :optional => false,
78
- :choices => ['public', 'secure', 'proprietary']
79
- end
80
-
81
- # A service for accessing astronomical data.
82
- class SkyService; end
83
- class SkyServiceType
84
- object_node :coverage, 'Coverage', :class => Coverage, :optional => false
85
-
86
- array_node :facilities, 'Facility', :class => Facility, :optional => true, :default_value => []
87
- array_node :instruments, 'Instrument', :class => Instrument, :optional => true, :default_value => []
88
- end
89
-
90
- # A service invoked via an HTTP Query (either Get or Post) with a set of arguments consisting of keyword name-value pairs.
91
- class ParamHTTP; end
92
- class ParamHTTPType
93
- object_node :qtype, '@qtype', 'HTTPQueryType', :optional => true
94
- object_node :http_results, 'HTTPResults', :class => HTTPResults, :optional => false
95
-
96
- array_node :params, 'Param', :class => Param, :optional => true, :default_value => []
97
- end
98
-
99
- # This is used as a base type for extended Interface types. It simply restricts the value of Invocation to be "Extended".
100
- class ExtendedInterfaceType
101
- object_node :invocation, 'Invocation', :class => Invocation, :optional => false
102
- object_node :description, 'Description', :class => Description, :optional => true
103
- object_node :access_url, 'AccessURL', :class => AccessURL, :optional => false
104
- end
105
-
106
- # The type of HTTP request, either GET or POST.
107
- class HTTPQueryType
108
- include XML::Mapping
109
-
110
- text_enumeration_node :value, '', :optional => false,
111
- :choices => ['GET', 'POST']
112
- end
113
-
114
- # The MIME type of a document returned by an HTTP Get.
115
- class HTTPResults
116
- include XML::Mapping
117
-
118
- text_enumeration_node :value, '', :optional => false
119
- end
120
-
121
- # This element is recommended for use within extensions of the Capability element.
122
- class VOTableColumns
123
- include XML::Mapping
124
-
125
- # Requires VOTable model
126
- #object_node :fields, 'FIELD', :class => Field, :optional => true, :default_value => []
127
- end
128
-
129
- # A service that interacts with one or more specified tables having some coverage of the sky, time, and/or frequency.
130
- class TabularSkyService; end
131
- class TabularSkyServiceType
132
- array_node :tables, 'Table', :class => Table, :optional => true, :default_value => []
133
- end
134
-
135
- # A description of a table and its columns.
136
- class Table; end
137
- class TableType
138
- include XML::Mapping
139
-
140
- text_node :role, '@role', :optional => true
141
-
142
- object_node :name, 'Name', :class => Name, :optional => true
143
- object_node :description, 'Description', :class => Description, :optional => true
144
-
145
- array_node :columns, 'Column', :class => Column, :optional => true, :default_value => []
146
- end
147
-
148
- # A description of a table column.
149
- class Column; end
150
-
151
- class ParamType
152
- include XML::Mapping
153
-
154
- object_node :name, 'Name', :class => Name, :optional => false
155
- object_node :description, 'Description', :class => Description, :optional => true
156
- object_node :data_type, 'DataType', :class => DataType, :optional => true
157
- object_node :unit, 'Unit', :class => Unit, :optional => true
158
- object_node :ucd, 'UCD', :class => UCD, :optional => true
159
- end
160
-
161
- # A (VOTable-supported) data type.
162
- class DataType
163
- include XML::Mapping
164
-
165
- text_node :arraysize, '@arraysize', :optional => true
166
-
167
- text_enumeration_node :value, '', :optional => false,
168
- :choices => ['boolean', 'bit', 'unsignedByte', 'short', 'int', 'long',
169
- 'char', 'unicodeChar', 'float', 'double', 'floatComplex', 'doubleComplex']
170
- end
171
-
172
- # The measurement unit associated with a measurement.
173
- class Unit
174
- include XML::Mapping
175
-
176
- text_node :value, '', :optional => false
177
- end
178
-
179
- # The name of a unified content descriptor.
180
- class UCD
181
- include XML::Mapping
182
-
183
- text_node :value, '', :optional => false
184
- end
185
-
186
- end
187
- end
188
- end
189
- end
@@ -1,163 +0,0 @@
1
- require 'voruby/resources/vodataservice/loader'
2
-
3
- require 'voruby/resources/voresource/voresource_v0_10'
4
- require 'voruby/resources/vodataservice/coverage_v0_3'
5
-
6
- include VORuby::Resources::VOResource::V0_10
7
- include VORuby::Resources::VODataServiceCoverage::V0_3
8
-
9
- module VORuby
10
- module Resources
11
- module VODataService
12
- module V0_5
13
-
14
- # Forward declarations
15
- class DataCollection < Resource; end
16
- class Format; end
17
- class Rights; end
18
- class SkyService < Service; end
19
- class WebService < Interface; end
20
- class GLUService < Interface; end
21
- class ParamHTTP < Interface; end
22
- class Param; end
23
- class ScalarDataType; end
24
- class DataType < ScalarDataType; end
25
- class ArrayShape; end
26
- class HTTPQueryType; end
27
- class TabularSkyService < SkyService; end
28
- class Table; end
29
-
30
- # A logical grouping of data which, in general, is composed of one or more accessible datasets.
31
- class DataCollection
32
- # extent of the content of the resource over space, time, and frequency.
33
- object_node :coverage, 'coverage', :class => Coverage, :optional => true
34
- # the URL that can be used to download the data contained in this data collection
35
- object_node :access_url, 'accessURL', :class => AccessURL, :optional => true
36
-
37
- # the observatory or facility used to collect the data contained or managed by this resource
38
- array_node :facilities, 'facility', :class => ResourceName, :optional => true, :default_value => []
39
- # the instrument used to collect the data contain or managed by a resource
40
- array_node :instruments, 'instrument', :class => ResourceName, :optional => true, :default_value => []
41
- # the physical or digital manifestation of the information supported by a resource
42
- array_node :formats, 'format', :class => Format, :optional => true, :default_value => []
43
- # information about rights held in and over the resource.
44
- array_node :rights, 'rights', :class => Rights, :optional => true, :default_value => []
45
- end
46
-
47
- class Format
48
- include XML::Mapping
49
-
50
- text_node :value, '', :optional => false
51
- boolean_node :is_mime_type, '@isMIMEType', 'true', 'false', :optional => false, :default_value => 'false'
52
- end
53
-
54
- class Rights
55
- include XML::Mapping
56
-
57
- text_enumeration_node :value, '', :optional => false,
58
- :choices => ['public', 'secure', 'proprietary']
59
- end
60
-
61
- # A service for accessing astronomical data.
62
- class SkyService
63
- # extent of the content of the resource over space, time, and frequency
64
- object_node :coverage, 'coverage', :class => Coverage, :optional => true
65
-
66
- # the observatory or facility used to collect the data contained or managed by this resource
67
- array_node :facilities, 'facility', :class => ResourceName, :optional => true, :default_value => []
68
- # the instrument used to collect the data contain or managed by a resource
69
- array_node :instruments, 'instrument', :class => ResourceName, :optional => true, :default_value => []
70
- end
71
-
72
- # A Web Service that is describable by a WSDL document.
73
- # The access_url gives the URL to the WSDL document for the service.
74
- class WebService; end
75
-
76
- # A web-based service that is described in a GLU registry.
77
- # The access_url gives the URL to the GLU record describing the service.
78
- class GLUService; end
79
-
80
- # A service invoked via an HTTP Query (either Get or Post) with a set of arguments consisting of keyword name-value pairs.
81
- class ParamHTTP
82
- # the MIME type of a document returned by an HTTP Get
83
- text_node :result_type, 'resultType', :optional => true
84
-
85
- # the type of HTTP request, either GET or POST
86
- object_node :qtype, '@qtype', :class => HTTPQueryType, :optional => true
87
-
88
- # a description of a input parameter. Each should be rendered as name=value in the query URL's arguements
89
- array_node :params, 'param', :optional => true, :default_value => []
90
- end
91
-
92
- class Param
93
- include XML::Mapping
94
-
95
- # the name of the column
96
- text_node :name, 'name', :optional => true
97
- # a description of the column's contents
98
- text_node :description, 'description', :optional => true
99
- # the unit associated with all values in the column
100
- text_node :unit, 'unit', :optional => true
101
- # the name of a unified content descriptor
102
- text_node :ucd, 'ucd', :optional => true
103
-
104
- # a type of data contained in the column
105
- object_node :data_type, 'dataType', :class => DataType, :optional => true
106
- end
107
-
108
- class ScalarDataType
109
- include XML::Mapping
110
-
111
- text_enumeration_node :value, '', :optional => false,
112
- :choices => ['boolean', 'bit', 'unsignedByte', 'short', 'int', 'long', 'char', 'unicodeChar',
113
- 'float', 'double', 'floatComplex', 'doubleComplex']
114
- end
115
-
116
- # A (VOTable-supported) data type.
117
- class DataType
118
- # the shape of the array that constitutes the value
119
- object_node :arraysize, '@arraysize', :object => ArrayShape, :optional => true, :default => '1'
120
- end
121
-
122
- class ArrayShape
123
- include XML::Mapping
124
-
125
- text_node :value, '', :optional => false
126
-
127
- def value=(shape)
128
- raise RuntimeError, "ArrayShape '#{shape}' in wrong format" if !shape.match(/^([0-9]+x)*[0-9]*[*]?$/)
129
-
130
- @value = shape
131
- end
132
- end
133
-
134
- # The type of HTTP request, either GET or POST.
135
- class HTTPQueryType
136
- include XML::Mapping
137
-
138
- text_enumeration_node :value, '', :optional => false,
139
- :choices => ['GET', 'POST']
140
- end
141
-
142
- # A service that interacts with one or more specified tables having some coverage of the sky, time, and/or frequency.
143
- class TabularSkyService
144
- # a description of a table and its columns
145
- array_node :tables, 'table', :class => Table, :optional => true, :default_value => []
146
- end
147
-
148
- class Table
149
- include XML::Mapping
150
-
151
- # the name of the table
152
- text_node :name, 'name', :optional => true
153
- # a description of the tables contents
154
- text_node :description, 'description', :optional => true
155
-
156
- # a description of a table column
157
- array_node :params, 'param', :class => Param, :optional => true, :default_value => []
158
- end
159
-
160
- end
161
- end
162
- end
163
- end
@@ -1,221 +0,0 @@
1
- require 'voruby/resources/vodataservice/loader'
2
-
3
- require 'voruby/resources/voresource/voresource_v1_0'
4
-
5
- include VORuby::Resources::VOResource::V1_0
6
-
7
- module VORuby
8
- module Resources
9
- module VODataService
10
- module V1_0
11
-
12
- # Forward declarations
13
- class Format; end
14
- class Coverage; end
15
- class ServiceReference < AnyURI; end
16
- class Waveband; end
17
- class Catalog; end
18
- class Table; end
19
- class BaseParam; end
20
- class TableParam < BaseParam; end
21
- class VOTScalarDataType; end
22
- class TableDataType < VOTScalarDataType; end
23
- class DataCollection < Resource; end
24
- class StandardSTC < Resource; end
25
- class DataService < Service; end
26
- class ParamHTTP < Interface; end
27
- class HTTPQueryType; end
28
- class InputParam < BaseParam; end
29
- class ParamUse; end
30
- class SimpleScalarDataType; end
31
- class SimpleDataType < SimpleScalarDataType; end
32
- class CatalogService < DataService; end
33
- class TableService < Service; end
34
- class ArrayShape; end
35
-
36
- # An expression of a the shape of a multi-dimensional array of the form LxNxM... where each value between gives the
37
- # integer length of the array along a dimension. An asterisk (*) as the last dimension of the shape indicates
38
- # that the length of the last axis is variable or undetermined.
39
- class ArrayShape
40
- include XML::Mapping
41
-
42
- text_node :value, '', :optional => false
43
-
44
- def value=(shape)
45
- raise RuntimeError, "ArrayShape '#{shape}' in wrong format" if !shape.match(/^([0-9]+x)*[0-9]*[*]?$/)
46
-
47
- @value = shape
48
- end
49
- end
50
-
51
- # A logical grouping of data which, in general, is composed of one or more accessible datasets. A collection can contain any
52
- # combination of images, spectra, catalogs, or other data.
53
- class DataCollection
54
- object_node :coverage, 'coverage', :class => Coverage, :optional => true
55
- object_node :access_url, 'accessURL', :class => VOResource::V1_0::AccessURL, :optional => true
56
-
57
- array_node :facilities, 'facility', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
58
- array_node :instruments, 'instrument', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
59
- array_node :rights, 'rights', :class => VOResource::V1_0::Rights, :optional => true, :default_values => []
60
- array_node :formats, 'format', :class => Format, :optional => true, :default_values => []
61
- array_node :catalogs, 'catalog', :class => Catalog, :optional => true, :default_values => []
62
- end
63
-
64
- # The physical or digital manifestation of the information supported by a resource.
65
- class Format
66
- include XML::Mapping
67
-
68
- text_node :value, '', :optional => false
69
- boolean_node :is_mime_type, '@isMIMEType', 'true', 'false', :optional => false, :default_value => 'false'
70
- end
71
-
72
- # Extent of the content of the resource over space, time, and frequency.
73
- # Coverage includes an STCResourceProfile which I haven't implemented yet.
74
- class Coverage
75
- include XML::Mapping
76
-
77
- # object_node :stc_resource_profile, 'STCResourceProfile', :class => STC::STCResourceProfile, :optional => true
78
- object_node :footprint, 'footprint', :class => ServiceReference, :optional => true
79
-
80
- array_node :wavebands, 'waveband', :class => Waveband, :optional => true, :default_values => []
81
- end
82
-
83
- # The service URL for a potentially registerd service. That is, if an IVOA identifier is also provided, then the service is
84
- # described in a registry.
85
- class ServiceReference
86
- object_node :ivo_id, '@ivo-id', :class => VOResource::V1_0::IdentifierURI, :optional => true
87
- end
88
-
89
- # A detailed description of a logically-related set of tables.
90
- class Catalog
91
- include XML::Mapping
92
-
93
- array_node :tables, 'table', :class => Table, :optional => true, :default_values => []
94
- end
95
-
96
- # A description of a parameter that places no restriction on the parameter's data type.
97
- class BaseParam
98
- include XML::Mapping
99
-
100
- text_node :name, 'name', :optional => true
101
- text_node :description, 'description', :optional => true
102
- text_node :unit, 'unit', :optional => true
103
- text_node :ucd, 'ucd', :optional => true
104
- end
105
-
106
- # A description of a table parameter having a fixed data type.
107
- class TableParam
108
- boolean_node :std, '@std', 'true', 'false', :optional => true
109
-
110
- object_node :data_type, 'dataType', :class => TableDataType, :optional => true
111
- end
112
-
113
- # A scalar data type name taken controlled set that corresponds closely to VOTable data types.
114
- class VOTScalarDataType
115
- include XML::Mapping
116
-
117
- text_enumeration_node :value, '', :optional => false,
118
- :choices => ['boolean', 'bit', 'unsignedByte', 'short', 'int', 'long',
119
- 'char', 'unicodeChar', 'float', 'double', 'floatComplex',
120
- 'doubleComplex', 'string']
121
- end
122
-
123
- # A (VOTable-supported) data type
124
- class TableDataType
125
- object_node :arraysize, '@arraysize', :class => ArrayShape, :optional => true
126
- end
127
-
128
- # A description of a table and its columns.
129
- class Table
130
- include XML::Mapping
131
-
132
- text_node :name, 'name', :optional => true
133
- text_node :description, 'description', :optional => true
134
- text_node :role, '@role', :optional => true
135
-
136
- array_node :columns, 'column', :class => TableParam, :optional => true, :default_values => []
137
- end
138
-
139
- # A description of standard space-time coordinate systems, positions, and regions.
140
- # We need a full STC description to use this...
141
- class StandardSTC
142
- #array_node :stc_resource_profile, 'STCResourceProfile', :class => STC::STCResourceProfile,
143
- # :optional => true, :default_values => []
144
- end
145
-
146
- # A service for accessing astronomical data.
147
- class DataService
148
- object_node :coverage, 'coverage', :class => Coverage, :optional => true
149
-
150
- array_node :facilities, 'facility', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
151
- array_node :instruments, 'instrument', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
152
- end
153
-
154
- # A service invoked via an HTTP Query (either Get or Post) with a set of arguments consisting of keyword name-value pairs.
155
- class ParamHTTP
156
- text_node :result_type, 'resultType', :optional => false
157
-
158
- array_node :query_type, 'queryType', :class => HTTPQueryType, :optional => true, :default_values => []
159
- array_node :param, 'param', :class => InputParam, :optional => true, :default_values => []
160
- end
161
-
162
- # The type of HTTP request, either GET or POST.
163
- class HTTPQueryType
164
- include XML::Mapping
165
-
166
- text_enumeration_node :value, '', :optional => false,
167
- :choices => ['GET', 'POST']
168
- end
169
-
170
- # A description of a service or function parameter having a fixed data type.
171
- class InputParam
172
- boolean_node :std, '@std', 'true', 'false', :optional => true, :default => 'true'
173
-
174
- object_node :data_type, 'dataType', :class => SimpleDataType, :optional => true
175
- object_node :use, '@use', :class => ParamUse, :default => 'optional'
176
- end
177
-
178
- # The parameter is required for the application or service to work properly.
179
- class ParamUse
180
- include XML::Mapping
181
-
182
- text_enumeration_node :value, '', :optional => false,
183
- :choices => ['required', 'optional', 'ignored']
184
- end
185
-
186
- # A scalar data type name taken from a small controlled set that does not imply a size nor precise format.
187
- class SimpleScalarDataType
188
- include XML::Mapping
189
-
190
- text_enumeration_node :value, '', :optional => false,
191
- :choices => ['integer', 'real', 'complex', 'boolean', 'char', 'string']
192
- end
193
-
194
- # A simple data type that does not imply a size nor precise format.
195
- class SimpleDataType
196
- object_node :arraysize, '@arraysize', :class => ArrayShape, :optional => true
197
- end
198
-
199
- # A service that interacts with one or more specified tables having some coverage of the sky, time, and/or frequency.
200
- class CatalogService
201
- array_node :tables, 'table', :class => Table, :optional => true, :default_values => []
202
- end
203
-
204
- # A service that returns or otherwise interacts with one or more specified tables.
205
- class TableService
206
- array_node :facilities, 'facility', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
207
- array_node :instruments, 'instrument', :class => VOResource::V1_0::ResourceName, :optional => true, :default_values => []
208
- array_node :tables, 'table', :class => Table, :optional => true, :default_values => []
209
- end
210
-
211
- class Waveband
212
- include XML::Mapping
213
-
214
- text_enumeration_node :value, '', :optional => false,
215
- :choices => ['Radio', 'Millimeter', 'Infrared', 'Optical', 'UV', 'EUV', 'X-ray', 'Gamma-ray']
216
- end
217
-
218
- end
219
- end
220
- end
221
- end