Java API

oracle.uddi.message.util
Class UddiElementBag

java.lang.Object
  |
  +--oracle.uddi.message.UddiElement
        |
        +--oracle.uddi.message.util.UddiElementBag
Direct Known Subclasses:
BindingDetail, BindingTemplates, BusinessDetail, BusinessDetailExt, BusinessInfos, BusinessServices, CategoryBag, Contacts, DiscoveryURLs, IdentifierBag, SaveBinding, SaveBusiness, SaveService, SaveTModel, ServiceDetail, ServiceInfos, TModelDetail, TModelInfos, TModelInstanceDetails

public abstract class UddiElementBag
extends UddiElement
implements BagRandomAccessor, BagSequentialAccessor

A data structure that holds a bag of UddiElements of the same typ. Examples include CategoryBag, discoveryURLs, etc.

See Also:
BagRandomAccessor, BagSequentialAccessor

Constructor Summary
UddiElementBag()
           
 
Method Summary
TypeMethod
 boolean addUddiElement(UddiElement uddiElt)
          Convenient method to add a UDDI Element to the bag.
static UddiElementIterator getOrCreateUddiElementIterator(UddiElementBag uddiEltBag)
          A helper method that returns an existing UddiElementIterator when available, or constructing a new UddiElementIterator when the sub elements are in a List.
static java.util.List getOrCreateUddiElementList(UddiElementBag uddiEltBag)
           A helper method that returns an existing List of sub UddiElements when available, or constructing a new List when the sub elements are in an UddiElementIterator.
 UddiElement getUddiElement(int index)
          Convenient method to get a UDDI Element from the bag.
 UddiElementIterator getUddiElementIterator()
           
 java.util.List getUddiElementList()
           
 void init()
           
 void initWithEmptyList()
          Initalize the element with an empty list to hold sub UDDI elements.
 boolean removeUddiElement(UddiElement uddiElt)
          Convenient method to remove a UDDI Element from the bag.
 void setUddiElementIterator(UddiElementIterator uitr)
           
 void setUddiElementList(java.util.List listUddiElt)
           
 
Methods inherited from class oracle.uddi.message.UddiElement
getElementName, getElementPrefix, getGeneric, getNamespaceUri, getTagName, getVersion, marshall, unmarshall
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UddiElementBag

public UddiElementBag()
Method Detail

init

public void init()
Overrides:
init in class UddiElement

initWithEmptyList

public void initWithEmptyList()
Initalize the element with an empty list to hold sub UDDI elements.

setUddiElementList

public void setUddiElementList(java.util.List listUddiElt)
                        throws SequentialAccessOnlyException
Specified by:
setUddiElementList in interface BagRandomAccessor

getUddiElementList

public java.util.List getUddiElementList()
                                  throws SequentialAccessOnlyException
Specified by:
getUddiElementList in interface BagRandomAccessor

addUddiElement

public boolean addUddiElement(UddiElement uddiElt)
                       throws SequentialAccessOnlyException
Convenient method to add a UDDI Element to the bag. It works only if the bag is implemented by a random-access list. If a list has not been created, a list based on the factory implementation will be used.

removeUddiElement

public boolean removeUddiElement(UddiElement uddiElt)
                          throws SequentialAccessOnlyException
Convenient method to remove a UDDI Element from the bag. It works only if the bag is implemented by a random-access list. If a list has not been created, a list based on the factory implementation will be used.

getUddiElement

public UddiElement getUddiElement(int index)
                           throws SequentialAccessOnlyException
Convenient method to get a UDDI Element from the bag. It works only if the bag is implemented by a random-access list. If a list has not been created, a list based on the factory implementation will be used.

getUddiElementIterator

public UddiElementIterator getUddiElementIterator()
                                           throws RandomAccessOnlyException
Specified by:
getUddiElementIterator in interface BagSequentialAccessor

setUddiElementIterator

public void setUddiElementIterator(UddiElementIterator uitr)
                            throws RandomAccessOnlyException
Specified by:
setUddiElementIterator in interface BagSequentialAccessor

getOrCreateUddiElementList

public static java.util.List getOrCreateUddiElementList(UddiElementBag uddiEltBag)
                                                 throws UddiException

A helper method that returns an existing List of sub UddiElements when available, or constructing a new List when the sub elements are in an UddiElementIterator.

Side effects: if the sub elements are in an UddiElementIterator, the iterator will be consumed.

Parameters:
uddiEltBag - the UddiElementBag that contains some sub elements.
Returns:
a non-null List representing the underlying sub elements

getOrCreateUddiElementIterator

public static UddiElementIterator getOrCreateUddiElementIterator(UddiElementBag uddiEltBag)
A helper method that returns an existing UddiElementIterator when available, or constructing a new UddiElementIterator when the sub elements are in a List.
Parameters:
uddiEltBag - the UddiElementBag that contains some sub elements.
Returns:
a non-null UddiElementIterator representing the underlying sub elements

Java API

Copyright © 2001 - Oracle Corporation