|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.xml.LimeXMLSchema
Stores a XML schema, and provides access to various components of schema
Constructor Summary | |
LimeXMLSchema(java.io.File schemaFile)
Creates new LimeXMLSchema |
|
LimeXMLSchema(org.xml.sax.InputSource inputSource)
Creates new LimeXMLSchema |
Method Summary | |
java.lang.String[] |
getCanonicalizedFieldNames()
Returns all the fields(placeholders) names in this schema. |
java.util.List |
getCanonicalizedFields()
Returns all the fields(placeholders) in this schema. |
java.util.Map |
getDefaultFieldEnumerativeValueMap()
Returns Mapping from FieldName => (EnumerativeValue => Mapped Value) (String ==> Map (String => String)) |
static java.lang.String |
getDisplayString(java.lang.String schemaURI)
Utility method to be used in the gui to display schemas |
java.util.List |
getEnumerationFields()
Returns only those fields which are of enumeration type |
java.lang.String |
getSchemaURI()
Returns the unique identifier which identifies this particular schema |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LimeXMLSchema(java.io.File schemaFile) throws java.io.IOException
schemaFile
- The filefrom where to read the schema definition
java.io.IOException
- If the specified schemaFile doesnt exist, or isnt
a valid schema filepublic LimeXMLSchema(org.xml.sax.InputSource inputSource) throws java.io.IOException
inputSource
- The source representing the XML schema definition
to be parsed
java.io.IOException
- If the specified schemaFile doesnt exist, or isnt
a valid schema fileMethod Detail |
public java.lang.String getSchemaURI()
public java.util.List getCanonicalizedFields()
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__
public java.util.List getEnumerationFields()
public java.util.Map getDefaultFieldEnumerativeValueMap()
public java.lang.String[] getCanonicalizedFieldNames()
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__
public static java.lang.String getDisplayString(java.lang.String schemaURI)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |