Package org.jibx.custom.classes
Class SharedNestingBase
- java.lang.Object
-
- org.jibx.custom.classes.CustomBase
-
- org.jibx.custom.classes.SharedNestingBase
-
- Direct Known Subclasses:
NestingBase,NestingBase
public abstract class SharedNestingBase extends CustomBase
Base class for all binding customizations that can contain other customizations. This includes inherited values shared with customization extensions (in particular, the WSDL extensions).- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringm_actualNamespaceprivate java.lang.Stringm_javadocFormatterprivate java.lang.Stringm_namespaceprivate java.lang.Integerm_namespaceStyleprivate java.lang.Integerm_nameStyleprivate java.lang.Integerm_requireprivate java.lang.Booleanm_useJavaDocsstatic StringArrays_allowedAttributesEnumeration of allowed attribute names-
Fields inherited from class org.jibx.custom.classes.CustomBase
CAMEL_CASE_NAMES, DERIVE_BY_PACKAGE, DERIVE_FIXED, DERIVE_NONE, DOTTED_NAMES, HYPHENATED_NAMES, REQUIRE_ALL, REQUIRE_NONE, REQUIRE_OBJECTS, REQUIRE_PRIMITIVES, s_namespaceStyleEnum, s_nameStyleEnum, s_requireEnum, UNDERSCORED_NAMES, UPPER_CAMEL_CASE_NAMES
-
-
Constructor Summary
Constructors Constructor Description SharedNestingBase(SharedNestingBase parent)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringconvertName(java.lang.String base)Convert class or unprefixed field name to element or attribute name using current format.java.lang.StringgetFormatterClass()Get JavaDoc formatter class name.java.lang.StringgetNamespace()Get the namespace for schema definitions.intgetNamespaceStyle()Get namespace derivation style.private java.lang.StringgetNamespaceStyleText()Namespace style get text method.intgetNameStyle()Get name style.private java.lang.StringgetNameStyleText()Name style get text method.private java.lang.StringgetRequireText()Required get text method.protected java.lang.StringgetSpecifiedNamespace()Get namespace specified on this element.booleanisObjectRequired(java.lang.String type)Check if object value should be treated as required.booleanisPrimitiveRequired(java.lang.String type)Check if primitive value should be treated as required.booleanisUseJavaDocs()Check if JavaDocs should be used for documentation.protected voidsetNamespace(java.lang.String ns)Set the namespace to be used for schema definitions.voidsetNamespaceStyle(java.lang.Integer style)Set namespace derivation style.private voidsetNamespaceStyleText(java.lang.String text, IUnmarshallingContext ictx)Namespace style set text method.voidsetNameStyle(java.lang.Integer style)Set name style.private voidsetNameStyleText(java.lang.String text, IUnmarshallingContext ictx)Name style set text method.private voidsetRequireText(java.lang.String text, IUnmarshallingContext ictx)Required set text method.-
Methods inherited from class org.jibx.custom.classes.CustomBase
convertName, deriveItemName, deriveNamespace, getContainingObject, getGlobal, getParent, packageOfType, packageToNamespace, validateAttributes
-
-
-
-
Field Detail
-
s_allowedAttributes
public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names
-
m_javadocFormatter
private java.lang.String m_javadocFormatter
-
m_namespace
private java.lang.String m_namespace
-
m_namespaceStyle
private java.lang.Integer m_namespaceStyle
-
m_nameStyle
private java.lang.Integer m_nameStyle
-
m_require
private java.lang.Integer m_require
-
m_useJavaDocs
private java.lang.Boolean m_useJavaDocs
-
m_actualNamespace
private java.lang.String m_actualNamespace
-
-
Constructor Detail
-
SharedNestingBase
public SharedNestingBase(SharedNestingBase parent)
Constructor.- Parameters:
parent-
-
-
Method Detail
-
getFormatterClass
public java.lang.String getFormatterClass()
Get JavaDoc formatter class name.- Returns:
- namespace style
-
getSpecifiedNamespace
protected java.lang.String getSpecifiedNamespace()
Get namespace specified on this element. This method is only intended for use by subclasses - otherwise thegetNamespace()method should instead be used.- Returns:
- namespace (
nullif none)
-
getNamespaceStyle
public int getNamespaceStyle()
Get namespace derivation style.- Returns:
- namespace style
-
setNamespaceStyle
public void setNamespaceStyle(java.lang.Integer style)
Set namespace derivation style.- Parameters:
style- (nullif none at this level)
-
getNameStyle
public int getNameStyle()
Get name style.- Returns:
- name style
-
setNameStyle
public void setNameStyle(java.lang.Integer style)
Set name style.- Parameters:
style- (nullif none at this level)
-
getNamespace
public final java.lang.String getNamespace()
Get the namespace for schema definitions. This value must be set by subclasses using thesetNamespace(String)method.- Returns:
- schema namespace
-
setNamespace
protected void setNamespace(java.lang.String ns)
Set the namespace to be used for schema definitions. This method is only intended for use by subclasses.- Parameters:
ns-
-
isPrimitiveRequired
public boolean isPrimitiveRequired(java.lang.String type)
Check if primitive value should be treated as required. If not set at any nesting level, the default istrue.- Parameters:
type- primitive type- Returns:
trueif required value,falseif not
-
isObjectRequired
public boolean isObjectRequired(java.lang.String type)
Check if object value should be treated as required. If not set at any nesting level, the default isfalse.- Parameters:
type- object type- Returns:
trueif required value,falseif not
-
isUseJavaDocs
public boolean isUseJavaDocs()
Check if JavaDocs should be used for documentation. If not set at any nesting level, the default istrue.- Returns:
- force names flag
-
convertName
public java.lang.String convertName(java.lang.String base)
Convert class or unprefixed field name to element or attribute name using current format.- Parameters:
base- class or simple field name to be converted- Returns:
- element or attribute name
-
setNameStyleText
private void setNameStyleText(java.lang.String text, IUnmarshallingContext ictx)Name style set text method. This is intended for use during unmarshalling. TODO: add validation- Parameters:
text-ictx-
-
getNameStyleText
private java.lang.String getNameStyleText()
Name style get text method. This is intended for use during marshalling.- Returns:
- text
-
setNamespaceStyleText
private void setNamespaceStyleText(java.lang.String text, IUnmarshallingContext ictx)Namespace style set text method. This is intended for use during unmarshalling. TODO: add validation- Parameters:
text-ictx-
-
getNamespaceStyleText
private java.lang.String getNamespaceStyleText()
Namespace style get text method. This is intended for use during marshalling.- Returns:
- text
-
setRequireText
private void setRequireText(java.lang.String text, IUnmarshallingContext ictx)Required set text method. This is intended for use during unmarshalling. TODO: add validation- Parameters:
text-ictx-
-
getRequireText
private java.lang.String getRequireText()
Required get text method. This is intended for use during marshalling.- Returns:
- text
-
-