Package gavo :: Package protocols :: Module oaiclient :: Class CanonicalPrefixes
[frames] | no frames]

Class CanonicalPrefixes

source code

object --+
         |
        CanonicalPrefixes

a self-persisting dictionary of the prefixes we use in our OAI interface.

CanonicalPrefixes objects are constructed with the name of a pickle file containing a list of (prefix, uri) pairs.

This reproduces some code from stanxml.NSRegistry, but we want that stuff as instance method here, not as class method.

Instance Methods
 
__init__(self, pickleName)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
registerPrefix(self, prefix, ns, save=True) source code
 
registerPrefixOrMakeUp(self, prefix, ns)
registers prefix for ns or, if prefix is already taken, makes up a new prefix for the namespace URI ns.
source code
 
getPrefixForNS(self, ns) source code
 
haveNS(self, ns) source code
 
getNSForPrefix(self, prefix) source code
 
iterNS(self) source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, pickleName)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)