de.grogra.pf.io
Class FilterSourceBase

java.lang.Object
  extended by de.grogra.pf.io.FilterSourceBase
All Implemented Interfaces:
FilterSource, RegistryContext
Direct Known Subclasses:
DOMSourceImpl, FileSource, InputStreamSourceImpl, NullSource, ObjectSourceImpl, ReaderSourceImpl, SAXSourceBase

public abstract class FilterSourceBase
extends java.lang.Object
implements FilterSource


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V>
 
Field Summary
 
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL
 
Constructor Summary
FilterSourceBase(IOFlavor flavor, Registry registry, ModifiableMap metaData)
           
 
Method Summary
 Filter getFilter()
          Returns the Filter from which this instance obtains its data.
 IOFlavor getFlavor()
          Returns the IOFlavor of this data source.
<V> V
getMetaData(FilterSource.MetaDataKey<V> key, V defaultValue)
           
 Registry getRegistry()
          Returns the Registry which is linked with this instance.
 void initProgressMonitor(ProgressMonitor monitor)
           
<V> void
setMetaData(FilterSource.MetaDataKey<V> key, V value)
           
 void setProgress(java.lang.String text, float progress)
           
protected  void setProgress0(java.lang.String text, float progress)
           
protected  void setProgressImpl(java.lang.String text, float progress)
           
 java.lang.String toString()
           
protected  boolean useAutoProgress()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.grogra.pf.io.FilterSource
getSystemId
 

Constructor Detail

FilterSourceBase

public FilterSourceBase(IOFlavor flavor,
                        Registry registry,
                        ModifiableMap metaData)
Method Detail

getFilter

public final Filter getFilter()
Description copied from interface: FilterSource
Returns the Filter from which this instance obtains its data. If there is no such filter, i.e., if this is the first object in the filter pipeline, this method returns null.

Specified by:
getFilter in interface FilterSource
Returns:
the filter from which data is obtained, or null

getFlavor

public final IOFlavor getFlavor()
Description copied from interface: FilterSource
Returns the IOFlavor of this data source. Depending on the flavor, this instance has to implement corresponding subinterfaces of FilterSource.

Specified by:
getFlavor in interface FilterSource
Returns:
the flavor of the data

getMetaData

public <V> V getMetaData(FilterSource.MetaDataKey<V> key,
                         V defaultValue)
Specified by:
getMetaData in interface FilterSource

getRegistry

public final Registry getRegistry()
Description copied from interface: RegistryContext
Returns the Registry which is linked with this instance.

Specified by:
getRegistry in interface RegistryContext
Returns:
the registry linked with this instance

initProgressMonitor

public void initProgressMonitor(ProgressMonitor monitor)
Specified by:
initProgressMonitor in interface FilterSource

setMetaData

public <V> void setMetaData(FilterSource.MetaDataKey<V> key,
                            V value)
Specified by:
setMetaData in interface FilterSource

setProgress

public void setProgress(java.lang.String text,
                        float progress)
Specified by:
setProgress in interface FilterSource

setProgress0

protected void setProgress0(java.lang.String text,
                            float progress)

setProgressImpl

protected void setProgressImpl(java.lang.String text,
                               float progress)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

useAutoProgress

protected final boolean useAutoProgress()