Package bar :: Package rec :: Module pipeline :: Class barPipelineXML
[hide private]
[frames] | no frames]

Class barPipelineXML


A virtual class parental to all VTK pipeline classes.

Nested Classes [hide private]
Instance Methods [hide private]
xml.dom.minidom.Element
getXMLelement(self, domDocument=None)
Returns: DOM XML representation of the object

Inherited from base.barObject: __str__, getElementById, writeXMLtoFile

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

Static Methods [hide private]
str
_getSingle(xmlElement, tagName, default=None)
Returns: value of the requested child XML element
[Element, ...]
_getSingleNested(xmlElement, tagName, childElemName='value', default=None)
Returns: the requested grandchildren XML elements

Inherited from base.barObject (private): _getAttributesDict

Class Variables [hide private]
str _elementName = None
name of the XML element related to the class object.
[str, ...] _singleelements = []
a list of the singular children XML elements' names
[str, ...] _listelements = []
a list of the multiple children XML elements' names
[str, ...] _attributes = []
a list of the related XML attributes
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getXMLelement(self, domDocument=None)

 

A stub of method. Raise NotImplementedError.

Parameters:
  • domDocument (xml.dom.minidom.Document) - DOM XML document for creation of the XML element (if not given, a new DOM XML document object is created)
Returns: xml.dom.minidom.Element
DOM XML representation of the object
Overrides: base.barObject.getXMLelement

_getSingle(xmlElement, tagName, default=None)
Static Method

 
Parameters:
  • xmlElement (xml.dom.minidom.Element) - DOM XML element
  • tagName (str) - name of the singular child XML element
  • default - value to be returned if xmlElement has no child of name tagName
Returns: str
value of the requested child XML element

Attention: works properly on the assumption that xmlElement.getElementsByTagName preserves elements order

_getSingleNested(xmlElement, tagName, childElemName='value', default=None)
Static Method

 
Parameters:
  • xmlElement (xml.dom.minidom.Element) - DOM XML element
  • tagName (str) - name of the singular child XML element
  • childElemName (str) - name of children XML elements of the tagName element
  • default - value to be returned if xmlElement has no child of name tagName
Returns: [Element, ...]
the requested grandchildren XML elements

Attention: works properly on the assumption that xmlElement.getElementsByTagName preserves elements order