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 boolean
Name represents an attribute flag.private String
Name text.private NamespaceElement
Namespace definition used by this name.private String
Namespace prefix.private String
Namespace URI.static final StringArray
Enumeration of allowed attribute names -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
Get name.Get effective namespace definition.Get specified namespace prefix.getUri()
Get specified namespace URI.int
hashCode()
boolean
Get flag for an attribute name.void
setIsAttribute
(boolean isattr) Set flag for an attribute name.void
Set name.void
Set namespace prefix.void
Set namespace URI.void
validate
(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:
true
if an attribute,false
if an element
-
getName
Get name.- Returns:
- name text
-
setName
Set name.- Parameters:
name
- text for name
-
getUri
Get specified namespace URI.- Returns:
- namespace URI (
null
if not set)
-
setUri
Set namespace URI.- Parameters:
uri
- namespace URI (null
if not set)
-
getPrefix
Get specified namespace prefix.- Returns:
- namespace prefix (
null
if not set)
-
setPrefix
Set namespace prefix.- Parameters:
prefix
- namespace prefix (null
if 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:AttributeBase
Validate 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:
validate
in classAttributeBase
- Parameters:
vctx
- validation context
-
equals
-
hashCode
public int hashCode()
-