org.ikasan.framework.component.transformation.flatfile.reader
Class BaseFlatFileReader

java.lang.Object
  extended by org.ikasan.framework.component.transformation.flatfile.reader.BaseFlatFileReader
All Implemented Interfaces:
XMLReader
Direct Known Subclasses:
BaseStringHandlingFlatFileReader

public abstract class BaseFlatFileReader
extends Object
implements XMLReader

Abstract base class for FlatFile implementations of XMLReader Subclasses of this class will be capable of reading various types of flat files as if they were XML files.

Author:
Ikasan Development Team

Field Summary
protected  Attributes attributes
          Attributes
protected  ContentHandler contentHandler
          Handler to the content
protected  String namespaceURI
          The URI for the namespace
 
Constructor Summary
BaseFlatFileReader(String rootElementName)
          Constructor
 
Method Summary
 ContentHandler getContentHandler()
          Accessor method for ContentHandler
 DTDHandler getDTDHandler()
          Accessor method for DTDHandler
 EntityResolver getEntityResolver()
          Accessor method for EntityResolver
 ErrorHandler getErrorHandler()
          Accessor method for ErrorHandler
 boolean getFeature(String name)
          Accessor method for features.
 Object getProperty(String name)
          Accessor for named properties
 void parse(InputSource inputSource)
          Parses the InputSource creating an empty document Delegates to subclasses to parse the InputSource in type specific manner
 void parse(String systemId)
          Unimplemented method from XMLReader
protected abstract  void parseInputSource(InputSource inputSource)
          Type specific method implemented by subclasses
 void setContentHandler(ContentHandler handler)
          Setter method for ContentHandler
 void setDTDHandler(DTDHandler handler)
          Setter method for DTDHandler
 void setEntityResolver(EntityResolver resolver)
          Setter method for EntityResolver
 void setErrorHandler(ErrorHandler handler)
          Setter method for ErrorHandler
 void setFeature(String name, boolean value)
          Unimplemented method from XMLReader
 void setNamespaceURI(String namespaceURI)
          Setter for namespaceURI
 void setProperty(String name, Object value)
          Unimplemented method from XMLReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentHandler

protected ContentHandler contentHandler
Handler to the content


namespaceURI

protected String namespaceURI
The URI for the namespace


attributes

protected Attributes attributes
Attributes

Constructor Detail

BaseFlatFileReader

public BaseFlatFileReader(String rootElementName)
Constructor

Parameters:
rootElementName - - The name of the root element
Method Detail

getContentHandler

public ContentHandler getContentHandler()
Accessor method for ContentHandler

Specified by:
getContentHandler in interface XMLReader
Returns:
contentHandler

getDTDHandler

public DTDHandler getDTDHandler()
Accessor method for DTDHandler

Specified by:
getDTDHandler in interface XMLReader
Returns:
dtdHandler

getEntityResolver

public EntityResolver getEntityResolver()
Accessor method for EntityResolver

Specified by:
getEntityResolver in interface XMLReader
Returns:
entityResolver

getErrorHandler

public ErrorHandler getErrorHandler()
Accessor method for ErrorHandler

Specified by:
getErrorHandler in interface XMLReader
Returns:
errorHandler

getFeature

public boolean getFeature(String name)
                   throws SAXNotSupportedException
Accessor method for features.

Specified by:
getFeature in interface XMLReader
Parameters:
name -
Returns:
throws SAXNotSupportedException as not currently supported
Throws:
SAXNotSupportedException

getProperty

public Object getProperty(String name)
Accessor for named properties

Specified by:
getProperty in interface XMLReader
Parameters:
name -
Returns:
null in all cases

parse

public void parse(String systemId)
Unimplemented method from XMLReader

Specified by:
parse in interface XMLReader
Parameters:
systemId -

setContentHandler

public void setContentHandler(ContentHandler handler)
Setter method for ContentHandler

Specified by:
setContentHandler in interface XMLReader
Parameters:
handler -

setDTDHandler

public void setDTDHandler(DTDHandler handler)
Setter method for DTDHandler

Specified by:
setDTDHandler in interface XMLReader
Parameters:
handler -

setEntityResolver

public void setEntityResolver(EntityResolver resolver)
Setter method for EntityResolver

Specified by:
setEntityResolver in interface XMLReader
Parameters:
resolver -

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Setter method for ErrorHandler

Specified by:
setErrorHandler in interface XMLReader
Parameters:
handler -

setFeature

public void setFeature(String name,
                       boolean value)
                throws SAXNotSupportedException
Unimplemented method from XMLReader

Specified by:
setFeature in interface XMLReader
Parameters:
name -
value -
Throws:
SAXNotSupportedException

setProperty

public void setProperty(String name,
                        Object value)
Unimplemented method from XMLReader

Specified by:
setProperty in interface XMLReader
Parameters:
name -
value -

setNamespaceURI

public void setNamespaceURI(String namespaceURI)
Setter for namespaceURI

Parameters:
namespaceURI -

parse

public void parse(InputSource inputSource)
           throws IOException,
                  SAXException
Parses the InputSource creating an empty document Delegates to subclasses to parse the InputSource in type specific manner

Specified by:
parse in interface XMLReader
Parameters:
inputSource -
Throws:
IOException
SAXException

parseInputSource

protected abstract void parseInputSource(InputSource inputSource)
                                  throws IOException,
                                         SAXException
Type specific method implemented by subclasses

Parameters:
inputSource -
Throws:
IOException
SAXException


Copyright © 2007-2012 Ikasan. All Rights Reserved.