| |
- Enumeration(Propertied)
-
- Month
- MonthAbbr
- WeekDay
- WeekDayAbbr
class Month(Enumeration) |
|
Locale-specific month enumeration
Uses calendar/mx.DateTime standard of January=1,
December = 12 |
|
- Method resolution order:
- Month
- Enumeration
- Propertied
- object
Class methods defined here:
- allInstances(cls) from type
- Return cls instances for each of this class's set
Data and other attributes defined here:
- data = [('January', 1), ('February', 2), ('March', 3), ('April', 4), ('May', 5), ('June', 6), ('July', 7), ('August', 8), ('September', 9), ('October', 10), ('November', 11), ('December', 12)]
- dataType = 'enumeration.month'
- set = {u'February': EnumerationChoice( name=u'February...: EnumerationChoice( name=u'November', value=11)}
Methods inherited from Enumeration:
- __cmp__(self, other)
- Compare this value to another value
- __init__(self, name='', *arguments, **named)
- __repr__(self)
- Return a code-like representation of this object
- __str__(self)
- Return the enumeration value as a name
- choice(self)
- Get the choice object associated with this value or None
- value(self)
- Get the value associated with this choice
Class methods inherited from Enumeration:
- check(cls, value) from type
- Check whether value is of cls type, and has the same set
- coerce(cls, value) from type
- Coerce a value into an Enumeration value
Accepted types:
Enumeration objects
integers/longs
([name,name,name],remainder) tuples
[name,name,name,value] lists (values are |'d together)
- fromValue(cls, value) from type
- Create from an integer value
- parse(cls, value) from type
- Create from a string value
Possible formats:
"coreName"
"23"
"friendlyName"
Data and other attributes inherited from Enumeration:
- name = <BasicProperty 'name'>
- Data-value choice within one of our sets
Methods inherited from Propertied:
- clone(self, **newValues)
- Clone this object, with optional new property values
This method calls the __init__ method of your class with
the current property values of your class. Providing newValues
(a dictionary) overrides property settings with new values.
- getCloneProperties(self)
- Get properties dictionary (key:value) for use in cloning of the instance
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
- toString(self, indentation='', alreadyDone=None, indentString=' ')
- Get a nicely formatted representation of this object
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
XXX Needs a far better API, likely a stand-alone class
without the automatic inheritance problems here :(
Class methods inherited from Propertied:
- getProperties(cls) from type
- Get the BasicProperty properties for a particular object's class
Data and other attributes inherited from Propertied:
- __dict__ = <dictproxy object at 0x01C53C70>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Propertied' objects>
- list of weak references to the object (if defined)
|
class MonthAbbr(Enumeration) |
|
Locale-specific month (abbreviated) enumeration
Uses calendar/mx.DateTime standard of January=1,
December = 12 |
|
- Method resolution order:
- MonthAbbr
- Enumeration
- Propertied
- object
Class methods defined here:
- allInstances(cls) from type
- Return cls instances for each of this class's set
Data and other attributes defined here:
- dataType = 'enumeration.month.abbr'
- set = {u'Mar': EnumerationChoice( name=u'Mar', value=3...'Oct': EnumerationChoice( name=u'Oct', value=10)}
Methods inherited from Enumeration:
- __cmp__(self, other)
- Compare this value to another value
- __init__(self, name='', *arguments, **named)
- __repr__(self)
- Return a code-like representation of this object
- __str__(self)
- Return the enumeration value as a name
- choice(self)
- Get the choice object associated with this value or None
- value(self)
- Get the value associated with this choice
Class methods inherited from Enumeration:
- check(cls, value) from type
- Check whether value is of cls type, and has the same set
- coerce(cls, value) from type
- Coerce a value into an Enumeration value
Accepted types:
Enumeration objects
integers/longs
([name,name,name],remainder) tuples
[name,name,name,value] lists (values are |'d together)
- fromValue(cls, value) from type
- Create from an integer value
- parse(cls, value) from type
- Create from a string value
Possible formats:
"coreName"
"23"
"friendlyName"
Data and other attributes inherited from Enumeration:
- name = <BasicProperty 'name'>
- Data-value choice within one of our sets
Methods inherited from Propertied:
- clone(self, **newValues)
- Clone this object, with optional new property values
This method calls the __init__ method of your class with
the current property values of your class. Providing newValues
(a dictionary) overrides property settings with new values.
- getCloneProperties(self)
- Get properties dictionary (key:value) for use in cloning of the instance
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
- toString(self, indentation='', alreadyDone=None, indentString=' ')
- Get a nicely formatted representation of this object
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
XXX Needs a far better API, likely a stand-alone class
without the automatic inheritance problems here :(
Class methods inherited from Propertied:
- getProperties(cls) from type
- Get the BasicProperty properties for a particular object's class
Data and other attributes inherited from Propertied:
- __dict__ = <dictproxy object at 0x01C538B0>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Propertied' objects>
- list of weak references to the object (if defined)
|
class WeekDay(Enumeration) |
|
Locale-specific day-of-week enumeration
Uses both calendar and mx.DateTime's standard of
Monday = 0, Sunday = 6 |
|
- Method resolution order:
- WeekDay
- Enumeration
- Propertied
- object
Class methods defined here:
- allInstances(cls) from type
- Return cls instances for each of this class's set
Data and other attributes defined here:
- dataType = 'enumeration.weekday'
- set = {u'Monday': EnumerationChoice( name=u'Monday', v...': EnumerationChoice( name=u'Saturday', value=5)}
Methods inherited from Enumeration:
- __cmp__(self, other)
- Compare this value to another value
- __init__(self, name='', *arguments, **named)
- __repr__(self)
- Return a code-like representation of this object
- __str__(self)
- Return the enumeration value as a name
- choice(self)
- Get the choice object associated with this value or None
- value(self)
- Get the value associated with this choice
Class methods inherited from Enumeration:
- check(cls, value) from type
- Check whether value is of cls type, and has the same set
- coerce(cls, value) from type
- Coerce a value into an Enumeration value
Accepted types:
Enumeration objects
integers/longs
([name,name,name],remainder) tuples
[name,name,name,value] lists (values are |'d together)
- fromValue(cls, value) from type
- Create from an integer value
- parse(cls, value) from type
- Create from a string value
Possible formats:
"coreName"
"23"
"friendlyName"
Data and other attributes inherited from Enumeration:
- name = <BasicProperty 'name'>
- Data-value choice within one of our sets
Methods inherited from Propertied:
- clone(self, **newValues)
- Clone this object, with optional new property values
This method calls the __init__ method of your class with
the current property values of your class. Providing newValues
(a dictionary) overrides property settings with new values.
- getCloneProperties(self)
- Get properties dictionary (key:value) for use in cloning of the instance
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
- toString(self, indentation='', alreadyDone=None, indentString=' ')
- Get a nicely formatted representation of this object
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
XXX Needs a far better API, likely a stand-alone class
without the automatic inheritance problems here :(
Class methods inherited from Propertied:
- getProperties(cls) from type
- Get the BasicProperty properties for a particular object's class
Data and other attributes inherited from Propertied:
- __dict__ = <dictproxy object at 0x01C53D10>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Propertied' objects>
- list of weak references to the object (if defined)
|
class WeekDayAbbr(Enumeration) |
|
Locale-specific day-of-week (abbreviated) enumeration
Uses both calendar and mx.DateTime's standard of
Mon = 0, Sun = 6 |
|
- Method resolution order:
- WeekDayAbbr
- Enumeration
- Propertied
- object
Class methods defined here:
- allInstances(cls) from type
- Return cls instances for each of this class's set
Data and other attributes defined here:
- dataType = 'enumeration.weekday.abbr'
- set = {u'Wed': EnumerationChoice( name=u'Wed', value=2...u'Sat': EnumerationChoice( name=u'Sat', value=5)}
Methods inherited from Enumeration:
- __cmp__(self, other)
- Compare this value to another value
- __init__(self, name='', *arguments, **named)
- __repr__(self)
- Return a code-like representation of this object
- __str__(self)
- Return the enumeration value as a name
- choice(self)
- Get the choice object associated with this value or None
- value(self)
- Get the value associated with this choice
Class methods inherited from Enumeration:
- check(cls, value) from type
- Check whether value is of cls type, and has the same set
- coerce(cls, value) from type
- Coerce a value into an Enumeration value
Accepted types:
Enumeration objects
integers/longs
([name,name,name],remainder) tuples
[name,name,name,value] lists (values are |'d together)
- fromValue(cls, value) from type
- Create from an integer value
- parse(cls, value) from type
- Create from a string value
Possible formats:
"coreName"
"23"
"friendlyName"
Data and other attributes inherited from Enumeration:
- name = <BasicProperty 'name'>
- Data-value choice within one of our sets
Methods inherited from Propertied:
- clone(self, **newValues)
- Clone this object, with optional new property values
This method calls the __init__ method of your class with
the current property values of your class. Providing newValues
(a dictionary) overrides property settings with new values.
- getCloneProperties(self)
- Get properties dictionary (key:value) for use in cloning of the instance
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
- toString(self, indentation='', alreadyDone=None, indentString=' ')
- Get a nicely formatted representation of this object
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
XXX Needs a far better API, likely a stand-alone class
without the automatic inheritance problems here :(
Class methods inherited from Propertied:
- getProperties(cls) from type
- Get the BasicProperty properties for a particular object's class
Data and other attributes inherited from Propertied:
- __dict__ = <dictproxy object at 0x01C53A50>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Propertied' objects>
- list of weak references to the object (if defined)
| |