Back to index

plone3  3.1.7
Public Member Functions
icalendar.cal.ComponentFactory Class Reference

The component factory. More...

Inheritance diagram for icalendar.cal.ComponentFactory:
Inheritance graph
[legend]
Collaboration diagram for icalendar.cal.ComponentFactory:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __getitem__
def __setitem__
def __delitem__
def __contains__
def get
def setdefault
def pop
def popitem
def has_key
def update
def copy
def clear
def __repr__

Detailed Description

The component factory.

All components defined in rfc 2445 are registered in this factory class. To
get a component you can use it like this.

>>> factory = ComponentFactory()
>>> component = factory['VEVENT']
>>> event = component(dtstart='19700101')
>>> event.as_string()
'BEGIN:VEVENT\\r\\nDTSTART:19700101\\r\\nEND:VEVENT\\r\\n'

>>> factory.get('VCALENDAR', Component)
<class 'icalendar.cal.Calendar'>

Definition at line 27 of file cal.py.


Constructor & Destructor Documentation

def icalendar.cal.ComponentFactory.__init__ (   self,
  args,
  kwargs 
)

Reimplemented from icalendar.caselessdict.CaselessDict.

Definition at line 42 of file cal.py.

00042 
00043     def __init__(self, *args, **kwargs):
00044         "Set keys to upper for initial dict"
00045         CaselessDict.__init__(self, *args, **kwargs)
00046         self['VEVENT'] = Event
00047         self['VTODO'] = Todo
00048         self['VJOURNAL'] = Journal
00049         self['VFREEBUSY'] = FreeBusy
00050         self['VTIMEZONE'] = Timezone
00051         self['VALARM'] = Alarm
00052         self['VCALENDAR'] = Calendar
00053 
00054 
00055 # These Properties have multiple property values inlined in one propertyline
# seperated by comma. Use CaselessDict as simple caseless set.

Member Function Documentation

def icalendar.caselessdict.CaselessDict.__contains__ (   self,
  item 
) [inherited]

Definition at line 61 of file caselessdict.py.

00061 
00062     def __contains__(self, item):
00063         return dict.__contains__(self, item.upper())

def icalendar.caselessdict.CaselessDict.__delitem__ (   self,
  key 
) [inherited]

Definition at line 58 of file caselessdict.py.

00058 
00059     def __delitem__(self, key):
00060         dict.__delitem__(self, key.upper())

def icalendar.caselessdict.CaselessDict.__getitem__ (   self,
  key 
) [inherited]

Definition at line 52 of file caselessdict.py.

00052 
00053     def __getitem__(self, key):
00054         return dict.__getitem__(self, key.upper())

Here is the caller graph for this function:

Reimplemented in icalendar.cal.Component, and icalendar.parser.Parameters.

Definition at line 92 of file caselessdict.py.

00092 
00093     def __repr__(self):
00094         return 'CaselessDict(' + dict.__repr__(self) + ')'
def icalendar.caselessdict.CaselessDict.__setitem__ (   self,
  key,
  value 
) [inherited]

Definition at line 55 of file caselessdict.py.

00055 
00056     def __setitem__(self, key, value):
00057         dict.__setitem__(self, key.upper(), value)

Here is the caller graph for this function:

def icalendar.caselessdict.CaselessDict.clear (   self) [inherited]

Definition at line 89 of file caselessdict.py.

00089 
00090     def clear(self):
00091         dict.clear(self)

Here is the caller graph for this function:

def icalendar.caselessdict.CaselessDict.copy (   self) [inherited]

Definition at line 86 of file caselessdict.py.

00086 
00087     def copy(self):
00088         return CaselessDict(dict.copy(self))

def icalendar.caselessdict.CaselessDict.get (   self,
  key,
  default = None 
) [inherited]

Definition at line 64 of file caselessdict.py.

00064 
00065     def get(self, key, default=None):
00066         return dict.get(self, key.upper(), default)

Here is the caller graph for this function:

def icalendar.caselessdict.CaselessDict.has_key (   self,
  key 
) [inherited]

Definition at line 76 of file caselessdict.py.

00076 
00077     def has_key(self, key):
00078         return dict.has_key(self, key.upper())

Here is the caller graph for this function:

def icalendar.caselessdict.CaselessDict.pop (   self,
  key,
  default = None 
) [inherited]

Definition at line 70 of file caselessdict.py.

00070 
00071     def pop(self, key, default=None):
00072         return dict.pop(self, key.upper(), default)

Here is the caller graph for this function:

def icalendar.caselessdict.CaselessDict.popitem (   self) [inherited]

Definition at line 73 of file caselessdict.py.

00073 
00074     def popitem(self):
00075         return dict.popitem(self, key.upper())

def icalendar.caselessdict.CaselessDict.setdefault (   self,
  key,
  value = None 
) [inherited]

Definition at line 67 of file caselessdict.py.

00067 
00068     def setdefault(self, key, value=None):
00069         return dict.setdefault(self, key.upper(), value)

def icalendar.caselessdict.CaselessDict.update (   self,
  indict 
) [inherited]
Multiple keys where key1.upper() == key2.upper() will be lost.

Definition at line 79 of file caselessdict.py.

00079 
00080     def update(self, indict):
00081         """
00082         Multiple keys where key1.upper() == key2.upper() will be lost.
00083         """
00084         for entry in indict:
00085             self[entry] = indict[entry]

Here is the caller graph for this function:


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