Package org.jibx.binding.model
Class NamespaceElement
- java.lang.Object
-
- org.jibx.binding.model.ElementBase
-
- org.jibx.binding.model.NamespaceElement
-
public class NamespaceElement extends ElementBase
Model component for namespace element of binding definition.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description static intALLDEFAULT_USAGEstatic intATTRIBUTES_USAGEstatic intELEMENTS_USAGEstatic intNODEFAULT_USAGEstatic StringArrays_allowedAttributesEnumeration of allowed attribute namesstatic org.jibx.runtime.EnumSets_defaultEnum-
Fields inherited from class org.jibx.binding.model.ElementBase
BINDING_ELEMENT, COLLECTION_ELEMENT, ELEMENT_NAMES, FORMAT_ELEMENT, INCLUDE_ELEMENT, INPUT_ELEMENT, MAPPING_ELEMENT, NAMESPACE_ELEMENT, OUTPUT_ELEMENT, SPLIT_ELEMENT, STRUCTURE_ELEMENT, TEMPLATE_ELEMENT, VALUE_ELEMENT
-
-
Constructor Summary
Constructors Constructor Description NamespaceElement()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultName()Get namespace default type name.StringgetPrefix()Get prefix.StringgetUri()Get namespace URI.booleanisAttributeDefault()Check if default namespace for attributes.booleanisElementDefault()Check if default namespace for elements.voidprevalidate(ValidationContext vctx)Prevalidate attributes of element in isolation.voidsetDefaultName(String name)Set namespace default type name.voidsetPrefix(String text)Set prefix.voidsetUri(String uri)Set namespace URI.-
Methods inherited from class org.jibx.binding.model.ElementBase
getComment, name, setComment, toString, type, validate, validateAttributes
-
-
-
-
Field Detail
-
s_allowedAttributes
public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names
-
NODEFAULT_USAGE
public static final int NODEFAULT_USAGE
- See Also:
- Constant Field Values
-
ELEMENTS_USAGE
public static final int ELEMENTS_USAGE
- See Also:
- Constant Field Values
-
ATTRIBUTES_USAGE
public static final int ATTRIBUTES_USAGE
- See Also:
- Constant Field Values
-
ALLDEFAULT_USAGE
public static final int ALLDEFAULT_USAGE
- See Also:
- Constant Field Values
-
s_defaultEnum
public static final org.jibx.runtime.EnumSet s_defaultEnum
-
-
Method Detail
-
getPrefix
public String getPrefix()
Get prefix.- Returns:
- prefix text
-
setPrefix
public void setPrefix(String text)
Set prefix.- Parameters:
text- prefix text
-
getUri
public String getUri()
Get namespace URI.- Returns:
- namespace URI (
nullif no-namespace namespace)
-
setUri
public void setUri(String uri)
Set namespace URI.- Parameters:
uri- namespace URI (nullif no-namespace namespace)
-
setDefaultName
public void setDefaultName(String name)
Set namespace default type name.- Parameters:
name- namespace default type
-
getDefaultName
public String getDefaultName()
Get namespace default type name.- Returns:
- namespace default type name
-
isAttributeDefault
public boolean isAttributeDefault()
Check if default namespace for attributes. This method is only meaningful after a call toprevalidate(ValidationContext).- Returns:
trueif default namespace for attributes,falseif not
-
isElementDefault
public boolean isElementDefault()
Check if default namespace for elements. This method is only meaningful after a call toprevalidate(ValidationContext).- Returns:
trueif default namespace for elements,falseif not
-
prevalidate
public void prevalidate(ValidationContext vctx)
Prevalidate attributes of element in isolation.- Overrides:
prevalidatein classElementBase- Parameters:
vctx- validation context
-
-