Package org.jibx.ws.wsdl.model
Class WsdlBase
- java.lang.Object
-
- org.jibx.ws.wsdl.model.WsdlBase
-
- Direct Known Subclasses:
Definitions,OpenAttrBase
public abstract class WsdlBase extends java.lang.ObjectBase class which provides validation hooks and support for extra namespaces. This base class for WSDL element representations is based on the schema data model code.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Listm_documentationDocumentation for component (lazy create,nullif unused).private java.lang.Objectm_extensionExtension data for application use.private java.util.Listm_namespacesNamespace definitions associated with this element (lazy create,nullif unused).static java.lang.StringSOAP_NAMESPACE_URIFixed URI for SOAP namespace.static java.lang.StringWSDL_NAMESPACE_URIFixed URI for WSDL namespace.
-
Constructor Summary
Constructors Constructor Description WsdlBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNamespaceDeclaration(java.lang.String prefix, java.lang.String uri)Add namespace declaration.voidclearNamespaceDeclarations()Clear namespace declarations list.java.util.ListgetDocumentation()Get documentation.java.lang.ObjectgetExtension()Get extension data.java.util.ListgetNamespaceDeclarations()Get namespace declarations list.private java.lang.StringmakeUniquePrefix(java.lang.String pref, StringSizedSet prefixes)Create a unique prefix.protected voidpreget(IMarshallingContext ictx)Pre-get method to be called by data binding while writing element start tag.protected voidpreset(IUnmarshallingContext ictx)Pre-set method to be called by data binding while parsing element start tag.voidprevalidate(ValidationContext vctx)Prevalidate component information.protected voidreadNamespaces(IUnmarshallingContext ictx)Collect namespace declarations from element.voidsetDocumentation(java.util.List documentation)Set documentation.voidsetExtension(java.lang.Object extension)Set extension data.voidvalidate(ValidationContext vctx)Validate component information.protected voidvalidateAttributes(IUnmarshallingContext ictx, boolean other, StringArray attrs)Validate attributes of element.protected voidwriteNamespaces(IMarshallingContext ictx)Write namespace declarations to element.
-
-
-
Field Detail
-
WSDL_NAMESPACE_URI
public static final java.lang.String WSDL_NAMESPACE_URI
Fixed URI for WSDL namespace.- See Also:
- Constant Field Values
-
SOAP_NAMESPACE_URI
public static final java.lang.String SOAP_NAMESPACE_URI
Fixed URI for SOAP namespace.- See Also:
- Constant Field Values
-
m_extension
private java.lang.Object m_extension
Extension data for application use.
-
m_namespaces
private java.util.List m_namespaces
Namespace definitions associated with this element (lazy create,nullif unused).
-
m_documentation
private java.util.List m_documentation
Documentation for component (lazy create,nullif unused).
-
-
Method Detail
-
getExtension
public java.lang.Object getExtension()
Get extension data. The actual type of object used for extension data (if any) is defined by the application.- Returns:
- extension
-
setExtension
public void setExtension(java.lang.Object extension)
Set extension data. The actual type of object used for extension data (if any) is defined by the application.- Parameters:
extension-
-
getNamespaceDeclarations
public final java.util.List getNamespaceDeclarations()
Get namespace declarations list. Entries in this list consist of pairs, consisting of namespace prefix followed by namespace URI. The empty string is used as the prefix for the default namespace.- Returns:
- extra attribute list
-
clearNamespaceDeclarations
public final void clearNamespaceDeclarations()
Clear namespace declarations list.
-
addNamespaceDeclaration
public final void addNamespaceDeclaration(java.lang.String prefix, java.lang.String uri)Add namespace declaration.- Parameters:
prefix- namespace prefixuri- namespace URI
-
getDocumentation
public java.util.List getDocumentation()
Get documentation. This is the content of the optional <documentation> child element, which consists of DOM Nodes.- Returns:
- documentation (
nullif no documentation present)
-
setDocumentation
public void setDocumentation(java.util.List documentation)
Set documentation. This is the content of the optional <documentation> child element, which consists of DOM Nodes.- Parameters:
documentation-
-
preget
protected void preget(IMarshallingContext ictx) throws JiBXException
Pre-get method to be called by data binding while writing element start tag. The base class implementation just writes out any extra namespaces defined on the element. Subclasses which override this implementation must call the base implementation during their processing.- Parameters:
ictx- marshalling context- Throws:
JiBXException- on marshalling error
-
preset
protected void preset(IUnmarshallingContext ictx) throws JiBXException
Pre-set method to be called by data binding while parsing element start tag. The base class implementation just reads in any extra namespaces defined on the element. Subclasses which override this implementation must call the base implementation during their processing.- Parameters:
ictx- unmarshalling context- Throws:
JiBXException- on error
-
validateAttributes
protected void validateAttributes(IUnmarshallingContext ictx, boolean other, StringArray attrs)
Validate attributes of element. This is designed to be called during unmarshalling as part of the pre-set method processing when a subclass instance is being created. An error is reported if an element in the default namespace is not in the declared list,- Parameters:
ictx- unmarshalling contextother- attributes from other namespaces allowed flagattrs- attributes array- See Also:
preset(IUnmarshallingContext)
-
readNamespaces
protected void readNamespaces(IUnmarshallingContext ictx)
Collect namespace declarations from element. This is designed to be called during unmarshalling as part of the pre-set method processing when a subclass instance is being created.- Parameters:
ictx- unmarshalling context
-
makeUniquePrefix
private java.lang.String makeUniquePrefix(java.lang.String pref, StringSizedSet prefixes)Create a unique prefix. If the requested prefix is already in use, this modifies the prefix by appending a numeric suffix to create a unique variant.- Parameters:
pref- requested prefixprefixes- prefixes in use- Returns:
- unique prefix
-
writeNamespaces
protected void writeNamespaces(IMarshallingContext ictx) throws JiBXException
Write namespace declarations to element. This is designed to be called during marshalling as part of the pre-get method processing when a subclass instance is being marshalled.- Parameters:
ictx- marshalling context- Throws:
JiBXException- on error writing
-
prevalidate
public void prevalidate(ValidationContext vctx)
Prevalidate component information. The prevalidation step is used to check isolated aspects of a component, such as the settings for enumerated values. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.- Parameters:
vctx- validation context
-
validate
public void validate(ValidationContext vctx)
Validate component information. The validation step is used for checking the interactions between components, such as name references to other components. Theprevalidate(org.jibx.schema.validation.ValidationContext)method will always be called for every component in the schema definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.- Parameters:
vctx- validation context
-
-