public class IlvDOMDocument extends IlvAbstractFileDocument
org.w3c.dom.Document
instances.
If an IlvDOMDocument is initialized with the
initializeDocument(java.lang.Object) method, an empty org.w3c.dom.Document
is created and associated with the document.
IlvDOMDocument is initialized from a file URL with
the method readDocument(java.net.URL, ilog.views.appframe.docview.IlvFileFilter), the specified file is considered as
an XML file and its content is parsed into the
associated org.w3c.dom.Document instance of the document.
The DOM document associated with an IlvDOMDocument is accessed
with the method getDOMDocument().
| Modifier and Type | Field and Description |
|---|---|
protected Document |
document
Stores the
org.w3c.dom.Document associated with the document. |
PATHNAME_PROPERTYREDO_CMD, UNDO_CMDFILE_FILTER_PROPERTY, MRU_PROPERTYAPPLICATION_PROPERTY, ATTACHED_DOCUMENTS_PROPERTY, DOCUMENT_OWNER_PROPERTY, DOCUMENT_TEMPLATE_PROPERTY, EDITABLE_PROPERTY, MODIFIED_PROPERTY, SAVEABLE_PROPERTY, TITLE_PROPERTY| Constructor and Description |
|---|
IlvDOMDocument()
Creates a new
IlvDOMDocument. |
| Modifier and Type | Method and Description |
|---|---|
Document |
getDOMDocument()
Returns the DOM document associated with this document.
|
boolean |
initializeDocument(Object userData)
Initializes a new empty DOM document.
|
boolean |
readDocument(URL url,
IlvFileFilter filter)
Parses the XML file with the specified URL and sets the resulting
org.w3c.dom.Document to the document. |
boolean |
writeDocument(Writer writer,
IlvFileFilter filter)
Writes document data to the specified
writer. |
activated, getFileDocumentTemplate, getPathName, readDocument, readStreamDocument, setPathName, writeDocument, writeStreamDocumentactionPerformed, addActionHandler, addEdit, addPropertyChangeListener, addView, attachDocument, canRedo, canUndo, clean, documentClosed, documentClosing, getActiveView, getApplication, getDocumentTemplate, getProperty, getTitle, getUndoManager, getView, getViewCount, getViews, isModified, isProcessingAction, notifyViews, receiveMessage, redo, registerMappings, removeActionHandler, removePropertyChangeListener, removeView, removeViews, setApplication, setModified, setProperty, setTitle, undo, updateAction, updateModificationStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddView, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, isModified, removeView, removeViews, setModified, setTitleisProcessingAction, updateActionactionPerformedreceiveMessageaddPropertyChangeListener, getProperty, removePropertyChangeListener, setPropertyprotected Document document
org.w3c.dom.Document associated with the document.public boolean initializeDocument(Object userData)
Document.initializeDocument in interface IlvDocumentinitializeDocument in class IlvAbstractDocumentuserData - The user data to initialize the document with - can be
null. This parameter comes from the
user data parameter given to the application methods: This parameter is not used.true if an empty org.w3c.dom.Document
could be initialized; false otherwise.IlvApplication.newDocument(java.lang.Object, boolean),
IlvApplication.newDocument(),
IlvApplication.newDocument(IlvDocumentTemplate, boolean, Object),
getDOMDocument()public boolean writeDocument(Writer writer, IlvFileFilter filter)
writer.
By default, this method does nothing. It should be overridden to perform
any writing.writeDocument in class IlvAbstractFileDocumentwriter - The writer to write the data of the document to.filter - The file filter that indicates the format to use for
writing the data.true if the document could write its data;
false otherwise.IlvAbstractFileDocument.writeDocument(java.net.URL, IlvFileFilter)public boolean readDocument(URL url, IlvFileFilter filter)
org.w3c.dom.Document to the document.readDocument in interface IlvFileDocumentreadDocument in class IlvAbstractFileDocumenturl - The XML file URL to read the DOM from.filter - The file filter that indicates the format to use for
reading the data.true if the XML file could be parsed;
false otherwise.IlvAbstractFileDocument.writeDocument(java.io.Writer, ilog.views.appframe.docview.IlvFileFilter)public Document getDOMDocument()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.