com.agimatec.commons.config.sax
Class NodeHandler
java.lang.Object
com.agimatec.commons.config.sax.NodeHandler
- Direct Known Subclasses:
- FileNodeHandler
public abstract class NodeHandler
- extends Object
Title:
Description:
Company:
- Author:
- Roman Stumm
|
Method Summary |
protected void |
acceptCharacters(ConfigContentHandler docHandler,
char[] chars,
int offset,
int length)
|
protected void |
acceptNode(ConfigContentHandler docHandler,
Object aNode,
Attributes attr)
|
protected String |
appendCharacters(String oldText,
char[] chars,
int offset,
int length)
append a new string to on oldText, if oldText is ! |
protected abstract Class |
getInstanceClass()
|
protected String |
getName(Attributes attr)
|
protected String |
getValue(Attributes attr)
|
protected void |
printIndent(PrintWriter pw,
int indent)
util method for toString() xml conversion. |
protected void |
setName(Node node,
Attributes attr)
|
protected abstract Object |
startNode(Attributes attr)
|
protected String |
tag()
|
protected void |
writeConfig(ConfigWriter writer,
Object obj,
Object parent,
PrintWriter pw,
int indent)
|
protected void |
writeParentName(PrintWriter pw,
Object parent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeHandler
public NodeHandler(String aTag)
acceptNode
protected void acceptNode(ConfigContentHandler docHandler,
Object aNode,
Attributes attr)
throws SAXException
- Throws:
SAXException
tag
protected String tag()
acceptCharacters
protected void acceptCharacters(ConfigContentHandler docHandler,
char[] chars,
int offset,
int length)
throws SAXException
- Throws:
SAXException
appendCharacters
protected String appendCharacters(String oldText,
char[] chars,
int offset,
int length)
- append a new string to on oldText, if oldText is != null. otherwise return the new string
- Parameters:
oldText - - the previous text valuechars - offset - length -
- Returns:
startNode
protected abstract Object startNode(Attributes attr)
throws SAXException
- Throws:
SAXException
getInstanceClass
protected abstract Class getInstanceClass()
setName
protected void setName(Node node,
Attributes attr)
getValue
protected String getValue(Attributes attr)
getName
protected String getName(Attributes attr)
writeConfig
protected void writeConfig(ConfigWriter writer,
Object obj,
Object parent,
PrintWriter pw,
int indent)
throws SAXException
- Throws:
SAXException
printIndent
protected final void printIndent(PrintWriter pw,
int indent)
- util method for toString() xml conversion.
this method makes the indent of the xml lines.
writeParentName
protected void writeParentName(PrintWriter pw,
Object parent)
Copyright © 2008-2012. All Rights Reserved.