Package org.jibx.binding.model
Class NamespaceElement
java.lang.Object
org.jibx.binding.model.ElementBase
org.jibx.binding.model.NamespaceElement
Model component for namespace element of binding definition.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprivate intActual selected default.private StringDefault type name.private StringNamespace prefix (may benull, but not "").private StringNamespace URI.static final intstatic final StringArrayEnumeration of allowed attribute namesstatic final EnumSetFields 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 -
Method Summary
Modifier and TypeMethodDescriptionGet namespace default type name.Get prefix.getUri()Get namespace URI.booleanCheck if default namespace for attributes.booleanCheck if default namespace for elements.private voidpreSet(IUnmarshallingContext uctx) Make sure all attributes are defined.voidprevalidate(ValidationContext vctx) Prevalidate attributes of element in isolation.voidsetDefaultName(String name) Set namespace default type name.voidSet prefix.voidSet namespace URI.Methods inherited from class org.jibx.binding.model.ElementBase
getComment, name, setComment, toString, type, validate, validateAttributes
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
NODEFAULT_USAGE
public static final int NODEFAULT_USAGE- See Also:
-
ELEMENTS_USAGE
public static final int ELEMENTS_USAGE- See Also:
-
ATTRIBUTES_USAGE
public static final int ATTRIBUTES_USAGE- See Also:
-
ALLDEFAULT_USAGE
public static final int ALLDEFAULT_USAGE- See Also:
-
s_defaultEnum
-
m_defaultName
Default type name. -
m_defaultIndex
private int m_defaultIndexActual selected default. -
m_uri
Namespace URI. -
m_prefix
Namespace prefix (may benull, but not "").
-
-
Constructor Details
-
NamespaceElement
public NamespaceElement()Constructor.
-
-
Method Details
-
getPrefix
Get prefix.- Returns:
- prefix text
-
setPrefix
Set prefix.- Parameters:
text- prefix text
-
getUri
Get namespace URI.- Returns:
- namespace URI (
nullif no-namespace namespace)
-
setUri
Set namespace URI.- Parameters:
uri- namespace URI (nullif no-namespace namespace)
-
setDefaultName
Set namespace default type name.- Parameters:
name- namespace default type
-
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
-
preSet
Make sure all attributes are defined.- Parameters:
uctx- unmarshalling context
-
prevalidate
Prevalidate attributes of element in isolation.- Overrides:
prevalidatein classElementBase- Parameters:
vctx- validation context
-