Class XmlSchemaAttrInfo

java.lang.Object
org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo

public class XmlSchemaAttrInfo extends Object
This represents a complete XML Schema Attribute, after references are followed and types are defined.
  • Field Details

  • Constructor Details

    • XmlSchemaAttrInfo

      public XmlSchemaAttrInfo(XmlSchemaAttribute attribute, XmlSchemaTypeInfo attrType)
      Constructs a new XmlSchemaAttrInfo from the provided XmlSchemaAttribute and XmlSchemaTypeInfo.

      The XmlSchemaAttribute represents the XML attribute definition after any references have been resolved, and merged with the global definition.

      Parameters:
      attribute - The underlying XmlSchemaAttribute.
      attrType - The attribute's type.
    • XmlSchemaAttrInfo

      XmlSchemaAttrInfo(XmlSchemaAttribute attribute, boolean isTopLevel)
    • XmlSchemaAttrInfo

      XmlSchemaAttrInfo(XmlSchemaAttribute attribute)
  • Method Details

    • getAttribute

      public XmlSchemaAttribute getAttribute()
      The underlying XmlSchemaAttribute. If the attribute was originally a reference, this instance is merged with the global attribute it referenced.

      The only exception is with XmlSchemaAttribute.isTopLevel(). A copy of the XmlSchemaAttribute may have been made in order to properly merge a local reference with a global definition. When that happens, XmlSchemaAttribute.isTopLevel() may not return the correct result. Use isTopLevel() instead.

    • getType

      public XmlSchemaTypeInfo getType()
      The attribute's value type.
    • isTopLevel

      public boolean isTopLevel()
      Whether the attribute exists in the global namespace. Because a copy of XmlSchemaAttribute may have been made in order to merge a local reference with the global definition, XmlSchemaAttribute.isTopLevel() may no longer be accurate.
    • setType

      void setType(XmlSchemaTypeInfo attrType)