|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.xml.XMLStringUtils
Provides utility methods to process the canonicalized strings we use to represent XML document structure. The structure is explained below:
So as to preserve the structure, Structure.Field will be represented as Structure__Field (Double Underscore is being used as a delimiter to represent the structure).
In case of multiple structured values with same name, as might occur while using + or * in the regular expressions in schema, those should be represented as using the array index using the __ notation (withouth the square brackets) for e.g. myarray[0].name ==> myarray__0__name
attribute names for an element in the XML schema should be postfixed with __ (double underscore). So element.attribute ==> element__attribute__
Field Summary | |
static java.lang.String |
AUDIO_SCHEMA_TAG
The xml tag for audio schemas. |
static java.lang.String |
DELIMITER
Delimiter used to preserve the structural information in the canonicalized xml field strings |
static java.lang.String |
MAX_ENDING
Fields ending with this string are supposed to be representing MAX value in the xml queries |
static java.lang.String |
MIN_ENDING
Fields ending with this string are supposed to be representing MIN value in the xml queries |
static java.lang.String |
VIDEO_SCHEMA_TAG
The xml tag for video schemas. |
static java.lang.String |
XML_DOC_START_IDENTIFIER
Theh minimal part of the the string that is used as a ademiliter between xml documents, when stored in a file. |
static java.lang.String |
XML_VERSION_DELIM
The xml tag describing the version of xml used. |
Constructor Summary | |
XMLStringUtils()
|
Method Summary | |
static java.lang.String |
getDomainName(java.lang.String schemaURI)
Returns the domain name part from the passed schemaURI |
static java.util.List |
split(java.lang.String canonicalizedField)
Breaks the given string (which confirms to the pattern defined above in the class description) into a list (of strings) such that the first element in the list is the top most structural element, and the last one the actual field/attribute name |
static java.util.List |
tokenize(java.lang.String content,
java.lang.String delimiter)
Tokenizes the given string based upon the delimiter passed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DELIMITER
public static final java.lang.String MAX_ENDING
public static final java.lang.String MIN_ENDING
public static final java.lang.String XML_DOC_START_IDENTIFIER
public static final java.lang.String XML_VERSION_DELIM
public static final java.lang.String AUDIO_SCHEMA_TAG
public static final java.lang.String VIDEO_SCHEMA_TAG
Constructor Detail |
public XMLStringUtils()
Method Detail |
public static java.util.List split(java.lang.String canonicalizedField)
canonicalizedField
- The string thats needed to be split
public static java.util.List tokenize(java.lang.String content, java.lang.String delimiter)
content
- The string to be tokenizeddelimiter
- delimits/identifies the various parts of the content
public static java.lang.String getDomainName(java.lang.String schemaURI)
schemaURI
- The schema URI whose corresponding domain name
to be returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |