def _importNode(self, node):
        """
        Import the settings from the DOM node.
        """

        MembraneToolXMLAdapter._importNode(self, node)
        self._annotateHash(node)
Beispiel #2
0
    def _importNode(self, node):
        """
        Import the settings from the DOM node.
        """

        MembraneToolXMLAdapter._importNode(self, node)
        self._annotateHash(node)
Beispiel #3
0
 def _exportNode(self):
     """
     Export the contents as an xml node
     """
     node = MembraneToolXMLAdapter._exportNode(self)
     mbtool = getToolByName(self.context, 'membrane_tool')
     annot = IAnnotations(mbtool)
     try:
         htype = annot[ANNOT_KEY]['hash_type']
         child = self._doc.createElement('hash-type')
         child.setAttribute('name', htype)
         fragment = self._doc.createDocumentFragment()
         fragment.appendChild(child)
         node.appendChild(fragment)
         self._logger.info("Remember hash-type exported: %s" % htype)
     except KeyError: # no hash_type annotated on mbtool, no need to add node
         pass
     return node
Beispiel #4
0
 def _exportNode(self):
     """
     Export the contents as an xml node
     """
     node = MembraneToolXMLAdapter._exportNode(self)
     mbtool = getToolByName(self.context, 'membrane_tool')
     annot = IAnnotations(mbtool)
     try:
         htype = annot[ANNOT_KEY]['hash_type']
         child = self._doc.createElement('hash-type')
         child.setAttribute('name', htype)
         fragment = self._doc.createDocumentFragment()
         fragment.appendChild(child)
         node.appendChild(fragment)
         self._logger.info("Remember hash-type exported: %s" % htype)
     except KeyError:
         # no hash_type annotated on mbtool, no need to add node
         pass
     return node