Back to index

plone3  3.1.7
document.py
Go to the documentation of this file.
00001 from zope.interface import implements
00002 from Products.ATContentTypes.interface.dataExtractor import IDataExtractor
00003 
00004 
00005 class DocumentDataExtractor(object):
00006     """
00007     """
00008     implements(IDataExtractor)
00009     
00010     def __init__(self, context):
00011         self.context = context
00012 
00013     def getData(self,**kwargs):
00014         """ get the CookedBody of the Document
00015         """
00016         return self.context.CookedBody()
00017 
00018 class DocumentRawDataExtractor(object):
00019     """
00020     """
00021     implements(IDataExtractor)
00022  
00023     def __init__(self, context):
00024         self.context = context
00025 
00026     def getData(self,**kwargs):
00027         """ get the raw text of the Document
00028         """
00029         return self.context.getRawText()