|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectde.grogra.pf.io.FilterBase
public abstract class FilterBase
This is a base class for the implementation of
Filters. Its implementation of getMetaData
forwards to #getImpl(Object, Object) firstly, then to
the item which defines this filter, then to
the meta data of the source, and returns the first value
which could be found this way.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource |
|---|
FilterSource.MetaDataKey<V> |
| Nested classes/interfaces inherited from interface de.grogra.util.Map |
|---|
Map.Chain |
| Field Summary | |
|---|---|
protected FilterItem |
item
The defining FilterItem for this filter. |
protected FilterSource |
source
The data source of this filter. |
| Fields inherited from interface de.grogra.pf.io.FilterSource |
|---|
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL |
| Fields inherited from interface de.grogra.util.Map |
|---|
DEFAULT_VALUE, EMPTY_MAP |
| Constructor Summary | |
|---|---|
FilterBase(FilterItem item,
FilterSource source)
Creates a new FilterBase, initializes its
item and source fields and
sets the system id to the system id of the source. |
|
| Method Summary | ||
|---|---|---|
java.lang.Object |
get(java.lang.Object key,
java.lang.Object defaultValue)
Returns the value associated with key. |
|
Filter |
getFilter()
Returns the Filter from which this instance obtains its data. |
|
IOFlavor |
getFlavor()
Returns the IOFlavor of this data source. |
|
protected java.lang.Object |
getImpl(FilterSource.MetaDataKey key,
java.lang.Object defaultValue)
This method is invoked by get(Object, Object). |
|
|
getMetaData(FilterSource.MetaDataKey<V> key,
V defaultValue)
|
|
Registry |
getRegistry()
Returns the Registry which is linked with this instance. |
|
FilterSource |
getSource()
Returns the data source of this filter. |
|
java.lang.String |
getSystemId()
Returns a system id which identifies this source. |
|
void |
initProgressMonitor(ProgressMonitor monitor)
|
|
protected void |
setFlavor(IOFlavor flavor)
|
|
|
setMetaData(FilterSource.MetaDataKey<V> key,
V value)
|
|
protected void |
setMetaData(Map metaData)
Sets the internal meta data map to the specified map. |
|
void |
setProgress(java.lang.String text,
float progress)
|
|
protected void |
setSystemId(java.lang.String systemId)
|
|
java.lang.String |
toString()
|
|
java.net.URL |
toURL()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final FilterItem item
FilterItem for this filter.
protected final FilterSource source
| Constructor Detail |
|---|
public FilterBase(FilterItem item,
FilterSource source)
FilterBase, initializes its
item and source fields and
sets the system id to the system id of the source.
item - the defining FilterItemsource - the data source| Method Detail |
|---|
public java.lang.Object get(java.lang.Object key,
java.lang.Object defaultValue)
Mapkey. If there is
no value associated with key, defaultValue
is returned.
get in interface Mapkey - a key for the mapdefaultValue - the default value
defaultValuepublic final Filter getFilter()
FilterSourceFilter 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.
getFilter in interface FilterSourcenullpublic final IOFlavor getFlavor()
FilterSourceIOFlavor of this data source. Depending on the
flavor, this instance has to implement corresponding subinterfaces
of FilterSource.
getFlavor in interface FilterSource
protected java.lang.Object getImpl(FilterSource.MetaDataKey key,
java.lang.Object defaultValue)
get(Object, Object). This default
implementation forwards to the internal meta data map
(see setMetaData(Map)), or returns defaultValue
if no such internal map has been set.
key - a keydefaultValue - a default value
defaultValue
public <V> V getMetaData(FilterSource.MetaDataKey<V> key,
V defaultValue)
getMetaData in interface FilterSourcepublic final Registry getRegistry()
RegistryContextRegistry which is linked with this instance.
getRegistry in interface RegistryContextpublic final FilterSource getSource()
Filter
getSource in interface Filterpublic final java.lang.String getSystemId()
FilterSource
getSystemId in interface FilterSourcepublic void initProgressMonitor(ProgressMonitor monitor)
initProgressMonitor in interface FilterSourceprotected final void setFlavor(IOFlavor flavor)
public <V> void setMetaData(FilterSource.MetaDataKey<V> key,
V value)
setMetaData in interface FilterSourceprotected void setMetaData(Map metaData)
metaData - a value for the internal meta data map
public void setProgress(java.lang.String text,
float progress)
setProgress in interface FilterSourceprotected final void setSystemId(java.lang.String systemId)
public java.lang.String toString()
toString in class java.lang.Object
public java.net.URL toURL()
throws java.net.MalformedURLException
java.net.MalformedURLException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||