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 int
static final int
static final int
private int
Actual selected default.private String
Default type name.private String
Namespace prefix (may benull
, but not "").private String
Namespace URI.static final int
static final StringArray
Enumeration of allowed attribute namesstatic final EnumSet
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 -
Method Summary
Modifier and TypeMethodDescriptionGet namespace default type name.Get prefix.getUri()
Get namespace URI.boolean
Check if default namespace for attributes.boolean
Check if default namespace for elements.private void
preSet
(IUnmarshallingContext uctx) Make sure all attributes are defined.void
prevalidate
(ValidationContext vctx) Prevalidate attributes of element in isolation.void
setDefaultName
(String name) Set namespace default type name.void
Set prefix.void
Set 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 (
null
if no-namespace namespace)
-
setUri
Set namespace URI.- Parameters:
uri
- namespace URI (null
if 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:
true
if default namespace for attributes,false
if not
-
isElementDefault
public boolean isElementDefault()Check if default namespace for elements. This method is only meaningful after a call toprevalidate(ValidationContext)
.- Returns:
true
if default namespace for elements,false
if not
-
preSet
Make sure all attributes are defined.- Parameters:
uctx
- unmarshalling context
-
prevalidate
Prevalidate attributes of element in isolation.- Overrides:
prevalidate
in classElementBase
- Parameters:
vctx
- validation context
-