Package org.jibx.binding.model
Class NameAttributes
java.lang.Object
org.jibx.binding.model.AttributeBase
org.jibx.binding.model.NameAttributes
Model component for name attribute group in binding definition.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanName represents an attribute flag.private StringName text.private NamespaceElementNamespace definition used by this name.private StringNamespace prefix.private StringNamespace URI.static final StringArrayEnumeration of allowed attribute names -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Get name.Get effective namespace definition.Get specified namespace prefix.getUri()Get specified namespace URI.inthashCode()booleanGet flag for an attribute name.voidsetIsAttribute(boolean isattr) Set flag for an attribute name.voidSet name.voidSet namespace prefix.voidSet namespace URI.voidvalidate(ValidationContext vctx) Validate attribute information.Methods inherited from class org.jibx.binding.model.AttributeBase
prevalidate
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
m_name
Name text. -
m_uri
Namespace URI. -
m_prefix
Namespace prefix. -
m_isAttribute
private boolean m_isAttributeName represents an attribute flag. -
m_namespace
Namespace definition used by this name.
-
-
Constructor Details
-
NameAttributes
public NameAttributes()Default constructor.
-
-
Method Details
-
setIsAttribute
public void setIsAttribute(boolean isattr) Set flag for an attribute name. This information is necessary for resolving the namespace definition to be used with a name, but has to be determined by the element owning this attribute group. It must be set (if different from the default offalse) prior to validation.- Parameters:
isattr- flag for name represents an attribute
-
isAttribute
public boolean isAttribute()Get flag for an attribute name.- Returns:
trueif an attribute,falseif an element
-
getName
Get name.- Returns:
- name text
-
setName
Set name.- Parameters:
name- text for name
-
getUri
Get specified namespace URI.- Returns:
- namespace URI (
nullif not set)
-
setUri
Set namespace URI.- Parameters:
uri- namespace URI (nullif not set)
-
getPrefix
Get specified namespace prefix.- Returns:
- namespace prefix (
nullif not set)
-
setPrefix
Set namespace prefix.- Parameters:
prefix- namespace prefix (nullif not set)
-
getNamespace
Get effective namespace definition. This call can only be used after validation.- Returns:
- definition for namespace used by this name
-
validate
Description copied from class:AttributeBaseValidate attribute information. The validation step is used for checking the interactions between attributes, such as references to named elements and namespace usage. TheAttributeBase.prevalidate(org.jibx.binding.model.ValidationContext)method will always be called for every component in the binding definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.- Overrides:
validatein classAttributeBase- Parameters:
vctx- validation context
-
equals
-
hashCode
public int hashCode()
-