|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.xml.XMLOptions
public class XMLOptions
A class for transforming options listed in XML to a regular WEKA command line string.
| Field Summary | |
|---|---|
static java.lang.String |
ATT_NAME
the name attribute. |
static java.lang.String |
ATT_TYPE
the type attribute. |
static java.lang.String |
ATT_VALUE
the value attribute. |
static java.lang.String |
DOCTYPE
the DTD for the XML file. |
static java.lang.String |
ROOT_NODE
the root node. |
static java.lang.String |
TAG_OPTION
tag for a single option. |
static java.lang.String |
TAG_OPTIONS
tag for a list of options. |
static java.lang.String |
VAL_TYPE_CLASSIFIER
a value of the type attribute. |
static java.lang.String |
VAL_TYPE_FLAG
a value of the type attribute. |
static java.lang.String |
VAL_TYPE_HYPHENS
a value of the type attribute. |
static java.lang.String |
VAL_TYPE_OPTIONHANDLER
a value of the type attribute. |
static java.lang.String |
VAL_TYPE_QUOTES
a value of the type attribute. |
static java.lang.String |
VAL_TYPE_SINGLE
a value of the type attribute. |
| Constructor Summary | |
|---|---|
XMLOptions()
Creates a new instance of XMLOptions. |
|
XMLOptions(java.io.File file)
Creates a new instance of XMLOptions. |
|
XMLOptions(java.io.InputStream stream)
Creates a new instance of XMLOptions. |
|
XMLOptions(java.io.Reader reader)
Creates a new instance of XMLOptions. |
|
XMLOptions(java.lang.String xml)
Creates a new instance of XMLOptions. |
|
| Method Summary | |
|---|---|
org.w3c.dom.Document |
getDocument()
returns the parsed DOM document. |
java.lang.String |
getRevision()
Returns the revision string. |
boolean |
getValidating()
returns whether a validating parser is used. |
XMLDocument |
getXMLDocument()
returns the handler of the XML document. |
static void |
main(java.lang.String[] args)
for testing only. |
void |
setValidating(boolean validating)
sets whether to use a validating parser or not. |
java.lang.String[] |
toArray()
returns the current DOM document as string array. |
java.lang.String |
toCommandLine()
returns the given DOM document as command line. |
java.lang.String |
toString()
returns the object in a string representation (as indented XML output). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TAG_OPTION
public static final java.lang.String TAG_OPTIONS
public static final java.lang.String ATT_NAME
public static final java.lang.String ATT_TYPE
public static final java.lang.String ATT_VALUE
public static final java.lang.String VAL_TYPE_FLAG
public static final java.lang.String VAL_TYPE_SINGLE
public static final java.lang.String VAL_TYPE_HYPHENS
public static final java.lang.String VAL_TYPE_QUOTES
public static final java.lang.String VAL_TYPE_CLASSIFIER
public static final java.lang.String VAL_TYPE_OPTIONHANDLER
public static final java.lang.String ROOT_NODE
public static final java.lang.String DOCTYPE
| Constructor Detail |
|---|
public XMLOptions()
throws java.lang.Exception
java.lang.Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(java.lang.String xml)
throws java.lang.Exception
xml - the xml to parse (if "Throws:
java.lang.Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(java.io.File file)
throws java.lang.Exception
file - the XML file to parse
java.lang.Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(java.io.InputStream stream)
throws java.lang.Exception
stream - the XML stream to parse
java.lang.Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(java.io.Reader reader)
throws java.lang.Exception
reader - the XML reader to parse
java.lang.Exception - if the construction of the DocumentBuilder failssetValidating(boolean)| Method Detail |
|---|
public boolean getValidating()
public void setValidating(boolean validating)
throws java.lang.Exception
validating - whether to use a validating parser
java.lang.Exception - if the instantiating of the DocumentBuilder failspublic org.w3c.dom.Document getDocument()
public XMLDocument getXMLDocument()
getDocument() method.
getDocument()
public java.lang.String toCommandLine()
throws java.lang.Exception
java.lang.Exception - if anything goes wrong initializing the parsing
public java.lang.String[] toArray()
throws java.lang.Exception
java.lang.Exception - if anything goes wrong initializing the parsingpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandler
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - the commandline options.
java.lang.Exception - if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||