|
Oracle® Application Server Web Services UDDI Client API Reference 10g Release 2 (10.1.2) Part No. B13971-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.uddi.message.UddiElement
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.
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 |
public UddiElement(UddiElementFactory ueFactory)
UddiElementFactory
to create instances of specific subclasses of this class.Method Detail |
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.
public UddiElementFactory getUddiElementFactory()
public UddiVersionConstants getVersion()
public java.lang.String getGeneric()
public java.lang.String getNamespaceUri()
public void marshall(XmlWriter xmlWriter) throws MarshallException
XmlWriter
instance. See this class's description for more information.xmlWriter
- the destination of the element content; an object that implements the XmlWriter interface or, more specifically, one of its subinterfaces.MarshallException
public void unmarshall(XmlScanner xmlScanner) throws UnmarshallException
XmlScanner
instance. See this class's description for more information.xmlScanner
- the source of the element content; an object that implements the XmlScanner interface or, more specifically, one of its subinterfaces.UnmarshallException
public abstract java.lang.String getTagName()
public java.lang.String getElementPrefix()
public java.lang.String getElementName()
public boolean hasEmptyContent() throws MarshallException
MarshallException
public boolean isV1Compatible()
public boolean isV2Compatible()
|
Oracle® Application Server Web Services UDDI Client API Reference 10g Release 2 (10.1.2) Part No. B13971-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |