|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstarlink.AbstractMessage.XMLFactoring
public class XMLFactoring
XMLFactoring provides a library of operations for processing the XML descriptions of protocol packets. Java code can be generated from an xml schema. Data values can be inserted into XML generated objects; and xpath expressions can be used to query the value of a field in and XML generated object.
Method Summary | |
---|---|
AbstractMessage |
constructPacket(Message m)
Construct the data representation as required by the generic composer |
ProtocolMessage |
createMessages(java.io.File XMLDocument)
Generate the java objects that correspond to the protocol's abstract representation. |
static XMLFactoring |
getInstance()
|
java.lang.Object |
getXPathField(AbstractMessage msg,
java.lang.String xpathExpr)
|
java.lang.String |
getXPathFieldLabel(java.lang.String xpathExpr)
|
AbstractMessage |
getXPathStructuredField(AbstractMessage msg,
java.lang.String xpathExpr)
|
java.lang.Object |
getXPathValue(AbstractMessage msg,
java.lang.String xpathExpr)
Get the value of a message field by using an XPATH expression. |
void |
setXPathValue(AbstractMessage msg,
java.lang.String xpathExpr,
java.lang.Object value)
Set the value of a message field by using an XPATH expression. |
void |
writePrimitiveField(AbstractMessage mp,
java.lang.String label,
java.lang.String type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static XMLFactoring getInstance()
public ProtocolMessage createMessages(java.io.File XMLDocument)
XMLDocument
- The XML file containing the description of the
network protocol.
public java.lang.Object getXPathValue(AbstractMessage msg, java.lang.String xpathExpr)
msg
- The message content to search the value in.xpathExpr
- The XPATH expression describing the location of the
field we want the value of.
public java.lang.String getXPathFieldLabel(java.lang.String xpathExpr)
public java.lang.Object getXPathField(AbstractMessage msg, java.lang.String xpathExpr)
public AbstractMessage getXPathStructuredField(AbstractMessage msg, java.lang.String xpathExpr)
public void setXPathValue(AbstractMessage msg, java.lang.String xpathExpr, java.lang.Object value)
msg
- The message content to put the value in.xpathExpr
- The XPATH expression describing the location of the
field we want to change/set the value of.public AbstractMessage constructPacket(Message m)
m
- The message to convert to the meta packet structure
public void writePrimitiveField(AbstractMessage mp, java.lang.String label, java.lang.String type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |