Source code: javax/ide/model/xml/XMLDocument.java
1 package javax.ide.model.xml;
2
3 import java.io.IOException;
4
5 import javax.ide.model.Project;
6 import javax.ide.model.spi.XMLDocumentImpl;
7 import javax.ide.model.text.TextDocument;
8
9 /**
10 * The <CODE>XMLDocument</CODE> class.
11 */
12 public class XMLDocument extends TextDocument
13 {
14 private XMLDocumentImpl getXMLDocumentImpl()
15 {
16 return (XMLDocumentImpl) getElementImpl();
17 }
18
19 /**
20
21 * Fetches the {@link XMLModel}. This calls opens the document and loads
22 * its contents. The <code>XMLModel</code> instance returned lives while
23 * clients refer to it. Once a model instance is not referred by
24 * clients it may be garbage collected at any time.
25 *
26 * @return the {@link XMLModel} containing the document's xml model.
27 * @exception IOException if the document cannot be opened.
28 */
29 public final XMLModel getXMLModel( Project project ) throws IOException
30 {
31 return getXMLDocumentImpl().getXMLModel( project );
32 }
33 }