|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.sourceforge.esw.collection.ATransducer
Abstract base class that transduces data between a specific external data
source and an IMetaCollection instance.
This transduction occurs both ways; put() takes data
from the IMetaCollection instance to which this
ITransducer instance is attached and places it into the data
source represented by this ITransducer instance. The
get() method takes data from the data source represented by this
ITransducer instance and places it into the
IMetaCollection instance to which this ITransducer
instance is attached.
All ITransducer implementors should remain stateless in their
interaction with the IMetaCollection instance to which this
ITransducer implementor is attached. This insures that
ITransducer implementors may be used in multi-threaded
environments.
The INodeContextFactory instance attached to this
ITransducer instance provides context from which to create the
INode instances that are added to the
IMetaCollection instances. This INodeContextFactory
is only valid during the get operations of the
ITransducer. The context determines how new INode
instances are obtained during a get() operation. For instance,
the context controls whether a new INode instance is created,
or an entire subgraph of INode instances with a preset
structure. Advanced uses may include returning a graph of INode
instances that is reused from a previous transduction. The
INodeContectFactory is intended to be the primary form of
customization and extension to the creation and behavior of the
IMetaCollection / ITransducer / INode
framework.
The ATransducer is an abstract base class for the Transducer
architecture. It provides a default implementation of the
INodeContectFactory accessor methods, but still requires the
implementors to implement the get() and put()
methods for the ITransducer interface. It is suggested that all
ITransducer implementors extend ATransducer.
By default, the INodeContextFactory instance is an
DefaultNodeContextFactory instance.
IMetaCollection, Serialized Form| Field Summary | |
protected INodeContextFactory |
contextFactory
The INodeContextFactory instance for this
ATransducer. |
| Constructor Summary | |
ATransducer()
Creates a new instance of this ITransducer instance setting
the INodeContextFactory to be an instance of the
DefaultNodeContectFactory. |
|
| Method Summary | |
INodeContextFactory |
getContextFactory()
Returns the INodeContextFactory instance used by this
ITransducer instance during get operations. |
void |
setContextFactory(INodeContextFactory aContextFactory)
Sets the INodeContextFactory instance to be used by this
ITransducer instance during get operations. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.esw.collection.ITransducer |
get, put |
| Field Detail |
protected INodeContextFactory contextFactory
INodeContextFactory instance for this
ATransducer.| Constructor Detail |
public ATransducer()
ITransducer instance setting
the INodeContextFactory to be an instance of the
DefaultNodeContectFactory.| Method Detail |
public void setContextFactory(INodeContextFactory aContextFactory)
INodeContextFactory instance to be used by this
ITransducer instance during get operations.setContextFactory in interface ITransduceraContextFactory - the INodeContextFactory instance to
provide context.getContextFactory()public INodeContextFactory getContextFactory()
INodeContextFactory instance used by this
ITransducer instance during get operations.getContextFactory in interface ITransducerINodeContextFactory instance utilitied by this
ITransducer instance.setContextFactory( INodeContextFactory )
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||