Class XMLOptions
java.lang.Object
weka.core.xml.XMLOptions
- All Implemented Interfaces:
RevisionHandler
A class for transforming options listed in XML to a regular WEKA command
line string.
- Version:
- $Revision: 1.4 $
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe name attribute.static final Stringthe type attribute.static final Stringthe value attribute.static final Stringthe DTD for the XML file.static final Stringthe root node.static final Stringtag for a single option.static final Stringtag for a list of options.static final Stringa value of the type attribute.static final Stringa value of the type attribute.static final Stringa value of the type attribute.static final Stringa value of the type attribute.static final Stringa value of the type attribute.static final Stringa value of the type attribute. -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionreturns the parsed DOM document.Returns the revision string.booleanreturns whether a validating parser is used.returns the handler of the XML document.static voidfor testing only.voidsetValidating(boolean validating) sets whether to use a validating parser or not.String[]toArray()returns the current DOM document as string array.returns the given DOM document as command line.toString()returns the object in a string representation (as indented XML output).
-
Field Details
-
TAG_OPTION
-
TAG_OPTIONS
-
ATT_NAME
-
ATT_TYPE
-
ATT_VALUE
-
VAL_TYPE_FLAG
-
VAL_TYPE_SINGLE
-
VAL_TYPE_HYPHENS
-
VAL_TYPE_QUOTES
-
VAL_TYPE_CLASSIFIER
-
VAL_TYPE_OPTIONHANDLER
-
ROOT_NODE
-
DOCTYPE
-
-
Constructor Details
-
XMLOptions
-
XMLOptions
-
XMLOptions
-
XMLOptions
Creates a new instance of XMLOptions.- Parameters:
stream- the XML stream to parse- Throws:
Exception- if the construction of the DocumentBuilder fails- See Also:
-
XMLOptions
-
-
Method Details
-
getValidating
public boolean getValidating()returns whether a validating parser is used.- Returns:
- whether a validating parser is used
-
setValidating
-
getDocument
-
getXMLDocument
returns the handler of the XML document. the internal DOM document can be accessed via thegetDocument()method.- Returns:
- the object handling the XML document
- See Also:
-
toCommandLine
-
toArray
-
toString
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
main
-