Package flumotion :: Package common :: Module registry :: Class RegistryParser
[show private | hide private]
[frames | no frames]

Class RegistryParser

Loggable --+    
           |    
      Parser --+
               |
              RegistryParser


Registry parser

I have two modes, one to parse registries and another one to parse standalone component files.

For parsing registries use the parseRegistry function and for components use parseRegistryFile.

I also have a list of all components and directories which the registry uses (instead of saving its own copy)
Method Summary
  __init__(self)
  _parseBundle(self, node)
  _parseBundleDependencies(self, node)
  _parseBundleDependency(self, node)
  _parseBundleDirectories(self, node)
  _parseBundleDirectory(self, node)
  _parseBundleDirectoryFilename(self, node, name)
  _parseBundles(self, node)
  _parseComponent(self, node)
  _parseComponents(self, node)
  _parseDirectories(self, node)
  _parseDirectory(self, node)
  _parseEater(self, node)
  _parseEntries(self, node)
  _parseEntry(self, node)
  _parseFeeder(self, node)
  _parseFile(self, node)
  _parseFiles(self, node)
  _parsePlug(self, node)
  _parsePlugEntry(self, node)
  _parsePlugs(self, node)
  _parseProperties(self, node)
  _parseProperty(self, node)
  _parseRoot(self, node, disallowed)
  _parseSocket(self, node)
  _parseSockets(self, node)
  _parseSource(self, node)
  _parseSynchronization(self, node)
  addDirectory(self, directory)
Add a registry path object to the parser.
  clean(self)
  getComponent(self, name)
  getComponents(self)
  getDirectories(self)
  getDirectory(self, name)
  getPlug(self, name)
  getPlugs(self)
  parseRegistry(self, file)
  parseRegistryFile(self, file)
  removeDirectoryByPath(self, path)
Remove a directory from the parser given the path.
    Inherited from Parser
  checkAttributes(self, node, required, optional)
Checks that a given XML node has all of the required attributes, and no unknown attributes.
  getRoot(self, file)
Return the root of the XML tree for the the string or filename passed as an argument.
tuple of string or None, as long as the combined length of the required and optional attributes. parseAttributes(self, node, required, optional)
Checks the validity of the attributes on an XML node, via Parser.checkAttributes, then parses them out and returns them all as a tuple.
  parseFromTable(self, parent, parsers)
A data-driven verifying XML parser.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
str logCategory: Implementors can provide a category to log their messages under.

Method Details

addDirectory(self, directory)

Add a registry path object to the parser.
Parameters:
directory
           (type={RegistryDirectory})

parseRegistry(self, file)

Parameters:
file - The file to parse, either as an open file object, or as the name of a file to open.
           (type=str or file.)

parseRegistryFile(self, file)

Parameters:
file - The file to parse, either as an open file object, or as the name of a file to open.
           (type=str or file.)

removeDirectoryByPath(self, path)

Remove a directory from the parser given the path. Used when the path does not actually contain any registry information.

Generated by Epydoc 2.1 on Sat Apr 14 13:16:51 2007 http://epydoc.sf.net