edu.ksu.cis.kdd.data.converter.xml
Class XMLDataParser

java.lang.Object
  extended byedu.ksu.cis.kdd.data.converter.xml.XMLDataParser
All Implemented Interfaces:
Converter

public class XMLDataParser
extends java.lang.Object
implements Converter

XML Data Parser
Description:
This class is used to parse data set encoded as (abused) XML file. This is a DOM implementation. I did this because I don't want to convert the file by hand.

Version:
0.1.0
Author:
Roby Joehanes

Field Summary
protected  Database db
           
protected  boolean isPRM
           
protected  java.util.LinkedList pKeys
           
protected  java.util.LinkedList rKeys
           
protected  Table tuples
           
 
Constructor Summary
XMLDataParser()
           
 
Method Summary
protected  java.lang.String getElementValue(org.w3c.dom.Node parent)
           
 void initialize()
           
 Database load(java.io.InputStream stream)
           
 void save(java.io.OutputStream stream, Database db)
           
 void visitDocument(org.w3c.dom.Node parent)
           
 void visitModel(org.w3c.dom.Node parent)
           
protected  void visitPRMAttributeSet(org.w3c.dom.Node parent)
           
 void visitPRMClass(org.w3c.dom.Node parent)
           
 void visitSamples(org.w3c.dom.Node parent)
           
protected  Tuple visitSampleSet(org.w3c.dom.Node parent)
           
protected  Attribute visitVariable(org.w3c.dom.Node parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected Database db

tuples

protected Table tuples

isPRM

protected boolean isPRM

rKeys

protected java.util.LinkedList rKeys

pKeys

protected java.util.LinkedList pKeys
Constructor Detail

XMLDataParser

public XMLDataParser()
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface Converter
See Also:
Converter.initialize()

save

public void save(java.io.OutputStream stream,
                 Database db)
Specified by:
save in interface Converter

load

public Database load(java.io.InputStream stream)
Specified by:
load in interface Converter
See Also:
Converter.load(java.io.InputStream)

visitDocument

public void visitDocument(org.w3c.dom.Node parent)

visitModel

public void visitModel(org.w3c.dom.Node parent)

visitPRMClass

public void visitPRMClass(org.w3c.dom.Node parent)

visitPRMAttributeSet

protected void visitPRMAttributeSet(org.w3c.dom.Node parent)

visitVariable

protected Attribute visitVariable(org.w3c.dom.Node parent)

visitSamples

public void visitSamples(org.w3c.dom.Node parent)

visitSampleSet

protected Tuple visitSampleSet(org.w3c.dom.Node parent)

getElementValue

protected java.lang.String getElementValue(org.w3c.dom.Node parent)