|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.parser.ParserImpl
com.ibm.di.parser.XMLParser
com.ibm.di.parser.DSMLParser
public class DSMLParser
The DSML Parser reads and writes XML documents. The Parser silently ignores schema entries.
Field Summary |
---|
Fields inherited from class com.ibm.di.parser.XMLParser |
---|
children, curindex, db, entrytag, inputDoc, outputDoc, toplevel, toplevelInput, useCData, valuetag |
Fields inherited from class com.ibm.di.parser.ParserImpl |
---|
_debug, myConfiguration |
Constructor Summary | |
---|---|
DSMLParser()
Constructor |
Method Summary | |
---|---|
Element |
createAttribute(Attribute attr)
Creates Element with the given attribute . |
Element |
createObjectClass(Attribute attr)
Creates Element with ObjectClass tag name. |
Element |
createValue(String name,
Object elemValue)
Creates an Element with the given name and elemValue. |
void |
dumpNodes(String indent,
NodeList list)
Prints all nodes and its children from the given list with the given indent |
Node |
findNamedElement(NodeList list,
String name)
Finds element by name |
Vector |
getElementList(Node parent)
Retrieves children elements |
Node |
getFirstElement(Node parent)
Retrieves first child element |
Node |
getFirstText(Node parent)
Retrieves first first Text node child |
Node |
getNextNode(Node node)
Retrieves the next Node |
String |
getVersion()
Version Information. |
String |
getXML()
Converts the output Document to String using parser's encoding. |
void |
initInput()
Initializes the properties from the input Document |
void |
initOutput()
Initializes the output Document |
void |
initParser()
This function is called by the connector containing this parser |
void |
p(String s)
Prints a String |
Entry |
parseRequest(Object request)
Sets the input stream with the given request object if the object is of type InputStream, Reader or StringReader. |
void |
printNode(String indent,
Node n)
Prints a node with a given indent |
Entry |
readEntry()
Constructs the next entry from the data structure read in initially. |
void |
writeEntry(Entry entry)
Constructs the data structure from the next entry read in initially. |
Methods inherited from class com.ibm.di.parser.XMLParser |
---|
closeParser, error, fatalError, flush, getOmitXMLDeclaration, registerScriptBeans, setOmitXMLDeclaration, warning |
Methods inherited from class com.ibm.di.parser.ParserImpl |
---|
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, querySchema, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DSMLParser()
Method Detail |
---|
public void initParser() throws Exception
initParser
in interface ParserInterface
initParser
in class XMLParser
Exception
- if an error occurs.public void initOutput() throws Exception
initOutput
in class XMLParser
Exception
- if an error occurs.public void initInput() throws Exception
initInput
in class XMLParser
Exception
- if an error occurs.public Entry parseRequest(Object request) throws Exception
request
- Object of type InputStream Reader or StringReader
Exception
- if an error occurspublic Node findNamedElement(NodeList list, String name)
list
- NodeListname
- String
public Vector getElementList(Node parent)
parent
- Node
public Node getFirstElement(Node parent)
parent
- Node
public Node getFirstText(Node parent)
parent
- Node
public void dumpNodes(String indent, NodeList list)
indent
- Stringlist
- NodeListpublic void printNode(String indent, Node n)
indent
- Stringn
- Nodepublic void p(String s)
s
- the String to printpublic Entry readEntry() throws Exception
readEntry
in interface ParserInterface
readEntry
in class XMLParser
Exception
- if an error occurs.public Node getNextNode(Node node)
node
- Node
public void writeEntry(Entry entry) throws Exception
writeEntry
in interface ParserInterface
writeEntry
in class XMLParser
entry
- the next Entry
Exception
- if an error occurs.public Element createAttribute(Attribute attr) throws Exception
attr
- Attribute
Exception
- if an error occurs.public Element createObjectClass(Attribute attr) throws Exception
ObjectClass
tag name. Then appends a
child Element to it with name oc-value
and value the given
attribute.
attr
- Attribute
Exception
- if an error occurs.public Element createValue(String name, Object elemValue) throws Exception
name
- String objectelemValue
- value of the Element
Exception
- if an error occurs.public String getXML() throws Exception
Exception
- if an error occurs.public String getVersion()
getVersion
in interface VersionInfoInterface
getVersion
in class XMLParser
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |