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_PROPERTY
REDO_CMD, UNDO_CMD
FILE_FILTER_PROPERTY, MRU_PROPERTY
APPLICATION_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, writeStreamDocument
actionPerformed, 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, updateModificationState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addView, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, isModified, removeView, removeViews, setModified, setTitle
isProcessingAction, updateAction
actionPerformed
receiveMessage
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
protected Document document
org.w3c.dom.Document
associated with the document.public boolean initializeDocument(Object userData)
Document
.initializeDocument
in interface IlvDocument
initializeDocument
in class IlvAbstractDocument
userData
- 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 IlvAbstractFileDocument
writer
- 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 IlvFileDocument
readDocument
in class IlvAbstractFileDocument
url
- 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 Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.