net.sourceforge.esw.collection
Class AIOTransducer

java.lang.Object
  |
  +--net.sourceforge.esw.collection.ATransducer
        |
        +--net.sourceforge.esw.collection.AIOTransducer
All Implemented Interfaces:
IIOTransducer, ITransducer, java.io.Serializable
Direct Known Subclasses:
DelimitedTransducer, DictionaryTransducer, FixedPositionTransducer, XMLTransducer

public abstract class AIOTransducer
extends ATransducer
implements IIOTransducer

Provides an abstract base class for implementors of the IIOTransducer interface.

Performs Transduction against a stream of data from either a Reader or a Writer.

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.

This IIOTransducer instance provides stream-based access for stream-based ITransducer implementors. It abstracts out the setting and getting of the streams, or the Readers and Writers, into this interface.

For specific type of streams, like file-based streams or string-based streams, see the TransducerAdapter objects.

This implementation provides storage for the Reader and Writer instances.

See Also:
FileTransducerAdapter, StringTransducerAdapter, URLTransducerAdapter, IMetaCollection, Serialized Form

Field Summary
protected  java.io.Reader reader
          The Reader instance that will provide input for get methods.
protected  java.io.Writer writer
          The Writer instance that will provide ouput for put methods.
 
Fields inherited from class net.sourceforge.esw.collection.ATransducer
contextFactory
 
Constructor Summary
AIOTransducer()
          Creates a new AIOTransducer instance.
 
Method Summary
 java.io.Reader getReader()
          Returns the Reader instance to be used by this IIOTransducer instance.
 java.io.Writer getWriter()
          Returns the Writer instance to be used by this IIOTransducer instance.
 void setReader(java.io.Reader aReader)
          Sets the Reader instance for this IIOTransducer instance.
 void setWriter(java.io.Writer aWriter)
          Sets the Writer instance for this IIOTransducer instance.
 
Methods inherited from class net.sourceforge.esw.collection.ATransducer
getContextFactory, setContextFactory
 
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, getContextFactory, put, setContextFactory
 

Field Detail

reader

protected java.io.Reader reader
The Reader instance that will provide input for get methods.

writer

protected java.io.Writer writer
The Writer instance that will provide ouput for put methods.
Constructor Detail

AIOTransducer

public AIOTransducer()
Creates a new AIOTransducer instance.
Method Detail

getReader

public java.io.Reader getReader()
Returns the Reader instance to be used by this IIOTransducer instance.
Specified by:
getReader in interface IIOTransducer
See Also:
setReader( Reader )

getWriter

public java.io.Writer getWriter()
Returns the Writer instance to be used by this IIOTransducer instance.
Specified by:
getWriter in interface IIOTransducer
See Also:
setWriter( Writer )

setReader

public void setReader(java.io.Reader aReader)
Sets the Reader instance for this IIOTransducer instance.
Specified by:
setReader in interface IIOTransducer
Parameters:
aReader - the Reader instance to be used by this IIOTransducer instance.
See Also:
getReader()

setWriter

public void setWriter(java.io.Writer aWriter)
Sets the Writer instance for this IIOTransducer instance.
Specified by:
setWriter in interface IIOTransducer
Parameters:
aWriter - the Writer instance to be used by this IIOTransducer instance.
See Also:
getWriter()


Copyright 2002 Free Software Foundation. All Rights Reserved.