org.jvnet.wom.api
Class WSDLEntity

java.lang.Object
  extended by org.jvnet.wom.api.WSDLEntity
All Implemented Interfaces:
WSDLExtensible
Direct Known Subclasses:
WSDLBoundFault, WSDLBoundInput, WSDLBoundOperation, WSDLBoundOutput, WSDLBoundPortType, WSDLDefinitions, WSDLFault, WSDLInput, WSDLMessage, WSDLOperation, WSDLOutput, WSDLPart, WSDLPort, WSDLPortType, WSDLService, WSDLTypes

public abstract class WSDLEntity
extends java.lang.Object
implements WSDLExtensible

Base class for the wsdl model. It represents WSDL entities such as wsdl:definitions, wsdl:portType, wsdl:port, wsdl:message etc.

Author:
Vivek Pandey

Constructor Summary
protected WSDLEntity(org.xml.sax.Locator locator, javax.xml.namespace.QName name)
           
 
Method Summary
 void addExtension(java.util.Collection<WSDLExtension> extension)
          Adds a new WSDLExtension to this object.
 java.lang.String getDocumentation()
          Gives the Comment on a WSDL component.
<T extends WSDLExtension>
java.util.Collection<T>
getExtension(java.lang.Class<T> type)
          Gets the extension that is assignable to the given type.
 java.lang.Iterable<WSDLExtension> getExtensions()
          Gets all the WSDLExtensions added through #addExtension(Collection).
<T extends WSDLExtension>
T
getFirstExtension(java.lang.Class<T> type)
          Returns the first extension
 org.xml.sax.Locator getLocation()
          Gets the source location information in the parsed WSDL.
 javax.xml.namespace.QName getName()
           
 WSDLDefinitions getOwnerWSDLModel()
          Gives WSDLDefinitions owning this WSDL entity.
 WSDLDocument getWSDLDocument()
          The WSDLDocument associated with this WSDL entity.
protected  void setOwnerWSDLDocument(WSDLDocumentImpl wsdlDocument)
           
abstract
<V,P> V
visit(WSDLVisitor<V,P> visitor, P param)
          WSDL visitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDLEntity

protected WSDLEntity(org.xml.sax.Locator locator,
                     javax.xml.namespace.QName name)
Method Detail

getName

public javax.xml.namespace.QName getName()

getLocation

public org.xml.sax.Locator getLocation()
Gets the source location information in the parsed WSDL.

This is useful when producing error messages.


getOwnerWSDLModel

public WSDLDefinitions getOwnerWSDLModel()
Gives WSDLDefinitions owning this WSDL entity.

Returns:

getWSDLDocument

public WSDLDocument getWSDLDocument()
The WSDLDocument associated with this WSDL entity.

Returns:
Always non-null.

getDocumentation

public java.lang.String getDocumentation()
Gives the Comment on a WSDL component. This is the content of <wsdl:document>

Returns:
"" if there is no documentation

visit

public abstract <V,P> V visit(WSDLVisitor<V,P> visitor,
                              P param)
WSDL visitor


getExtensions

public final java.lang.Iterable<WSDLExtension> getExtensions()
Description copied from interface: WSDLExtensible
Gets all the WSDLExtensions added through #addExtension(Collection).

Specified by:
getExtensions in interface WSDLExtensible
Returns:
never null.

getExtension

public <T extends WSDLExtension> java.util.Collection<T> getExtension(java.lang.Class<T> type)
Description copied from interface: WSDLExtensible
Gets the extension that is assignable to the given type.

This is just a convenient version that does

 Iterator itr = getExtensions(type);
 if(itr.hasNext())  return itr.next();
 else               return null;
 

Specified by:
getExtension in interface WSDLExtensible
Returns:
null if the extension was not found.

getFirstExtension

public <T extends WSDLExtension> T getFirstExtension(java.lang.Class<T> type)
Returns the first extension

Parameters:
type - always non-null
Returns:
may be null if the type does not match

addExtension

public void addExtension(java.util.Collection<WSDLExtension> extension)
Description copied from interface: WSDLExtensible
Adds a new WSDLExtension to this object.

Specified by:
addExtension in interface WSDLExtensible
Parameters:
extension - must not be null.

setOwnerWSDLDocument

protected void setOwnerWSDLDocument(WSDLDocumentImpl wsdlDocument)


Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.