Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

oracle.uddi.message
Class UddiElement

java.lang.Object
  extended byoracle.uddi.message.UddiElement

Direct Known Subclasses:
AccessPoint, Address, AddressLine, AssertionStatusItem, AuthToken, BindingTemplate, BusinessEntity, BusinessEntityExt, BusinessInfo, BusinessList, BusinessService, Contact, DeleteBinding, DeleteBusiness, DeleteService, DeleteTModel, Description, DiscardAuthToken, DiscoveryURL, DispositionReport, Email, ErrInfo, FindBinding, FindBusiness, FindQualifiers, FindRelatedBusinesses, FindService, FindTModel, GetAssertionStatusReport, GetAuthToken, GetBindingDetail, GetBusinessDetail, GetBusinessDetailExt, GetPublisherAssertions, GetRegisteredInfo, GetServiceDetail, GetTModelDetail, HostingRedirector, InstanceDetails, KeyedReference, KeysOwned, Name, OverviewDoc, Phone, PublisherAssertion, RegisteredInfo, RelatedBusinessesList, RelatedBusinessInfo, Result, ServiceInfo, ServiceList, TModel, TModelBag, TModelInfo, TModelInstanceInfo, TModelList, UddiElementBag, ValidateValues

public abstract class UddiElement
extends java.lang.Object

This is the base class for all UDDI XML elements. Its many subclasses override key methods and provide element-specific behavior.

Common functionality defined here includes the ability to specify which version of UDDI the element supports and the ability to "marshall" and "unmarshall" an element's data to an XmlWriter instance. Marshalling is the process of serializing the data to some destination format; possible formats include a DOM element (and subtree) and a Writer stream for textual XML output. Unmarshalling simply reverses this process and can populate an element's data from an input source defined by an XmlScanner instance. Possible input sources are a DOM element (and subtree) and a Reader stream for textual XML input.

See Also:
XmlWriter, XmlScanner, DomXmlWriter, DomXmlScanner, WriterXmlWriter, ReaderXmlScanner

Constructor Summary
UddiElement(UddiElementFactory ueFactory)
          Users should not call the constructor directly; they should use an instance of UddiElementFactory to create instances of specific subclasses of this class.

 

Method Summary
 java.lang.String getElementName()
          Returns the name of the element, i.e., the prefix plus tagname
 java.lang.String getElementPrefix()
          Returns the namespace prefix used in marshalling.
 java.lang.String getGeneric()
          Returns the "generic" portion of version information for this element.
 java.lang.String getNamespaceUri()
          Returns the namespace URI of the version information for this element.
abstract  java.lang.String getTagName()
          Returns the local name of the tag of the UDDI Element.
 UddiElementFactory getUddiElementFactory()
          Return version specific element factory
 UddiVersionConstants getVersion()
          Returns an object which contains version information specifying the version of UDDI implemented by this element.
 boolean hasEmptyContent()
          Returns true if this element has empty content.
 void init()
          This method is not intended for use by clients of the API.
 boolean isV1Compatible()
          Returns true if element is V1 compatible
 boolean isV2Compatible()
          Returns true if element is V2 compatible
 void marshall(XmlWriter xmlWriter)
          Serializes the content of this element to the destination specified by the XmlWriter instance.
 void unmarshall(XmlScanner xmlScanner)
          Deserializes the content of this UDDI element (thereby populating the element with data) from the source specified by the XmlScanner instance.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

UddiElement

public UddiElement(UddiElementFactory ueFactory)
Users should not call the constructor directly; they should use an instance of UddiElementFactory to create instances of specific subclasses of this class.
Method Detail

init

public void init()

This method is not intended for use by clients of the API.

Initalizes the element. If the element has been initalized, it re-initalizes the element so that it is as if it is a new object. This method enables object reuse.

Note on re-initalization: Reinitalization is done such that the object will be in the state as if it is a new object. It implies that all sub-elements will be discarded. If the caller wants to re-use sub-elements, it is caller's responsibility to get the sub-elements prior to re-initalization and reassign the optional sub-elements after re-initalization.

For example, A tModel contains an optional sub-element identifierBag. Hence identifierBag will be discarded. If the caller wishes to re-use the identifierBag, the caller has to get the identifierBag, re-initalize it and assign it back as the tModel's identifierBag :

   ...
   IdentifierBag identifierBag = tModel.getIdentifierBag();
   tModel.init();
   identifierBag.init();
   tModel.setIdentifierBag(identifierBag);
   ...


Access to UddiElement and its sub-structure is not guaranteed to be thread-safe.

Every subclass of UddiElement MUST overwrite init(). In the implementation, it should always invoke super.init() and intialize/reinitialize subclass-specific members. The pattern is exactly the same as a Java constructor.


getUddiElementFactory

public UddiElementFactory getUddiElementFactory()
Return version specific element factory

getVersion

public UddiVersionConstants getVersion()
Returns an object which contains version information specifying the version of UDDI implemented by this element.

getGeneric

public java.lang.String getGeneric()
Returns the "generic" portion of version information for this element.

getNamespaceUri

public java.lang.String getNamespaceUri()
Returns the namespace URI of the version information for this element.

marshall

public void marshall(XmlWriter xmlWriter)
              throws MarshallException
Serializes the content of this element to the destination specified by the XmlWriter instance. See this class's description for more information.
Parameters:
xmlWriter - the destination of the element content; an object that implements the XmlWriter interface or, more specifically, one of its subinterfaces.
Throws:
MarshallException

unmarshall

public void unmarshall(XmlScanner xmlScanner)
                throws UnmarshallException
Deserializes the content of this UDDI element (thereby populating the element with data) from the source specified by the XmlScanner instance. See this class's description for more information.
Parameters:
xmlScanner - the source of the element content; an object that implements the XmlScanner interface or, more specifically, one of its subinterfaces.
Throws:
UnmarshallException

getTagName

public abstract java.lang.String getTagName()
Returns the local name of the tag of the UDDI Element.

getElementPrefix

public java.lang.String getElementPrefix()
Returns the namespace prefix used in marshalling.

getElementName

public java.lang.String getElementName()
Returns the name of the element, i.e., the prefix plus tagname

hasEmptyContent

public boolean hasEmptyContent()
                        throws MarshallException
Returns true if this element has empty content. For non-bag elements, this should simply return false. For bag elements, it returns true if it contains empty sub element list.
Throws:
MarshallException

isV1Compatible

public boolean isV1Compatible()
Returns true if element is V1 compatible

isV2Compatible

public boolean isV2Compatible()
Returns true if element is V2 compatible

Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

Copyright © 2001, 2004, Oracle. All rights reserved.