def __init__(self, session, node, parent): self.protocol = "http://www.openarchives.org/OAI/2.0/OAI-PMH" self.recordNamespaces = {} # key: metadataPrefix, value: XML Namespace self.schemaLocations = {} # key: XML Namespace, value: Schema Location self.transformerHash = { } # key: XML Namespace, value: Cheshire3 Transformer Object self.contacts = [] ZeerexProtocolMap.__init__(self, session, node, parent) # some validation checks try: self.baseURL = 'http://%s:%d/%s' % (self.host, self.port, self.databaseName) except: raise ConfigFileException( "Unable to derive baseURL from host, port, database") # metadatPrefix oai_dc is mandatory if not 'oai_dc' in self.recordNamespaces: raise ConfigFileException( "Schema configuration for mandatory metadataPrefix 'oai_dc' required in schemaInfo." ) # at least 1 adminEmail address is mandatory for Identify response if not len(self.contacts): raise ConfigFileException( "Contact e-mail address of a database administrator required in databaseInfo." )
def __init__(self, session, node, parent): self.protocol = "http://www.loc.gov/z3950/" self.transformerHash = {} self.indexHash = {} self.prefixes = {} self.defaultAttribute = [] ZeerexProtocolMap.__init__(self, session, node, parent) self.defaultAttributeHash = {} for x in self.defaultAttribute: self.defaultAttributeHash[(x[0], x[1])] = x[2]
def __init__(self, session, node, parent): self.protocol = "http://www.openarchives.org/OAI/2.0/OAI-PMH" self.recordNamespaces = {} # key: metadataPrefix, value: XML Namespace self.schemaLocations = {} # key: XML Namespace, value: Schema Location self.transformerHash = {} # key: XML Namespace, value: Cheshire3 Transformer Object self.contacts = [] ZeerexProtocolMap.__init__(self, session, node, parent) # some validation checks try: self.baseURL = 'http://%s:%d/%s' % (self.host, self.port, self.databaseName) except: raise ConfigFileException("Unable to derive baseURL from host, port, database") # metadatPrefix oai_dc is mandatory if not 'oai_dc' in self.recordNamespaces: raise ConfigFileException("Schema configuration for mandatory metadataPrefix 'oai_dc' required in schemaInfo.") # at least 1 adminEmail address is mandatory for Identify response if not len(self.contacts): raise ConfigFileException("Contact e-mail address of a database administrator required in databaseInfo.")
def __init__(self, session, node, parent): self.protocol = "http://www.cheshire3.org/protocols/workflow/1.0/" ZeerexProtocolMap.__init__(self, session, node, parent)