| |
|
| java.lang.Object weka.core.xml.XMLOptions
XMLOptions | public class XMLOptions (Code) | | A class for transforming options listed in XML to a regular WEKA command
line string.
author: FracPete (fracpete at waikato dot ac dot nz) version: $Revision: 1.2 $ |
ATT_NAME | final public static String ATT_NAME(Code) | | the name attribute
|
ATT_TYPE | final public static String ATT_TYPE(Code) | | the type attribute
|
ATT_VALUE | final public static String ATT_VALUE(Code) | | the value attribute
|
DOCTYPE | final public static String DOCTYPE(Code) | | the DTD for the XML file
|
ROOT_NODE | final public static String ROOT_NODE(Code) | | the root node
|
TAG_OPTION | final public static String TAG_OPTION(Code) | | tag for a single option
|
TAG_OPTIONS | final public static String TAG_OPTIONS(Code) | | tag for a list of options
|
VAL_TYPE_CLASSIFIER | final public static String VAL_TYPE_CLASSIFIER(Code) | | a value of the type attribute
|
VAL_TYPE_FLAG | final public static String VAL_TYPE_FLAG(Code) | | a value of the type attribute
|
VAL_TYPE_HYPHENS | final public static String VAL_TYPE_HYPHENS(Code) | | a value of the type attribute
|
VAL_TYPE_QUOTES | final public static String VAL_TYPE_QUOTES(Code) | | a value of the type attribute
|
VAL_TYPE_SINGLE | final public static String VAL_TYPE_SINGLE(Code) | | a value of the type attribute
|
fixHyphens | protected Document fixHyphens(Document document)(Code) | | pushes any options with type ATT_HYPHENS to the end, s.t. the "--" are
really added at the end
Parameters: document - the DOM document to work on the fixed DOM document |
getDocument | public Document getDocument()(Code) | | returns the parsed DOM document
the parsed DOM document |
getQuotesLevel | protected int getQuotesLevel(Node node)(Code) | | returns the quotes level for the given node, i.e. it returns the number
of option's of the type "quotes" are in the path
|
getValidating | public boolean getValidating()(Code) | | returns whether a validating parser is used
whether a validating parser is used |
getXMLDocument | public XMLDocument getXMLDocument()(Code) | | returns the handler of the XML document. the internal DOM document can
be accessed via the getDocument() method.
the object handling the XML document See Also: XMLOptions.getDocument() |
main | public static void main(String[] args) throws Exception(Code) | | for testing only. prints the given XML, the resulting commandline and
the string array.
|
setValidating | public void setValidating(boolean validating) throws Exception(Code) | | sets whether to use a validating parser or not.
Note: this does clear the current DOM document!
Parameters: validating - whether to use a validating parser throws: Exception - if the instantiating of the DocumentBuilder fails |
toArray | public String[] toArray() throws Exception(Code) | | returns the current DOM document as string array (takes care of quotes!)
the document as string array throws: Exception - if anything goes wrong initializing the parsing |
toCommandLine | protected String toCommandLine(String cl, Element parent, int depth)(Code) | | converts the given node into a command line representation and adds it
to the existing command line
Parameters: cl - the command line so far Parameters: parent - the node to convert to command line Parameters: depth - the current depth the new command line |
toCommandLine | public String toCommandLine() throws Exception(Code) | | returns the given DOM document as command line
the document as command line throws: Exception - if anything goes wrong initializing the parsing |
toString | public String toString()(Code) | | returns the object in a string representation (as indented XML output)
the object in a string representation |
|
|
|