org.spaceroots.rkcheck
Class RungeKuttaFile

java.lang.Object
  extended byorg.spaceroots.rkcheck.XMLFile
      extended byorg.spaceroots.rkcheck.RungeKuttaFile
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class RungeKuttaFile
extends XMLFile

This class reads or write an XML file containing a Runge-Kutta method description.

Version:
$Id: RungeKuttaFile.java,v 1.2 2004/05/23 18:36:27 luc Exp $
Author:
L. Maisonobe

Field Summary
 
Fields inherited from class org.spaceroots.rkcheck.XMLFile
uri
 
Constructor Summary
RungeKuttaFile(RungeKuttaMethod method)
          Simple constructor.
 
Method Summary
 void analyze(org.w3c.dom.Document document, java.lang.String uri)
          Analyze the DOM tree.
 void build(org.w3c.dom.Document document, java.lang.String uri)
          Build the DOM tree.
protected  java.lang.String getPublicId()
          Get the public ID of the DTD.
protected  java.lang.String getSystemId()
          Get the system ID of the DTD.
 
Methods inherited from class org.spaceroots.rkcheck.XMLFile
error, fatalError, getAttribute, getContent, getElement, read, warning, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RungeKuttaFile

public RungeKuttaFile(RungeKuttaMethod method)
               throws RKCheckException
Simple constructor.

Build a file reader/writer for a Runge-Kutta method instance.

Parameters:
method - Runge-Kutta method instance to initialize by file reading or to store by file writing
Throws:
RKCheckException - if no parser can be built
Method Detail

analyze

public void analyze(org.w3c.dom.Document document,
                    java.lang.String uri)
             throws RKCheckException,
                    java.lang.NumberFormatException
Analyze the DOM tree.

This method is called by the read method after having build the DOM tree. Its purpose is to analyze the tree and store the contained information in application-specific ways.

Specified by:
analyze in class XMLFile
Parameters:
document - DOM tree to analyze
uri - URI from which the project document was read (useful mainly for error messages)
Throws:
RKCheckException - if some data cannot be found in the tree or if there is a dimension mismatch
java.lang.NumberFormatException - if some number cannot be parsed

build

public void build(org.w3c.dom.Document document,
                  java.lang.String uri)
           throws RKCheckException
Build the DOM tree.

This method is called by the write method before writing the DOM tree. Its purpose is to build the DOM tree in application-specific ways.

Specified by:
build in class XMLFile
Parameters:
document - empty DOM tree to build
uri - URI where the project document will be written (useful mainly for error messages)
Throws:
RKCheckException - if some problem occurs while building the tree

getPublicId

protected java.lang.String getPublicId()
Get the public ID of the DTD.

Specified by:
getPublicId in class XMLFile
Returns:
public ID of the DTD

getSystemId

protected java.lang.String getSystemId()
Get the system ID of the DTD.

Specified by:
getSystemId in class XMLFile
Returns:
system ID of the DTD


Copyright © 2002-2004 Luc Maisonobe. All Rights Reserved.