Java Doc for XMLOptions.java in  » Science » weka » weka » core » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » weka » weka.core.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $



Field Summary
final public static  StringATT_NAME
    
final public static  StringATT_TYPE
    
final public static  StringATT_VALUE
    
final public static  StringDOCTYPE
    
final public static  StringROOT_NODE
    
final public static  StringTAG_OPTION
    
final public static  StringTAG_OPTIONS
    
final public static  StringVAL_TYPE_CLASSIFIER
    
final public static  StringVAL_TYPE_FLAG
    
final public static  StringVAL_TYPE_HYPHENS
    
final public static  StringVAL_TYPE_QUOTES
    
final public static  StringVAL_TYPE_SINGLE
    
protected  XMLDocumentm_XMLDocument
    

Constructor Summary
public  XMLOptions()
    
public  XMLOptions(String xml)
    
public  XMLOptions(File file)
    
public  XMLOptions(InputStream stream)
    
public  XMLOptions(Reader reader)
    

Method Summary
protected  DocumentfixHyphens(Document document)
     pushes any options with type ATT_HYPHENS to the end, s.t.
public  DocumentgetDocument()
    
protected  intgetQuotesLevel(Node node)
     returns the quotes level for the given node, i.e.
public  booleangetValidating()
    
public  XMLDocumentgetXMLDocument()
     returns the handler of the XML document.
public static  voidmain(String[] args)
     for testing only.
public  voidsetValidating(boolean validating)
     sets whether to use a validating parser or not.
public  String[]toArray()
    
protected  StringtoCommandLine(String cl, Element parent, int depth)
    
public  StringtoCommandLine()
    
public  StringtoString()
    

Field Detail
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



m_XMLDocument
protected XMLDocument m_XMLDocument(Code)
the XML document




Constructor Detail
XMLOptions
public XMLOptions() throws Exception(Code)
Creates a new instance of XMLOptions
throws:
  Exception - if the construction of the DocumentBuilder fails
See Also:   XMLOptions.setValidating(boolean)



XMLOptions
public XMLOptions(String xml) throws Exception(Code)
Creates a new instance of XMLOptions
Parameters:
  xml - the xml to parse (if "throws:
  Exception - if the construction of the DocumentBuilder fails
See Also:   XMLOptions.setValidating(boolean)



XMLOptions
public XMLOptions(File file) throws Exception(Code)
Creates a new instance of XMLOptions
Parameters:
  file - the XML file to parse
throws:
  Exception - if the construction of the DocumentBuilder fails
See Also:   XMLOptions.setValidating(boolean)



XMLOptions
public XMLOptions(InputStream stream) throws Exception(Code)
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.setValidating(boolean)



XMLOptions
public XMLOptions(Reader reader) throws Exception(Code)
Creates a new instance of XMLOptions
Parameters:
  reader - the XML reader to parse
throws:
  Exception - if the construction of the DocumentBuilder fails
See Also:   XMLOptions.setValidating(boolean)




Method Detail
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.