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

Class Property

object --+
         |
        Property

Known Subclasses:
DateProperty, UnknownProperty, TextProperty

All properties must inherit from this class. An instance of this class should be treated as an unknown property.
Method Summary
  __init__(self, name, content, value, encoding, type, lineNumber)
a new object with type S, a subtype of T __new__(S, ...)
  __str__(self)
Serializes a property back to raw data.
  getContent(self)
Use this to fetch the content.
  invalidContent(self, message, content)
Issue warning.
  setContent(self, content)
Use this to set the content.
boolean validate(self)
Validates the property content.

Method Details

__init__(self, name, content, value, encoding, type, lineNumber=None)
(Constructor)

Parameters:
name - The name of this property (not type).
           (type=string)
content - The raw content fetched directly from the input data.
           (type=string)
encoding - The encoding used to store the raw content.
           (type=string)
type - Type of content.
           (type=string)
lineNumber - The line on which this property was found.
           (type=number)

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

__str__(self)
(Informal representation operator)

Serializes a property back to raw data.

getContent(self)

Use this to fetch the content.
Returns:
The content in it's correct form and type.

invalidContent(self, message, content)

Issue warning.
Parameters:
message - Explaining why the content is invalid.
           (type=string)
content - The invalid content.
           (type=string)

setContent(self, content)

Use this to set the content. The content will be validated.
Parameters:
content - The data string content.
           (type=string)

validate(self)

Validates the property content. Issues warnings.
Returns:
None or zero if invalid content.
           (type=boolean)

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