Package org.jibx.schema.attributes
Class AttributeBase
- java.lang.Object
-
- org.jibx.schema.attributes.AttributeBase
-
- All Implemented Interfaces:
IComponent
- Direct Known Subclasses:
DefRefAttributeGroup
,FormChoiceAttribute
,OccursAttributeGroup
,TypeAttribute
public class AttributeBase extends java.lang.Object implements IComponent
Base class for schema attributes and attribute groups. This just provides a link to the owning element, along with dummy implementations of the validation methods.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private SchemaBase
m_owner
Owning element.-
Fields inherited from interface org.jibx.schema.IComponent
SCHEMA_NAMESPACE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AttributeBase(SchemaBase owner)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemaBase
getOwner()
Get owning element.void
prevalidate(ValidationContext vctx)
Prevalidate component information.void
validate(ValidationContext vctx)
Validate component information.
-
-
-
Field Detail
-
m_owner
private final SchemaBase m_owner
Owning element.
-
-
Constructor Detail
-
AttributeBase
protected AttributeBase(SchemaBase owner)
Constructor.- Parameters:
owner
- owning element
-
-
Method Detail
-
getOwner
public final SchemaBase getOwner()
Get owning element.- Returns:
- owning element (cannot be
null
)
-
prevalidate
public void prevalidate(ValidationContext vctx)
Prevalidate component information. The prevalidation step is used to check isolated aspects of a component, such as the settings for enumerated values. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.- Specified by:
prevalidate
in interfaceIComponent
- Parameters:
vctx
- validation context
-
validate
public void validate(ValidationContext vctx)
Validate component information. The validation step is used for checking the interactions between components, such as name references to other components. Theprevalidate(org.jibx.schema.validation.ValidationContext)
method will always be called for every component in the schema definition before this method is called for any component. This empty base class implementation should be overridden by each subclass that requires validation handling.- Specified by:
validate
in interfaceIComponent
- Parameters:
vctx
- validation context
-
-