Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
wicked.txtfilter.BrackettedWickedFilter Class Reference
Inheritance diagram for wicked.txtfilter.BrackettedWickedFilter:
Inheritance graph
[legend]
Collaboration diagram for wicked.txtfilter.BrackettedWickedFilter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def removeParens
def scope
def normalize
def encoding
def filtered_text
def getLinks
def resolver
def backlinker
def manageLink
def unlink
def manageLinks
def cache
def renderer
def __call__
def findall
def patterns
def chunks
def dynamic
def filtered_chunks

Public Attributes

 section
 context
 field
 event

Static Public Attributes

 pattern = pattern2
string name = 'Wicked Filter'
 query_iface = IWickedQuery
tuple getMatch = staticmethod(utils.getMatch)

Detailed Description

media wiki style bracket matching

Definition at line 148 of file txtfilter.py.


Member Function Documentation

def wicked.txtfilter.WickedFilter.__call__ (   self) [inherited]

Reimplemented from wicked.fieldevent.txtfilter.TxtFilter.

Definition at line 136 of file txtfilter.py.

00136 
00137     def __call__(self):
00138         if self.event.kwargs.get('raw', False):
00139             raise EndFiltrationException('Kwargs flag for raw return')
00140         super(WickedFilter, self).__call__()

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.backlinker (   self) [inherited]

Definition at line 110 of file txtfilter.py.

00110 
00111     def backlinker(self):
00112         return getMultiAdapter((self, self.context), IBacklinkManager)

def wicked.txtfilter.WickedFilter.cache (   self) [inherited]

Definition at line 123 of file txtfilter.py.

00123 
00124     def cache(self):
00125         return getMultiAdapter((self, self.context), ICacheManager)
    
Simple text replacement via co-op with the modules

Definition at line 61 of file txtfilter.py.

00061 
00062     def chunks(self):
00063         """Simple text replacement via co-op with the modules"""
00064         for pattern in self.patterns:
00065             val=pattern.split(self.event.value)
00066             if len(val)>1:
00067                 return val
00068         return val

Here is the call graph for this function:

Here is the caller graph for this function:

tricky ben saller split

Definition at line 70 of file txtfilter.py.

00070 
00071     def dynamic(self):
00072         """tricky ben saller split"""
00073         return self.chunks[1::2]

Here is the call graph for this function:

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.encoding (   self) [inherited]
AT hack

Definition at line 73 of file txtfilter.py.

00073 
00074     def encoding(self):
00075         """AT hack"""
00076         try:
00077             encoding = self.context.getCharset()
00078         except AttributeError:
00079             encoding = self._encoding
00080         return encoding
    

Here is the caller graph for this function:

Definition at line 75 of file txtfilter.py.

00075 
00076     def filtered_chunks(self):
00077         return [self._filterCore(d, **self.event.kwargs) for d in self.dynamic]

Here is the call graph for this function:

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.filtered_text (   self) [inherited]
syntax preprocessing

Reimplemented from wicked.fieldevent.txtfilter.TxtFilter.

Definition at line 88 of file txtfilter.py.

00088 
00089     def filtered_text(self):
00090         """syntax preprocessing"""
00091         return super(WickedFilter, self).filtered_text
    
def wicked.fieldevent.txtfilter.TxtFilter.findall (   self,
  value 
) [inherited]

Definition at line 47 of file txtfilter.py.

00047 
00048     def findall(self, value):
00049         for pattern in self.patterns:
00050             val = pattern.findall(value)
00051             if len(val):
00052                 return val
00053         return val
        

Here is the call graph for this function:

def wicked.txtfilter.WickedFilter.getLinks (   self,
  chunk,
  normalled 
) [inherited]

Definition at line 94 of file txtfilter.py.

00094 
00095     def getLinks(self, chunk, normalled):
00096         self.resolver.configure(chunk, normalled, self.scope)
00097         brains = self.resolver.search
00098         if not brains:
00099             brains = self.resolver.scopedSearch
00100         links = [utils.packBrain(b) for b in brains if b]
00101         return links

Here is the call graph for this function:

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.manageLink (   self,
  obj,
  link 
) [inherited]

Definition at line 113 of file txtfilter.py.

00113 
00114     def manageLink(self, obj, link):
00115         self.backlinker.manageLink(obj, link)

def wicked.txtfilter.WickedFilter.manageLinks (   self,
  links 
) [inherited]

Definition at line 119 of file txtfilter.py.

00119 
00120     def manageLinks(self, links):
00121         self.backlinker.manageLinks(links)
        
def wicked.txtfilter.WickedFilter.normalize (   self,
  value 
) [inherited]

Definition at line 69 of file txtfilter.py.

00069 
00070     def normalize(self, value):
00071         return self._normalize(value)

Here is the caller graph for this function:

Definition at line 55 of file txtfilter.py.

00055 
00056     def patterns(self):
00057         if not isinstance(self.pattern, list):
00058             return [self.pattern]
00059         return self.pattern

Here is the caller graph for this function:

Definition at line 151 of file txtfilter.py.

00151 
00152     def removeParens(wikilink):
00153         wikilink.replace('[[', '')
00154         wikilink.replace(']]', '')
        return wikilink
def wicked.txtfilter.WickedFilter.renderer (   self) [inherited]

Definition at line 127 of file txtfilter.py.

00127 
00128     def renderer(self):
00129         # @@ better way to get request? maybe a txtfilter should be a view?
00130         renderer = getMultiAdapter((self.context, self.context.REQUEST), Interface, 'link_renderer')
00131         renderer.section = self.section
00132         # hook for zope2 aq wrapper
00133         if hasattr(renderer, '__of__'):
00134             return renderer.__of__(self.context)
00135         return renderer

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.resolver (   self) [inherited]
@return query object

Definition at line 103 of file txtfilter.py.

00103 
00104     def resolver(self):
00105         """
00106         @return query object
00107         """
00108         return self.query_iface(self.context)

def wicked.txtfilter.WickedFilter.scope (   self) [inherited]

Definition at line 57 of file txtfilter.py.

00057 
00058     def scope(self):
00059         try:
00060             return getMultiAdapter((self.field, self.context), IScope)
00061         except ComponentLookupError:
00062             return ''

Here is the caller graph for this function:

def wicked.txtfilter.WickedFilter.unlink (   self,
  uid 
) [inherited]

Definition at line 116 of file txtfilter.py.

00116 
00117     def unlink(self, uid):
00118         self.backlinker.unlink(uid)
        

Member Data Documentation

Definition at line 42 of file txtfilter.py.

Definition at line 44 of file txtfilter.py.

Definition at line 43 of file txtfilter.py.

tuple wicked.txtfilter.WickedFilter.getMatch = staticmethod(utils.getMatch) [static, inherited]

Definition at line 64 of file txtfilter.py.

string wicked.txtfilter.WickedFilter.name = 'Wicked Filter' [static, inherited]

Reimplemented from wicked.fieldevent.txtfilter.TxtFilter.

Definition at line 45 of file txtfilter.py.

Reimplemented from wicked.txtfilter.WickedFilter.

Definition at line 150 of file txtfilter.py.

wicked.txtfilter.WickedFilter.query_iface = IWickedQuery [static, inherited]

Definition at line 48 of file txtfilter.py.

Definition at line 53 of file txtfilter.py.


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