Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 828 → Rev 829

/sun/xmleditor/trunk/src/control/DocumentManagerInterface.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.26 $
* @version $Revision: 1.27 $
*
* Last modification: $Date: 2003/07/23 12:05:10 $
* $Id: DocumentManagerInterface.java,v 1.26 2003/07/23 12:05:10 smcsporr Exp $
* Last modification: $Date: 2003/07/24 22:18:06 $
* $Id: DocumentManagerInterface.java,v 1.27 2003/07/24 22:18:06 ioklasse Exp $
*/
 
package src.control;
26,10 → 26,17
*
* @see src.control.DocumentManager
*
* @version $Revision: 1.26 $ Last modification: $Date: 2003/07/23 12:05:10 $
* @version $Revision: 1.27 $ Last modification: $Date: 2003/07/24 22:18:06 $
*/
public interface DocumentManagerInterface {
 
/**
* This method checks, if the actual Document has been changed and not saved.
*
* @return <code>true</code> if document has been changed, <code>false</code> otherwise.
*/
public boolean actualDocumentChanged();
/**
* <code>changeToDocument</code> changes the actual
* document to the document with the file name specified.
47,8 → 54,32
* from the internal document list and to update the program display afterwards.
*/
public void closeActualDocument();
 
/**
* The method <code>closeActualDocumentWithSaveCofirmation</code> closes
* the active document. If it has not been saved, a dialog will appear to ask the user if
* he really doesn't want to save the file before closing it.
*/
public void closeActualDocumentWithSaveConfirmation();
/**
* This method closes all opened documents using the method
* <code>closeAllDocumentsWithSaveConfimation</code>.
*/
public void closeAll();
/**
* <code>createNewFileWithDTD</code> creates a new document and sets a new
* DTD grammar. A root node will be inserted according to the chosen DTD.
*/
public void createNewFileWithDTD();
/**
* <code>createNewFileWithSchema</code> creates a new document and sets a new
*/
public void createNewFileWithSchema();
/**
* This method returns the document object of the current <code>OurDocument</code> instance.
*
* @return The implementation of a DOM document.
57,27 → 88,20
*/
public DocumentImpl getActualDocument();
/**
* The method <code>getOpenDocumentList</code> returns a <code>LinkedList</code> with the
* file names of all currently opened <code>OurDocument</code> instances.
/**
* Returns the <code>File</code> object belonging to the actual document
*
* @return A list containing the file names of the currently opened documents.
*
* @see src.document.OurDocument
* @return The file's path and name from which the actual document has been parsed.
*/
public LinkedList getOpenDocumentList();
public File getActualDocumentFile();
/**
* The method <code>setActualVisibleTree</code> sets
* a <code>LinkedList</code> of the visible <code>TreePath</code>s.
* Delivers the title of the actual document.
*
* @param en: A <code>LinkedList</code> of <code>TreePath</code> objects.
*
* @see javax.swing.tree.TreePath
* @see java.util.LinkedList
* @return The title of the actual document (which is also used in the GUI).
*/
public void setActualVisibleTree(LinkedList en);
public String getActualDocumentName();
 
/**
* The method <code>getActualVisibleTree</code> returns
* a <code>LinkedList</code> of the visible <code>TreePath</code>s.
90,14 → 114,6
public LinkedList getActualVisibleTree();
/**
* The method <code>setExpression</code> saves an xpathExpression to
* store information to restore the state of the tree display.
*
* @param expression: An XPath expression.
*/
public void setExpression(String expression);
/**
* The method <code>getExpression</code> returns the current XPath expression.
*
* @return An XPath expression.
105,14 → 121,26
* @see src.control.DocumentManagerInterface#setExpression
*/
public String getExpression();
 
/**
* The method <code>getOpenDocumentList</code> returns a <code>LinkedList</code> with the
* file names of all currently opened <code>OurDocument</code> instances.
*
* @return A list containing the file names of the currently opened documents.
*
* @see src.document.OurDocument
*/
public LinkedList getOpenDocumentList();
/**
* The method <code>closeActualDocumentWithSaveCofirmation</code> closes
* the active document. If it has not been saved, a dialog will appear to ask the user if
* he really doesn't want to save the file before closing it.
* Returns the <code>PluginManagerInterface</code> saved in this instance.
* Needed to get access for plugins to pluin manager
* to perform custom transformation.
*
* @return The PluginManagerInterface.
*/
public void closeActualDocumentWithSaveConfirmation();
 
public PluginManagerInterface getPluginManagerInterface();
/**
* This method displays a <code>JFileChooser</code> and parses a file if the user
* chooses one.
122,49 → 150,45
public boolean loadDocument();
/**
* <code>setNewDTD</code> lets the user choose a DTD file and launches a method in the
* current <code>OurDocument</code> instance that changes it's DTD grammar file entry
* to the chosen file.
*/
public void setNewDTD();
/**
* <code>setNewSchema</code> lets the user choose an XML schema file and launches a method in
* the current <code>OurDocument</code> instance that changes it's XML schema file entry
* to the chosen file.
*/
public void setNewSchema();
/**
* <code>makeNewDocument</code> creates a new <code>OurDocument</code> object and
* adds it to an internal document list.
*/
public void makeNewDocument();
/**
* <code>createNewFileWithDTD</code> creates a new document and sets a new
* DTD grammar. A root node will be inserted according to the chosen DTD.
*/
public void createNewFileWithDTD();
/**
* <code>createNewFileWithSchema</code> creates a new document and sets a new
*/
public void createNewFileWithSchema();
/**
* <code>saveActualDocument</code> launches a method that saves the active document.
* <code>saveActiveDocument</code> launches a method that saves the active document.
* This is a kind of a quicksave function and can only be used if the corresponding
* file name of the current document is available.
*/
public void saveActualDocument();
public void saveActiveDocument();
/**
* <code>saveActualDocumentAs</code> saves the active document in a specified file
* <code>saveActiveDocumentAs</code> saves the active document in a specified file
* chosen by the user.
*/
public void saveActualDocumentAs();
public void saveActiveDocumentAs();
/**
* This method saves all opened documents using the methods
* <code>saveActiveDocument</code> and, if the actual document doesn't
* exist as saved document, <code>saveActiveDocumentAs</code>.
*
* @see src.control.DocumentManager#saveActiveDocument
* @see src.control.DocumentManager#saveActiveDocumentAs
*/
public void saveAll();
 
/**
* The method <code>setActualVisibleTree</code> sets
* a <code>LinkedList</code> of the visible <code>TreePath</code>s.
*
* @param en: A <code>LinkedList</code> of <code>TreePath</code> objects.
*
* @see javax.swing.tree.TreePath
* @see java.util.LinkedList
*/
public void setActualVisibleTree(LinkedList en);
/**
* This method sets the document object of the current <code>OurDocument</code>
* instance to the given parameter.
173,51 → 197,33
*
* @see src.document.OurDocument
*/
public void setDocument(DocumentImpl document);
 
public void setDocument(DocumentImpl document);
/**
* This method checks, if the actual Document has been changed and not saved.
* <code>setExpression</code> saves an xpathExpression to
* store information to restore the state of the tree display.
*
* @return <code>true</code> if document has been changed, <code>false</code> otherwise.
* @param expression An XPath expression.
*/
public boolean actualDocumentChanged();
public void setExpression(String expression);
 
/**
* Delivers the title of the actual document.
/**
* <code>setNewDTD</code> lets the user change the current document's DOCTYPE entry.
*
* @return The title of the actual document (which is also used in the GUI).
* A user may choose a DTD file. If an XML document has been opened, a DOCTYPE entry
* will be inserted into the header of the current document. If a DOCTYPE entry
* already exists, it will be overwritten. Please note that this method will only add
* a name and a SYSTEM identifier to the DOCTYPE entry, a PUBLIC identifier must be
* added manually from inside the text editor.
*/
public String getActualDocumentName();
public void setNewDTD();
/**
* Returns the <code>File</code> object belonging to the actual document
/**
* <code>setNewSchema</code> lets the user change the current document's 'schemaLocation' entry.
*
* @return The file's path and name from which the actual document has been parsed.
* A user may choose an XML schema file. If an XML document has been opened, a new
* 'schemaLocation' entry will be inserted into the document's header. If a similar
* entry already existed, it will be overwritten.
*/
public File getActualDocumentFile();
/**
* This method closes all opened documents using the method
* <code>closeAllDocumentsWithSaveConfimation</code>.
*/
public void closeAll();
/**
* This method saves all opened documents using the methods
* <code>saveActualDocument</code> and, if the actual document doesn't
* exist as saved document, <code>saveActualDocumentAs</code>.
*
* @see src.control.DocumentManager#saveActualDocument
* @see src.control.DocumentManager#saveActualDocumentAs
*/
public void saveAll();
/**
* Returns the <code>PluginManagerInterface</code> saved in this instance.
* Needed to get access for plugins to pluin manager
* to perform custom transformation.
*
* @return The PluginManagerInterface.
*/
public PluginManagerInterface getPluginManagerInterface();
public void setNewSchema();
}