Home | Trees | Index | Help |
---|
Package pdi :: Module core :: Class Component |
|
object
--+
|
Component
VUnknown
,
VCalendar
,
VTodo
,
VEvent
,
VJournal
,
VCard
,
VWhacky
Method Summary | |
---|---|
| |
a new object with type S, a subtype of T |
|
Serialize this component as well as it's properties and subcomponents. | |
pdi.core.Component
|
Add a subcomponent to this component. |
Candy method for adding several components at one time. | |
Candy method for adding several properties at one time. | |
pdi.core.Property
|
Add a property to this component. |
string |
Return the name of this component. |
Interprets a symbol and value. | |
pdi.core.Component
|
This parses one line of data. |
Register all valid (or invalid, depending on rule) components. | |
Register valid (or invalid, depending on rule) properties. | |
Register available property types. | |
This will make sure that all mandatory components and properties are present. |
Instance Variable Summary | |
---|---|
begin
- The line number where this component started. | |
classes
- Internal dictionary for keeping track valid classes for components and
properties. | |
components
- A list of all subcomponents under this component. | |
componentsMay
- Internal list for keeping track components that may occur. | |
componentsMust
- Internal list for keeping track of mandatory components. | |
componentsNot
- Internal list for keeping track of disallowed components. | |
componentsRecommended
- Internal list for keeping track of recommended compoennts. | |
componentTracker
- Internal dictionary for keeping track of what subcomponent classes has
been added. | |
end
- The line number where this component ended. | |
ignoreWarnings
- Set this baby to true to supress warnings. | |
parent
- Internal instance of a pdi.core.Component for keeping track of the
parent. | |
properties
- A dictionary of all properties where the uppercased name is the key
and an instance of the property is the value. | |
propertiesMay
- Internal list for keeping track of properties that may occur. | |
propertiesMust
- Internal list for keeping track of mandatory properties. | |
propertiesNot
- Internal list for keeping track of disallowed properties. | |
propertiesRecommended
- Internal list for keeping track of recommended properties. |
Method Details |
---|
__init__(self,
parent=None)
|
__new__(S, ...)
|
__str__(self)
Serialize this component as well as it's properties and
subcomponents.
|
addComponent(self, component, lineNumber=None)Add a subcomponent to this component.
|
addComponents(self, componentList)Candy method for adding several components at one time.
|
addProperties(self, propertyList)Candy method for adding several properties at one time.
|
addProperty(self, property, lineNumber=None)Add a property to this component. The property will also be validated and warnings issued as the property implementation sees fit.
|
getName(self)Return the name of this component. This is the uppercased class name unless an unknown component.
|
interpret(self, key, value, lineNumber=-1)Interprets a symbol and value. |
parseLine(self, data, lineNumber)This parses one line of data.
|
registerComponents(self, componentList, rule=20)Register all valid (or invalid, depending on rule) components. All components that are supposed to be valid should be registered with this method, otherwise they become instances of UnknownComponent.
|
registerProperties(self, propertyList, rule=20)Register valid (or invalid, depending on rule) properties.
|
registerPropertyTypes(self, propertyTypes)Register available property types. Properties without a type or a type that has not been registered will be instansiated as UnknownProperty.
|
validate(self, lineNumber=None)This will make sure that all mandatory components and properties are present. The validation is recursive, so you only need to call it for the top component.
|
Instance Variable Details |
---|
beginThe line number where this component started. None if it never was started == very bad! |
classesInternal dictionary for keeping track valid classes for components and properties. |
componentsA list of all subcomponents under this component. |
componentsMayInternal list for keeping track components that may occur. |
componentsMustInternal list for keeping track of mandatory components. |
componentsNotInternal list for keeping track of disallowed components. |
componentsRecommendedInternal list for keeping track of recommended compoennts. |
componentTrackerInternal dictionary for keeping track of what subcomponent classes has been added. |
endThe line number where this component ended. None if it never was ended == very bad, will raise an exception. |
ignoreWarningsSet this baby to true to supress warnings. |
parentInternal instance of apdi.core.Component for keeping track of the
parent.
|
propertiesA dictionary of all properties where the uppercased name is the key and an instance of the property is the value. |
propertiesMayInternal list for keeping track of properties that may occur. |
propertiesMustInternal list for keeping track of mandatory properties. |
propertiesNotInternal list for keeping track of disallowed properties. |
propertiesRecommendedInternal list for keeping track of recommended properties. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Nov 24 14:33:25 2002 | http://epydoc.sf.net |