Package gavo :: Package registry :: Module builders
[frames] | no frames]

Module builders

source code

Functions returning xmlstan for various OAI/VOR documents.

This comprises basic VOResource elements; capabilities and interfaces (i.e. everything to do with renderers) are in registry.capabilities.

All this only becomes difficult when actually generating VOResource metadata (OAI is plain). For every type of VO resource (CatalogService, Registry, etc), there's a XYResourceMaker, all inheriting ResourceMaker.

The decision what VOResource type a given service has is passed using common.getResType; this means the resType meta is tried first, using resob.resType as a fallback.

Classes
  ResourceMaker
A base class for the generation of VOResource elements.
  ServiceResourceMaker
A ResourceMaker adding rights and capabilities.
  DataServiceResourceMaker
A ResourceMaker for DataServices.
  CatalogServiceResourceMaker
  RegistryResourceMaker
  OrgResourceMaker
  AuthResourceMaker
  StandardsResourceMaker
  DocResourceMaker
  DeletedResourceMaker
  DataCollectionResourceMaker
A base class for Table- and DataResourceMaker.
  TableResourceMaker
A ResourceMaker for rscdef.TableDef items (yielding reformed DataCollections)
  DataResourceMaker
A ResourceMaker for rscdef.DataDescriptor items (yielding reformed DataCollections)
Functions
 
getResourceArgs(resob)
returns the mandatory attributes for constructing a Resource record for service in a dictionary.
source code
 
getOAIHeaderElementForRestup(restup) source code
 
getIdentifyElement(registryService)
returns OAI Identify stanxml.
source code
 
getListIdentifiersElement(restups)
returns an OAI ListIdentifiers element for the rec tuples recs.
source code
 
getListMetadataFormatsElement() source code
 
getListSetsElement() source code
 
getResourceElement(resob, setNames, metadataMaker)
helps get[VO|DC]ResourceElement.
source code
 
getDCMetadataElement(resob, setNames) source code
 
getDCResourceElement(resob, setNames=set(['ivo_managed'])) source code
 
getDCListRecordsElement(resobs, setNames, makeRecord=<__builtin__.function object>)
returns stanxml for ListRecords in dublin core format.
source code
 
getDCGetRecordElement(resob) source code
 
getVORMetadataElement(resob, setNames=set(['ivo_managed'])) source code
 
getVOResourceElement(resob, setNames=set(['ivo_managed']))
returns a stanxml for Resource in VOR format.
source code
 
getVOListRecordsElement(resobs, setNames) source code
 
getVOGetRecordElement(resob) source code
Variables
  VALIDATING = False
  __package__ = 'gavo.registry'
  metaName = 'uses'
  term = 'IsServedBy'
  vorTerm = 'Cites'
Function Details

getIdentifyElement(registryService)

source code 

returns OAI Identify stanxml.

registryService is the registry we're identifying, i.e. typically __system__/services#registry

getDCListRecordsElement(resobs, setNames, makeRecord=<__builtin__.function object>)

source code 

returns stanxml for ListRecords in dublin core format.

resobs is a sequence of res objects. makeRecord(resob, setNames) -> stanxml is a function that returns an OAI.record element. For ivo_vor metadata prefixes, this is overridden. by getVOListRecordsElement.

getVOResourceElement(resob, setNames=set(['ivo_managed']))

source code 

returns a stanxml for Resource in VOR format.

There's trouble here in that we have set management on the level of renderers (capabilities). Thus, to come up with capabilities for a given ivorn, we have to know what set is queried. However, OAI GetRecord doesn't specify sets. So, we provide a default set of ivo_managed, assuming that the registry is only interested in records actually VO-registred. This may fly into our face, but I can't see a way around it given the way our services are described.