Package pdi :: Module core
[show private | hide private]
[frames | no frames]

Module pdi.core

Python-PDI - Library for Personal Data Interchange. Copyright (C) 2002-2003 Peter Gebauer

This is the core of Python-PDI.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Classes
Component The mama of all components.
DateProperty A date-type property.
Property All properties must inherit from this class.
TextProperty A text-type property.
UnknownProperty Unknown type.
VUnknown This class is used for all components that do not have their own classes registered.

Exceptions
ComponentError General component error class.
InvalidComponentError A component has been placed where it's not allowed to be.
InvalidComponentWarning The component is not mandatory, recommended nor presumed (may).
InvalidPropertyContentWarning The content of the property is invalid according to the property's validation method.
InvalidPropertyError The property is not allowed in that component.
InvalidPropertyTypeWarning A property has a defined type that isn't registered.
InvalidPropertyValueError You tried to set an invalid value for the property.
InvalidPropertyWarning A property that is not mandatory, recommended nor presumed (may) has been found or it has invalid syntax.
MissingComponentError A mandatory component is missing.
MissingComponentWarning The component is when recommended components are not found.
MissingPropertyError A mandatory property is missing.
MissingPropertyWarning A recommended property is missing.
ParseError If a parse error occurs there's a real problem in the data.
PropertyError All property related errrors should inherit from this class.
PropertyValueError The value of the property is malformed or of unknown type.

Variable Summary
str CRLF - Contains the type of linebreaking to apply when serializing components.
int RULE_MAY - Rule for components and properties that are allowed, but not mandatory.
int RULE_MUST - Rule for mandatory components and properties.
int RULE_NOT - Any component or property in this category is disallowed and will raise pdi.core.InvalidComponentError or pdi.core.InvalidPropertyError.
int RULE_RECOMMENDED - Rule for components and properties that are recommended.

Variable Details

CRLF

Contains the type of linebreaking to apply when serializing components.
Type:
str
Value:
'''
'''                                                                    

RULE_MAY

Rule for components and properties that are allowed, but not mandatory. If a component or property that has no must, recommended nor may rule is found you get a pdi.core.InvalidComponentWarning or pdi.core.InvalidPropertyWarning type warning.
Type:
int
Value:
20                                                                     

RULE_MUST

Rule for mandatory components and properties. If one of these are missing a pdi.core.MissingComponentError or pdi.core.MissingPropertyError is raised when parsing.
Type:
int
Value:
10                                                                     

RULE_NOT

Any component or property in this category is disallowed and will raise pdi.core.InvalidComponentError or pdi.core.InvalidPropertyError.
Type:
int
Value:
40                                                                     

RULE_RECOMMENDED

Rule for components and properties that are recommended. If one of these are missing you will be warned with pdi.core.MissingComponentWarning or pdi.core.MissingPropertyWarning.
Type:
int
Value:
30                                                                     

Generated by Epydoc 1.1 on Sun Nov 24 14:33:25 2002 http://epydoc.sf.net