| 1 |
""" |
| 2 |
The schema and XML namespaces for OAI/VOR documents. |
| 3 |
""" |
| 4 |
|
| 5 |
#c Copyright 2008-2025, the GAVO project <[email protected]> |
| 6 |
#c |
| 7 |
#c This program is free software, covered by the GNU GPL. See the |
| 8 |
#c COPYING file in the source distribution. |
| 9 |
|
| 10 |
|
| 11 |
from gavo import base |
| 12 |
from gavo.utils.stanxml import Element, schemaURL, registerPrefix, xsiPrefix |
| 13 |
|
| 14 |
|
| 15 |
class Error(base.Error): |
| 16 |
pass |
| 17 |
|
| 18 |
|
| 19 |
# See stanxml for the root of all the following evil. |
| 20 |
# If you change schemaURL here, you will quite certainly have |
| 21 |
# to fix testtricks.VO_SCHEMATA as well. |
| 22 |
registerPrefix("oai", "http://www.openarchives.org/OAI/2.0/", |
| 23 |
schemaURL("OAI-PMH.xsd")) |
| 24 |
registerPrefix("oai_dc", "http://www.openarchives.org/OAI/2.0/oai_dc/", |
| 25 |
schemaURL("oai_dc.xsd")) |
| 26 |
registerPrefix("ri", |
| 27 |
"http://www.ivoa.net/xml/RegistryInterface/v1.0", |
| 28 |
schemaURL("RegistryInterface.xsd")) |
| 29 |
registerPrefix("vg", "http://www.ivoa.net/xml/VORegistry/v1.0", |
| 30 |
schemaURL("VORegistry.xsd")) |
| 31 |
registerPrefix("vr", "http://www.ivoa.net/xml/VOResource/v1.0", |
| 32 |
schemaURL("VOResource.xsd")) |
| 33 |
registerPrefix("dc", "http://purl.org/dc/elements/1.1/", |
| 34 |
schemaURL("simpledc20021212.xsd")) |
| 35 |
registerPrefix("vs", "http://www.ivoa.net/xml/VODataService/v1.1", |
| 36 |
schemaURL("VODataService.xsd")) |
| 37 |
registerPrefix("cs", "http://www.ivoa.net/xml/ConeSearch/v1.0", |
| 38 |
schemaURL("ConeSearch.xsd")) |
| 39 |
registerPrefix("sia", "http://www.ivoa.net/xml/SIA/v1.1", |
| 40 |
schemaURL("SIA.xsd")) |
| 41 |
registerPrefix("slap", "http://www.ivoa.net/xml/SLAP/v1.0", |
| 42 |
schemaURL("SLAP.xsd")) |
| 43 |
registerPrefix("ssap", "http://www.ivoa.net/xml/SSA/v1.1", |
| 44 |
schemaURL("SSA.xsd")) |
| 45 |
registerPrefix("tr", "http://www.ivoa.net/xml/TAPRegExt/v1.0", |
| 46 |
schemaURL("TAPRegExt.xsd")) |
| 47 |
registerPrefix("vstd", "http://www.ivoa.net/xml/StandardsRegExt/v1.0", |
| 48 |
schemaURL("StandardsRegExt.xsd")) |
| 49 |
registerPrefix("doc", "http://www.ivoa.net/xml/DocRegExt/v1", |
| 50 |
schemaURL("DocRegExt.xsd")) |
| 51 |
registerPrefix("voe", "http://www.ivoa.net/xml/VOEventRegExt/v2", |
| 52 |
schemaURL("VOEventRegExt.xsd")) |
| 53 |
registerPrefix("g-colstat", "http://dc.g-vo.org/ColStats-1", |
| 54 |
schemaURL("Colstats.xsd")) |
| 55 |
registerPrefix("eudc", "http://schema.eudat.eu/schema/kernel-1", |
| 56 |
schemaURL("eudat-core.xsd")) |
| 57 |
registerPrefix("dachs", "http://docs.g-vo.org/schemata/DaCHS.xsd", |
| 58 |
schemaURL("DaCHS.xsd")) |
| 59 |
|
| 60 |
|
| 61 |
class _ResourceNameMixin(object): |
| 62 |
_a_ivoId = None |
| 63 |
_name_a_ivoId = "ivo-id" |
| 64 |
|
| 65 |
|
| 66 |
class OAI(object): |
| 67 |
"""is a container for classes modelling OAI elements. |
| 68 |
""" |
| 69 |
class OAIElement(Element): |
| 70 |
_prefix = "oai" |
| 71 |
|
| 72 |
class PMH(OAIElement): |
| 73 |
name_ = "OAI-PMH" |
| 74 |
|
| 75 |
class responseDate(OAIElement): pass |
| 76 |
|
| 77 |
class request(OAIElement): |
| 78 |
_mayBeEmpty = True |
| 79 |
_a_verb = None |
| 80 |
_a_metadataPrefix = None |
| 81 |
|
| 82 |
class metadata(OAIElement): pass |
| 83 |
|
| 84 |
class Identify(OAIElement): pass |
| 85 |
|
| 86 |
class ListIdentifiers(OAIElement): pass |
| 87 |
|
| 88 |
class ListRecords(OAIElement): pass |
| 89 |
|
| 90 |
class GetRecord(OAIElement): pass |
| 91 |
|
| 92 |
class ListMetadataFormats(OAIElement): pass |
| 93 |
|
| 94 |
class ListSets(OAIElement): |
| 95 |
_mayBeEmpty = True |
| 96 |
|
| 97 |
class header(OAIElement): |
| 98 |
_a_status = None |
| 99 |
|
| 100 |
class error(OAIElement): |
| 101 |
_mayBeEmpty = True |
| 102 |
_a_code = None |
| 103 |
|
| 104 |
class record(OAIElement): pass |
| 105 |
|
| 106 |
class identifier(OAIElement): pass |
| 107 |
|
| 108 |
class datestamp(OAIElement): pass |
| 109 |
|
| 110 |
class setSpec(OAIElement): pass |
| 111 |
|
| 112 |
class repositoryName(OAIElement): pass |
| 113 |
|
| 114 |
class baseURL(OAIElement): pass |
| 115 |
|
| 116 |
class adminEmail(OAIElement): pass |
| 117 |
|
| 118 |
class earliestDatestamp(OAIElement): pass |
| 119 |
|
| 120 |
class deletedRecord(OAIElement): pass |
| 121 |
|
| 122 |
class granularity(OAIElement): pass |
| 123 |
|
| 124 |
class description(OAIElement): pass |
| 125 |
|
| 126 |
class protocolVersion(OAIElement): pass |
| 127 |
|
| 128 |
class metadataFormat(OAIElement): pass |
| 129 |
|
| 130 |
class metadataPrefix(OAIElement): pass |
| 131 |
|
| 132 |
class schema(OAIElement): pass |
| 133 |
|
| 134 |
class metadataNamespace(OAIElement): pass |
| 135 |
|
| 136 |
class set(OAIElement): pass |
| 137 |
|
| 138 |
class setName(OAIElement): pass |
| 139 |
|
| 140 |
class setDescription(OAIElement): pass |
| 141 |
|
| 142 |
class resumptionToken(OAIElement): pass |
| 143 |
# optional attributes not supported here |
| 144 |
# The string value in here has a structure; see oaiinter. |
| 145 |
|
| 146 |
|
| 147 |
class OAIDC: |
| 148 |
"""is a container for OAI's Dublin Core metadata model. |
| 149 |
""" |
| 150 |
class OAIDCElement(Element): |
| 151 |
_prefix = "oai_dc" |
| 152 |
|
| 153 |
class dc(OAIDCElement): |
| 154 |
pass |
| 155 |
|
| 156 |
|
| 157 |
class VOR: |
| 158 |
"""is a container for classes modelling elements from VO Resource. |
| 159 |
""" |
| 160 |
class VORElement(Element): |
| 161 |
_prefix = "vr" |
| 162 |
_local = True |
| 163 |
|
| 164 |
class Resource(VORElement): |
| 165 |
# This is "abstract" in that only derived elements may be present |
| 166 |
# in an instance document (since VOR doesn't define any global elements). |
| 167 |
# Typically, this will be vr:Resource elements with some funky xsi:type |
| 168 |
_a_created = None |
| 169 |
_a_updated = None |
| 170 |
_a_status = None |
| 171 |
_a_version = "1.2" |
| 172 |
name_ = "Resource" |
| 173 |
_local = False |
| 174 |
_additionalPrefixes = frozenset(["vr", "ri", "xsi"]) |
| 175 |
|
| 176 |
def __repr__(self): |
| 177 |
# see if we can find out our identifier -- that's going to help |
| 178 |
# in debugging. |
| 179 |
identifier = "(unknown)" |
| 180 |
for child in self.iterChildrenWithName("identifier"): |
| 181 |
identifier = child.text_ |
| 182 |
break |
| 183 |
|
| 184 |
return "<%s: %s>"%( |
| 185 |
self.__class__.__name__.split(".")[-1], |
| 186 |
identifier) |
| 187 |
|
| 188 |
class Organisation(Resource): |
| 189 |
_a_xsi_type = "vr:Organisation" |
| 190 |
|
| 191 |
class Service(Resource): |
| 192 |
_a_xsi_type = "vr:Service" |
| 193 |
|
| 194 |
class validationLevel(VORElement): |
| 195 |
_a_validatedBy = None |
| 196 |
|
| 197 |
class title(VORElement): pass |
| 198 |
|
| 199 |
class shortName(VORElement): pass |
| 200 |
|
| 201 |
class ResourceName(VORElement): |
| 202 |
_a_ivoId = None |
| 203 |
_name_a_ivoId = "ivo-id" |
| 204 |
_a_altIdentifier = None |
| 205 |
|
| 206 |
class identifier(VORElement): pass |
| 207 |
|
| 208 |
class altIdentifier(VORElement): pass |
| 209 |
|
| 210 |
class curation(VORElement): pass |
| 211 |
|
| 212 |
class content(VORElement): pass |
| 213 |
|
| 214 |
class creator(VORElement): pass |
| 215 |
|
| 216 |
class contributor(ResourceName): pass |
| 217 |
|
| 218 |
class date(VORElement): |
| 219 |
_a_role = None |
| 220 |
|
| 221 |
class version(VORElement): pass |
| 222 |
|
| 223 |
class contact(VORElement): pass |
| 224 |
|
| 225 |
class publisher(ResourceName): pass |
| 226 |
|
| 227 |
class facility(VORElement): pass |
| 228 |
|
| 229 |
class instrument(ResourceName): pass |
| 230 |
|
| 231 |
class name(ResourceName): pass |
| 232 |
|
| 233 |
class address(VORElement): pass |
| 234 |
|
| 235 |
class email(VORElement): pass |
| 236 |
|
| 237 |
class telephone(VORElement): pass |
| 238 |
|
| 239 |
class logo(VORElement): pass |
| 240 |
|
| 241 |
class subject(VORElement): pass |
| 242 |
|
| 243 |
class description(VORElement): pass |
| 244 |
|
| 245 |
class source(VORElement): |
| 246 |
_a_format = None |
| 247 |
|
| 248 |
class referenceURL(VORElement): pass |
| 249 |
|
| 250 |
class type(VORElement): pass |
| 251 |
|
| 252 |
class contentLevel(VORElement): pass |
| 253 |
|
| 254 |
class relationship(VORElement): |
| 255 |
def _setupNode(self): |
| 256 |
self.__isEmpty = None |
| 257 |
self._setupNodeNext(VOR.relationship) |
| 258 |
|
| 259 |
def isEmpty(self): |
| 260 |
# special rule: a relationship is empty if there's no relatedResource |
| 261 |
# in them (this is a simplification of "don't count relationshipType |
| 262 |
# since it's always non-empty"). |
| 263 |
if self._isEmptyCache is None: |
| 264 |
self._isEmptyCache = True |
| 265 |
for c in self.iterChildrenOfType(VOR.relatedResource): |
| 266 |
self._isEmptyCache = False |
| 267 |
break |
| 268 |
return self._isEmptyCache |
| 269 |
|
| 270 |
class relationshipType(VORElement): pass |
| 271 |
|
| 272 |
class relatedResource(VORElement): |
| 273 |
_a_ivoId = None |
| 274 |
_name_a_ivoId = "ivo-id" |
| 275 |
_a_altIdentifier = None |
| 276 |
|
| 277 |
class rights(VORElement): |
| 278 |
_a_rightsURI = None |
| 279 |
|
| 280 |
class capability(VORElement): |
| 281 |
name_ = "capability" |
| 282 |
_additionalPrefixes = xsiPrefix |
| 283 |
_a_standardID = None |
| 284 |
|
| 285 |
class interface(VORElement): |
| 286 |
name_ = "interface" |
| 287 |
_additionalPrefixes = xsiPrefix |
| 288 |
_a_version = None |
| 289 |
_a_role = None |
| 290 |
_a_qtype = None |
| 291 |
|
| 292 |
class WebBrowser(interface): |
| 293 |
_a_xsi_type = "vr:WebBrowser" |
| 294 |
|
| 295 |
class WebService(interface): |
| 296 |
_a_xsi_type = "vr:WebService" |
| 297 |
|
| 298 |
class wsdlURL(VORElement): pass |
| 299 |
|
| 300 |
class accessURL(VORElement): |
| 301 |
_a_use = None |
| 302 |
|
| 303 |
class mirrorURL(VORElement): pass |
| 304 |
|
| 305 |
class securityMethod(VORElement): |
| 306 |
def isEmpty(self): |
| 307 |
return self.standardId is None |
| 308 |
_a_standardId = None |
| 309 |
|
| 310 |
|
| 311 |
class RI: |
| 312 |
"""is a container for classes modelling elements from IVOA Registry Interface. |
| 313 |
""" |
| 314 |
class RIElement(Element): |
| 315 |
_prefix = "ri" |
| 316 |
|
| 317 |
class VOResources(RIElement): pass |
| 318 |
|
| 319 |
class Resource(VOR.Resource): |
| 320 |
_prefix = "ri" |
| 321 |
|
| 322 |
|
| 323 |
class VOG: |
| 324 |
"""is a container for classes modelling elements from VO Registry. |
| 325 |
""" |
| 326 |
class VOGElement(Element): |
| 327 |
_prefix = "vg" |
| 328 |
_local = True |
| 329 |
|
| 330 |
class Resource(RI.Resource): |
| 331 |
_a_xsi_type = "vg:Registry" |
| 332 |
_additionalPrefixes = frozenset(["vg", "xsi"]) |
| 333 |
|
| 334 |
class Authority(RI.Resource): |
| 335 |
_a_xsi_type = "vg:Authority" |
| 336 |
_additionalPrefixes = frozenset(["vg", "xsi"]) |
| 337 |
|
| 338 |
class capability(VOR.capability): |
| 339 |
_a_standardID = "ivo://ivoa.net/std/registry" |
| 340 |
|
| 341 |
class Harvest(capability): |
| 342 |
_a_xsi_type = "vg:Harvest" |
| 343 |
_additionalPrefixes = frozenset(["vg", "xsi", "vs"]) |
| 344 |
|
| 345 |
class Search(VOGElement): |
| 346 |
_a_xsi_type = "vg:Search" |
| 347 |
_additionalPrefixes = frozenset(["vg", "xsi", "vs"]) |
| 348 |
|
| 349 |
class OAIHTTP(VOR.interface): |
| 350 |
_a_xsi_type = "vg:OAIHTTP" |
| 351 |
# namespace declaration has happened in enclosing element |
| 352 |
|
| 353 |
class OAISOAP(VOR.interface): |
| 354 |
_a_xsi_type = "vg:OAISOAP" |
| 355 |
# namespace declaration has happened in enclosing element |
| 356 |
|
| 357 |
class full(VOGElement): pass |
| 358 |
|
| 359 |
class managedAuthority(VOGElement): pass |
| 360 |
|
| 361 |
class validationLevel(VOGElement): pass |
| 362 |
|
| 363 |
class description(VOGElement): pass |
| 364 |
|
| 365 |
class interface(VOGElement): pass |
| 366 |
|
| 367 |
class maxRecords(VOGElement): pass |
| 368 |
|
| 369 |
class extensionSearchSupport(VOGElement): pass |
| 370 |
|
| 371 |
class optionalProtocol(VOGElement): pass |
| 372 |
|
| 373 |
class managingOrg(VOGElement, _ResourceNameMixin): pass |
| 374 |
|
| 375 |
|
| 376 |
class DC: |
| 377 |
"""is a container for classes modelling elements from Dublin Core. |
| 378 |
""" |
| 379 |
class DCElement(Element): |
| 380 |
_prefix = "dc" |
| 381 |
|
| 382 |
class contributor(DCElement): pass |
| 383 |
|
| 384 |
class coverage(DCElement): pass |
| 385 |
|
| 386 |
class creator(DCElement): pass |
| 387 |
|
| 388 |
class date(DCElement): pass |
| 389 |
|
| 390 |
class description(DCElement): pass |
| 391 |
|
| 392 |
class format(DCElement): pass |
| 393 |
|
| 394 |
class identifier(DCElement): pass |
| 395 |
|
| 396 |
class language(DCElement): pass |
| 397 |
|
| 398 |
class publisher(DCElement): pass |
| 399 |
|
| 400 |
class relation(DCElement): pass |
| 401 |
|
| 402 |
class rights(DCElement): pass |
| 403 |
|
| 404 |
class source(DCElement): pass |
| 405 |
|
| 406 |
class subject(DCElement): pass |
| 407 |
|
| 408 |
class title(DCElement): pass |
| 409 |
|
| 410 |
class type(DCElement): pass |
| 411 |
|
| 412 |
|
| 413 |
class VS: |
| 414 |
"""A container for classes modelling elements from VODataService 1.2. |
| 415 |
""" |
| 416 |
class VSElement(Element): |
| 417 |
_prefix = "vs" |
| 418 |
_local = True |
| 419 |
|
| 420 |
class DataCollection(RI.Resource): |
| 421 |
_a_xsi_type = "vs:DataCollection" |
| 422 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 423 |
|
| 424 |
class tableset(VSElement): |
| 425 |
_additionalPrefixes = xsiPrefix |
| 426 |
_childSequence = ["schema"] |
| 427 |
|
| 428 |
class schema(VSElement): |
| 429 |
_childSequence = ["name", "title", "description", "utype", |
| 430 |
"table"] |
| 431 |
|
| 432 |
class title(VSElement): pass |
| 433 |
class utype(VSElement): pass |
| 434 |
class nrows(VSElement): pass |
| 435 |
|
| 436 |
class table(VSElement): |
| 437 |
_a_type = None |
| 438 |
_childSequence = ["name", "title", "description", "utype", |
| 439 |
"nrows", "column", "foreignKey"] |
| 440 |
|
| 441 |
class foreignKey(VSElement): |
| 442 |
_childSequence = ["targetTable", "fkColumn", "description", "utype"] |
| 443 |
|
| 444 |
class targetTable(VSElement): pass |
| 445 |
|
| 446 |
class fkColumn(VSElement): |
| 447 |
_childSequence = ["fromColumn", "targetColumn"] |
| 448 |
|
| 449 |
class fromColumn(VSElement): pass |
| 450 |
class targetColumn(VSElement): pass |
| 451 |
class flag(VSElement): pass |
| 452 |
class regionOfRegard(VSElement): pass |
| 453 |
|
| 454 |
class facility(VSElement): pass |
| 455 |
|
| 456 |
class instrument(VSElement): pass |
| 457 |
|
| 458 |
class coverage(VSElement): pass |
| 459 |
|
| 460 |
class footprint(VSElement): |
| 461 |
_a_ivoId = None |
| 462 |
_name_a_ivoId = "ivo-id" |
| 463 |
|
| 464 |
class waveband(VSElement): pass |
| 465 |
|
| 466 |
class spectral(VSElement): pass |
| 467 |
|
| 468 |
class spatial(VSElement): pass |
| 469 |
|
| 470 |
class temporal(VSElement): pass |
| 471 |
|
| 472 |
class productTypeServed(VSElement): pass |
| 473 |
|
| 474 |
class dataSource(VSElement): pass |
| 475 |
|
| 476 |
class format(VSElement): |
| 477 |
_a_isMIMEType = None |
| 478 |
|
| 479 |
class accessURL(VSElement): pass |
| 480 |
|
| 481 |
class ParamHTTP(VOR.interface): |
| 482 |
_a_xsi_type = "vs:ParamHTTP" |
| 483 |
_additionalPrefixes = frozenset(["vg", "xsi"]) |
| 484 |
|
| 485 |
class resultType(VSElement): pass |
| 486 |
|
| 487 |
class queryType(VSElement): pass |
| 488 |
|
| 489 |
class param(VSElement): |
| 490 |
_a_std = "false" |
| 491 |
|
| 492 |
class name(VSElement): pass |
| 493 |
|
| 494 |
class description(VSElement): pass |
| 495 |
|
| 496 |
class unit(VSElement): pass |
| 497 |
|
| 498 |
class ucd(VSElement): pass |
| 499 |
|
| 500 |
class Service(VOR.Resource): pass |
| 501 |
|
| 502 |
class DataResource(Service): |
| 503 |
_a_xsi_type = "vs:DataResource" |
| 504 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 505 |
|
| 506 |
class DataService(DataResource): |
| 507 |
_a_xsi_type = "vs:DataService" |
| 508 |
|
| 509 |
class CatalogResource(DataResource): |
| 510 |
_a_xsi_type = "vs:CatalogResource" |
| 511 |
|
| 512 |
class CatalogService(CatalogResource): |
| 513 |
_a_xsi_type = "vs:CatalogService" |
| 514 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 515 |
|
| 516 |
class ServiceReference(VSElement): |
| 517 |
_a_ivoId = None |
| 518 |
_name_a_ivoId = "ivo-id" |
| 519 |
|
| 520 |
# column for now contains our prototype g-colstat attributes; |
| 521 |
# these ought to be removed as we leave the prototyping state. |
| 522 |
# In particular, the _additionalPrefixes should go again then |
| 523 |
class column(VSElement): |
| 524 |
_additionalPrefixes = frozenset(["g-colstat"]) |
| 525 |
_a_minValue = None |
| 526 |
_name_a_minValue = "g-colstat:min-value" |
| 527 |
_a_maxValue = None |
| 528 |
_name_a_maxValue = "g-colstat:max-value" |
| 529 |
_a_median = None |
| 530 |
_name_a_median = "g-colstat:median" |
| 531 |
_a_percentile03 = None |
| 532 |
_name_a_percentile03 = "g-colstat:percentile03" |
| 533 |
_a_percentile97 = None |
| 534 |
_name_a_percentile97 = "g-colstat:percentile97" |
| 535 |
_a_fillFactor = None |
| 536 |
_name_a_fillFactor = "g-colstat:fillFactor" |
| 537 |
|
| 538 |
class stats(VSElement): |
| 539 |
_childSequence = ["min", "percentile03", "median", "percentile97", |
| 540 |
"max", "fillFactor", "option"] |
| 541 |
|
| 542 |
class min(VSElement): pass |
| 543 |
class percentile03(VSElement): pass |
| 544 |
class median(VSElement): pass |
| 545 |
class percentile97(VSElement): pass |
| 546 |
class max(VSElement): pass |
| 547 |
class fillFactor(VSElement): pass |
| 548 |
|
| 549 |
class option(VSElement): |
| 550 |
_a_freq = None |
| 551 |
|
| 552 |
class dataType(VSElement): |
| 553 |
name_ = "dataType" |
| 554 |
_additionalPrefixes = xsiPrefix |
| 555 |
_a_arraysize = None |
| 556 |
_a_delim = None |
| 557 |
_a_extendedSchema = None |
| 558 |
_a_extendedType = None |
| 559 |
_a_xsi_type = None |
| 560 |
|
| 561 |
class dataType(dataType): |
| 562 |
name_ = "dataType" |
| 563 |
|
| 564 |
class voTableDataType(dataType): |
| 565 |
name_ = "dataType" |
| 566 |
_a_xsi_type = "vs:VOTableType" |
| 567 |
|
| 568 |
class tapType(dataType): |
| 569 |
name_ = "dataType" |
| 570 |
_a_size = None |
| 571 |
_a_xsi_type = "vs:TAPType" |
| 572 |
|
| 573 |
|
| 574 |
class SIA(object): |
| 575 |
"""A container for classes modelling elements for describing simple |
| 576 |
image access services. |
| 577 |
""" |
| 578 |
class SIAElement(Element): |
| 579 |
_prefix = "sia" |
| 580 |
_local = True |
| 581 |
|
| 582 |
class interface(VOR.interface): |
| 583 |
_prefix = "sia" |
| 584 |
_a_role = "std" |
| 585 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 586 |
_a_xsi_type = "vs:ParamHTTP" |
| 587 |
|
| 588 |
class capability(VOR.capability): |
| 589 |
_a_standardID = "ivo://ivoa.net/std/sia" |
| 590 |
_a_xsi_type = "sia:SimpleImageAccess" |
| 591 |
_additionalPrefixes = frozenset(["sia", "xsi"]) |
| 592 |
|
| 593 |
class capability2(capability): |
| 594 |
# an artificial class to let me fix the standard id for SIAPv2 |
| 595 |
_a_standardID = "ivo://ivoa.net/std/sia#query-2.0" |
| 596 |
|
| 597 |
class imageServiceType(SIAElement): pass |
| 598 |
|
| 599 |
class maxQueryRegionSize(SIAElement): pass |
| 600 |
|
| 601 |
class maxImageExtent(SIAElement): pass |
| 602 |
|
| 603 |
class maxImageSize(SIAElement): pass |
| 604 |
|
| 605 |
class maxFileSize(SIAElement): pass |
| 606 |
|
| 607 |
class maxRecords(SIAElement): pass |
| 608 |
|
| 609 |
class long(SIAElement): pass |
| 610 |
|
| 611 |
class lat(SIAElement): pass |
| 612 |
|
| 613 |
class testQuery(SIAElement): pass |
| 614 |
|
| 615 |
class pos(SIAElement): pass |
| 616 |
|
| 617 |
class size(SIAElement): pass |
| 618 |
|
| 619 |
|
| 620 |
class SCS(object): |
| 621 |
"""A container for elements describing Simple Cone Search services. |
| 622 |
""" |
| 623 |
class SCSElement(Element): |
| 624 |
_prefix = "cs" |
| 625 |
_local = True |
| 626 |
|
| 627 |
class interface(VOR.interface): |
| 628 |
_prefix = "cs" |
| 629 |
_a_role = "std" |
| 630 |
_a_xsi_type = "vs:ParamHTTP" |
| 631 |
_additionalPrefixes = frozenset(["xsi", "vs"]) |
| 632 |
|
| 633 |
class capability(VOR.capability): |
| 634 |
_a_standardID = "ivo://ivoa.net/std/conesearch" |
| 635 |
_a_xsi_type = "cs:ConeSearch" |
| 636 |
_additionalPrefixes = frozenset(["xsi", "vs"]) |
| 637 |
|
| 638 |
class maxSR(SCSElement): pass |
| 639 |
|
| 640 |
class maxRecords(SCSElement): pass |
| 641 |
|
| 642 |
class verbosity(SCSElement): pass |
| 643 |
|
| 644 |
class testQuery(SCSElement): pass |
| 645 |
class ra(SCSElement): pass |
| 646 |
class dec(SCSElement): pass |
| 647 |
class sr(SCSElement): pass |
| 648 |
class extras(SCSElement): pass |
| 649 |
|
| 650 |
|
| 651 |
class SSAP(object): |
| 652 |
"""A container for the elements of the SSA registry extension. |
| 653 |
""" |
| 654 |
class SSAElement(Element): |
| 655 |
_prefix = "ssap" |
| 656 |
_local = True |
| 657 |
|
| 658 |
class capability(VOR.capability): |
| 659 |
_a_standardID = "ivo://ivoa.net/std/ssa" |
| 660 |
_a_xsi_type = "ssap:SimpleSpectralAccess" |
| 661 |
_additionalPrefixes = frozenset(["xsi", "vs"]) |
| 662 |
|
| 663 |
class interface(VOR.interface): |
| 664 |
_prefix = "ssap" |
| 665 |
_a_role = "std" |
| 666 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 667 |
_a_xsi_type = "vs:ParamHTTP" |
| 668 |
|
| 669 |
class complianceLevel(SSAElement): pass |
| 670 |
class dataSource(SSAElement): pass |
| 671 |
class creationType(SSAElement): pass |
| 672 |
class maxSearchRadius(SSAElement): pass |
| 673 |
class maxRecords(SSAElement): pass |
| 674 |
class defaultMaxRecords(SSAElement): pass |
| 675 |
class maxAperture(SSAElement): pass |
| 676 |
class maxFileSize(SSAElement): pass |
| 677 |
class supportedFrame(SSAElement): pass |
| 678 |
class testQuery(SSAElement): pass |
| 679 |
class queryDataCmd(SSAElement): pass |
| 680 |
|
| 681 |
|
| 682 |
class SLAP(object): |
| 683 |
"""A container for the elements of the SSA registry extension. |
| 684 |
""" |
| 685 |
class SLAPElement(Element): |
| 686 |
_prefix = "slap" |
| 687 |
_local = True |
| 688 |
|
| 689 |
class capability(VOR.capability): |
| 690 |
_a_standardID = "ivo://ivoa.net/std/slap" |
| 691 |
_a_xsi_type = "slap:SimpleLineAccess" |
| 692 |
_additionalPrefixes = frozenset(["xsi", "vs"]) |
| 693 |
|
| 694 |
class interface(VOR.interface): |
| 695 |
_a_role = "std" |
| 696 |
_additionalPrefixes = frozenset(["vs", "xsi"]) |
| 697 |
_a_xsi_type = "vs:ParamHTTP" |
| 698 |
|
| 699 |
class complianceLevel(SLAPElement): pass |
| 700 |
class dataSource(SLAPElement): pass |
| 701 |
class testQuery(SLAPElement): pass |
| 702 |
class queryDataCmd(SLAPElement): pass |
| 703 |
|
| 704 |
|
| 705 |
class TR(object): |
| 706 |
"""A container for elements describing TAP services. |
| 707 |
""" |
| 708 |
class TRElement(Element): |
| 709 |
_prefix = "tr" |
| 710 |
_local = True |
| 711 |
|
| 712 |
class _ModeDependentElement(TRElement): |
| 713 |
_a_forMode = None |
| 714 |
|
| 715 |
class interface(VOR.interface): |
| 716 |
_a_role = "std" |
| 717 |
_a_xsi_type = "vs:ParamHTTP" |
| 718 |
_additionalPrefixes = frozenset(["xsi", "vs"]) |
| 719 |
|
| 720 |
class daliInterface(VOR.interface): |
| 721 |
name_ = "interface" |
| 722 |
_a_role = "std" |
| 723 |
_a_xsi_type = "tr:DALIInterface" |
| 724 |
_additionalPrefixes = frozenset(["xsi"]) |
| 725 |
|
| 726 |
class capability(VOR.capability): |
| 727 |
_a_standardID = "ivo://ivoa.net/std/TAP" |
| 728 |
_a_xsi_type = "tr:TableAccess" |
| 729 |
_additionalPrefixes = frozenset(["tr", "xsi"]) |
| 730 |
|
| 731 |
class endpoint(TRElement): |
| 732 |
pass |
| 733 |
|
| 734 |
class meta(TRElement): |
| 735 |
_a_about = None |
| 736 |
_a_property = None |
| 737 |
_a_resource = None |
| 738 |
|
| 739 |
class dataModel(TRElement): |
| 740 |
_a_ivoId = None |
| 741 |
_name_a_ivoId = "ivo-id" |
| 742 |
|
| 743 |
class label(TRElement): |
| 744 |
pass |
| 745 |
|
| 746 |
class language(TRElement): |
| 747 |
_a_LANG = None |
| 748 |
|
| 749 |
class outputFormat(_ModeDependentElement): |
| 750 |
_a_FORMAT = None |
| 751 |
_a_mime = None |
| 752 |
_a_ivoId = None |
| 753 |
_name_a_ivoId = "ivo-id" |
| 754 |
|
| 755 |
class uploadMethod(_ModeDependentElement): |
| 756 |
_mayBeEmpty = True |
| 757 |
_a_protocol = None |
| 758 |
_a_ivoId = None |
| 759 |
_name_a_ivoId = "ivo-id" |
| 760 |
|
| 761 |
class default(TRElement): |
| 762 |
_a_unit = None |
| 763 |
|
| 764 |
class hard(TRElement): |
| 765 |
_a_unit = None |
| 766 |
|
| 767 |
class version(TRElement): |
| 768 |
_a_ivoId = None |
| 769 |
_name_a_ivoId = "ivo-id" |
| 770 |
|
| 771 |
class languageFeatures(TRElement): |
| 772 |
_a_type = None |
| 773 |
|
| 774 |
class alias(TRElement): pass |
| 775 |
class description(TRElement): pass |
| 776 |
class executionDuration(_ModeDependentElement): pass |
| 777 |
class mime(TRElement): pass |
| 778 |
class name(TRElement): pass |
| 779 |
class parameter(TRElement): pass |
| 780 |
class protocol(TRElement): pass |
| 781 |
class retentionPeriod(_ModeDependentElement): pass |
| 782 |
class outputLimit(_ModeDependentElement): pass |
| 783 |
class form(TRElement): pass |
| 784 |
class uploadLimit(_ModeDependentElement): pass |
| 785 |
class feature(TRElement): pass |
| 786 |
|
| 787 |
|
| 788 |
class VSTD(object): |
| 789 |
"""A container for elements from StandardsRegExt. |
| 790 |
""" |
| 791 |
class VSTDElement(Element): |
| 792 |
_prefix = "vstd" |
| 793 |
_local = True |
| 794 |
|
| 795 |
class endorsedVersion(VSTDElement): |
| 796 |
_a_status = "n/a" |
| 797 |
_a_use = "preferred" |
| 798 |
|
| 799 |
class Standard(RI.Resource): |
| 800 |
_a_xsi_type = "vstd:Standard" |
| 801 |
_additionalPrefixes = frozenset(["vstd", "xsi"]) |
| 802 |
|
| 803 |
class deprecated(VSTDElement): pass |
| 804 |
class key(VSTDElement): pass |
| 805 |
class description(VSTDElement): pass |
| 806 |
class name(VSTDElement): pass |
| 807 |
|
| 808 |
|
| 809 |
class DOC(object): |
| 810 |
"""A container for elements from DocRegExt. |
| 811 |
""" |
| 812 |
class DOCElement(Element): |
| 813 |
_prefix = "doc" |
| 814 |
_local = True |
| 815 |
|
| 816 |
class Document(RI.Resource): |
| 817 |
_a_xsi_type = "doc:Document" |
| 818 |
_additionalPrefixes = frozenset(["doc", "xsi"]) |
| 819 |
|
| 820 |
class capability(DOCElement): |
| 821 |
_a_xsi_type = "doc:Edition" |
| 822 |
_a_languageCode = None |
| 823 |
_a_locTitle = None |
| 824 |
|
| 825 |
class StaticFile(VOR.interface): |
| 826 |
_a_xsi_type = "doc:StaticFile" |
| 827 |
|
| 828 |
class resultType(DOCElement): pass |
| 829 |
class languageCode(DOCElement): pass |
| 830 |
class locTitle(DOCElement): pass |
| 831 |
|
| 832 |
|
| 833 |
class VOE: |
| 834 |
"""A container for elements from VOEventRegExt. |
| 835 |
""" |
| 836 |
class VOEElement(Element): |
| 837 |
_prefix = "voe" |
| 838 |
_local = True |
| 839 |
|
| 840 |
class _voeventStream(VOR.interface): |
| 841 |
name_ = "interface" |
| 842 |
_a_role = "std" |
| 843 |
_a_xsi_type = "voe:StreamEndpoint" |
| 844 |
_additionalPrefixes = frozenset(["voe"]) |
| 845 |
|
| 846 |
class vtpInterface(_voeventStream): |
| 847 |
_a_standardID = "ivo://ivoa.net/std/voevent#acc-vtp" |
| 848 |
|
| 849 |
class kafkaInterface(_voeventStream): |
| 850 |
_a_standardID = "ivo://ivoa.net/std/voevent#acc-kafka" |
| 851 |
|
| 852 |
class capability(VOR.capability): |
| 853 |
_a_standardID = "ivo://ivoa.net/std/voevent" |
| 854 |
|
| 855 |
|
| 856 |
class DaFut(object): |
| 857 |
"""A container for XSD elements we want to push into other schemas |
| 858 |
one of these days ("DaCHS Future"). |
| 859 |
""" |
| 860 |
class DaFutElement(Element): |
| 861 |
_prefix = "dachs" |
| 862 |
_local = True |
| 863 |
|
| 864 |
class daliInterface(VOR.interface): |
| 865 |
name_ = "interface" |
| 866 |
_a_role = "std" |
| 867 |
_a_xsi_type = "dachs:DALIInterface" |
| 868 |
_additionalPrefixes = frozenset(["xsi"]) |
| 869 |
|
| 870 |
class endpoint(DaFutElement): |
| 871 |
pass |
| 872 |
|
| 873 |
class meta(DaFutElement): |
| 874 |
_a_about = None |
| 875 |
_a_property = None |
| 876 |
_a_resource = None |