|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.ws.addressing.EndpointReference
EndpointReference is a complete implementation of the EndpointReferenceType
type defined in WS-Addressing 1.0.
This class is implemented as a wrapper for an XML representation of an EPR,
providing methods that allow users to get and set values with regular Java
types rather than DOM types. It also provides a number of copy and conversion
constructors for creating EPRs from various sources.
Constructor Summary | |
---|---|
EndpointReference(org.w3c.dom.Element root)
This is a convenience constructor that creates a new EPR from the given XML, making a deep copy of it in the process. |
|
EndpointReference(org.w3c.dom.Element root,
boolean makeDeepCopyOfXML)
Creates a new EPR from the given XML definition. |
|
EndpointReference(EndpointReference copy)
This is a convenience constructor that is equivalent to calling the EndpointReference(EndpointReference, QName) constructor with the standard wsa:EndpointReference QName. |
|
EndpointReference(EndpointReference copy,
QName typeName)
A copy constructor for EPRs - creates a deep copy of the given EPR. |
|
EndpointReference(java.net.URI address)
This is a convenience constructor that is the equivalent of calling EndpointReference(URI, QName) constructor with the standard wsa:EndpointReference QName. |
|
EndpointReference(java.net.URI address,
QName typeName)
Creates a new EPR with the given wsa:Address URI; when the EPR is serialized to XML, its root element will have the given QName. |
Method Summary | |
---|---|
void |
addParameter(org.w3c.dom.Element parameter)
Adds the given Element to the collection of reference parameters. |
void |
addParameter(QName qname)
This is a convenience method that calls addParameter(QName, Object) with a null parameter value. |
void |
addParameter(QName qname,
java.lang.Object value)
Creates a new reference parameter with the given name and value. |
boolean |
equals(java.lang.Object obj)
|
java.net.URI |
getAddress()
|
int |
getNumberOfParameters()
|
org.w3c.dom.Element |
getParameter(QName qname)
|
org.w3c.dom.Element |
getParameter(QName qname,
int index)
|
org.w3c.dom.Element[] |
getParameters()
|
org.w3c.dom.Element[] |
getParameters(QName qname)
|
java.lang.String |
getParameterString(QName qname)
|
java.lang.String |
getParameterString(QName qname,
int index)
|
QName |
getRootTypeName()
|
int |
hashCode()
This method has been properly overridden to account for the change to equals(Object). |
void |
removeParameter(QName qname)
This is a convenience method that removes the first instance of a reference parameter with the given name. |
void |
removeParameter(QName qname,
int index)
Removes the n-th instance of the parameter with the given name. |
void |
removeParameters(QName qname)
Removes all instances of the parameter with the given name. |
void |
setAddress(java.net.URI address)
|
java.lang.String |
toString()
|
org.w3c.dom.Element |
toXML()
Converts this object into an XML representation, as defined by its related schema or specification. |
org.w3c.dom.Element |
toXML(org.w3c.dom.Document doc)
Converts this object into an XML representation, as defined by its related schema or specification. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EndpointReference(org.w3c.dom.Element root) throws SoapFault
EndpointReference(Element, boolean)
public EndpointReference(org.w3c.dom.Element root, boolean makeDeepCopyOfXML) throws SoapFault
root
- The XML definition of the EPR.makeDeepCopyOfXML
- True if you want the class to clone the given XML fragment
so that it has an independent copy of the data. If a copy of
the given XML is made, it will retain the same root element
QName.
SoapFault
- public EndpointReference(EndpointReference copy)
EndpointReference(EndpointReference, QName)
,
WsaConstants.EPR_QNAME
public EndpointReference(EndpointReference copy, QName typeName)
copy
- The EPR to copy (deep copy).typeName
- The QName of the root element when this EPR is serialized to XML.public EndpointReference(java.net.URI address)
EndpointReference(URI, QName)
,
WsaConstants.EPR_QNAME
public EndpointReference(java.net.URI address, QName typeName)
address
- The wsa:Address of the EPR.typeName
- The QName of the root element when the EPR is serialized to XML.Method Detail |
public void addParameter(org.w3c.dom.Element parameter)
parameter
- public void addParameter(QName qname)
addParameter(QName, Object)
public void addParameter(QName qname, java.lang.Object value)
qname
- The name of the reference parameter's XML element.value
- The parameter value (can be null).public boolean equals(java.lang.Object obj)
public java.net.URI getAddress()
public int getNumberOfParameters()
public org.w3c.dom.Element getParameter(QName qname)
qname
- The name of the reference parameter to look up.
public org.w3c.dom.Element getParameter(QName qname, int index)
qname
- The name of the reference parameter to look up.
public org.w3c.dom.Element[] getParameters()
public org.w3c.dom.Element[] getParameters(QName qname)
public java.lang.String getParameterString(QName qname)
qname
- The name of the reference parameter to look up.
public java.lang.String getParameterString(QName qname, int index)
qname
- The name of the reference parameter to look up.
public QName getRootTypeName()
public int hashCode()
public void removeParameter(QName qname)
removeParameter(QName, int)
public void removeParameter(QName qname, int index)
qname
- The name of the parameter instance to delete.index
- The instance of the parameter to delete.public void removeParameters(QName qname)
qname
- The name of the parameter(s) to delete.public void setAddress(java.net.URI address)
address
- The wsa:Address of the EPR (cannot be null).public java.lang.String toString()
public org.w3c.dom.Element toXML()
XmlSerializable
toXML
in interface XmlSerializable
toXML(Document)
public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
XmlSerializable
toXML
in interface XmlSerializable
doc
- The DOM Document that will be used to create all of the nodes
in the resulting XML fragment.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |