voruby 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,221 @@
|
|
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
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'voruby/resources/voregistry/loader'
|
2
|
+
require 'voruby/resources/voresource/voresource_v0_9'
|
3
|
+
|
4
|
+
include VORuby::Resources::VOResource::V0_9
|
5
|
+
|
6
|
+
module VORuby
|
7
|
+
module Resources
|
8
|
+
module VORegistry
|
9
|
+
module V0_2
|
10
|
+
|
11
|
+
# Forward declarations
|
12
|
+
class RegistryType < ServiceType; end
|
13
|
+
class Registry < RegistryType; end
|
14
|
+
class ManagedAuthority < AuthorityIDType; end
|
15
|
+
class AuthorityType < ResourceType; end
|
16
|
+
class Authority < AuthorityType; end
|
17
|
+
class ManagingOrg < IdentifierType; end
|
18
|
+
|
19
|
+
# A service that provides access to descriptions of resources.
|
20
|
+
class Registry; end
|
21
|
+
class RegistryType
|
22
|
+
array_node :managed_authorities, 'ManagedAuthority', :class => ManagedAuthority, :optional => false
|
23
|
+
end
|
24
|
+
|
25
|
+
# An authority identifier managed by a registry.
|
26
|
+
class ManageAuthority; end
|
27
|
+
|
28
|
+
# A naming authority; an assertion of control over a namespace represented by an authority identifier.
|
29
|
+
class Authority; end
|
30
|
+
class AuthorityType
|
31
|
+
object_node :managing_org, 'ManagingOrg', :class => ManagingOrg, :optional => true
|
32
|
+
end
|
33
|
+
|
34
|
+
# A reference to an organization that manages something.
|
35
|
+
class ManagingOrg; end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'voruby/resources/voregistry/loader'
|
2
|
+
require 'voruby/resources/voresource/voresource_v0_10'
|
3
|
+
|
4
|
+
include VORuby::Resources::VOResource::V0_10
|
5
|
+
|
6
|
+
module VORuby
|
7
|
+
module Resources
|
8
|
+
module VORegistry
|
9
|
+
module V0_3
|
10
|
+
|
11
|
+
# Forward declarations
|
12
|
+
class Registry < Service; end
|
13
|
+
class Authority < Resource; end
|
14
|
+
|
15
|
+
# A service that provides access to descriptions of resources.
|
16
|
+
class Registry
|
17
|
+
# an authority identifier managed by a registry
|
18
|
+
array_node :managed_authorities, 'managedAuthority', :class => AuthorityID, :optional => true, :default_value => []
|
19
|
+
end
|
20
|
+
|
21
|
+
# A naming authority; an assertion of control over a namespace represented by an authority identifier.
|
22
|
+
class Authority
|
23
|
+
# the organization that manages or owns the this authority
|
24
|
+
object_node :managing_org, 'managingOrg', :class => ResourceName, :optional => true
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'voruby/resources/voregistry/loader'
|
2
|
+
require 'voruby/resources/voresource/voresource_v1_0'
|
3
|
+
|
4
|
+
include VORuby::Resources::VOResource::V1_0
|
5
|
+
|
6
|
+
module VORuby
|
7
|
+
module Resources
|
8
|
+
module VORegistry
|
9
|
+
module V1_0
|
10
|
+
|
11
|
+
# Forward declarations
|
12
|
+
class Registry < Service; end
|
13
|
+
class RegCapRestriction < Capability; end
|
14
|
+
class Harvest < RegCapRestriction; end
|
15
|
+
class ExtensionSearchSupport; end
|
16
|
+
class OptionalProtocol; end
|
17
|
+
class OAIHTTP < Interface; end
|
18
|
+
class OAISOAP < WebService; end
|
19
|
+
class Authority < Resource; end
|
20
|
+
class Search < RegCapRestriction; end
|
21
|
+
|
22
|
+
# A service that provides access to descriptions of resources.
|
23
|
+
class Registry
|
24
|
+
boolean_node :full, 'full', 'true', 'false', :optional => true, :default_value => false
|
25
|
+
|
26
|
+
array_node :managed_authorities, 'managedAuthority', :class => AuthorityID,
|
27
|
+
:optional => true, :default_values => []
|
28
|
+
end
|
29
|
+
|
30
|
+
# An abstract capability that fixes the standardID to the IVOA ID for the Registry standard.
|
31
|
+
class RegCapRestriction
|
32
|
+
def standard_id=(id)
|
33
|
+
@standard_id = URI.parse('ivo://ivoa.net/std/Registry')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# The capabilities of the Registry Harvest implementation.
|
38
|
+
class Harvest
|
39
|
+
numeric_node :max_records, 'maxRecords', :optional => false, :default_value => 0
|
40
|
+
end
|
41
|
+
|
42
|
+
# The level of support provided for searching against metadata defined in a legal VOResource extension schema.
|
43
|
+
class ExtensionSearchSupport
|
44
|
+
include XML::Mapping
|
45
|
+
|
46
|
+
text_enumeration_node :value, '', :optional => false,
|
47
|
+
:choices => ['core', 'partial', 'full']
|
48
|
+
end
|
49
|
+
|
50
|
+
# The name of an optional advanced search protocol supported.
|
51
|
+
class OptionalProtocol
|
52
|
+
include XML::Mapping
|
53
|
+
|
54
|
+
text_enumeration_node :value, '', :optional => false,
|
55
|
+
:choices => ['XQuery']
|
56
|
+
end
|
57
|
+
|
58
|
+
# A description of the standard OAI PMH interface using HTTP (GET or POST) queries.
|
59
|
+
class OAIHTTP
|
60
|
+
#
|
61
|
+
end
|
62
|
+
|
63
|
+
# A description of the standard OAI PMH interface using a SOAP Web Service interface.
|
64
|
+
class OAISOAP
|
65
|
+
#
|
66
|
+
end
|
67
|
+
|
68
|
+
# A naming authority; an assertion of control over a namespace represented by an authority identifier.
|
69
|
+
class Authority
|
70
|
+
object_node :managing_org, 'managingOrg', :class => ResourceName, :optional => true
|
71
|
+
end
|
72
|
+
|
73
|
+
# The capabilities of the Registry Search implementation.
|
74
|
+
class Search
|
75
|
+
numeric_node :max_records, 'maxRecords', :optional => false, :default_value => 0
|
76
|
+
|
77
|
+
object_node :extension_search_support, 'extensionSearchSupport', :class => ExtensionSearchSupport, :optional => false
|
78
|
+
|
79
|
+
array_node :optional_protocol, 'optionalProtocol', :class => OptionalProtocol,
|
80
|
+
:optional => true, :default_values => []
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'xml/mapping'
|
3
|
+
require 'uri'
|
4
|
+
|
5
|
+
require 'voruby/resources/loader'
|
6
|
+
require 'voruby/resources/nodes'
|
7
|
+
|
8
|
+
# Register specialized node types.
|
9
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::DateTimeNode)
|
10
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::JulianDateTimeNode)
|
11
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::UtcTimestampNode)
|
12
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::UtcDateTimeNode)
|
13
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::TextEnumerationNode)
|
14
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::NumericEnumerationNode)
|
15
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::FullObjectNode)
|
16
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::FullArrayNode)
|
17
|
+
XML::Mapping.add_node_class(VORuby::VOResource::Mapping::TextFloatArrayNode)
|