Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 784 → Rev 785

/sun/xmleditor/trunk/src/parser/ValidationErrorHandler.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.23 $
* @version $Revision: 1.24 $
*
* Last modification: $Date: 2003/07/22 18:59:53 $
* $Id: ValidationErrorHandler.java,v 1.23 2003/07/22 18:59:53 smcsporr Exp $
* Last modification: $Date: 2003/07/24 14:20:18 $
* $Id: ValidationErrorHandler.java,v 1.24 2003/07/24 14:20:18 smcsporr Exp $
*/
 
package src.parser;
24,26 → 24,32
/**
* The <b><code>ValidationErrorHandler</code></b> class supplies an error handler for the
* <code>Validator</code> class.
* An error handler retrieves and handles error events sent by a SAX parser. These
* errors include warnings, errors and fatal errors.
*
* @see org.apache.xml.utils.DefaultErrorHandler
*
* @author S. McSporran
*
* @version $Revision: 1.23 $ Last modification: $Date: 2003/07/22 18:59:53 $
* @version $Revision: 1.24 $ Last modification: $Date: 2003/07/24 14:20:18 $
*/
public class ValidationErrorHandler extends DefaultErrorHandler {
 
/* Holds the information, if the parsed document is valid. */
/** Holds the information, if the parsed document is valid. */
private boolean valid = true;
/* Reference variable to a log panel implementation. */
/** Reference variable to a log panel implementation. */
private LogInterface logInterfaceReference;
/* Reference variable to a status panel implementation. */
/** Reference variable to a status panel implementation. */
private StatusInterface statusInterfaceReference;
/**
* This method sets the internal validation status to <code>true</code> or <code>false</code>.
* This method resets the internal validation status to <code>true</code>. A document
* is valid by default and it's validation status only changes to false, if an error or
* fatal error occured.
* The valid status can only be reset to <code>true</code> from external classes, so
* only nonvalid XML documents will get a nonvalid status.
*
* @param value A <code>boolean</code> value.
*
52,20 → 58,22
* Last revision: 09-Jul-2003
*/
public void setValid(boolean value) {
valid = value;
if(value) {
valid = value;
}
}
 
/**
* This method returns the current value of valid.
* This method returns the status of the validation.
*
* @return The current valid status.
* @return The validation status. Will be <code>true</code>, if no error or
* fatal error occured during the validation process.
*
* author S. McSporran
* author S. McSporran
*
* Last revision: 18-Jun-2003
*/
public boolean isValid() {
return valid;
}
 
72,7 → 80,7
/**
* A method that catches SAX warnings and sends them to the log panel.
* Warnings indicate that something might be missing or incorrect in a XML file,
* wile no XML wellformedness rule has been broken.
* while no XML wellformedness rule has been broken.
*
* @param saxpe A warning sent by a SAX Parser.
*
161,12 → 169,12
statusInterfaceReference = stat;
}
/* Sends a message to the log panel. */
/** Sends a message to the log panel. */
private void log(int i, String message) {
logInterfaceReference.log(i,message);
}
/* Sets a new point in the status panel. */
/** Sets a new point in the status panel. */
private void setNewPoint(Point p) {
statusInterfaceReference.setPoint(p);
}
/sun/xmleditor/trunk/src/parser/Parser.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.55 $
* @version $Revision: 1.56 $
*
* Last modification: $Date: 2003/07/24 14:30:56 $
* $Id: Parser.java,v 1.55 2003/07/24 14:30:56 smcsporr Exp $
* Last modification: $Date: 2003/07/24 15:17:13 $
* $Id: Parser.java,v 1.56 2003/07/24 15:17:13 smcsporr Exp $
*/
 
package src.parser;
60,7 → 60,7
*
* @author Group 5
*
* @version $Revision: 1.55 $ Last modification: $Date: 2003/07/24 14:30:56 $
* @version $Revision: 1.56 $ Last modification: $Date: 2003/07/24 15:17:13 $
*/
public class Parser {
 
380,11 → 380,14
}
 
/**
* This method sets an internal reference to the log panel.
* This method sets an internal reference to the log panel that is used to
* output logging messages to inform the user about program events.
*
* @param log A log panel implementation compliant to src.gui.LogInterface.
*
* author S. McSporran
*
* Last revision: 24-Jun-2003
* Last Revision: 11-Jul-2003
*/
public void setLogInterface(LogInterface log) {
logInterfaceReference = log;