com.armatiek.infofuze.source
Class AbstractStreamSource

java.lang.Object
  extended by javax.xml.transform.stream.StreamSource
      extended by com.armatiek.infofuze.source.AbstractStreamSource
All Implemented Interfaces:
DataSourceIf, javax.xml.transform.Source
Direct Known Subclasses:
AbstractJDBCSource, CSVSource, FileSystemSource, LDAPSource, NullSource, SolrSource

public abstract class AbstractStreamSource
extends javax.xml.transform.stream.StreamSource
implements DataSourceIf

An abstract base class for all stream based Source classes.

Author:
Maarten Kroon

Field Summary
 
Fields inherited from class javax.xml.transform.stream.StreamSource
FEATURE
 
Constructor Summary
AbstractStreamSource(org.w3c.dom.Element configElem)
           
AbstractStreamSource(java.lang.String name)
           
 
Method Summary
 void afterStreamClosed()
          Method that can be implemented to perform special operations after the source is closed.
 void close()
          Closes this source.
 void destroy()
           
 java.lang.String getName()
          Returns the name of this source.
 java.io.Reader getReader()
           
 java.lang.String getTransformId()
          Returns the transformation identifier of the transformation this source is currently part of.
 Definitions.TransformMode getTransformMode()
          Returns the transformation mode of the transformation this source is currently part of.
 boolean isAutoReturning()
          Tests whether this source must be returned to the pool automatically when it is closed.
 boolean isOpen()
          Tests whether this source is open or not.
 void open()
          Opens this source.
 void reset()
          Resets this source (i.e. resets the transformation mode and identifier).
 void setAutoReturning(boolean isAutoReturning)
          Specifies if this source must be returned to the pool automatically when it is closed.
 void setParameters(java.util.List<Parameter> params)
          Sets the parameters.
 void setTransformId(java.lang.String id)
          Sets the transformation identifier.
 void setTransformMode(Definitions.TransformMode transformMode)
          Sets the transformation mode.
 
Methods inherited from class javax.xml.transform.stream.StreamSource
getInputStream, getPublicId, getSystemId, setInputStream, setPublicId, setReader, setSystemId, setSystemId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStreamSource

public AbstractStreamSource(org.w3c.dom.Element configElem)

AbstractStreamSource

public AbstractStreamSource(java.lang.String name)
Method Detail

afterStreamClosed

public void afterStreamClosed()
Description copied from interface: DataSourceIf
Method that can be implemented to perform special operations after the source is closed.

Specified by:
afterStreamClosed in interface DataSourceIf

close

public void close()
Description copied from interface: DataSourceIf
Closes this source.

Specified by:
close in interface DataSourceIf

destroy

public void destroy()
             throws java.lang.Throwable
Specified by:
destroy in interface DataSourceIf
Throws:
java.lang.Throwable

getName

public java.lang.String getName()
Description copied from interface: DataSourceIf
Returns the name of this source.

Specified by:
getName in interface DataSourceIf
Returns:
A String specifying the name of this source

getTransformId

public java.lang.String getTransformId()
Description copied from interface: DataSourceIf
Returns the transformation identifier of the transformation this source is currently part of.

Specified by:
getTransformId in interface DataSourceIf
Returns:
A String specifying the transformation identifier

getTransformMode

public Definitions.TransformMode getTransformMode()
Description copied from interface: DataSourceIf
Returns the transformation mode of the transformation this source is currently part of.

Specified by:
getTransformMode in interface DataSourceIf
Returns:
The transformation mode

getReader

public java.io.Reader getReader()
Overrides:
getReader in class javax.xml.transform.stream.StreamSource

isAutoReturning

public boolean isAutoReturning()
Description copied from interface: DataSourceIf
Tests whether this source must be returned to the pool automatically when it is closed.

Specified by:
isAutoReturning in interface DataSourceIf

isOpen

public boolean isOpen()
Description copied from interface: DataSourceIf
Tests whether this source is open or not.

Specified by:
isOpen in interface DataSourceIf

open

public void open()
Description copied from interface: DataSourceIf
Opens this source.

Specified by:
open in interface DataSourceIf

reset

public void reset()
Description copied from interface: DataSourceIf
Resets this source (i.e. resets the transformation mode and identifier).

Specified by:
reset in interface DataSourceIf

setAutoReturning

public void setAutoReturning(boolean isAutoReturning)
Description copied from interface: DataSourceIf
Specifies if this source must be returned to the pool automatically when it is closed.

Specified by:
setAutoReturning in interface DataSourceIf

setTransformId

public void setTransformId(java.lang.String id)
Description copied from interface: DataSourceIf
Sets the transformation identifier.

Specified by:
setTransformId in interface DataSourceIf
Parameters:
id - A String specifying the transformation identifier

setTransformMode

public void setTransformMode(Definitions.TransformMode transformMode)
Description copied from interface: DataSourceIf
Sets the transformation mode.

Specified by:
setTransformMode in interface DataSourceIf
Parameters:
transformMode - The transformation mode

setParameters

public void setParameters(java.util.List<Parameter> params)
Description copied from interface: DataSourceIf
Sets the parameters.

Specified by:
setParameters in interface DataSourceIf
Parameters:
params - A list containing the parameters