Class ValueItem

java.lang.Object
org.jibx.schema.codegen.Item
org.jibx.schema.codegen.ValueItem

public class ValueItem extends Item
Information for an item of a predefined type to be included in code generated from schema.
Author:
Dennis M. Sosnoski
  • Field Details

    • m_type

      private final JavaType m_type
      Predefined type reference.
    • m_schemaType

      private final QName m_schemaType
      Original schema type.
    • m_attributePresent

      private boolean m_attributePresent
      Attribute data present flag.
    • m_elementPresent

      private boolean m_elementPresent
      Element data present flag.
    • m_contentPresent

      private boolean m_contentPresent
      Character data content data present flag.
  • Constructor Details

    • ValueItem

      private ValueItem(ValueItem original, Item ref, GroupItem parent)
      Copy constructor. This creates a copy with a new parent.
      Parameters:
      original -
      ref - reference (for overrides to copy; null if none)
      parent -
    • ValueItem

      ValueItem(AnnotatedBase comp, QName type, JavaType ref, GroupItem parent)
      Constructor.
      Parameters:
      comp - schema component extension
      type - schema type name
      ref - schema type equivalent (null if not appropriate)
      parent - containing structure (null if a top-level structure)
  • Method Details

    • getType

      public JavaType getType()
      Get the simple type for this value.
      Returns:
      type
    • getSchemaType

      public QName getSchemaType()
      Get schema type name.
      Returns:
      name
    • copy

      protected Item copy(Item ref, GroupItem parent)
      Copy the item under a different parent.
      Specified by:
      copy in class Item
      Parameters:
      ref - reference (for overrides to copy; null if none)
      parent -
      Returns:
      copy
    • describe

      protected String describe(int depth, boolean classified)
      Build a description of the item.
      Specified by:
      describe in class Item
      Parameters:
      depth - current nesting depth
      classified - include classification details flag
      Returns:
      description
    • isAttributePresent

      public boolean isAttributePresent()
      Check if an attribute is part of this item. This is only true for items corresponding to attribute definitions, and groupings including these items which do not define an element name.
      Returns:
      true if attribute
    • isElementPresent

      public boolean isElementPresent()
      Check if a child elements is part of this item. This is true for all items corresponding to element definitions, and all groupings which include such an item.
      Returns:
      true if content
    • isContentPresent

      public boolean isContentPresent()
      Check if character data content is part of this item. This is true for all items corresponding to simpleContent definitions, and all groupings which include such an item.
      Returns:
      true if content