XMLManager
public interface XMLLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
XMLLibrary.XMLTag |
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
FILE_XML_BOUNDARY |
idConverter
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
convertXMLtoTag(java.lang.String TName,
boolean Data) |
Return the outer wrapper and contents of an XML tag <TNAME>Data</TNAME>
Usage: Data+=XMLoTag("MODELOBJECTONE",VA.ModelObjectOne);
|
java.lang.String |
convertXMLtoTag(java.lang.String TName,
int Data) |
Return the outer wrapper and contents of an XML tag <TNAME>Data</TNAME>
Usage: Data+=XMLoTag("MODELOBJECTONE",VA.ModelObjectOne);
|
java.lang.String |
convertXMLtoTag(java.lang.String TName,
long Data) |
Return the outer wrapper and contents of an XML tag <TNAME>Data</TNAME>
Usage: Data+=XMLoTag("MODELOBJECTONE",VA.ModelObjectOne);
|
java.lang.String |
convertXMLtoTag(java.lang.String TName,
short Data) |
Return the outer wrapper and contents of an XML tag <TNAME>Data</TNAME>
Usage: Data+=XMLoTag("MODELOBJECTONE",VA.ModelObjectOne);
|
java.lang.String |
convertXMLtoTag(java.lang.String TName,
java.lang.String Data) |
Return the outer wrapper and contents of an XML tag <TNAME>Data</TNAME>
Usage: Data+=XMLoTag("MODELOBJECTONE",VA.ModelObjectOne);
|
XMLLibrary.XMLTag |
createNewTag(java.lang.String key,
java.lang.String value) |
Create a new tag, just like the XML Manager does.
|
java.lang.String |
fromPOJOtoXML(java.lang.Object o) |
Converts a pojo object to a XML document.
|
java.util.Map<java.lang.String,java.lang.String> |
fromXML(java.lang.String str) |
Converts an xml document into a map.
|
void |
fromXMLtoPOJO(java.lang.String XML,
java.lang.Object o) |
Converts a xml document to a XML object.
|
void |
fromXMLtoPOJO(java.util.List<XMLLibrary.XMLTag> xmlObj,
java.lang.Object o) |
Converts a xml object to a pojo object.
|
boolean |
getBoolFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getBoolFromPieces(ThisRow,"TD");
|
boolean |
getBoolFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
boolean defValue) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getBoolFromPieces(ThisRow,"TD");
|
java.util.List<XMLLibrary.XMLTag> |
getContentsFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Returns the contents of a container tag, searched for in
another container tags contents
|
double |
getDoubleFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getDoubleFromPieces(ThisRow,"TD");
|
double |
getDoubleFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
double defVal) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getDoubleFromPieces(ThisRow,"TD");
|
int |
getIntFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getIntFromPieces(ThisRow,"TD");
|
int |
getIntFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
int defVal) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getIntFromPieces(ThisRow,"TD");
|
long |
getLongFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getLongFromPieces(ThisRow,"TD");
|
long |
getLongFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
long defVal) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getLongFromPieces(ThisRow,"TD");
|
XMLLibrary.XMLTag |
getPieceFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Returns the xml tag node for the given tag name, if found in the
given tag container contents
|
java.util.List<XMLLibrary.XMLTag> |
getPiecesFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Returns all tags inside the gives set that match this tag name
|
short |
getShortFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getShortFromPieces(ThisRow,"TD");
|
short |
getShortFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
short defVal) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=getShortFromPieces(ThisRow,"TD");
|
java.lang.String |
getValFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Returns the value of the tag, if it exists in the given
tag collection
|
java.lang.String |
getValFromPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag,
java.lang.String defValue) |
Returns the value of the tag, if it exists in the given
tag collection
|
java.lang.String |
getXMLList(java.util.List<java.lang.String> V) |
Converts the given list of strings into a set of top-level
xml tags called simply <X>
|
boolean |
isTagInPieces(java.util.List<XMLLibrary.XMLTag> V,
java.lang.String tag) |
Return where the value is within a given XML block
<TAG>Data</TAG>
Usage: boolean ThisColHead=isTagInPieces(ThisRow,"TD");
|
java.util.List<XMLLibrary.XMLTag> |
parseAllXML(java.lang.String buf) |
Parses all xml inside the given string buffer and returns
the root tags as a container collection.
|
java.util.List<XMLLibrary.XMLTag> |
parseAllXML(java.lang.StringBuffer buf) |
Parses all xml inside the given stringbuffer and returns
the root tags as a container collection.
|
java.lang.String |
parseOutAngleBrackets(java.lang.String s) |
parse a tag value for safety
Usage: String val=parseOutAngleBrackets(ThisValue);
|
java.lang.String |
parseOutAngleBracketsAndQuotes(java.lang.String s) |
parse a tag value for safety
Usage: String val=parseOutAngleBracketsAndQuotes(ThisValue);
|
java.util.List<java.lang.String> |
parseXMLList(java.lang.String numberedList) |
Parses a list of single-level xml tags, together in string.
|
java.lang.String |
restoreAngleBrackets(java.lang.String s) |
restore a tag value parsed for safety
Usage: String val=restoreAngleBrackets(ThisValue);
|
java.lang.String |
returnXMLBlock(java.lang.String Blob,
java.lang.String Tag) |
Return the contents of an XML tag, given the tag to search for
Usage: String XML=returnXMLBlock(Response,"PDIModelErrors");
|
boolean |
returnXMLBoolean(java.lang.String Blob,
java.lang.String Tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=returnXMLValue(ThisRow,"TD");
|
java.lang.String |
returnXMLValue(java.lang.String Blob) |
Return the data value within the first XML block
<TAG>Data</TAG>
Usage: String ThisColHead=returnXMLValue(ThisRow);
|
java.lang.String |
returnXMLValue(java.lang.String Blob,
java.lang.String Tag) |
Return the data value within a given XML block
<TAG>Data</TAG>
Usage: String ThisColHead=returnXMLValue(ThisRow,"TD");
|
java.lang.String |
toXML(java.util.Map<java.lang.String,java.lang.String> map) |
Converts a map into an xml document.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
static final java.lang.String FILE_XML_BOUNDARY
java.lang.String convertXMLtoTag(java.lang.String TName, java.lang.String Data)
TName
- Tag name to useData
- the datajava.lang.String convertXMLtoTag(java.lang.String TName, int Data)
TName
- Tag name to useData
- the datajava.lang.String convertXMLtoTag(java.lang.String TName, short Data)
TName
- Tag name to useData
- the datajava.lang.String convertXMLtoTag(java.lang.String TName, boolean Data)
TName
- Tag name to useData
- the datajava.lang.String convertXMLtoTag(java.lang.String TName, long Data)
TName
- Tag name to useData
- the datajava.lang.String returnXMLBlock(java.lang.String Blob, java.lang.String Tag)
Blob
- String to searhTag
- Tag name to search forjava.util.List<XMLLibrary.XMLTag> parseAllXML(java.lang.String buf)
buf
- the string to parsejava.util.List<XMLLibrary.XMLTag> parseAllXML(java.lang.StringBuffer buf)
buf
- the string to parsejava.util.List<java.lang.String> parseXMLList(java.lang.String numberedList)
numberedList
- the top level xml tagsjava.lang.String getXMLList(java.util.List<java.lang.String> V)
V
- the list of stringsjava.lang.String returnXMLValue(java.lang.String Blob)
Blob
- String to searhjava.lang.String returnXMLValue(java.lang.String Blob, java.lang.String Tag)
Blob
- String to searchTag
- Tag to search forboolean returnXMLBoolean(java.lang.String Blob, java.lang.String Tag)
Blob
- String to searchTag
- Tag to search forjava.lang.String parseOutAngleBrackets(java.lang.String s)
s
- String to parsejava.lang.String parseOutAngleBracketsAndQuotes(java.lang.String s)
s
- String to parsejava.lang.String restoreAngleBrackets(java.lang.String s)
s
- String to parseXMLLibrary.XMLTag createNewTag(java.lang.String key, java.lang.String value)
key
- the tag name/keyvalue
- the value of the inside of the tag, if any.java.util.List<XMLLibrary.XMLTag> getContentsFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- the container tags contentstag
- the tag to look forjava.util.List<XMLLibrary.XMLTag> getPiecesFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- the container tags contentstag
- the tag to look forXMLLibrary.XMLTag getPieceFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- the tag container contentstag
- the tag namejava.lang.String getValFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- the tag collection (container tag)tag
- the tag to look forboolean getBoolFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search forshort getShortFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search forint getIntFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search forboolean isTagInPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search forlong getLongFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search fordouble getDoubleFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag)
V
- Pieces to searchtag
- Tag to search forjava.lang.String getValFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, java.lang.String defValue)
V
- the tag collection (container tag)tag
- the tag to look fordefValue
- the value to return if the tag doesn't existboolean getBoolFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, boolean defValue)
V
- Pieces to searchtag
- Tag to search fordefValue
- the value to return if the tag doesn't existshort getShortFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, short defVal)
V
- Pieces to searchtag
- Tag to search fordefVal
- the value to return if the tag doesn't existint getIntFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, int defVal)
V
- Pieces to searchtag
- Tag to search fordefVal
- the value to return if the tag doesn't existlong getLongFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, long defVal)
V
- Pieces to searchtag
- Tag to search fordefVal
- the value to return if the tag doesn't existdouble getDoubleFromPieces(java.util.List<XMLLibrary.XMLTag> V, java.lang.String tag, double defVal)
V
- Pieces to searchtag
- Tag to search fordefVal
- the value to return if the tag doesn't existjava.lang.String fromPOJOtoXML(java.lang.Object o)
o
- the object to convertvoid fromXMLtoPOJO(java.lang.String XML, java.lang.Object o)
XML
- the XML documento
- the object to convertvoid fromXMLtoPOJO(java.util.List<XMLLibrary.XMLTag> xmlObj, java.lang.Object o)
xmlObj
- the xml objecto
- the object to convertjava.lang.String toXML(java.util.Map<java.lang.String,java.lang.String> map)
map
- the map to turn into an xml docjava.util.Map<java.lang.String,java.lang.String> fromXML(java.lang.String str)
str
- the xml document