|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.ixb.impl.doc.IxbDomElement
That is a wraper for org.w3c.dom.Element; Now it is rather pointless. I use it to be able in future to have another, not DOM based implementation. This implementation can be based on the DB stage tables or something similar
Nested Class Summary | |
protected class |
IxbDomElement.IxbDefaultHandler
|
Field Summary | |
(package private) Element |
domElem
|
private static String |
END_ENCODE_SYMBOL
|
private static char[] |
invalidCharsTabl
|
(package private) IxbDomDocument |
ixbDoc
|
private static String[] |
markupCharsTabl
|
private char |
PATH_DELIMITER
|
private SAXParser |
saxParser
|
private static String[] |
shifts
|
private static String |
START_ENCODE_SYMBOL
|
private String |
stSystemId
|
static String |
UTF8_INVALID_CHAR
|
protected boolean |
validate
|
private Boolean |
validateOnExport
|
Constructor Summary | |
IxbDomElement(IxbDomDocument _doc,
Element _el)
|
Method Summary | |
void |
addAdvancedDomAttributesOfForeignElement(IxbElement el)
Copies to the element such nodes as CData Processing instructions and so on.Is used by Tuner only Supported API: false |
void |
addAttribute(String key,
String value)
Supported API: true |
IxbElement |
addCDataSectionValue(String key,
String value)
Supported API: true |
void |
addCommentByCopy(Object el)
Supported API: false |
void |
addElement(IxbElement el)
Supported API: true |
IxbElement |
addElement(String key)
Supported API: true |
void |
addForeignElementByAdopt(IxbElement el)
Makes foreign elem native by adopt - not standard DOM feature !!! DO NOT USE THIS METHOD - IT DOES NOT WORK IN CURRENT xerces IMPLEMENTATION !!! |
void |
addForeignElementByCopy(IxbElement el)
Makes foreign elem native by copy - i.e. |
IxbElement |
addValue(String key,
boolean value)
Supported API: true |
IxbElement |
addValue(String key,
double value)
Supported API: true |
IxbElement |
addValue(String key,
int value)
Supported API: true |
IxbElement |
addValue(String key,
long value)
Supported API: true |
IxbElement |
addValue(String key,
String value)
Supported API: true |
private String |
encodeMarkupCharsAndInvalidChars(String s)
|
String |
getAttribute(String key)
Supported API: true |
Enumeration |
getAttributes()
Supported API: true |
Hashtable |
getAttributeValuePairs()
Returns Hashtable of pairs: (attrName, attrValue) Supported API: true |
Boolean |
getBooleanValue(String key)
Supported API: true |
private Element |
getChildByTagName(String tag)
|
private static NodeList |
getChildNodes(Node node,
short type)
Return a NodeList that contains the children of
the specified node that are of the specified
type . |
private static NodeList |
getChildNodes(Node node,
short[] types)
Return a NodeList that contains the children of
the specified node that are of the specified
types . |
private Vector |
getChildrenByTagName(String tag)
|
Element |
getDomElement()
|
Double |
getDoubleValue(String key)
Supported API: true |
IxbElement |
getElement(String key)
Supported API: true |
Enumeration |
getElements()
Supported API: true |
Enumeration |
getElements(String key)
Supported API: true |
Enumeration |
getElementsAndComments()
Supported API: false |
Integer |
getIntValue(String key)
Supported API: true |
private String |
getKeyOfPathKey(String pathKey)
|
Iterator |
getKeys()
Supported API: true |
Long |
getLongValue(String key)
Supported API: true |
IxbElement |
getParent()
Supported API: true |
private String |
getPathOfPathKey(String pathKey)
|
private String |
getShift(int level)
|
String |
getSystemId()
|
String |
getTag()
Supported API: true |
private String |
getTextNodeLikeValue(Node node)
|
private static String |
getTypeName(short type)
|
String |
getValue()
Supported API: true |
String |
getValue(String key)
Supported API: true |
Enumeration |
getValues(String key)
Supported API: true |
private static void |
initMarkupCharsTabl()
|
private void |
initSaxParser()
|
private String |
internalTrimIgnoreSpace(String str)
this method works similar to String.trim(), but leaves "space hex(20)" in place |
boolean |
isCDATASectionElement()
Supported API: true |
boolean |
isCommentElement()
Supported API: true |
private static boolean |
isOfType(Node node,
short[] types)
Return true if the type of the specified node is
included in the specified list of node types . |
boolean |
isTextElement()
Supported API: true |
private static void |
PP(String s)
|
private void |
printDOMTree(Node node,
PrintWriter System_out,
int level)
|
private String |
realEncodeInvalidChars(String s)
|
private String |
realEncodeMarkupChars(String s)
|
void |
removeChildElement(IxbElement el)
Supported API: true |
IxbElement |
setValue(String key,
String newValue)
Supported API: true |
File |
store(File xmlFile,
String dtdName)
Supported API: true |
void |
store(OutputStream stream,
String dtdName)
Supported API: true |
String |
store(String dtdName)
Supported API: true |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String START_ENCODE_SYMBOL
private static final String END_ENCODE_SYMBOL
public static final String UTF8_INVALID_CHAR
IxbDomDocument ixbDoc
Element domElem
private char PATH_DELIMITER
private static String[] shifts
private static String[] markupCharsTabl
private static char[] invalidCharsTabl
private Boolean validateOnExport
private SAXParser saxParser
private String stSystemId
protected boolean validate
Constructor Detail |
public IxbDomElement(IxbDomDocument _doc, Element _el)
Method Detail |
public String getSystemId()
public Element getDomElement()
public boolean isTextElement() throws WTException
IxbElement
isTextElement
in interface IxbElement
WTException
public boolean isCommentElement() throws WTException
IxbElement
isCommentElement
in interface IxbElement
WTException
public boolean isCDATASectionElement() throws WTException
IxbElement
isCDATASectionElement
in interface IxbElement
WTException
public IxbElement getParent() throws WTException
IxbElement
getParent
in interface IxbElement
WTException
public String getValue() throws WTException
IxbElement
getValue
in interface IxbElement
WTException
public Enumeration getAttributes() throws WTException
IxbElement
getAttributes
in interface IxbElement
WTException
public Hashtable getAttributeValuePairs() throws WTException
IxbElement
getAttributeValuePairs
in interface IxbElement
WTException
public Enumeration getElements() throws WTException
IxbElement
getElements
in interface IxbElement
WTException
public void addCommentByCopy(Object el) throws WTException
IxbElement
addCommentByCopy
in interface IxbElement
el
-
WTException
public Enumeration getElementsAndComments() throws WTException
IxbElement
getElementsAndComments
in interface IxbElement
WTException
public void addAttribute(String key, String value) throws WTException
IxbElement
addAttribute
in interface IxbElement
key
- value
-
WTException
public IxbElement addCDataSectionValue(String key, String value) throws WTException
IxbElement
addCDataSectionValue
in interface IxbElement
key
- value
-
WTException
public IxbElement addValue(String key, String value) throws WTException
IxbElement
addValue
in interface IxbElement
key
- value
-
WTException
public IxbElement setValue(String key, String newValue) throws WTException
IxbElement
setValue
in interface IxbElement
key
- newValue
-
WTException
public IxbElement addElement(String key) throws WTException
IxbElement
addElement
in interface IxbElement
key
-
WTException
public void addElement(IxbElement el) throws WTException
IxbElement
addElement
in interface IxbElement
el
-
WTException
public void removeChildElement(IxbElement el) throws WTException
IxbElement
removeChildElement
in interface IxbElement
el
-
WTException
public void addAdvancedDomAttributesOfForeignElement(IxbElement el) throws WTException
IxbElement
addAdvancedDomAttributesOfForeignElement
in interface IxbElement
el
-
WTException
public void addForeignElementByCopy(IxbElement el) throws WTException
IxbElement
addForeignElementByCopy
in interface IxbElement
el
-
WTException
public void addForeignElementByAdopt(IxbElement el) throws WTException
addForeignElementByAdopt
in interface IxbElement
el
-
WTException
public String getTag() throws WTException
IxbElement
getTag
in interface IxbElement
WTException
public String getAttribute(String key) throws WTException
IxbElement
getAttribute
in interface IxbElement
key
-
WTException
public String getValue(String key) throws WTException
IxbElement
getValue
in interface IxbElement
key
-
WTException
public Enumeration getValues(String key) throws WTException
IxbElement
getValues
in interface IxbElement
key
-
WTException
private String getTextNodeLikeValue(Node node) throws WTException
WTException
public IxbElement getElement(String key) throws WTException
IxbElement
getElement
in interface IxbElement
key
-
WTException
public Enumeration getElements(String key) throws WTException
IxbElement
getElements
in interface IxbElement
key
-
WTException
public Iterator getKeys() throws WTException
IxbElement
getKeys
in interface IxbElement
WTException
private String getPathOfPathKey(String pathKey)
private String getKeyOfPathKey(String pathKey)
private Vector getChildrenByTagName(String tag)
private Element getChildByTagName(String tag)
public IxbElement addValue(String key, int value) throws WTException
IxbElement
addValue
in interface IxbElement
key
- value
-
WTException
public IxbElement addValue(String key, long value) throws WTException
IxbElement
addValue
in interface IxbElement
key
- value
-
WTException
public IxbElement addValue(String key, boolean value) throws WTException
IxbElement
addValue
in interface IxbElement
key
- value
-
WTException
public IxbElement addValue(String key, double value) throws WTException
IxbElement
addValue
in interface IxbElement
key
- value
-
WTException
public Integer getIntValue(String key) throws WTException
IxbElement
getIntValue
in interface IxbElement
key
-
WTException
public Long getLongValue(String key) throws WTException
IxbElement
getLongValue
in interface IxbElement
key
-
WTException
public Double getDoubleValue(String key) throws WTException
IxbElement
getDoubleValue
in interface IxbElement
key
-
WTException
public Boolean getBooleanValue(String key) throws WTException
IxbElement
getBooleanValue
in interface IxbElement
key
-
WTException
public String store(String dtdName) throws WTException
IxbElement
store
in interface IxbElement
dtdName
-
WTException
public void store(OutputStream stream, String dtdName) throws WTException
IxbElement
store
in interface IxbElement
stream
- dtdName
-
WTException
public File store(File xmlFile, String dtdName) throws WTException
IxbElement
store
in interface IxbElement
xmlFile
- dtdName
-
WTException
private String getShift(int level)
private void printDOMTree(Node node, PrintWriter System_out, int level)
private String encodeMarkupCharsAndInvalidChars(String s)
private String realEncodeInvalidChars(String s)
private String realEncodeMarkupChars(String s)
private static void initMarkupCharsTabl()
private static NodeList getChildNodes(Node node, short type)
NodeList
that contains the children of
the specified node
that are of the specified
type
.
node
- the node whose children should be returnedtype
- one of the node type constants defined by the Node classprivate static NodeList getChildNodes(Node node, short[] types)
NodeList
that contains the children of
the specified node
that are of the specified
types
.
node
- the node whose children should be returnedtypes
- a list of node type constants defined by the Node classprivate static boolean isOfType(Node node, short[] types)
node
is
included in the specified list of node types
.
node
- the node whose type should be compared against
the specified list of typestypes
- a list of node type constants defined by the Node classprivate static String getTypeName(short type)
private String internalTrimIgnoreSpace(String str)
private void initSaxParser() throws WTException
WTException
private static void PP(String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |