Extension of the property / metadata support by complex domain objects.
Domain objects should allow to model meta data in a more compact way by using Python objects.
Domain objects should always be inherited from a base class (e.g., DomainObject). The required
properties should be defined on class level. Properties defined in this way are persisted and can be further described by a
documentation string, display name, and a default value. The existing property types (e.g., StringType, NumberType, ...) should be re-used as well.
Here an example:
>>> class Author(
... name = DomainProperty(
...
... @name.setValidate
... def _validateName(
... if self.name is None or len(self.name) == 0:
... raise ValueError("Name should not be empty.")
...
... author = Author()
... author.name = "Pierre"
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Essential
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Tobias Schlauch
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- 2.2.0
- Started by
- Tobias Schlauch
- Completed by
- Tobias Schlauch