biosphere::xlate::XMLParser Class Reference


Public Member Functions

def __init__
def Parse
def ParseDefinitions
def AddTypes
def AddMessages
def AddMessageParts
def AddPortTypes
def AddOperations
def AddServices
def AddPorts
def ParseResponse
def AddUsed
def AddMessageInstance

Data Fields

 error

Detailed Description

Parses the three different Bio-SPHERE XML representations
into their respective classes.

Definition at line 12 of file xlate.py.


Member Function Documentation

def biosphere::xlate::XMLParser::__init__ (   self  ) 

Initialize the XMLParser.

Definition at line 15 of file xlate.py.

def biosphere::xlate::XMLParser::Parse (   self,
  xmldata 
)

Parses a giving buffer with XML data into the correct
data type. If an error is encountered, None is returned
and the error can be examined at self.error.

Args:
xmldata -- A buffer with XML data to parse.

Definition at line 19 of file xlate.py.

def biosphere::xlate::XMLParser::ParseDefinitions (   self,
  dom 
)

Parse a definition XML structure. This method creates
a bs_definition class which is returned or None if there
was an error.

Args:
dom -- The DOM of the XML

Definition at line 36 of file xlate.py.

def biosphere::xlate::XMLParser::AddTypes (   self,
  dom,
  bsdef 
)

Add the data types used in the definition to the given
bs_definition class.

Args:
dom -- Part of the DOM with the data types.
bsdef -- bs_definition class to add types to.

Definition at line 59 of file xlate.py.

def biosphere::xlate::XMLParser::AddMessages (   self,
  dom,
  bsdef 
)

Add the messages used in the definition to the
bs_definition class.

Args:
dom -- Part of the DOM with the data types.
bsdef -- bs_definition class to add messages to.

Definition at line 71 of file xlate.py.

def biosphere::xlate::XMLParser::AddMessageParts (   self,
  msg,
  bsmsg,
  bsdef 
)

Add the parts of the message, whose DOM is in msg, to the
bs_message class (bsmsg), searching for the correct type in
bsdef.

Args:
msg -- Part of the DOM tree related to the message.
bsmsg -- bs_message class to add the parts to.
bsdef -- bs_definition class for cross-referencing.

Definition at line 85 of file xlate.py.

def biosphere::xlate::XMLParser::AddPortTypes (   self,
  dom,
  bsdef 
)

Add the port types to the bs_definition class.

Args:
dom -- Part of the DOM containing the port types.
bsdef -- bs_definition class to cross-reference.

Definition at line 108 of file xlate.py.

def biosphere::xlate::XMLParser::AddOperations (   self,
  pt,
  bspt,
  bsdef 
)

Add all the operations in pt (DOM) to the given
bs_port_type class, while cross-referencing in the
bs_definition class.

Args:
pt -- Part of the DOM related to the portType.
bspt -- bs_port_type class to add operations to.
bsdef -- bs_definition class to use for crossreferencing.

Definition at line 121 of file xlate.py.

def biosphere::xlate::XMLParser::AddServices (   self,
  dom,
  bsdef 
)

Add the services to the bs_definition structure.

Args:
dom -- DOM structure of the definitions.
bsdef -- bs_definition class to add them to.

Definition at line 165 of file xlate.py.

def biosphere::xlate::XMLParser::AddPorts (   self,
  svc,
  bssvc,
  bsdef 
)

Add the ports to the service, by using a partially
completed/parsed bs_definition class as a reference.

Args:
svc -- Part of the DOM used for searching the services.
bssvc -- bs_service class to add the ports to.
bsdef -- bs_definition class to search for port types.

Definition at line 178 of file xlate.py.

def biosphere::xlate::XMLParser::ParseResponse (   self,
  dom 
)

Definition at line 201 of file xlate.py.

def biosphere::xlate::XMLParser::AddUsed (   self,
  dom,
  resp 
)

Definition at line 214 of file xlate.py.

def biosphere::xlate::XMLParser::AddMessageInstance (   self,
  dom,
  message,
  direction 
)

Definition at line 230 of file xlate.py.


Field Documentation

biosphere::xlate::XMLParser::error

Definition at line 17 of file xlate.py.


The documentation for this class was generated from the following file:
Generated on Tue Jul 17 09:51:41 2007 for Bio-SPHERE by  doxygen 1.5.1