org.jibx.binding.model
Class NameAttributes

java.lang.Object
  extended by org.jibx.binding.model.AttributeBase
      extended by org.jibx.binding.model.NameAttributes

public class NameAttributes
extends AttributeBase

Model component for name attribute group in binding definition.

Author:
Dennis M. Sosnoski

Field Summary
static StringArray s_allowedAttributes
          Enumeration of allowed attribute names
 
Constructor Summary
NameAttributes()
          Default constructor.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Get name.
 NamespaceElement getNamespace()
          Get effective namespace definition.
 String getPrefix()
          Get specified namespace prefix.
 String getUri()
          Get specified namespace URI.
 int hashCode()
           
 boolean isAttribute()
          Get flag for an attribute name.
 void setIsAttribute(boolean isattr)
          Set flag for an attribute name.
 void setName(String name)
          Set name.
 void setPrefix(String prefix)
          Set namespace prefix.
 void setUri(String uri)
          Set namespace URI.
 void validate(ValidationContext vctx)
          Validate attribute information.
 
Methods inherited from class org.jibx.binding.model.AttributeBase
prevalidate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_allowedAttributes

public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names

Constructor Detail

NameAttributes

public NameAttributes()
Default constructor.

Method Detail

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 of false) 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

public String getName()
Get name.

Returns:
name text

setName

public void setName(String name)
Set name.

Parameters:
name - text for name

getUri

public String getUri()
Get specified namespace URI.

Returns:
namespace URI (null if not set)

setUri

public void setUri(String uri)
Set namespace URI.

Parameters:
uri - namespace URI (null if not set)

getPrefix

public String getPrefix()
Get specified namespace prefix.

Returns:
namespace prefix (null if not set)

setPrefix

public void setPrefix(String prefix)
Set namespace prefix.

Parameters:
prefix - namespace prefix (null if not set)

getNamespace

public NamespaceElement getNamespace()
Get effective namespace definition. This call can only be used after validation.

Returns:
definition for namespace used by this name

validate

public void validate(ValidationContext vctx)
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. The AttributeBase.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 class AttributeBase
Parameters:
vctx - validation context

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2005-2011 jibx.org. All Rights Reserved.