Class AnnotatedBase

All Implemented Interfaces:
IComponent
Direct Known Subclasses:
AttributeElement, AttributeGroupElement, AttributeGroupRefElement, CommonCompositorBase, CommonContentBase, CommonTypeDefinition, CommonTypeDerivation, ElementElement, FacetElement, GroupElement, KeyBase, ListElement, NotationElement, SchemaLocationBase, SelectionBase, UnionElement, WildcardBase

public abstract class AnnotatedBase extends OpenAttrBase
Base class for all element structures in schema definition which support annotations. The 'id' attribute handling is also implemented in this class, since it goes together with the annotation support in the schema for schema. Finally, this class maintains the parent element relationship.
Author:
Dennis M. Sosnoski
  • Field Details

    • s_allowedAttributes

      public static final StringArray s_allowedAttributes
      Enumeration of allowed attribute names
    • m_annotation

      private AnnotationElement m_annotation
      Annotation for this element (null if none).
    • m_id

      private String m_id
      "id" attribute value.
  • Constructor Details

    • AnnotatedBase

      protected AnnotatedBase(int type)
      Constructor.
      Parameters:
      type - element type
  • Method Details

    • getAnnotation

      public final AnnotationElement getAnnotation()
      Get annotation.
      Returns:
      annotation element (null if none)
    • setAnnotation

      public final void setAnnotation(AnnotationElement ann)
      Set annotation.
      Parameters:
      ann - annotation element (null if none)
    • getId

      public String getId()
      Get "id" attribute value.
      Returns:
      id attribute value
    • setId

      public void setId(String id)
      Set "id" value for element.
      Parameters:
      id - id attribute value
    • prevalidate

      public void prevalidate(ValidationContext vctx)
      Description copied from class: SchemaBase
      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 interface IComponent
      Overrides:
      prevalidate in class SchemaBase
      Parameters:
      vctx - validation context