CMS 3D CMS Logo

Public Member Functions | Private Attributes

cacheconfigParser::cacheconfigParser Class Reference

List of all members.

Public Member Functions

def __init__
def handleFrontierConnect
def parameterdict
def parse
def parseString
def proxylist
def serverlist

Private Attributes

 __configfile
 __configstr
 __parameterDict
 parse result

Detailed Description

Definition at line 3 of file cacheconfigParser.py.


Constructor & Destructor Documentation

def cacheconfigParser::cacheconfigParser::__init__ (   self)

Definition at line 4 of file cacheconfigParser.py.

00005                       :
00006         self.__configstr=''
00007         self.__configfile=''
00008         ###parse result
        self.__parameterDict={}

Member Function Documentation

def cacheconfigParser::cacheconfigParser::handleFrontierConnect (   self,
  dom 
)

Definition at line 9 of file cacheconfigParser.py.

00010                                        :
00011         #print 'handleFrontierConnect'
00012         nodelist=dom.getElementsByTagName('frontier-connect')[0].childNodes
00013         #print nodelist
00014         for node in nodelist:
00015             if node.nodeType!=Node.TEXT_NODE and node.nodeType!=Node.COMMENT_NODE:
00016                 tagname=node.tagName
00017                 attrs=node.attributes
00018                 for attrName in attrs.keys():
00019                     attrNode=attrs.get(attrName)
00020                     attrValue=attrNode.nodeValue
00021                     if  self.__parameterDict.has_key(tagname):
00022                         self.__parameterDict[tagname].append((attrName,attrValue))
00023                     else:
00024                         valuelist=[]
00025                         valuelist.append((attrName,attrValue))
                        self.__parameterDict[tagname]=valuelist
def cacheconfigParser::cacheconfigParser::parameterdict (   self)

Definition at line 41 of file cacheconfigParser.py.

00042                            :
        return self.__parameterDict
def cacheconfigParser::cacheconfigParser::parse (   self,
  filename 
)
Parse an XML file by name

Definition at line 26 of file cacheconfigParser.py.

00027                             :
00028         """
00029         Parse an XML file by name
00030         """
00031         dom=parse(filename)
00032         self.handleFrontierConnect(dom)
        dom.unlink()
def cacheconfigParser::cacheconfigParser::parseString (   self,
  strbuff 
)

Definition at line 33 of file cacheconfigParser.py.

00034                                  :
00035         dom=parseString(strbuff)
00036         self.handleFrontierConnect(dom)
        dom.unlink()
def cacheconfigParser::cacheconfigParser::proxylist (   self)

Definition at line 37 of file cacheconfigParser.py.

00038                        :
        return self.__parameterDict['proxy']
def cacheconfigParser::cacheconfigParser::serverlist (   self)

Definition at line 39 of file cacheconfigParser.py.

00040                         :
        return self.__parameterDict['server']

Member Data Documentation

Definition at line 4 of file cacheconfigParser.py.

Definition at line 4 of file cacheconfigParser.py.

parse result

Definition at line 5 of file cacheconfigParser.py.