Back to index

plone3  3.1.7
Properties | Private Member Functions
GenericSetup.ZCTextIndex.exportimport.ZCTextIndexNodeAdapter Class Reference
Inheritance diagram for GenericSetup.ZCTextIndex.exportimport.ZCTextIndexNodeAdapter:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.ZCTextIndex.exportimport.ZCTextIndexNodeAdapter:
Collaboration graph
[legend]

List of all members.

Properties

 node = property(_exportNode, _importNode)

Private Member Functions

def _exportNode
def _importNode

Detailed Description

Node im- and exporter for ZCTextIndex.

Definition at line 75 of file exportimport.py.


Member Function Documentation

Export the object as a DOM node.

Definition at line 82 of file exportimport.py.

00082 
00083     def _exportNode(self):
00084         """Export the object as a DOM node.
00085         """
00086         node = self._getObjectNode('index')
00087 
00088         for value in self.context.getIndexSourceNames():
00089             child = self._doc.createElement('indexed_attr')
00090             child.setAttribute('value', value)
00091             node.appendChild(child)
00092 
00093         child = self._doc.createElement('extra')
00094         child.setAttribute('name', 'index_type')
00095         child.setAttribute('value', self.context.getIndexType())
00096         node.appendChild(child)
00097 
00098         child = self._doc.createElement('extra')
00099         child.setAttribute('name', 'lexicon_id')
00100         child.setAttribute('value', self.context.lexicon_id)
00101         node.appendChild(child)
00102 
00103         return node

Here is the call graph for this function:

Here is the caller graph for this function:

Import the object from the DOM node.

Definition at line 104 of file exportimport.py.

00104 
00105     def _importNode(self, node):
00106         """Import the object from the DOM node.
00107         """
00108         indexed_attrs = []
00109         for child in node.childNodes:
00110             if child.nodeName == 'indexed_attr':
00111                 indexed_attrs.append(
00112                                   child.getAttribute('value').encode('utf-8'))
00113         self.context._indexed_attrs = indexed_attrs
00114         self.context.clear()

Here is the call graph for this function:

Here is the caller graph for this function:


Property Documentation

Definition at line 115 of file exportimport.py.


The documentation for this class was generated from the following file: