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

Class ResourceMaker

source code

object --+
         |
        ResourceMaker
Known Subclasses:

A base class for the generation of VOResource elements.

These have a resType attribute specifying which resource type they work for. These types are computed by the getResourceType helper function.

The makeResource function below tries the ResourceMakers in turn for the "best" one that matches.

If you create new ResourceMakers, you will have to enter them *in the correct sequence* in the _resourceMakers list below.

ResourceMaker instances are called with a resob argument and a set of set names. You will want to override the _makeResource(resob) -> xmlstan method and probably the resourceClass element.

Nested Classes
  resourceClass
Instance Methods
 
__call__(self, resob, setNames) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  resType = None
hash(x)
Properties

Inherited from object: __class__