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.
- data/Rakefile.rb +107 -224
- data/lib/misc.rb +1 -0
- data/lib/misc/misc.rb +60 -0
- data/lib/misc/propertyfile.rb +31 -0
- data/lib/symphony.rb +1 -0
- data/lib/symphony/symphony.rb +247 -0
- data/lib/voruby.rb +186 -0
- data/lib/voruby/active_votable/active_votable.rb +468 -347
- data/lib/voruby/adql/1.0/adql.rb +2418 -0
- data/lib/voruby/adql/support.rb +2 -0
- data/lib/voruby/misc.rb +351 -0
- data/lib/voruby/misc/connection_monitor.rb +97 -0
- data/lib/voruby/misc/libxml_ext.rb +121 -0
- data/lib/voruby/misc/rexml_ext.rb +223 -0
- data/lib/voruby/resolver/resolver.rb +12 -0
- data/lib/voruby/resolver/sesame.rb +299 -0
- data/lib/voruby/sky_query/sky_query.rb +192 -0
- data/lib/voruby/stc/1.10/coords.rb +2272 -0
- data/lib/voruby/stc/1.10/region.rb +892 -0
- data/lib/voruby/stc/1.10/stc.rb +3271 -0
- data/lib/voruby/stc/1.30/stc.rb +8666 -0
- data/lib/voruby/stc/support.rb +2 -0
- data/lib/voruby/ucd/ucd.rb +173 -0
- data/lib/voruby/voevent/1.1/voevent.rb +1124 -0
- data/lib/voruby/voevent/support.rb +5 -0
- data/lib/voruby/votable/1.0/votable.rb +1807 -0
- data/lib/voruby/votable/1.1/votable.rb +2100 -0
- data/lib/voruby/votable/votable.rb +305 -0
- data/lib/voruby/wesix/wesix.rb +491 -0
- data/lib/voruby/xlink/1.2/xlink.rb +21 -0
- data/test/voruby/active_votable/complex.vot +60 -0
- data/test/voruby/active_votable/error.vot +6 -0
- data/test/voruby/active_votable/large.vot +130040 -0
- data/test/voruby/active_votable/simple1.vot +38 -0
- data/test/voruby/active_votable/simple2.vot +38 -0
- data/test/voruby/active_votable/test.rb +193 -0
- data/test/voruby/adql/1.0/adql-alias.sql +1 -0
- data/test/voruby/adql/1.0/adql-alias.xml +26 -0
- data/test/voruby/adql/1.0/adql-avg.sql +1 -0
- data/test/voruby/adql/1.0/adql-avg.xml +31 -0
- data/test/voruby/adql/1.0/adql-circle.sql +1 -0
- data/test/voruby/adql/1.0/adql-circle.xml +46 -0
- data/test/voruby/adql/1.0/adql-expr.sql +1 -0
- data/test/voruby/adql/1.0/adql-expr.xml +34 -0
- data/test/voruby/adql/1.0/adql-function.sql +1 -0
- data/test/voruby/adql/1.0/adql-function.xml +41 -0
- data/test/voruby/adql/1.0/adql-group.sql +1 -0
- data/test/voruby/adql/1.0/adql-group.xml +51 -0
- data/test/voruby/adql/1.0/adql-having.sql +1 -0
- data/test/voruby/adql/1.0/adql-having.xml +25 -0
- data/test/voruby/adql/1.0/adql-like.sql +1 -0
- data/test/voruby/adql/1.0/adql-like.xml +17 -0
- data/test/voruby/adql/1.0/adql-order.sql +1 -0
- data/test/voruby/adql/1.0/adql-order.xml +37 -0
- data/test/voruby/adql/1.0/adql-simple.sql +1 -0
- data/test/voruby/adql/1.0/adql-simple.xml +12 -0
- data/test/voruby/adql/1.0/adql-top.sql +1 -0
- data/test/voruby/adql/1.0/adql-top.xml +33 -0
- data/test/voruby/adql/1.0/test.rb +2220 -0
- data/test/voruby/misc/test.rb +32 -0
- data/test/voruby/resolver/sesame/test.rb +56 -0
- data/test/voruby/sky_query/test.rb +107 -0
- data/test/voruby/stc/1.10/coords_test.rb +3704 -0
- data/test/voruby/stc/1.10/region_test.rb +993 -0
- data/test/voruby/stc/1.10/stc-catalog-entry-location.xml +112 -0
- data/test/voruby/stc/1.10/stc-obs-data-location.xml +126 -0
- data/test/voruby/stc/1.10/stc-region-circle.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-convex.xml +11 -0
- data/test/voruby/stc/1.10/stc-region-convexhull.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-ellipse.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-intersection.xml +25 -0
- data/test/voruby/stc/1.10/stc-region-negation.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-polygon.xml +13 -0
- data/test/voruby/stc/1.10/stc-region-sector.xml +6 -0
- data/test/voruby/stc/1.10/stc-region-union.xml +25 -0
- data/test/voruby/stc/1.10/stc-resource-profile.xml +60 -0
- data/test/voruby/stc/1.10/stc-search-location.xml +54 -0
- data/test/voruby/stc/1.10/stc_test.rb +4626 -0
- data/test/voruby/stc/1.30/stc-catalog-entry-location.xml +210 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-arecibo.xml +353 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-fits.xml +250 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-xlink.xml +63 -0
- data/test/voruby/stc/1.30/stc-obs-data-location.xml +216 -0
- data/test/voruby/stc/1.30/stc-resource-profile-unusual-ref-pos.xml +39 -0
- data/test/voruby/stc/1.30/stc-resource-profile.xml +129 -0
- data/test/voruby/stc/1.30/stc-search-location-arecibo.xml +86 -0
- data/test/voruby/stc/1.30/stc-search-location.xml +101 -0
- data/test/voruby/stc/1.30/test.rb +6274 -0
- data/test/voruby/ucd/test.rb +48 -0
- data/test/voruby/voevent/1.1/test.rb +812 -0
- data/test/{voevent/voevent_v1_1.xml → voruby/voevent/1.1/voevent.xml} +2 -2
- data/test/voruby/voregistry/0.3/test.rb +137 -0
- data/test/voruby/votable/1.0/test.rb +714 -0
- data/test/voruby/votable/1.0/votable.basic.xml +660 -0
- data/test/voruby/votable/1.0/votable.html +86 -0
- data/test/voruby/votable/1.0/votable.ns.xml +56 -0
- data/test/voruby/votable/1.1/test.rb +785 -0
- data/test/voruby/votable/1.1/votable.basic.xml +38 -0
- data/test/voruby/votable/1.1/votable.html +86 -0
- data/test/voruby/votable/1.1/votable.ns.xml +56 -0
- data/test/voruby/votable/test.rb +15 -0
- data/test/voruby/wesix/test.rb +268 -0
- data/test/voruby/wesix/testr.fits +28 -0
- metadata +234 -247
- data/REQUIREMENTS +0 -6
- data/lib/voruby/active_votable/loader.rb +0 -5
- data/lib/voruby/adql/adql.rb +0 -2787
- data/lib/voruby/adql/ext.rb +0 -14
- data/lib/voruby/adql/loader.rb +0 -6
- data/lib/voruby/adql/operations.rb +0 -54
- data/lib/voruby/adql/parser.rb +0 -160
- data/lib/voruby/adql/transforms.rb +0 -573
- data/lib/voruby/ext.rb +0 -17
- data/lib/voruby/loader.rb +0 -4
- data/lib/voruby/misc/propertyfile.rb +0 -36
- data/lib/voruby/plastic/applications.rb +0 -174
- data/lib/voruby/plastic/constants.rb +0 -30
- data/lib/voruby/plastic/loader.rb +0 -10
- data/lib/voruby/plastic/plastic.rb +0 -1
- data/lib/voruby/resources/conesearch/conesearch.rb +0 -9
- data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +0 -55
- data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +0 -50
- data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +0 -72
- data/lib/voruby/resources/conesearch/loader.rb +0 -4
- data/lib/voruby/resources/loader.rb +0 -50
- data/lib/voruby/resources/nodes.rb +0 -190
- data/lib/voruby/resources/openskynode/loader.rb +0 -4
- data/lib/voruby/resources/openskynode/openskynode.rb +0 -9
- data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +0 -54
- data/lib/voruby/resources/sia/loader.rb +0 -5
- data/lib/voruby/resources/sia/sia.rb +0 -9
- data/lib/voruby/resources/sia/sia_v0_6.rb +0 -90
- data/lib/voruby/resources/sia/sia_v0_7.rb +0 -89
- data/lib/voruby/resources/sia/sia_v1_0.rb +0 -122
- data/lib/voruby/resources/stsci.rb +0 -59
- data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +0 -195
- data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +0 -158
- data/lib/voruby/resources/vodataservice/loader.rb +0 -5
- data/lib/voruby/resources/vodataservice/vodataservice.rb +0 -9
- data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +0 -189
- data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +0 -163
- data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +0 -221
- data/lib/voruby/resources/voregistry/loader.rb +0 -4
- data/lib/voruby/resources/voregistry/voregistry.rb +0 -9
- data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +0 -40
- data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +0 -30
- data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +0 -86
- data/lib/voruby/resources/voresource/loader.rb +0 -17
- data/lib/voruby/resources/voresource/voresource.rb +0 -9
- data/lib/voruby/resources/voresource/voresource_v0_10.rb +0 -327
- data/lib/voruby/resources/voresource/voresource_v0_9.rb +0 -405
- data/lib/voruby/resources/voresource/voresource_v1_0.rb +0 -230
- data/lib/voruby/services/ext.rb +0 -11
- data/lib/voruby/services/gestalt/footprint.rb +0 -95
- data/lib/voruby/services/gestalt/wcs_fixer.rb +0 -105
- data/lib/voruby/services/gestalt/wesix.rb +0 -155
- data/lib/voruby/services/loader.rb +0 -7
- data/lib/voruby/services/registry/registry.rb +0 -53
- data/lib/voruby/services/resolver/resolver.rb +0 -35
- data/lib/voruby/services/schema/schema.rb +0 -644
- data/lib/voruby/sesame/loader.rb +0 -6
- data/lib/voruby/sesame/sesame_v1_0.rb +0 -64
- data/lib/voruby/simple/loader.rb +0 -6
- data/lib/voruby/simple/parameters.rb +0 -196
- data/lib/voruby/simple/sap.rb +0 -446
- data/lib/voruby/spacetime/loader.rb +0 -3
- data/lib/voruby/spacetime/spacetime.rb +0 -607
- data/lib/voruby/stc/coords_v1_20.rb +0 -900
- data/lib/voruby/stc/loader.rb +0 -55
- data/lib/voruby/stc/region_v1_20.rb +0 -274
- data/lib/voruby/stc/stc_v1_20.rb +0 -1196
- data/lib/voruby/util.rb +0 -27
- data/lib/voruby/voevent/loader.rb +0 -7
- data/lib/voruby/voevent/voevent_v1_0.rb +0 -213
- data/lib/voruby/voevent/voevent_v1_1.rb +0 -196
- data/lib/voruby/votables/chandra.rb +0 -373
- data/lib/voruby/votables/data.rb +0 -179
- data/lib/voruby/votables/galex.rb +0 -377
- data/lib/voruby/votables/int.rb +0 -354
- data/lib/voruby/votables/libxml_parser.rb +0 -411
- data/lib/voruby/votables/libxml_votable.rb +0 -67
- data/lib/voruby/votables/loader.rb +0 -10
- data/lib/voruby/votables/meta.rb +0 -763
- data/lib/voruby/votables/misc.rb +0 -51
- data/lib/voruby/votables/nsa.rb +0 -410
- data/lib/voruby/votables/rexml_parser.rb +0 -408
- data/lib/voruby/votables/rexml_votable.rb +0 -67
- data/lib/voruby/votables/sdss.rb +0 -356
- data/lib/voruby/votables/transforms.rb +0 -388
- data/lib/voruby/votables/tree.rb +0 -45
- data/lib/voruby/votables/types.rb +0 -391
- data/lib/voruby/votables/votable.rb +0 -687
- data/test/active_votable/database.yml +0 -6
- data/test/active_votable/test.vot +0 -168492
- data/test/active_votable/unittest.rb +0 -41
- data/test/adql/test1.adql +0 -49
- data/test/adql/test2.adql +0 -51
- data/test/adql/test3.adql +0 -81
- data/test/adql/test4.adql +0 -53
- data/test/adql/test5.adql +0 -55
- data/test/adql/test6.adql +0 -18
- data/test/adql/test7.adql +0 -48
- data/test/adql/unittest.rb +0 -1672
- data/test/plastic/test.rb +0 -44
- data/test/plastic/test.vot +0 -5385
- data/test/plastic/unittest.rb +0 -66
- data/test/resources/conesearch/conesearch_v0_3.xml +0 -31
- data/test/resources/conesearch/conesearch_v1_0.xml +0 -86
- data/test/resources/conesearch/unittest_v0_3.rb +0 -22
- data/test/resources/conesearch/unittest_v1_0.rb +0 -24
- data/test/resources/openskynode/open_sky_node_v0_1.xml +0 -32
- data/test/resources/openskynode/unittest_v0_1.rb +0 -31
- data/test/resources/sia/simple_image_access_v0_7.xml +0 -36
- data/test/resources/sia/simple_image_access_v1_0.xml +0 -122
- data/test/resources/sia/unittest_v0_7.rb +0 -24
- data/test/resources/sia/unittest_v1_0.rb +0 -29
- data/test/resources/stsci.xml +0 -336
- data/test/resources/unittest_stsci.rb +0 -25
- data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +0 -128
- data/test/resources/vodataservice/data_collection_resource_v0_5.xml +0 -54
- data/test/resources/vodataservice/data_collection_resource_v1_0.xml +0 -117
- data/test/resources/vodataservice/data_service_resource_v1_0.xml +0 -115
- data/test/resources/vodataservice/sky_service_resource_v0_10.xml +0 -45
- data/test/resources/vodataservice/table_service_resource_v1_0.xml +0 -122
- data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +0 -60
- data/test/resources/vodataservice/unittest_v0_5.rb +0 -126
- data/test/resources/vodataservice/unittest_v1_0.rb +0 -151
- data/test/resources/voregistry/authority_resource_v0_3.xml +0 -20
- data/test/resources/voregistry/authority_resource_v1_0.xml +0 -82
- data/test/resources/voregistry/registry_service_v0_3.xml +0 -20
- data/test/resources/voregistry/registry_service_v1_0.xml +0 -107
- data/test/resources/voregistry/unittest_v0_3.rb +0 -31
- data/test/resources/voregistry/unittest_v1_0.rb +0 -34
- data/test/resources/voresource/organisation_resource_v1_0.xml +0 -90
- data/test/resources/voresource/resource_organisation_v0_10.xml +0 -22
- data/test/resources/voresource/resource_service_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v1_0.xml +0 -79
- data/test/resources/voresource/service_resource_v1_0.xml +0 -91
- data/test/resources/voresource/unittest_v0_10.rb +0 -61
- data/test/resources/voresource/unittest_v0_9.rb +0 -4
- data/test/resources/voresource/unittest_v1_0.rb +0 -190
- data/test/services/gestalt/unittest.rb +0 -74
- data/test/services/registry/unittest.rb +0 -34
- data/test/services/resolver/unittest.rb +0 -38
- data/test/simple/unittest.rb +0 -46
- data/test/spacetime/unittest.rb +0 -39
- data/test/stc/catalog_entry_location_v1_20.xml +0 -112
- data/test/stc/obs_data_location_v1_20.xml +0 -108
- data/test/stc/search_location_v1_20.xml +0 -54
- data/test/stc/stc_resource_profile_v1_20.xml +0 -60
- data/test/stc/unittest_v1_20.rb +0 -620
- data/test/voevent/unittest_v1_0.rb +0 -79
- data/test/voevent/unittest_v1_1.rb +0 -70
- data/test/voevent/voevent_v1_0.xml +0 -96
- data/test/votables/test.vot +0 -366
- data/test/votables/unittest.rb +0 -54
@@ -1,405 +0,0 @@
|
|
1
|
-
require 'voruby/resources/voresource/loader'
|
2
|
-
|
3
|
-
require 'voruby/resources/voresource/voresource_v0_10'
|
4
|
-
|
5
|
-
module VORuby
|
6
|
-
module Resources
|
7
|
-
module VOResource
|
8
|
-
module V0_9
|
9
|
-
|
10
|
-
# Forward declarations
|
11
|
-
class VODescription; end
|
12
|
-
class VOResource; end
|
13
|
-
class ResourceType; end
|
14
|
-
class Resource < ResourceType; end
|
15
|
-
class IdentifierType; end
|
16
|
-
class Identifier < IdentifierType; end
|
17
|
-
class AuthorityIDType; end
|
18
|
-
class AuthorityID < AuthorityIDType; end
|
19
|
-
class ResourceKeyType; end
|
20
|
-
class ResourceKey < ResourceKeyType; end
|
21
|
-
class Title; end
|
22
|
-
class ShortName; end
|
23
|
-
class SummaryType; end
|
24
|
-
class Summary < SummaryType; end
|
25
|
-
class Description; end
|
26
|
-
class SourceType; end
|
27
|
-
class Source < SourceType; end
|
28
|
-
class ReferenceURL < VOResource::V0_10::AnyURI; end
|
29
|
-
class CategoryType; end
|
30
|
-
class Type < CategoryType; end
|
31
|
-
class RelatedResourceType; end
|
32
|
-
class RelatedResource < RelatedResourceType; end
|
33
|
-
class RelationshipType; end
|
34
|
-
class Relationship < RelationshipType; end
|
35
|
-
class LogicalIdentifierType < IdentifierType; end
|
36
|
-
class LogicalIdentifier < LogicalIdentifierType; end
|
37
|
-
class CurationType; end
|
38
|
-
class Curation < CurationType; end
|
39
|
-
class ResourceReferenceType; end
|
40
|
-
class Publisher < ResourceReferenceType; end
|
41
|
-
class RelatedTo < ResourceReferenceType; end
|
42
|
-
class ContactType; end
|
43
|
-
class Contact < ContactType; end
|
44
|
-
class Name; end
|
45
|
-
class Email; end
|
46
|
-
class DateType; end
|
47
|
-
class Date < DateType; end
|
48
|
-
class NameReferenceType; end
|
49
|
-
class CreatorType < NameReferenceType; end
|
50
|
-
class Contributor < NameReferenceType; end
|
51
|
-
class Creator < CreatorType; end
|
52
|
-
class Logo < VOResource::V0_10::AnyURI; end
|
53
|
-
class Version; end
|
54
|
-
class Subject; end
|
55
|
-
class ContentLevelType; end
|
56
|
-
class ContentLevel < ContentLevelType; end
|
57
|
-
class InterfaceType; end
|
58
|
-
class Interface < InterfaceType; end
|
59
|
-
class InvocationType; end
|
60
|
-
class Invocation < InvocationType; end
|
61
|
-
class AccessURLType < VOResource::V0_10::AnyURI; end
|
62
|
-
class AccessURL < AccessURLType; end
|
63
|
-
class CapabilityType; end
|
64
|
-
class Capability < CapabilityType; end
|
65
|
-
class Facility < ResourceReferenceType; end
|
66
|
-
class Instrument < ResourceReferenceType; end
|
67
|
-
class ServiceType < ResourceType; end
|
68
|
-
class Service < ServiceType; end
|
69
|
-
class StandardID < IdentifierType; end
|
70
|
-
class StandardURL < VOResource::V0_10::AnyURI; end
|
71
|
-
|
72
|
-
# A description of one or more VO Resources.
|
73
|
-
class VODescription
|
74
|
-
include XML::Mapping
|
75
|
-
|
76
|
-
array_node :resources, 'Resource', :class => Resource, :optional => false
|
77
|
-
end
|
78
|
-
|
79
|
-
# A description of a single VO Resource.
|
80
|
-
class VOResource
|
81
|
-
include XML::Mapping
|
82
|
-
|
83
|
-
object_node :resource, 'Resource', :class => Resource, :optional => false
|
84
|
-
end
|
85
|
-
|
86
|
-
# Any entity that is describable and identifiable by a IVOA Identifier.
|
87
|
-
class Resource; end
|
88
|
-
class ResourceType
|
89
|
-
include XML::Mapping
|
90
|
-
|
91
|
-
date_time_node :created, '@created', :optional => true
|
92
|
-
date_time_node :updated, '@updated', :optional => true
|
93
|
-
|
94
|
-
text_enumeration_node :status, :optional => true, :default_value => 'active',
|
95
|
-
:choices => ['active', 'inactive', 'deleted']
|
96
|
-
|
97
|
-
object_node :identifier, 'Identifier', :class => Identifier, :optional => false
|
98
|
-
object_node :title, 'Title', :class => Title, :optional => false
|
99
|
-
object_node :short_name, 'ShortName', :class => ShortName, :optional => true
|
100
|
-
object_node :summary, 'Summary', :class => Summary, :optional => false
|
101
|
-
object_node :curation, 'Curation', :class => Curation, :optional => false
|
102
|
-
|
103
|
-
array_node :types, 'Type', :class => Type, :optional => true
|
104
|
-
array_node :related_resources, 'RelatedResource', :class => RelatedResource, :optional => true, :default_value => []
|
105
|
-
array_node :logical_identifiers, 'LogicalIdentifier', :class => LogicalIdentifier, :optional => true, :default_value => []
|
106
|
-
array_node :subjects, 'Subject', :class => Subject, :optional => true, :default_value => []
|
107
|
-
array_node :content_levels, 'ContentLevel', :class => ContentLevel, :optional => true, :default_value => []
|
108
|
-
end
|
109
|
-
|
110
|
-
# Unambiguous reference to the resource conforming to the IVOA standard for identifiers.
|
111
|
-
class Identifier; end
|
112
|
-
class IdentifierType
|
113
|
-
include XML::Mapping
|
114
|
-
|
115
|
-
object_node :authority_id, 'AuthorityID', :class => AuthorityID, :optional => false
|
116
|
-
object_node :resource_key, 'ResourceKey', :class => ResourceKey, :optional => false
|
117
|
-
end
|
118
|
-
|
119
|
-
# The identifier of a namespace under the control of a single naming authority.
|
120
|
-
class AuthorityID; end
|
121
|
-
class AuthorityIDType
|
122
|
-
include XML::Mapping
|
123
|
-
|
124
|
-
text_node :value, '', :optional => false
|
125
|
-
|
126
|
-
def value=(authid)
|
127
|
-
raise RuntimeError, "AuthorityID '#{authid} in wrong format" if !authid.match(/^[\w\d][\w\d\-_\.!~\*'\(\)]{2,}$/)
|
128
|
-
|
129
|
-
@value = authid
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
# A name for a resource that is unique within an authority's namespace.
|
134
|
-
class ResourceKey; end
|
135
|
-
class ResourceKeyType
|
136
|
-
include XML::Mapping
|
137
|
-
|
138
|
-
text_node :value, '', :optional => false
|
139
|
-
|
140
|
-
def value=(reskey)
|
141
|
-
raise RuntimeError, "Resource Key '#{reskey}' in wrong format" if !reskey.match("^[\w\d\-_\.!~\*'\(\)]+(/[\w\d\-_\.!~\*'\(\)]+)*$")
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
# The full name of a resource.
|
146
|
-
class Title
|
147
|
-
include XML::Mapping
|
148
|
-
|
149
|
-
text_node :value, '', :optional => false
|
150
|
-
end
|
151
|
-
|
152
|
-
# A short name or abbreviation for this resource that applications may use to refer to this resource in a compact display.
|
153
|
-
class ShortName
|
154
|
-
include XML::Mapping
|
155
|
-
|
156
|
-
text_node :value, '', :optional => false
|
157
|
-
end
|
158
|
-
|
159
|
-
# An account of the nature of the resource.
|
160
|
-
class Description
|
161
|
-
include XML::Mapping
|
162
|
-
|
163
|
-
text_node :value, '', :optional => false
|
164
|
-
end
|
165
|
-
|
166
|
-
# An informational, human-readable overview of a resource.
|
167
|
-
class Summary; end
|
168
|
-
class SummaryType
|
169
|
-
include XML::Mapping
|
170
|
-
|
171
|
-
object_node :description, 'Description', :class => Description, :optional => false
|
172
|
-
object_node :reference_url, 'ReferenceURL', :class => ReferenceURL, :optional => false
|
173
|
-
object_node :source, 'Source', :class => Source, :optional => true
|
174
|
-
end
|
175
|
-
|
176
|
-
# A bibliographic reference from which the present resource is derived or extracted.
|
177
|
-
class Source; end
|
178
|
-
class SourceType
|
179
|
-
include XML::Mapping
|
180
|
-
|
181
|
-
text_node :value, '', :optional => false
|
182
|
-
text_node :format, '@format', :optional => true
|
183
|
-
end
|
184
|
-
|
185
|
-
# URL pointing to a human-readable document describing this resource.
|
186
|
-
class ReferenceURL; end
|
187
|
-
|
188
|
-
# Nature or genre of the content of the resource.
|
189
|
-
class Type; end
|
190
|
-
class CategoryType
|
191
|
-
include XML::Mapping
|
192
|
-
|
193
|
-
text_enumeration_node :value, '', :optional => false,
|
194
|
-
:choices => ['Other', 'Archive', 'Bibliography', 'Catalog',
|
195
|
-
'Journal', 'Library', 'Simulation', 'Survey',
|
196
|
-
'Transformation', 'Education', 'Outreach', 'EPOResource',
|
197
|
-
'Animation', 'Artwork', 'Background', 'BasicData',
|
198
|
-
'Historical', 'Photographic', 'Press', 'Organisation',
|
199
|
-
'Project', 'Person']
|
200
|
-
end
|
201
|
-
|
202
|
-
# A description of a relationship to another resource.
|
203
|
-
class RelatedResource; end
|
204
|
-
class RelatedResourceType
|
205
|
-
include XML::Mapping
|
206
|
-
|
207
|
-
object_node :relationship, 'Relationship', :class => Relationship, :optional => false
|
208
|
-
object_node :related_to, 'RelatedTo', :class => RelatedTo, :optional => false
|
209
|
-
end
|
210
|
-
|
211
|
-
# A property that relates one resource to another.
|
212
|
-
class Relationship; end
|
213
|
-
class RelationshipType
|
214
|
-
include XML::Mapping
|
215
|
-
|
216
|
-
text_enumeration_node :value, '', :optional => false,
|
217
|
-
:choices => ['service-for', 'derived-from', 'related-to']
|
218
|
-
end
|
219
|
-
|
220
|
-
# The resource that is related to the current one being described.
|
221
|
-
class RelatedTo; end
|
222
|
-
|
223
|
-
# A reference to a group of resources which the current resouce
|
224
|
-
# claims to be similar to in some way. A resource's registered
|
225
|
-
# identifier (given by the Identifier element) is its default
|
226
|
-
# LogicalIdentifier.
|
227
|
-
class LogicalIdentifier; end
|
228
|
-
class LogicalIdentiferType
|
229
|
-
include XML::Mapping
|
230
|
-
|
231
|
-
# a name refering to the characteristic that relates resources having this logical identifier.
|
232
|
-
text_node :role, '@role', :optional => true
|
233
|
-
end
|
234
|
-
|
235
|
-
# Information regarding the general curation of the resource.
|
236
|
-
class Curation; end
|
237
|
-
class CurationType
|
238
|
-
include XML::Mapping
|
239
|
-
|
240
|
-
object_node :publisher, 'Publisher', :class => Publisher, :optional => false
|
241
|
-
object_node :contact, 'Contact', :class => Contact, :optional => false
|
242
|
-
object_node :creator, 'Creator', :class => Creator, :optional => true
|
243
|
-
object_node :version, 'Version', :class => Version, :optional => true
|
244
|
-
|
245
|
-
array_node :dates, 'Date', :class => Date, :optional => true, :default_value => []
|
246
|
-
array_node :contributors, 'Contributor', :class => Contributor, :optional => true, :default_value => []
|
247
|
-
end
|
248
|
-
|
249
|
-
# Entity (e.g. person or organisation) responsible for making the resource available.
|
250
|
-
class Publisher; end
|
251
|
-
|
252
|
-
class ResourceReferenceType
|
253
|
-
include XML::Mapping
|
254
|
-
|
255
|
-
object_node :identifier, 'Identifier', :class => Identifier, :optional => true
|
256
|
-
object_node :title, 'Title', :class => Title, :optional => false
|
257
|
-
object_node :description, 'Description', :class => Description, :optional => true
|
258
|
-
object_node :reference_url, 'ReferenceURL', :class => ReferenceURL, :optional => true
|
259
|
-
end
|
260
|
-
|
261
|
-
# Information that can be used for contacting someone with regard to this resource.
|
262
|
-
class Contact; end
|
263
|
-
class ContactType
|
264
|
-
include XML::Mapping
|
265
|
-
|
266
|
-
object_node :name, 'Name', :class => Name, :optional => false
|
267
|
-
object_node :identifier, 'Identifier', :class => Identifier, :optional => true
|
268
|
-
object_name :email, 'Email', :class => Email, :optional => true
|
269
|
-
end
|
270
|
-
|
271
|
-
# The name of someone or something.
|
272
|
-
class Name
|
273
|
-
include XML::Mapping
|
274
|
-
|
275
|
-
text_node :value, '', :optional => false
|
276
|
-
end
|
277
|
-
|
278
|
-
# An email address.
|
279
|
-
class Email
|
280
|
-
include XML::Mapping
|
281
|
-
|
282
|
-
text_node :value, '', :optional => false
|
283
|
-
end
|
284
|
-
|
285
|
-
# Date associated with an event in the life cycle of the resource.
|
286
|
-
class Date; end
|
287
|
-
class DateType
|
288
|
-
include XML::Mapping
|
289
|
-
|
290
|
-
# a string indicating what the date refers to
|
291
|
-
text_node :role, '@role', :optional => true, :default_value => 'representative'
|
292
|
-
|
293
|
-
date_time_node :value, '', :optional => false
|
294
|
-
end
|
295
|
-
|
296
|
-
# Entity responsible for contributions to the content of the resource.
|
297
|
-
class Contributor; end
|
298
|
-
|
299
|
-
class NameReferenceType
|
300
|
-
include XML::Mapping
|
301
|
-
|
302
|
-
object_node :identifier, 'Identifier', :class => Identifier, :optional => true
|
303
|
-
object_node :name, 'Name', :class => Name, :optional => false
|
304
|
-
end
|
305
|
-
|
306
|
-
# The entity (e.g. person or organisation) primarily responsible for creating the content or constitution of the resource.
|
307
|
-
class Creator; end
|
308
|
-
class CreatorType
|
309
|
-
object_node :logo, 'Logo', :class => Logo, :optional => true
|
310
|
-
end
|
311
|
-
|
312
|
-
# URL pointing to a graphical logo, which may be used to help identify the information source.
|
313
|
-
class Logo; end
|
314
|
-
|
315
|
-
# Label associated with creation or availablilty of a version ofa resource.
|
316
|
-
class Version
|
317
|
-
include XML::Mapping
|
318
|
-
|
319
|
-
text_node :value, '', :optional => false
|
320
|
-
end
|
321
|
-
|
322
|
-
# List of topics, object types, or other descriptive keywords about the resource.
|
323
|
-
class Subject
|
324
|
-
include XML::Mapping
|
325
|
-
|
326
|
-
text_node :value, '', :optional => false
|
327
|
-
end
|
328
|
-
|
329
|
-
# Description of the content level or intended audience.
|
330
|
-
class ContentLevel; end
|
331
|
-
class ContentLevelType
|
332
|
-
include XML::Mapping
|
333
|
-
|
334
|
-
text_enumeration_node :value, '', :optional => false,
|
335
|
-
:choices => ['General', 'Elementary Education', 'Middle School Education', 'Secondary Education',
|
336
|
-
'Community College', 'University', 'Research', 'Amateur', 'Informal Education']
|
337
|
-
end
|
338
|
-
|
339
|
-
# A description of a service interface.
|
340
|
-
class Interface; end
|
341
|
-
# This is typically used as a base type for defining specific
|
342
|
-
# kinds of service interfaces. If this type is used
|
343
|
-
# directly, the Description element should be used to describe
|
344
|
-
# how to invoke the service.
|
345
|
-
class InterfaceType
|
346
|
-
require XML::Mapping
|
347
|
-
|
348
|
-
object_node :invocation, 'Invocation', :class => Invocation, :optional => false
|
349
|
-
object_node :description, 'Description', :class => Description, :optional => true
|
350
|
-
object_node :access_url, 'AccessURL', :class => AccessURL, :optional => false
|
351
|
-
end
|
352
|
-
|
353
|
-
# The type of interface used by the current Service, expressed as a controlled name.
|
354
|
-
class Invocation; end
|
355
|
-
class InvocationType
|
356
|
-
require XML::Mapping
|
357
|
-
|
358
|
-
text_enumeration_node :value, '', :optional => false,
|
359
|
-
:choices => ['Extended', 'WebService', 'WebBrowser', 'GLUService']
|
360
|
-
end
|
361
|
-
|
362
|
-
# A full or base URL that can be used to access data or a service.
|
363
|
-
class AccessURL; end
|
364
|
-
class AccessURLType
|
365
|
-
# a flag indicating whether this should be interpreted as a base
|
366
|
-
# URL, a full URL, or a URL to a directory that will produce a
|
367
|
-
# listing of files
|
368
|
-
text_enumeration_node :use, '@use', :optional => true,
|
369
|
-
:choices => ['full', 'base', 'dir']
|
370
|
-
end
|
371
|
-
|
372
|
-
# A specific description of the context and capabilities of a service.
|
373
|
-
class Capability; end
|
374
|
-
# This is a base type for defining specific kinds of service
|
375
|
-
# capability descriptions, each with its own special mark-up schema.
|
376
|
-
class CapabilityType
|
377
|
-
include XML::Mapping
|
378
|
-
|
379
|
-
object_node :standard_url, 'StandardURL', :class => StandardURL, :optional => true
|
380
|
-
object_node :standard_id, 'StandardID', :class => StandardID, :optional => true
|
381
|
-
end
|
382
|
-
|
383
|
-
# The observatory or facility used to collect the data contained or managed by this resource.
|
384
|
-
class Facility; end
|
385
|
-
|
386
|
-
# the instrument used to collect the data contain or managed by a resource.
|
387
|
-
class Instrument; end
|
388
|
-
|
389
|
-
# A resource that provides an interface for executing some operation or retrieving data.
|
390
|
-
class Service; end
|
391
|
-
class ServiceType
|
392
|
-
object_node :capability, 'Capability', :class => Capability, :optional => true
|
393
|
-
object_node :interface, 'Interface', :class => Interface, :optional => false
|
394
|
-
end
|
395
|
-
|
396
|
-
# An identifier for a registered standard.
|
397
|
-
class StandardID; end
|
398
|
-
|
399
|
-
# A URL that points to a human-readable document that describes the standard upon which a resource is based.
|
400
|
-
class StandardURL; end
|
401
|
-
|
402
|
-
end
|
403
|
-
end
|
404
|
-
end
|
405
|
-
end
|
@@ -1,230 +0,0 @@
|
|
1
|
-
require 'voruby/resources/voresource/loader'
|
2
|
-
|
3
|
-
# Re-use the classes unchanged from previous versions of the schema.
|
4
|
-
require 'voruby/resources/voresource/voresource_v0_10'
|
5
|
-
|
6
|
-
module VORuby
|
7
|
-
module Resources
|
8
|
-
module VOResource
|
9
|
-
module V1_0
|
10
|
-
|
11
|
-
# Forward declarations
|
12
|
-
class Resource; end
|
13
|
-
class Organisation < Resource; end
|
14
|
-
class Service < Resource; end
|
15
|
-
class ValidationLevel; end
|
16
|
-
class Curation; end
|
17
|
-
class ResourceName < VOResource::V0_10::ResourceName; end
|
18
|
-
class Creator < VOResource::V0_10::Creator; end
|
19
|
-
class Contact < VOResource::V0_10::Contact; end
|
20
|
-
class Content; end
|
21
|
-
class Subject; end
|
22
|
-
class Source < VOResource::V0_10::Source; end
|
23
|
-
class Type < VOResource::V0_10::Type; end
|
24
|
-
class ContentLevel < VOResource::V0_10::ContentLevel; end
|
25
|
-
class Relationship; end
|
26
|
-
class RelatedResource; end
|
27
|
-
class Rights; end
|
28
|
-
class Capability; end
|
29
|
-
class Interface; end
|
30
|
-
class SecurityMethod; end
|
31
|
-
class AuthorityID < VOResource::V0_10::AuthorityID; end
|
32
|
-
class WebBrowser < Interface; end
|
33
|
-
class WebService < Interface; end
|
34
|
-
class Validation < ValidationLevel; end
|
35
|
-
class UTCTimestamp; end
|
36
|
-
class UTCDateTime < UTCTimestamp; end
|
37
|
-
class Date < UTCDateTime; end
|
38
|
-
class ShortName < VOResource::V0_10::ShortName; end
|
39
|
-
class AnyURI < VOResource::V0_10::AnyURI; end
|
40
|
-
class IdentifierURI < VOResource::V0_10::IdentifierURI; end
|
41
|
-
class AccessURL < AnyURI; end
|
42
|
-
class ResourceKey < VOResource::V0_10::ResourceKey; end
|
43
|
-
|
44
|
-
$CapabilityUnmarshaller = Resources::namespace_dispatcher(
|
45
|
-
'VORuby::Resources::VOResource::V1_0',
|
46
|
-
'Capability', Capability)
|
47
|
-
$InterfaceUnmarshaller = Resources::namespace_dispatcher(
|
48
|
-
'VORuby::Resources::VOResource::V1_0',
|
49
|
-
'Interface', Interface)
|
50
|
-
|
51
|
-
# Any entity or component of a VO application that is describable and identifiable by a IVOA Identifier.
|
52
|
-
class Resource
|
53
|
-
include XML::Mapping
|
54
|
-
|
55
|
-
text_node :title, 'title', :optional => false
|
56
|
-
date_time_node :created, '@created', :optional => true
|
57
|
-
date_time_node :updated, '@updated', :optional => true
|
58
|
-
|
59
|
-
text_enumeration_node :status, '@status', :optional => false, :default_value => 'active',
|
60
|
-
:choices => ['active', 'inactive', 'deleted']
|
61
|
-
|
62
|
-
object_node :short_name, 'shortName', :class => ShortName, :optional => true
|
63
|
-
object_node :identifier, 'identifier', :class => IdentifierURI, :optional => false
|
64
|
-
object_node :curation, 'curation', :class => Curation, :optional => false
|
65
|
-
object_node :content, 'content', :class => Content, :optional => false
|
66
|
-
array_node :validation_levels, 'validationLevel', :class => Validation, :optional => true, :default_value => []
|
67
|
-
end
|
68
|
-
|
69
|
-
# A numeric grade describing the quality of the
|
70
|
-
# resource description, when applicable,
|
71
|
-
# to be used to indicate the confidence an end-user
|
72
|
-
# can put in the resource as part of a VO application
|
73
|
-
# or research study.
|
74
|
-
class ValidationLevel
|
75
|
-
include XML::Mapping
|
76
|
-
|
77
|
-
numeric_enumeration_node :value, '', :optional => false,
|
78
|
-
:choices => [0, 1, 2, 3, 4]
|
79
|
-
end
|
80
|
-
|
81
|
-
# Information regarding the general curation of the resource.
|
82
|
-
class Curation
|
83
|
-
include XML::Mapping
|
84
|
-
|
85
|
-
text_node :version, 'version', :optional => true
|
86
|
-
|
87
|
-
object_node :publisher, 'publisher', :class => ResourceName, :optional => false
|
88
|
-
|
89
|
-
array_node :creators, 'creator', :class => Creator, :default_value => [], :optional => true
|
90
|
-
array_node :contributors, 'contributor', :class => ResourceName, :default_value => [], :optional => true
|
91
|
-
array_node :dates, 'date', :class => Date, :default_value => [], :optional => true
|
92
|
-
array_node :contacts, 'contact', :class => Contact, :optional => false
|
93
|
-
end
|
94
|
-
|
95
|
-
# Date associated with an event in the life cycle of the resource.
|
96
|
-
class Date
|
97
|
-
include XML::Mapping
|
98
|
-
|
99
|
-
text_node :role, '@role', :optional => false, :default_value => 'representative'
|
100
|
-
end
|
101
|
-
|
102
|
-
# Information regarding the general content of the resource.
|
103
|
-
class Content
|
104
|
-
include XML::Mapping
|
105
|
-
|
106
|
-
text_node :description, 'description', :optional => false
|
107
|
-
|
108
|
-
object_node :source, 'source', :class => Source, :optional => true
|
109
|
-
object_node :reference_url, 'referenceURL', :class => AnyURI, :optional => false
|
110
|
-
|
111
|
-
array_node :subjects, 'subject', :class => Subject, :optional => false
|
112
|
-
array_node :types, 'type', :class => Type, :default_value => [], :optional => true
|
113
|
-
array_node :content_levels, 'contentLevel', :class => ContentLevel, :default_value => [], :optional => true
|
114
|
-
array_node :relationships, 'relationship', :class => Relationship, :default_value => [], :optional => true
|
115
|
-
end
|
116
|
-
|
117
|
-
# A topic, object type, or other descriptive keywords about the resource.
|
118
|
-
class Subject
|
119
|
-
include XML::Mapping
|
120
|
-
|
121
|
-
text_node :value, '', :optional => false
|
122
|
-
end
|
123
|
-
|
124
|
-
# A description of a relationship to another resource.
|
125
|
-
class Relationship
|
126
|
-
include XML::Mapping
|
127
|
-
|
128
|
-
text_node :relationship_type, 'relationshipType', :optional => false
|
129
|
-
|
130
|
-
array_node :related_resources, 'relatedResource', :class => RelatedResource, :optional => false
|
131
|
-
end
|
132
|
-
|
133
|
-
# The name of resource that this resource is related to.
|
134
|
-
class RelatedResource
|
135
|
-
include XML::Mapping
|
136
|
-
|
137
|
-
text_node :value, '', :optional => false
|
138
|
-
end
|
139
|
-
|
140
|
-
# A named group of one or more persons brought together to pursue participation in VO applications.
|
141
|
-
class Organisation
|
142
|
-
array_node :facilities, 'facility', :class => ResourceName, :optional => true, :default_value => []
|
143
|
-
array_node :instruments, 'instrument', :class => ResourceName, :optional => true, :default_value => []
|
144
|
-
end
|
145
|
-
|
146
|
-
# A resource that can be invoked by a client to perform some action on its behalf.
|
147
|
-
class Service
|
148
|
-
array_node :rights, 'rights', :class => Rights, :optional => true, :default_value => []
|
149
|
-
|
150
|
-
# Choose the capability based on the type.
|
151
|
-
array_node :capabilities, 'capability', :unmarshaller => $CapabilityUnmarshaller, :optional => true,
|
152
|
-
:default_value => []
|
153
|
-
end
|
154
|
-
|
155
|
-
# Information about rights held in and over the resource.
|
156
|
-
class Rights
|
157
|
-
include XML::Mapping
|
158
|
-
|
159
|
-
text_enumeration_node :value, '', :optional => false,
|
160
|
-
:choices => ['public', 'secure', 'proprietary']
|
161
|
-
end
|
162
|
-
|
163
|
-
# A description of a general capability of the service and how to use it.
|
164
|
-
class Capability
|
165
|
-
include XML::Mapping
|
166
|
-
|
167
|
-
text_node :capability_type, '@type', :optional => true
|
168
|
-
text_node :description, 'description', :optional => true
|
169
|
-
|
170
|
-
object_node :standard_id, '@standardID', :class => AnyURI, :optional => true
|
171
|
-
|
172
|
-
array_node :validation_levels, 'validationLevel', :class => Validation, :optional => true, :default_value => []
|
173
|
-
array_node :interfaces, 'interface', :unmarshaller => $InterfaceUnmarshaller, :optional => true, :default_value => []
|
174
|
-
end
|
175
|
-
|
176
|
-
# A description of how to call the service to access this capability
|
177
|
-
class Interface
|
178
|
-
include XML::Mapping
|
179
|
-
|
180
|
-
text_node :interface_type, '@type', :optional => false
|
181
|
-
text_node :version, '@version', :optional => true, :default_value => '1.0'
|
182
|
-
text_node :role, '@role', :optional => true
|
183
|
-
|
184
|
-
array_node :access_urls, 'accessURL', :class => AccessURL, :optional => false
|
185
|
-
array_node :security_methods, 'securityMethod', :class => SecurityMethod, :optional => true, :default_value => []
|
186
|
-
end
|
187
|
-
|
188
|
-
# The URL (or base URL) that a client uses to access the service.
|
189
|
-
class AccessURL
|
190
|
-
text_enumeration_node :use, '@use', :optional => false, :default_value => 'full',
|
191
|
-
:choices => ['full', 'base', 'post', 'dir']
|
192
|
-
end
|
193
|
-
|
194
|
-
# A description of a security mechanism.
|
195
|
-
class SecurityMethod
|
196
|
-
include XML::Mapping
|
197
|
-
|
198
|
-
object_node :standard_id, '@standardID', :class => AnyURI, :optional => false
|
199
|
-
end
|
200
|
-
|
201
|
-
# A (form-based) interface intended to be accesed interactively by a user via a web browser.
|
202
|
-
class WebBrowser; end
|
203
|
-
|
204
|
-
# A Web Service that is describable by a WSDL document.
|
205
|
-
class WebService
|
206
|
-
array_node :wsdl_urls, 'wsdlURL', :class => AnyURI, :optional => true, :default_value => []
|
207
|
-
end
|
208
|
-
|
209
|
-
# A validation stamp combining a validation level and the ID of the validator.
|
210
|
-
class Validation
|
211
|
-
object_node :validated_by, '@validatedBy', :class => IdentifierURI, :optional => false
|
212
|
-
end
|
213
|
-
|
214
|
-
# A timestamp that is compliant with ISO8601 but disallows the use of a timezone indicator.
|
215
|
-
class UTCTimestamp
|
216
|
-
include XML::Mapping
|
217
|
-
|
218
|
-
text_node :value, '', :optional => false
|
219
|
-
|
220
|
-
def value=(timestamp)
|
221
|
-
raise RuntimeError, "UTCTimestamp '#{timestamp} in wrong format" if !timestamp.strip.match('^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?$')
|
222
|
-
|
223
|
-
@value = Time.parse(timestamp.strip)
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|