Class XMLInstances
java.lang.Object
weka.core.xml.XMLDocument
weka.core.xml.XMLInstances
- All Implemented Interfaces:
Serializable, RevisionHandler
XML representation of the Instances class.
- Version:
- $Revision: 1.4 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe class attributestatic final Stringthe format attribute (for date attributes)static final Stringthe index attributestatic final Stringthe missing attributestatic final Stringthe type attributestatic final Stringthe version attributestatic final Stringthe weight attributestatic final Stringthe DTDstatic StringThe filename extension that should be used for xrff filesstatic final Stringthe attribute elementstatic final Stringthe attributes elementstatic final Stringthe body elementstatic final Stringthe root elementstatic final Stringthe header elementstatic final Stringthe instance elementstatic final Stringthe data elementstatic final Stringthe label elementstatic final Stringthe labels elementstatic final Stringthe meta-data elementstatic final Stringthe notes elementstatic final Stringthe property elementstatic final Stringthe value elementstatic final Stringthe value for datestatic final Stringthe value for nominalstatic final Stringthe value for normalstatic final Stringthe value for numericstatic final Stringthe value for relationalstatic final Stringthe value for sparsestatic final Stringthe value for stringFields inherited from class XMLDocument
ATT_NAME, DTD_ANY, DTD_AT_LEAST_ONE, DTD_ATTLIST, DTD_CDATA, DTD_DOCTYPE, DTD_ELEMENT, DTD_IMPLIED, DTD_OPTIONAL, DTD_PCDATA, DTD_REQUIRED, DTD_SEPARATOR, DTD_ZERO_OR_MORE, PI, VAL_NO, VAL_YES -
Constructor Summary
ConstructorsConstructorDescriptionthe default constructorXMLInstances(Reader reader) generates the Instances directly from the reader containing the XML data.XMLInstances(Instances data) generates the XML structure based on the given data -
Method Summary
Modifier and TypeMethodDescriptionreturns the current instances, either the ones that were set or the ones that were generated from the XML structure.Returns the revision string.static voidtakes an XML document as first argument and then outputs the Instances statisticsvoidsetInstances(Instances data) builds up the XML structure based on the given datavoidreads the XML structure from the given readerMethods inherited from class XMLDocument
clear, evalBoolean, evalDouble, evalString, findNodes, getBuilder, getChildTags, getChildTags, getContent, getDocType, getDocument, getFactory, getNode, getRootNode, getValidating, newDocument, print, read, read, read, read, setDocType, setDocument, setRootNode, setValidating, toString, write, write, write, write
-
Field Details
-
FILE_EXTENSION
The filename extension that should be used for xrff files -
TAG_DATASET
-
TAG_HEADER
-
TAG_BODY
-
TAG_NOTES
-
TAG_ATTRIBUTES
-
TAG_ATTRIBUTE
-
TAG_LABELS
-
TAG_LABEL
-
TAG_METADATA
-
TAG_PROPERTY
-
TAG_INSTANCES
-
TAG_INSTANCE
-
TAG_VALUE
-
ATT_VERSION
-
ATT_TYPE
-
ATT_FORMAT
-
ATT_CLASS
-
ATT_INDEX
-
ATT_WEIGHT
-
ATT_MISSING
-
VAL_NUMERIC
-
VAL_DATE
-
VAL_NOMINAL
-
VAL_STRING
-
VAL_RELATIONAL
-
VAL_NORMAL
-
VAL_SPARSE
-
DOCTYPE
the DTD
-
-
Constructor Details
-
XMLInstances
-
XMLInstances
-
XMLInstances
-
-
Method Details
-
setInstances
builds up the XML structure based on the given data- Parameters:
data- data to generate the XML from
-
getInstances
returns the current instances, either the ones that were set or the ones that were generated from the XML structure.- Returns:
- the current instances
-
setXML
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classXMLDocument- Returns:
- the revision
-
main
takes an XML document as first argument and then outputs the Instances statistics- Parameters:
args- the commandline options
-