de.opsdesign.yax.insert
Class Configuration
java.lang.Object
org.xml.sax.helpers.DefaultHandler
de.opsdesign.yax.insert.Configuration
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class Configuration
- extends org.xml.sax.helpers.DefaultHandler
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCE_FILE
public final java.lang.String SOURCE_FILE
- See Also:
- Constant Field Values
SOURCE_FILE_ID
public final int SOURCE_FILE_ID
- See Also:
- Constant Field Values
SOURCE_ELEMENT
public final java.lang.String SOURCE_ELEMENT
- See Also:
- Constant Field Values
SOURCE_ELEMENT_ID
public final int SOURCE_ELEMENT_ID
- See Also:
- Constant Field Values
TARGET_FILE
public final java.lang.String TARGET_FILE
- See Also:
- Constant Field Values
TARGET_FILE_ID
public final int TARGET_FILE_ID
- See Also:
- Constant Field Values
TARGET_MODE
public final java.lang.String TARGET_MODE
- See Also:
- Constant Field Values
TARGET_MODE_ID
public final int TARGET_MODE_ID
- See Also:
- Constant Field Values
TARGET_ELEMENT
public final java.lang.String TARGET_ELEMENT
- See Also:
- Constant Field Values
TARGET_ELEMENT_ID
public final int TARGET_ELEMENT_ID
- See Also:
- Constant Field Values
OUTPUT_FILE
public final java.lang.String OUTPUT_FILE
- See Also:
- Constant Field Values
OUTPUT_FILE_ID
public final int OUTPUT_FILE_ID
- See Also:
- Constant Field Values
INSERT
public final java.lang.String INSERT
- See Also:
- Constant Field Values
INSERT_ID
public final int INSERT_ID
- See Also:
- Constant Field Values
BEFORE
public final java.lang.String BEFORE
- See Also:
- Constant Field Values
AFTER
public final java.lang.String AFTER
- See Also:
- Constant Field Values
Configuration
public Configuration()
configure
public boolean configure(java.lang.String[] args)
throws ConfigurationException
- Configures the Inserter.
- Parameters:
args
- which consist of:
Two configuration modes are offered:
1) configuration fileconfigfile
- xml filename which contains the above described parameters.
or
2) parameterssourceFile
- name of the xml file containing the new elementsourceElement
- path to the new elementtargetFile
- name of the xml file which contains the target documenttargetMode
- before | after
(the new element will be inserted before | after targetElementtargetElement
- insertion point within the target documentoutputFile
- name of the xml file the new document will be written to
- Returns:
-
- Throws:
ConfigurationException
startElement
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] buf,
int offset,
int len)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
getOutputFile
public java.io.File getOutputFile()
setOutputFile
public void setOutputFile(java.io.File outputFile)
getSourceElement
public java.lang.String getSourceElement()
setSourceElement
public void setSourceElement(java.lang.String sourceElement)
getSourceFile
public java.io.File getSourceFile()
setSourceFile
public void setSourceFile(java.io.File sourceFile)
getTargetElement
public java.lang.String getTargetElement()
setTargetElement
public void setTargetElement(java.lang.String targetElement)
getTargetFile
public java.io.File getTargetFile()
setTargetFile
public void setTargetFile(java.io.File targetFile)
getTargetMode
public java.lang.String getTargetMode()
setTargetMode
public void setTargetMode(java.lang.String targetMode)
isConfigured
public boolean isConfigured()
Copyright © 2008 OPS Design GmbH. All Rights Reserved.