jcreek.cke.importexport.jcxml
Class JCXMLimportParser

java.lang.Object
  extended byjcreek.cke.importexport.jcxml.JCXMLimportParser

public class JCXMLimportParser
extends java.lang.Object

Takes as input a DOM Document of a JCXML XML file that is assumed valid, and traverses that document. Finds tags that are valid according to the Schema of JCXML and constructs a Knowledge Model of the content of the JCXML. if the abortOnFatalErrors is set to true the process will be aborted if a fatal error should occur.

Author:
Stein L. Tomassen, NTNU 2002

Constructor Summary
JCXMLimportParser(org.w3c.dom.Document document, KnowledgeModel km, boolean abortOnFatalErrors, ProcessStatusWindowInterface statusWindow)
          Constructor that takes as input a DOM Document of a JCXML XML file that is assumed valid, and traverses that document.
 
Method Summary
 boolean didFatalErrorOccur()
          Checks if an fatal error did occur.
 boolean isAbortOnFatalErrorsEnabled()
          Checks if abortOnFatalErrors is enabled or not.
 void startTraverse()
          Starts the traversal of the DOM document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCXMLimportParser

public JCXMLimportParser(org.w3c.dom.Document document,
                         KnowledgeModel km,
                         boolean abortOnFatalErrors,
                         ProcessStatusWindowInterface statusWindow)
Constructor that takes as input a DOM Document of a JCXML XML file that is assumed valid, and traverses that document. Finds tags that are valid according to the Schema of JCXML and constructs a Knowledge Model of the content of the JCXML. if the abortOnFatalErrors is set to true the process will be aborted if a fatal error should occur.

Parameters:
document - the DOM document containing the JavaCreek Knowledge Model.
km - the knowledge model to build
abortOnFatalErrors - abort if a fatal error occurs or just continue?
statusWindow - the window where the process information should be displayed
Method Detail

startTraverse

public void startTraverse()
Starts the traversal of the DOM document.


isAbortOnFatalErrorsEnabled

public boolean isAbortOnFatalErrorsEnabled()
Checks if abortOnFatalErrors is enabled or not.

Returns:
true if bortOnFatalErrors is enabled, otherwise false.

didFatalErrorOccur

public boolean didFatalErrorOccur()
Checks if an fatal error did occur.

Returns:
true if an fatal error did occur, otherwise false.


Created at IDI, NTNU by the Artificial Intelligence and Learning group