Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 850 → Rev 876

/sun/xmleditor/trunk/src/document/OurDocument.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.69 $
* @version $Revision: 1.70 $
*
* Last modification: $Date: 2003/07/26 13:23:58 $
* $Id: OurDocument.java,v 1.69 2003/07/26 13:23:58 smcsporr Exp $
* Last modification: $Date: 2003/07/26 15:35:53 $
* $Id: OurDocument.java,v 1.70 2003/07/26 15:35:53 smcsporr Exp $
*/
package src.document;
42,9 → 42,11
* is working on. Instances of this class are handled by the
* <code>DocumentManager</code>.
*
* @see src.control.DocumentManager
*
* @author S. McSporran
*
* @version $Revision: 1.69 $ Last modification: $Date: 2003/07/26 13:23:58 $
* @version $Revision: 1.70 $ Last modification: $Date: 2003/07/26 15:35:53 $
*/
public class OurDocument {
72,7 → 74,9
/** Indicates, if the current document has been changed. */
private boolean isChanged;
/** Used to save expanded tree nodes. */
private LinkedList visibleTree = new LinkedList();
private String xpathExpression = "";
/**
106,7 → 110,7
* The method <code>setVisibleTree</code> saves the currently expanded
* nodes.
*
* @param en: A <code>LinkedList</code> of visible <code>TreePath</code>s.
* @param en A <code>LinkedList</code> of visible <code>TreePath</code>s.
*
* @see java.util.LinkedList
* @see javax.swing.tree.TreePath
134,7 → 138,7
* The methode <code> setExpression </code> saves the Xpath
* expression in this instance of OurDocument
*
* @param expression: The XPath expression.
* @param expression The XPath expression.
*/
public void setExpression(String expression) {
if(expression != null) {
156,7 → 160,7
* 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.
* @param log A log panel implementation compliant to src.gui.LogInterface.
*
* author S. McSporran
*
193,7 → 197,7
/**
* <code>setTitle</code> sets the title of a document.
*
* @param name: The new name of the document as <code>String</code>.
* @param name The new name of the document as <code>String</code>.
*
* Last revision: 24-Jun-2003
*/
205,7 → 209,7
* Sets a new DOM document object to be the new document in this <code>OurDocument</code>
* instance.
*
* @param document: The new document of this instance.
* @param document The new document of this instance.
*
* Last revision: 17-Jul-2003
*/
220,7 → 224,7
/**
* Sets the file name related to the current document.
*
* @param fName: The new file name.
* @param fName The new file name.
*
* @see java.io.File
*
254,15 → 258,14
* @param dtdFile The new schema's path and filename as <code>File</code>-object.
*
* @see java.io.File
* @see org.w3c.dom.Document
*
* author S. McSporran
*
* Last revision: 25-Jul-2003 by S. McSporran
* Last revision: 28-Jul-2003 by S. McSporran
*/
public void changeSchemaGrammar(DocumentImpl changeDoc, File schemaFile) {
 
final String defaultNS = "http://www.w3.org/2001/XMLSchema-instance";
 
/* Create an empty DOM document used as data container. */
DocumentImpl tempDocument = new DocumentImpl();
295,8 → 298,7
} else {
/* Set a default schemaLocation attribute when no targetNamespace was available. */
XMLRootElement.setAttribute("xsi:schemaLocation", defaultNS + " " +
schemaFile.getPath());
XMLRootElement.setAttribute("xsi:noNamespaceSchemaLocation", schemaFile.getPath());
}
}