|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.model.DefaultDisplayable oracle.ide.model.DefaultElement oracle.ide.model.DefaultDocument oracle.ide.model.DefaultNode oracle.ide.model.XMLDataNode oracle.ide.model.XMLDataContainer
The XMLDataContainer
is the Container
wrapper
for a Folder
-implementing JavaBean that can be
persisted to XML using the XML marshalling framework in
oracle.ide.marshal.xml
.
XMLDataContainer
wraps objects that can contain
children. In order to interact with XMLDataContainer
,
wrapped objects must implement Folder
.
All methods to the XMLDataContainer
's Element
,
Folder
, and Container
methods are forwarded to the
wrapped Folder
object.
If the wrapped object is not an instance of Folder
,
then an IllegalStateException
will be thrown every time
an operation that requires the children list is called.
Object2Dom
Nested Class Summary |
Nested classes inherited from class oracle.ide.model.XMLDataNode |
XMLDataNode.DataCastPacket |
Field Summary |
Fields inherited from interface oracle.ide.addin.Subject |
OBJECT_MODIFIED |
Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
Constructor Summary | |
XMLDataContainer()
|
Method Summary | |
boolean |
add(Element element)
Appends a child Element to the end of the
Folder . |
boolean |
add(Element element,
boolean notify)
This is a variant of the Folder.add(Element) method
that accepts an additional flag that indicates whether or not
notifications of the change should be sent to registered observers. |
boolean |
canAdd(Element element)
Other classes can call this method to determine whether the given Element can be added to the Folder . |
boolean |
canRemove(Element element)
Other classes can call this method to determine whether the specified Element can be removed from this
Folder . |
boolean |
containsChild(Element child)
Returns true if the folder contains the
specified child Element ; returns false
otherwise. |
protected Folder |
getDataFolder()
Retrieves the Folder object associated with this
XMLDataContainer instance. |
boolean |
mayHaveChildren()
This method is part of the Element interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof operator or having to downcast to a
more specific type. |
boolean |
remove(Element element)
Removes the specified child Element . |
boolean |
remove(Element element,
boolean notify)
This is a variant of the Folder.remove(Element) method
that accepts an additional flag that indiciates whether or not
notifications of the change should be sent to registered observers. |
void |
removeAll()
Removes all children from the folder. |
void |
removeAll(boolean notify)
Removes all elements in the Container . |
int |
size()
Returns the current number of children in the folder. |
Methods inherited from class oracle.ide.model.XMLDataNode |
close, getAttributes, getCategory, getChildren, getData, getDataCastPacketDirectly, getDefaultClass, getIcon, getToolTipText, getXMLRootElementName, markDirty, newObject2Dom, open, reopen, save, setData, setDataCastPacketDirectly, setNodeInfo, setURL |
Methods inherited from class oracle.ide.model.DefaultNode |
equalsImpl |
Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getInputStream, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getURL, isDirty, isNew, isOpen, isReadOnly, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly, setURLDirectly |
Methods inherited from class oracle.ide.model.DefaultDisplayable |
toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.ide.model.Document |
close, getInputStream, getTimestamp, isNew, isReadOnly, open, save |
Methods inherited from interface oracle.ide.model.Locatable |
getURL, setURL |
Methods inherited from interface oracle.ide.model.Element |
getAttributes, getChildren |
Methods inherited from interface oracle.ide.model.Data |
getData |
Methods inherited from interface oracle.ide.model.Displayable |
getIcon, getLongLabel, getShortLabel, getToolTipText, toString |
Methods inherited from interface oracle.ide.addin.Subject |
attach, detach, notifyObservers |
Methods inherited from interface oracle.ide.model.Dirtyable |
isDirty, markDirty |
Methods inherited from interface oracle.ide.model.LazyLoadable |
isOpen |
Methods inherited from interface oracle.ide.model.Category |
getCategory |
Constructor Detail |
public XMLDataContainer()
Method Detail |
public boolean mayHaveChildren()
Element
Element
interface to
provide a convenient way of determining whether an object may
have children without having to test the object's type with the
instanceof
operator or having to downcast to a
more specific type.
An implementation of Element
that represents a leaf
in a tree structure should return false
from this
method. An implementation of Element
that could
represent a non-leaf in a tree structure should return
true
from this method, even if it does not currently
contain any children.
mayHaveChildren
in interface Element
mayHaveChildren
in class XMLDataNode
public boolean canAdd(Element element)
Folder
Element
can be added to the Folder
.
canAdd
in interface Folder
element
- the Element
that is about to be added
to this Folder
.
true
if the specified Element
can be
added to this Folder
; false
if the
Element
cannot be added.public boolean add(Element element)
Folder
Element
to the end of the
Folder
.
add
in interface Folder
public boolean canRemove(Element element)
Folder
Element
can be removed from this
Folder
.
canRemove
in interface Folder
element
- the Element
that is about to be removed
from this Folder
.
true
if the specified Element
can be
removed from this Folder
; false
if the
Element
cannot be removed.public boolean remove(Element element)
Folder
Element
. If the child object
appears more than once, only the first instance is removed.
remove
in interface Folder
element
- The child object to remove.public boolean containsChild(Element child)
Folder
true
if the folder contains the
specified child Element
; returns false
otherwise.
containsChild
in interface Folder
public int size()
Folder
size
in interface Folder
public void removeAll()
Folder
removeAll
in interface Folder
public boolean add(Element element, boolean notify)
Container
Folder.add(Element)
method
that accepts an additional flag that indicates whether or not
notifications of the change should be sent to registered observers.
add
in interface Container
element
- The Element
to be added to this
Container
.notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.public boolean remove(Element element, boolean notify)
Container
Folder.remove(Element)
method
that accepts an additional flag that indiciates whether or not
notifications of the change should be sent to registered observers.
remove
in interface Container
element
- The Element
to be removed from this
Container
.notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.public void removeAll(boolean notify)
Container
Container
. The
notify
flag indicates whether observers should be
notified of the change.
removeAll
in interface Container
notify
- If true
, any observers are notified
of the change. If false
, no notification is sent.protected final Folder getDataFolder() throws java.lang.IllegalStateException
Folder
object associated with this
XMLDataContainer
instance. If there is no Folder
currently associated with the XMLDataContainer
, however,
then an IllegalStateException
is thrown.
java.lang.IllegalStateException
- if the XMLDataContainer
is not capable of holding a Folder
.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.