|
||||||||||
| 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 String |
ATT_NAME
the name attribute. |
static String |
ATT_TYPE
the type attribute. |
static String |
ATT_VALUE
the value attribute. |
static String |
DOCTYPE
the DTD for the XML file. |
static String |
ROOT_NODE
the root node. |
static String |
TAG_OPTION
tag for a single option. |
static String |
TAG_OPTIONS
tag for a list of options. |
static String |
VAL_TYPE_CLASSIFIER
a value of the type attribute. |
static String |
VAL_TYPE_FLAG
a value of the type attribute. |
static String |
VAL_TYPE_HYPHENS
a value of the type attribute. |
static String |
VAL_TYPE_OPTIONHANDLER
a value of the type attribute. |
static String |
VAL_TYPE_QUOTES
a value of the type attribute. |
static String |
VAL_TYPE_SINGLE
a value of the type attribute. |
| Constructor Summary | |
|---|---|
XMLOptions()
Creates a new instance of XMLOptions. |
|
XMLOptions(File file)
Creates a new instance of XMLOptions. |
|
XMLOptions(InputStream stream)
Creates a new instance of XMLOptions. |
|
XMLOptions(Reader reader)
Creates a new instance of XMLOptions. |
|
XMLOptions(String xml)
Creates a new instance of XMLOptions. |
|
| Method Summary | |
|---|---|
Document |
getDocument()
returns the parsed DOM document. |
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(String[] args)
for testing only. |
void |
setValidating(boolean validating)
sets whether to use a validating parser or not. |
String[] |
toArray()
returns the current DOM document as string array. |
String |
toCommandLine()
returns the given DOM document as command line. |
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 String TAG_OPTION
public static final String TAG_OPTIONS
public static final String ATT_NAME
public static final String ATT_TYPE
public static final String ATT_VALUE
public static final String VAL_TYPE_FLAG
public static final String VAL_TYPE_SINGLE
public static final String VAL_TYPE_HYPHENS
public static final String VAL_TYPE_QUOTES
public static final String VAL_TYPE_CLASSIFIER
public static final String VAL_TYPE_OPTIONHANDLER
public static final String ROOT_NODE
public static final String DOCTYPE
| Constructor Detail |
|---|
public XMLOptions()
throws Exception
Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(String xml)
throws Exception
xml - the xml to parse (if "Throws:
Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(File file)
throws Exception
file - the XML file to parse
Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(InputStream stream)
throws Exception
stream - the XML stream to parse
Exception - if the construction of the DocumentBuilder failssetValidating(boolean)
public XMLOptions(Reader reader)
throws Exception
reader - the XML reader to parse
Exception - if the construction of the DocumentBuilder failssetValidating(boolean)| Method Detail |
|---|
public boolean getValidating()
public void setValidating(boolean validating)
throws Exception
validating - whether to use a validating parser
Exception - if the instantiating of the DocumentBuilder failspublic Document getDocument()
public XMLDocument getXMLDocument()
getDocument() method.
getDocument()
public String toCommandLine()
throws Exception
Exception - if anything goes wrong initializing the parsing
public String[] toArray()
throws Exception
Exception - if anything goes wrong initializing the parsingpublic String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandler
public static void main(String[] args)
throws Exception
args - the commandline options.
Exception - if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||