API Reference for Enthought Tool Suite 2.7.1

The base class for all resource types.

A resource type represents a *kind* of resource (i.e., domain object) such
as a log, log suite, well, mixing tank etc.  It could also represent a
'primitive' type such as an int, float, or more probably in our case, a
numeric array.

A resource type describes how to manage the following aspects of its
resources:

1) Visualization

Resources can be visualized in a number of ways, in trees, tables, lists
etc.  To do this we need information such as icons, label text etc. and
this is provided by the resource type's node type.  Although the node type
has its roots in the tree world, it can obviously be reused across widgets
such as tables and lists etc by simply not displaying the resource's
children.

2) Serialization

A resource type can provide a serializer to control how its resources are
persisted (e.g., to the project naming system).  By default, all objects
are pickled using cPickle, but for example, a log suite resource type could
provide a serializer that would read and write log suites as LAS (log ASCII
standard) files.

3) Naming

Envisage uses naming systems heavily, and importantly, the project
workspace is simply a persistent naming system that uses the file system
(see 'enthought.naming.PyFSContext').  If required, a resource type can
describe how naming resolution can proceed 'into' the namespace of an
individual resource e.g., a log suite resource type could allow name
resolution into its logs.  This comes in handy in the project workspace
view so that the user can navigate to any item displayed in the project
tree using the same naming mechanism.

4) Editing

A resource type can specify a class that will be used to create editors its
resource.

fixme: This should probably be the common pattern of:- a factory or a
class where the default factory just creates an instance of the class.

5) Traits UI handlers.

Resource types contain a dictionary of traits UI handlers that can be used
to create user interfaces for resources.

Inherits from

Attributes

Inherited from base classes

Method summary

Inherited from base classes

Methods

Copyright © 2002-2008 Enthought, Inc.