Class Schema

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​Object>, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.ChildrenAccessor<Schema[]>, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.TypeAccessor, org.refcodes.mixin.ValueAccessor<Sequence>

    public class Schema
    extends HashMap<String,​Object>
    implements Map<String,​Object>, org.refcodes.mixin.ChildrenAccessor<Schema[]>, org.refcodes.mixin.TypeAccessor, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.ValueAccessor<Sequence>
    The purpose of a Schema is automatically generate documentation of serial data. It describes a portion of defined data such as a AllocSectionDecoratorSegment and its components such as Segment or Section. A type supporting its schema representation
    See Also:
    Serialized Form
    • Constructor Detail

      • Schema

        public Schema​(String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(Sequence aValue,
                      int aLength,
                      String aDescription,
                      Class<?> aType)
        Constructs a Schema with the provided arguments.
        Parameters:
        aValue - The content of the Schema providing type.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
      • Schema

        public Schema​(Sequence aValue,
                      String aVerbose,
                      int aLength,
                      String aDescription,
                      Class<?> aType)
        Constructs a Schema with the provided arguments.
        Parameters:
        aValue - The content of the Schema providing type.
        aVerbose - The verbose representation of the value.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
      • Schema

        public Schema​(Sequence aValue,
                      int aLength,
                      String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aValue - The content of the Schema providing type.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(Sequence aValue,
                      String aVerbose,
                      int aLength,
                      String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aValue - The content of the Schema providing type.
        aVerbose - The verbose representation of the value.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(String aAlias,
                      String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(String aAlias,
                      int aLength,
                      String aDescription,
                      Class<?> aType)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
      • Schema

        public Schema​(String aAlias,
                      Sequence aValue,
                      int aLength,
                      String aDescription,
                      Class<?> aType)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aValue - The content of the Schema providing type.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
      • Schema

        public Schema​(String aAlias,
                      Sequence aValue,
                      String aVerbose,
                      int aLength,
                      String aDescription,
                      Class<?> aType)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aValue - The content of the Schema providing type.
        aVerbose - The verbose representation of the value.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
      • Schema

        public Schema​(String aAlias,
                      Sequence aValue,
                      int aLength,
                      String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aValue - The content of the Schema providing type.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(String aAlias,
                      Sequence aValue,
                      String aVerbose,
                      int aLength,
                      String aDescription,
                      Class<?> aType,
                      Schema... aChildren)
        Constructs a Schema with the provided arguments.
        Parameters:
        aAlias - The alias (name) of the schema described by the Schema providing type.
        aValue - The content of the Schema providing type.
        aVerbose - The verbose representation of the value.
        aLength - The length of the Schema providing type.
        aDescription - The description of the schema described by the Schema providing type.
        aType - The type providing the this Schema instance.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
      • Schema

        public Schema​(Schema aSchema)
        Constructs a Schema with the properties of the provided Schema ("copy constructor"),.
        Parameters:
        aSchema - The Schema from which to copy the attributes.
      • Schema

        public Schema​(Schema aSchema,
                      Schema... aChildren)
        Constructs a Schema with the properties of the provided Schema ("copy constructor"),.
        Parameters:
        aSchema - The Schema from which to copy the attributes.
        aChildren - The children's Schema descriptions representing part of the Schema providing type.
    • Method Detail

      • getValue

        public Sequence getValue()
        Specified by:
        getValue in interface org.refcodes.mixin.ValueAccessor<Sequence>
      • getVerboseValue

        public String getVerboseValue()
        Retrieves the verbose representation of the value.
        Returns:
        The human readable value representation.
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface org.refcodes.mixin.DescriptionAccessor
      • getLength

        public int getLength()
        Specified by:
        getLength in interface org.refcodes.mixin.LengthAccessor
      • getAlias

        public String getAlias()
        Specified by:
        getAlias in interface org.refcodes.mixin.AliasAccessor
      • getType

        public Class<?> getType()
        Specified by:
        getType in interface org.refcodes.mixin.TypeAccessor
      • getChildren

        public Schema[] getChildren()
        Specified by:
        getChildren in interface org.refcodes.mixin.ChildrenAccessor<Schema[]>