net.sf.fikin.sql.core
Class MultipleXmlFiles

java.lang.Object
  extended by net.sf.fikin.sql.SQLPipeElement
      extended by net.sf.fikin.sql.core.SimpleXmlFile
          extended by net.sf.fikin.sql.core.MultipleXmlFiles

public class MultipleXmlFiles
extends SimpleXmlFile

Parses multiple input files and execute them consequently.

This class is similar to SimpleXmlFile in idea but it deals with url or file names rather than actual sql statments.

SimpleXmlFile must be placed next in the pipe as this class delegates file's parsing to it.

It recognizes one tag only which by default is set to uri="http://fikin-ant-tasks.sf.net/sql/simple-input.xsd" and localName="file" or localName="url". One can modify this via object's setter methods.

It treats the text inside the tags as an file name or a qualified url and does not recognize nested xml tags. In such case an SQXException exception is raisen.

This object accepts file, file name or input stream as input source.

File parsing is based on SAX.

created on Dec 17, 2006

Since:
Version:
$Revision: 1.7 $
Author:
fiykov

Nested Class Summary
 class MultipleXmlFiles.FileUrlParser
          recognizes only SimpleXmlFile.getTag() or getUrlTag() tag and extract its characters if any
 
Nested classes/interfaces inherited from class net.sf.fikin.sql.core.SimpleXmlFile
SimpleXmlFile.SimpleSAXParser
 
Field Summary
static java.lang.String DEFAULT_FILE_TAG
          default tag local name, this parser is configured with
static java.lang.String DEFAULT_URL_TAG
          default tag local name, this parser is configured with
 
Fields inherited from class net.sf.fikin.sql.core.SimpleXmlFile
DEFAULT_TAG, DEFAULT_URI
 
Constructor Summary
MultipleXmlFiles()
          default constructs
 
Method Summary
protected  SimpleXmlFile.SimpleSAXParser createParser()
          subclassing point
 java.lang.String getUrlTag()
           
 void setUrlTag(java.lang.String tag)
           
 
Methods inherited from class net.sf.fikin.sql.core.SimpleXmlFile
createReader, execute, getFileName, getInputSource, getSAXParser, getTag, getURI, getXMLReader, setInputSource, setInputSource, setInputSource, setInputSource, setInputSource, setInputSourceFileName, setSAXParser, setTag, setURI, setXMLReader
 
Methods inherited from class net.sf.fikin.sql.SQLPipeElement
getBaseClassName, getId, getNext, getPipe, setNext, setPipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILE_TAG

public static final java.lang.String DEFAULT_FILE_TAG
default tag local name, this parser is configured with

See Also:
Constant Field Values

DEFAULT_URL_TAG

public static final java.lang.String DEFAULT_URL_TAG
default tag local name, this parser is configured with

See Also:
Constant Field Values
Constructor Detail

MultipleXmlFiles

public MultipleXmlFiles()
                 throws org.xml.sax.SAXException
default constructs

Throws:
org.xml.sax.SAXException
Method Detail

setUrlTag

public void setUrlTag(java.lang.String tag)

getUrlTag

public java.lang.String getUrlTag()

createParser

protected SimpleXmlFile.SimpleSAXParser createParser()
subclassing point

Overrides:
createParser in class SimpleXmlFile
Returns:
new Parser object


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.