|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ocd.dcf.DCContainer
DCContainer Basic Container for IXMLPersistable Components or Objects. This class doesnot implement IXMLPersistable However it can be used by Persistable Objects that wish to contain IXMLPersistable Objects.
Field Summary | |
protected static ICompFactory |
componentFactory
|
static java.lang.String |
CONTAINER_NODE_NAME
Name of the node that will contain Container data |
static java.lang.String |
CONTAINER_TYPE_ATTR
attribute name for the container type MAP or LIST |
static java.lang.String |
ITEM_ID_ATTR
|
static java.lang.String |
ITEM_INDEX_ATTR
|
static java.lang.String |
ITEM_NODE_NAME
Name of the node that will contain each item |
static int |
LIST
|
static java.lang.String |
LIST_STR
|
static int |
MAP
|
static java.lang.String |
MAP_STR
|
protected java.util.ArrayList |
objectList
|
protected java.util.HashMap |
objectMap
|
protected java.util.HashSet |
objectSet
|
static int |
SET
|
static java.lang.String |
SET_STR
|
protected int |
type
|
protected static IXMLParser |
xmlParser
|
Constructor Summary | |
DCContainer()
Create a new DCContainer based on a MAP |
|
DCContainer(int pType)
Create a new DCContainer based on a Map |
Method Summary | |
void |
addDCContainerListener(DCContainerListener pListener)
Add a Container Listener |
void |
addManagedObject(int index,
IXMLPersistable pObject)
Add an Object to this Container. |
void |
addManagedObject(java.lang.String id,
IXMLPersistable pObject)
Add an Object to this Container. |
boolean |
contains(IXMLPersistable pObject)
return true if this container contains the Object |
protected void |
fireManagedObjectAdded(java.lang.Object pObject,
int index)
Fire object added Event |
protected void |
fireManagedObjectAdded(java.lang.Object pObject,
java.lang.String id)
Fire object added Event |
protected void |
fireManagedObjectRemoved(java.lang.Object pObject)
Fire object Removed Event |
IXMLPersistable |
getManagedObject(int pIndex)
Get the persistable Component by Index |
IXMLPersistable |
getManagedObject(java.lang.String pID)
Get the persistable Component for an ID Map type Container only |
int |
getManagedObjectIndex(IXMLPersistable pObject)
Get the Index of an Object |
IXMLPersistable[] |
getManagedObjects()
Get the persistable Components that this Container contains |
org.w3c.dom.Document |
getObjectDocument(IXMLPersistable pObject)
Get an XML Document for a Single IXMLPersistable object |
java.util.List |
getObjectList()
Get the Map of Components |
java.util.Map |
getObjectMap()
Get the Map of Components |
java.util.Set |
getObjectSet()
Get the Set of Components |
int |
getType()
Get Type MAP or LIST |
org.w3c.dom.Element |
getXMLElement(java.lang.String HREFPrefix)
Get an XML Container Element that contains all managed Objects |
void |
removeDCContainerListener(DCContainerListener pListener)
Remove a Container Listener |
void |
removeManagedObject(IXMLPersistable pObject)
remove an Object from this Container |
void |
removeManagedObject(java.lang.String pID)
remove an Object from this Container Map Type Containers Only |
boolean |
setXMLElement(org.w3c.dom.Element containerE,
java.net.URL relativeURL)
Set an XML Container Element that contains all managed Objects |
int |
size()
The number of elements this Container is managing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONTAINER_NODE_NAME
public static final java.lang.String CONTAINER_TYPE_ATTR
public static final java.lang.String ITEM_NODE_NAME
public static final java.lang.String ITEM_ID_ATTR
public static final java.lang.String ITEM_INDEX_ATTR
public static final java.lang.String LIST_STR
public static final java.lang.String MAP_STR
public static final java.lang.String SET_STR
public static final int LIST
public static final int MAP
public static final int SET
protected static IXMLParser xmlParser
protected static ICompFactory componentFactory
protected java.util.HashMap objectMap
protected java.util.ArrayList objectList
protected java.util.HashSet objectSet
protected int type
Constructor Detail |
public DCContainer(int pType)
pType
- LIST, MAP, SETpublic DCContainer()
Method Detail |
public void addDCContainerListener(DCContainerListener pListener)
public void removeDCContainerListener(DCContainerListener pListener)
public IXMLPersistable[] getManagedObjects()
public IXMLPersistable getManagedObject(int pIndex)
public IXMLPersistable getManagedObject(java.lang.String pID)
public void addManagedObject(java.lang.String id, IXMLPersistable pObject)
id
- of the ObjectpObject
- to addpublic void addManagedObject(int index, IXMLPersistable pObject)
index
- of the ObjectpObject
- to addpublic void removeManagedObject(IXMLPersistable pObject)
pObject
- to removepublic void removeManagedObject(java.lang.String pID)
pObject
- to removepublic java.util.Map getObjectMap()
public java.util.List getObjectList()
public java.util.Set getObjectSet()
public int getType()
protected void fireManagedObjectAdded(java.lang.Object pObject, java.lang.String id)
protected void fireManagedObjectAdded(java.lang.Object pObject, int index)
protected void fireManagedObjectRemoved(java.lang.Object pObject)
public org.w3c.dom.Document getObjectDocument(IXMLPersistable pObject)
pObject
- to get Document Forpublic int getManagedObjectIndex(IXMLPersistable pObject)
public boolean contains(IXMLPersistable pObject)
public int size()
public org.w3c.dom.Element getXMLElement(java.lang.String HREFPrefix)
HREFPrefix
- the href that the id.dcf will be appended to as an Href for the
Data location for each Component Nodepublic boolean setXMLElement(org.w3c.dom.Element containerE, java.net.URL relativeURL)
containerE
- the element for this containerrelativeURL
- the href that the id.blx will be appended to as an Href for the
Data location for each Component Node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |