1 """
2 Common code and definitions for registry support.
3 """
4
5
6
7
8
9
10
11 from gavo import base
12 from gavo import utils
13 from gavo.utils import stanxml
14
15
16 SERVICELIST_ID = "__system__/services"
17
18
19 METADATA_PREFIXES = [
20
21 ("oai_dc", stanxml.schemaURL("OAI-PMH.xsd"),
22 "http://www.openarchives.org/OAI/2.0/oai_dc/"),
23 ("ivo_vor", stanxml.schemaURL("VOResource-v1.0.xsd"),
24 "http://www.ivoa.net/xml/RegistryInterface/v1.0"),
25 ]
26
27
29 """is one of the standard OAI errors.
30 """
31
40
41
44
45
48
49
55
56
68
69
71 """A mixin providing computers for dateUpdated and datetimeUpdated.
72
73 The trouble is that we need this in various formats. Classes
74 mixing this in may give a dateUpdated attribute (a datetime.datetime)
75 that is used to compute both meta elements.
76
77 If any of them is overridden manually, the other is computed from
78 the one given.
79 """
85
90
95
96
97 __all__ = ["SERVICELIST_ID", "METADATA_PREFIXES",
98
99 "getResType", "getServicesRD", "getRegistryService", "getDependencies",
100
101 "DateUpdatedMixin",
102
103 "OAIError", "BadArgument", "BadResumptionToken", "BadVerb",
104 "CannotDisseminateFormat", "IdDoesNotExist",
105 "NoMetadataFormats", "NoSetHierarchy",
106 "NoRecordsMatch",
107 ]
108