Back to index

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

List of all members.

Properties

 node = property(_exportNode, _importNode)

Private Member Functions

def _exportNode
def _importNode
def _getKeys

Detailed Description

Node im- and exporter for ZCTextIndex Lexicon.

Definition at line 31 of file exportimport.py.


Member Function Documentation

Export the object as a DOM node.

Definition at line 38 of file exportimport.py.

00038 
00039     def _exportNode(self):
00040         """Export the object as a DOM node.
00041         """
00042         node = self._getObjectNode('object')
00043         for element in self.context._pipeline:
00044             group, name = self._getKeys(element)
00045             child = self._doc.createElement('element')
00046             child.setAttribute('group', group)
00047             child.setAttribute('name', name)
00048             node.appendChild(child)
00049         return node

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 68 of file exportimport.py.

00068 
00069     def _getKeys(self, element):
00070         for group in element_factory.getFactoryGroups():
00071             for name, factory in element_factory._groups[group].items():
00072                 if factory == element.__class__:
00073                     return group, name
00074 

Here is the caller graph for this function:

Import the object from the DOM node.

Definition at line 50 of file exportimport.py.

00050 
00051     def _importNode(self, node):
00052         """Import the object from the DOM node.
00053         """
00054         pipeline = []
00055         for child in node.childNodes:
00056             if child.nodeName == 'element':
00057                 element = element_factory.instantiate(
00058                       child.getAttribute('group').encode('utf-8'),
00059                       child.getAttribute('name').encode('utf-8'))
00060                 pipeline.append(element)
00061         self.context._pipeline = tuple(pipeline)
00062         #clear lexicon
00063         self.context._wids = OIBTree()
00064         self.context._words = IOBTree()
00065         self.context.length = Length()

Here is the call graph for this function:

Here is the caller graph for this function:


Property Documentation

Definition at line 66 of file exportimport.py.


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