Class XMLType

    • Field Detail

      • NULL_ARGUMENT

        protected static java.lang.String NULL_ARGUMENT
        Error message for a null argument
    • Constructor Detail

      • XMLType

        public XMLType()
        Default constructor
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns the Id for this ComplexType, or null if no Id has been set.
        Returns:
        the Id for this ComplexType, or null if no Id has been set.
      • getName

        public java.lang.String getName()
        Returns the name of this type (null if none was defined)
        Returns:
        the name of this type (null if none was defined)
      • setName

        public void setName​(java.lang.String name)
        Sets the name of this type
        Parameters:
        name - of the type
      • isAnyType

        public final boolean isAnyType()
        Returns true if this XMLType is an AnyType
        Returns:
        true if this XMLType is an AnyType
      • isComplexType

        public final boolean isComplexType()
        Returns true if this XMLType is a ComplexType
        Returns:
        true if this XMLType is a ComplexType
      • isSimpleType

        public final boolean isSimpleType()
        Returns true if this XMLType is a SimpleType
        Returns:
        true if this XMLType is a SimpleType
      • getSchema

        public Schema getSchema()
        Returns the schema to which this type belongs
        Returns:
        the Schema to which this type belongs
      • setSchema

        public void setSchema​(Schema schema)
        Sets the name of this SimpleType
        Parameters:
        schema - the Schema to which this Simpletype belongs
      • getBaseType

        public XMLType getBaseType()
        Returns the base type that this type inherits from. If this type is a Simpletype that is a built in primitive type then null is returned.
        Returns:
        the parent type.
      • setBaseType

        public void setBaseType​(XMLType baseType)
        Sets the base type for this datatype
        Parameters:
        baseType - the base type which this datatype inherits from
      • getDerivationMethod

        public java.lang.String getDerivationMethod()
        Gets the name of the derivation method used to derive this type from its parent. null for primitive types.
      • setDerivationMethod

        public void setDerivationMethod​(java.lang.String derivationMethod)
        Sets the derivation method name
      • setId

        public void setId​(java.lang.String id)
        Sets the Id for this XMLType. The Id must be globally unique within the Schema. Use a null value to remove the Id.
        Parameters:
        id - the unique Id for this XMLType
      • setParent

        protected abstract void setParent​(Structure parent)
        Sets the parent for this XMLType
        Parameters:
        parent - the parent Structure for this XMLType
      • getType

        XMLType getType()
        Returns the type this type "really" represents ("this" in most cases), provides the indirection needed by references and forward declarations.
        Returns:
        the type this type "really" represents
      • getBaseTypeName

        public java.lang.String getBaseTypeName()
        If this type has a base type, this returns its name.
        Returns null otherwise.
        Returns:
        Base type's name if available, null otherwise.