|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.util.Msg
public class Msg
$Revision: 1.11 $
Constructor Summary | |
---|---|
|
Msg()
This public constructor gets you an un-named "fromDTD" document. |
protected |
Msg(Msg m)
This is for use by subclasses |
Method Summary | |
---|---|
void |
addSubMsg(java.lang.String subMsgPath,
Msg theSubMsg)
Add a submsg to this message, or to one of its submsgs, subMsgPath being a heirarchical list. |
void |
addSubMsg(java.lang.String subMsgPath,
java.lang.String delimsIgnored,
Msg theSubMsg)
Silly variant. |
void |
addSymbol(java.lang.String symbolName,
java.lang.Object symbolObject)
Variant of addSymbol - for Objects |
void |
addSymbol(java.lang.String symbolName,
java.lang.String symbolValue)
Given a Msg node, create a new simple SVP as a child, with a String for the value. |
void |
addSymbol(java.lang.String symbolName,
java.lang.String delimsIgnored,
java.lang.Object symbolObject)
Silly variant of addSymbol. |
void |
addSymbol(java.lang.String symbolName,
java.lang.String delimsIgnored,
java.lang.String symbolValue)
Silly variant of addSymbol. |
void |
addSymbol(java.lang.String symbolName,
java.lang.String delimsIgnored,
java.util.Vector vectorValue)
Unused variant of addSymbol. |
void |
addSymbol(java.lang.String symbolName,
java.util.Vector vectorValue)
Given a Msg node, create a new vector-type SVP as a child, with a Vector (of String) for the value: symbolName may be a heirarchical path. |
java.lang.Object |
clone()
|
static Msg |
createFromFile(java.lang.String filename,
org.xml.sax.ErrorHandler errHandler)
createFromFile is more for exploring XML than for KAoS use.... |
void |
error(org.xml.sax.SAXParseException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
static kaos.core.util.FixNodeList |
getElementsNamed(org.w3c.dom.Node parent,
java.lang.String desiredType)
replace function of svpNodes = msgNode.getElementsByTagName(SVP_ELEMENT_NAME); |
static org.w3c.dom.Element |
getFirstChildSkip(org.w3c.dom.Element n,
boolean skip)
getFirstChildNode if 1st child is #text, go to first non-#text sibling of it |
java.lang.String |
getNamedString(java.lang.String symbolPath)
Get the given String-value symbol denoted by (possibly heirarchical) symbolPath. |
java.lang.String |
getNamedString(java.lang.String symbolPath,
java.lang.String delimsIgnored)
Convenience method. |
java.util.Vector |
getNamedVector(java.lang.String symbolPath)
Convenience method. |
static org.w3c.dom.Element |
getNextSkip(org.w3c.dom.Element n,
boolean skip)
getNextNode keep skipping #text nodes |
static org.w3c.dom.NamedNodeMap |
getNodeAttributes(org.w3c.dom.Element n)
Public util method; list all attributes. |
static org.w3c.dom.Element |
getParentSkip(org.w3c.dom.Element n,
boolean skip)
getParentNode keep skipping #text nodes |
static org.w3c.dom.Element |
getPreviousSkip(org.w3c.dom.Element n,
boolean skip)
getPreviousNode keep skipping #text nodes |
org.w3c.dom.Element |
getRootNode()
getRootNode This gets the root Msg node, not the real root root. |
Msg |
getSubMsg(java.lang.String symbolPath)
Search for and return the submessage of this message having the given name. |
Msg |
getSubMsg(java.lang.String subMsgName,
java.lang.String delimsIgnored)
Unused variant of getSubMsg. |
java.lang.Object |
getSymbol(java.lang.String symbolPath)
Get the given symbol denoted by (possibly heirarchical) symbolPath. |
java.lang.Object |
getSymbol(java.lang.String symbolPath,
java.lang.String delimsIgnored)
Silly variant. |
static boolean |
getVerbosity()
Public method to get the verbosity level. |
static void |
main(java.lang.String[] argv)
getXML Obtain the XML representation of this Msg object. |
void |
removeSymbol(java.lang.String symbolPath)
|
static void |
setLogger(Logger logger)
|
static void |
setVerbosity(boolean newVerbosity)
Public method to set the verbosity level. |
static java.lang.String |
showMsgInfo(org.w3c.dom.Element msgNode,
boolean recurse,
int iLevel,
boolean crOnEnd)
|
static java.lang.String |
showMsgInfo(org.w3c.dom.Element msgNode,
boolean recurse,
int iLevel,
boolean crOnEnd,
boolean displayMsgName)
showMsgInfo - public utility method. |
java.lang.String |
toString()
Format a Msg for printing. |
static void |
traverseDOMBranch(org.w3c.dom.Node node,
int pIndent)
|
void |
traverseRoot()
Print out the whole fam damily. |
void |
warning(org.xml.sax.SAXParseException exception)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Msg()
protected Msg(Msg m)
Method Detail |
---|
public void addSymbol(java.lang.String symbolName, java.lang.String symbolValue)
public void addSymbol(java.lang.String symbolName, java.lang.String delimsIgnored, java.lang.String symbolValue)
public static void setLogger(Logger logger)
public void addSymbol(java.lang.String symbolName, java.lang.Object symbolObject)
public void addSymbol(java.lang.String symbolName, java.lang.String delimsIgnored, java.lang.Object symbolObject)
public void addSymbol(java.lang.String symbolName, java.util.Vector vectorValue)
public void addSymbol(java.lang.String symbolName, java.lang.String delimsIgnored, java.util.Vector vectorValue)
public java.lang.Object getSymbol(java.lang.String symbolPath) throws SymbolNotFoundException
SymbolNotFoundException
public void removeSymbol(java.lang.String symbolPath) throws SymbolNotFoundException
SymbolNotFoundException
public java.lang.Object getSymbol(java.lang.String symbolPath, java.lang.String delimsIgnored) throws SymbolNotFoundException
SymbolNotFoundException
public java.lang.String getNamedString(java.lang.String symbolPath) throws SymbolNotFoundException, java.lang.ClassCastException
SymbolNotFoundException
java.lang.ClassCastException
public java.lang.String getNamedString(java.lang.String symbolPath, java.lang.String delimsIgnored) throws SymbolNotFoundException, java.lang.ClassCastException
SymbolNotFoundException
java.lang.ClassCastException
public java.util.Vector getNamedVector(java.lang.String symbolPath)
Note that this returns null if not found, instead of throwing exception.
public void addSubMsg(java.lang.String subMsgPath, Msg theSubMsg)
public void addSubMsg(java.lang.String subMsgPath, java.lang.String delimsIgnored, Msg theSubMsg)
public Msg getSubMsg(java.lang.String symbolPath) throws SymbolNotFoundException
SymbolNotFoundException
public java.lang.Object clone()
clone
in class java.lang.Object
public Msg getSubMsg(java.lang.String subMsgName, java.lang.String delimsIgnored) throws SymbolNotFoundException
SymbolNotFoundException
public static Msg createFromFile(java.lang.String filename, org.xml.sax.ErrorHandler errHandler)
public static org.w3c.dom.NamedNodeMap getNodeAttributes(org.w3c.dom.Element n)
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String showMsgInfo(org.w3c.dom.Element msgNode, boolean recurse, int iLevel, boolean crOnEnd)
public static java.lang.String showMsgInfo(org.w3c.dom.Element msgNode, boolean recurse, int iLevel, boolean crOnEnd, boolean displayMsgName)
msgNode
- The root node at which to start displaying.recurse
- Shall we keep going into sub-messages?iLevel
- The display indentation level.crOnEnd
- Shall we put a carriage-return on the end of the returned string?public org.w3c.dom.Element getRootNode()
public static org.w3c.dom.Element getParentSkip(org.w3c.dom.Element n, boolean skip)
public static org.w3c.dom.Element getPreviousSkip(org.w3c.dom.Element n, boolean skip)
public static org.w3c.dom.Element getNextSkip(org.w3c.dom.Element n, boolean skip)
public static org.w3c.dom.Element getFirstChildSkip(org.w3c.dom.Element n, boolean skip)
public static void traverseDOMBranch(org.w3c.dom.Node node, int pIndent)
public void traverseRoot()
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
warning
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
org.xml.sax.SAXException
public static void setVerbosity(boolean newVerbosity)
public static boolean getVerbosity()
public static void main(java.lang.String[] argv)
public static kaos.core.util.FixNodeList getElementsNamed(org.w3c.dom.Node parent, java.lang.String desiredType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |