Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 785 → Rev 786

/sun/xmleditor/trunk/src/parser/AdapterDomToTreeModel.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* $Revision: 1.64 $
* $Revision: 1.65 $
*
* Last modification: $Date: 2003/07/24 14:30:28 $
* $Id: AdapterDomToTreeModel.java,v 1.64 2003/07/24 14:30:28 smcsporr Exp $
* Last modification: $Date: 2003/07/24 15:10:06 $
* $Id: AdapterDomToTreeModel.java,v 1.65 2003/07/24 15:10:06 mdonner Exp $
*/
 
package src.parser;
28,8 → 28,6
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
 
 
 
import src.gui.LogInterface;
 
/**
40,11 → 38,11
*
* @author Group 5
*
* @version $Revision: 1.64 $ Last modification: $Date: 2003/07/24 14:30:28 $
* @version $Revision: 1.65 $ Last modification: $Date: 2003/07/24 15:10:06 $
*/
public class AdapterDomToTreeModel implements TreeModel, LogInterface {
public class AdapterDomToTreeModel implements TreeModel {
 
/* the main Document */
/* The main Document. */
private Document doc;
/* list for the Listeners and a list for XPath filtered view */
192,7 → 190,7
/**
* This method gives the number of children.
*
* @param parent The parent node of the children.
* @param node The parent node of the children.
*
* @return Returns <code>true</code> if the given node is a leaf, this means it has
* no children.
859,13 → 857,14
}
 
/**
* This method sets the internal reference of <code>LogInterface</code>.
* 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 An instance of an object compliant to src.gui.LogInterface.
* @param log A log panel implementation compliant to src.gui.LogInterface.
*
* author Sascha Walkenhorst
* author S. McSporran
*
* Last revision: 24-Jun-2003
* Last Revision: 11-Jul-2003
*/
public void setLogInterface (LogInterface log) {
LogInterfaceReference = log;
875,8 → 874,4
public void log(int i, String message) {
LogInterfaceReference.log(i,message);
}
/* Used to clear the log panel. */
public void clear() {
}
}
/sun/xmleditor/trunk/src/parser/Validator.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.50 $
* @version $Revision: 1.51 $
*
* Last modification: $Date: 2003/07/24 13:56:26 $
* $Id: Validator.java,v 1.50 2003/07/24 13:56:26 smcsporr Exp $
* Last modification: $Date: 2003/07/24 14:20:45 $
* $Id: Validator.java,v 1.51 2003/07/24 14:20:45 smcsporr Exp $
*/
 
package src.parser;
47,10 → 47,6
* It can be used to parse and validate DOM document implementations against
* a Document Type Definition (DTD) or an XML schema.
*
* As second function, it can be used to parse an XML schema grammar to retrieve
* the possible top level elements, that are candidates of being the root
* element of an instance document of that schema.
*
* A <code>Validator</code> instance uses an instance of the <code>ValidationErrorHandler</code> class
* to catch and handle SAX warning and error events. These events are used to
* decide, whether a document is valid or not.
57,7 → 53,7
*
* @author S. McSporran
*
* @version $Revision: 1.50 $ Last modification: $Date: 2003/07/24 13:56:26 $
* @version $Revision: 1.51 $ Last modification: $Date: 2003/07/24 14:20:45 $
*/
public class Validator {
 
171,7 → 167,7
createTransformer();
}
/*
/**
* This method creates an instance of a <code>Transformer</code> object
* which is used by this class to generate an output stream from
* a <code>Document </code> object.
197,7 → 193,7
}
}
/*
/**
* This method registers an instance of the <code>ValidationErrorHandler</code> class
* with the parser.
*
216,7 → 212,7
activeParser.setErrorHandler(eHandler);
}
/*
/**
* This method activates the validation feature of the parser.
*
* @see <a href="http://xml.apache.org/xerces2-j/features.html">xerces validation</a>
248,7 → 244,7
}
}
/*
/**
* This method activates the dynamic validation feature of the parser.
*
* author S. McSporran
278,7 → 274,7
}
}
/*
/**
* This method activates the XML schema support of the parser.
*
* author S. McSporran
308,7 → 304,7
}
}
/*
/**
* This method activates the namespace feature of the parser.
*
* author S. McSporran
337,7 → 333,7
}
}
/*
/**
* This method activates the continue-after-fatal-error feature of the parser.
*
* author S. McSporran
448,8 → 444,10
* This method validates an <code>InputStream</code>.
*
* @param inStream The stream to be validated.
* @return Returns <code>true</code>, if the stream is valid.
*
* @return Returns <code>true</code>, if the stream contains valid XML
* character data, <code>false</code> otherwise.
*
* author S. McSporran
*
* Last revision: 30-Jun-2003
482,18 → 480,17
}
/**
* Sends a message of a specified type to the log panel.
*/
* Sends a message of a specified type to the log panel. */
private void log(int i,String message) {
logInterfaceReference.log(i,message);
}
/* Sends a message to the status panel. */
/** Sends a message to the status panel. */
private void sendStatMessage(String message) {
statInterfaceReference.setMessage(message);
}
/* Sets an icon on the status panel. */
/** Sets an icon on the status panel. */
private void setStatIcon(int icon) {
statInterfaceReference.setIcon(icon);
}