Home | Trees | Index | Help |
---|
Package vobject :: Module vobject :: Class Component |
|
object
--+ |VBase
--+ | Component
RecurringComponent
,
TimezoneComponent
A complex property that can contain multiple ContentLines.
For our purposes, a component must start with a BEGIN:xxxx line and end with END:xxxx, or have a PROFILE:xxx line if a top-level component.Method Summary | |
---|---|
__init__(self,
name,
*args,
**kwds)
| |
For convenience, make self.contents directly accessible. | |
__repr__(self)
| |
For convenience, make self.contents directly accessible. | |
__str__(self)
| |
Add objOrName to contents, set behavior if it can be inferred. | |
Return an iterable of all Component children. | |
Return an iterable of all children. | |
getSortedChildren(self)
| |
Return an iterable of all ContentLine children. | |
prettyPrint(self,
level,
tabwidth)
| |
Set behavior if one matches name, versionLine.value. | |
Assign a PROFILE to this unnamed component. | |
sortChildKeys(self)
| |
Recursively transform native children to vanilla representations. | |
Recursively replace children with their native representation. | |
Inherited from VBase | |
Set behavior if name is in self.parentBehavior.knownChildren. | |
Set behavior to None. | |
Serialize to buf if it exists, otherwise return a string. | |
Set behavior. | |
Return self transformed into a ContentLine or Component if needed. | |
Transform this object into a custom VBase subclass. | |
Call the behavior's validate method, or return True. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle |
Instance Variable Summary | |
---|---|
contents : A dictionary of lists of Component or ContentLine instances. | |
name : Uppercase string used to represent this Component, i.e VCARD if the
serialized object starts with BEGIN:VCARD. | |
useBegin : A boolean flag determining whether BEGIN: and END: lines should be
serialized. | |
Inherited from VBase | |
behavior : The Behavior class associated with this object, which controls
validation, transformations, and encoding. | |
group : An optional group prefix, should be used only to indicate sort order
in vCards, according to RFC2426 | |
isNative : Boolean describing whether this component is a Native instance. | |
parentBehavior : The object's parent's behavior, or None if no behaviored parent
exists. |
Method Details |
---|
__getattr__(self,
name)
For convenience, make self.contents directly accessible.
|
__setattr__(self, name, value)For convenience, make self.contents directly accessible. self.contents must contain lists, raise an error if value isn't a list.
|
add(self, objOrName, group=None)Add objOrName to contents, set behavior if it can be inferred. If objOrName is a string, create an empty component or line based on behavior. If no behavior is found for the object, add a ContentLine. group is an optional prefix to the name of the object (see RFC 2425). |
components(self)Return an iterable of all Component children. |
getChildren(self)Return an iterable of all children.
|
lines(self)Return an iterable of all ContentLine children. |
setBehaviorFromVersionLine(self, versionLine)Set behavior if one matches name, versionLine.value. |
setProfile(self, name)Assign a PROFILE to this unnamed component. Used by vCard, not by vCalendar. |
transformChildrenFromNative(self, clearBehavior=True)Recursively transform native children to vanilla representations. |
transformChildrenToNative(self)Recursively replace children with their native representation. |
Instance Variable Details |
---|
nameUppercase string used to represent this Component, i.e VCARD if the serialized object starts with BEGIN:VCARD. |
useBeginA boolean flag determining whether BEGIN: and END: lines should be serialized. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Fri Dec 14 17:25:15 2007 | http://epydoc.sf.net |