Class XmlSchemaAttribute

All Implemented Interfaces:
XmlSchemaNamed, XmlSchemaNamedWithForm, XmlSchemaObjectBase, XmlSchemaAttributeGroupMember, XmlSchemaItemWithRef<XmlSchemaAttribute>, XmlSchemaItemWithRefBase

Class for attributes, representing xs:attribute. This class represents both global and nested attributes.
  • Field Details

  • Constructor Details

    • XmlSchemaAttribute

      public XmlSchemaAttribute(XmlSchema schema, boolean topLevel)
      Create a new attribute.
      Parameters:
      schema - containing scheme.
      topLevel - true if a global attribute.
  • Method Details

    • getDefaultValue

      public String getDefaultValue()
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
    • getFixedValue

      public String getFixedValue()
    • setFixedValue

      public void setFixedValue(String fixedValue)
    • getRef

      public XmlSchemaRef<XmlSchemaAttribute> getRef()
      Specified by:
      getRef in interface XmlSchemaItemWithRef<XmlSchemaAttribute>
    • getSchemaType

      public XmlSchemaSimpleType getSchemaType()
    • setSchemaType

      public void setSchemaType(XmlSchemaSimpleType schemaType)
    • getSchemaTypeName

      public QName getSchemaTypeName()
    • setSchemaTypeName

      public void setSchemaTypeName(QName schemaTypeName)
    • getUse

      public XmlSchemaUse getUse()
    • setUse

      public void setUse(XmlSchemaUse use)
    • getName

      public String getName()
      Description copied from interface: XmlSchemaNamed
      Retrieve the name.
      Specified by:
      getName in interface XmlSchemaNamed
      Returns:
      the local name of this object within its schema.
    • getParent

      public XmlSchema getParent()
      Description copied from interface: XmlSchemaNamed
      Retrieve the parent schema.
      Specified by:
      getParent in interface XmlSchemaNamed
      Returns:
      the containing schema.
    • getQName

      public QName getQName()
      Description copied from interface: XmlSchemaNamed
      Get the QName for this object. This is always the formal name that identifies this item in the schema. If the item has a form (an element or attribute), and the form is 'unqualified', this is not the appropriate QName in an instance document. For those items, the getWiredName method returns the appropriate QName for an instance document.
      Specified by:
      getQName in interface XmlSchemaNamed
      Returns:
      The qualified name of this object.
      See Also:
    • isAnonymous

      public boolean isAnonymous()
      Specified by:
      isAnonymous in interface XmlSchemaNamed
      Returns:
      true if this object has no name.
    • isTopLevel

      public boolean isTopLevel()
      Specified by:
      isTopLevel in interface XmlSchemaNamed
      Returns:
      true if this item is a top-level item of the schema; false if this item is nested inside of some other schema object.
    • setName

      public void setName(String name)
      Description copied from interface: XmlSchemaNamed
      Set the name. Set to null to render the object anonymous, or to prepare to change it to refer to some other object.
      Specified by:
      setName in interface XmlSchemaNamed
      Parameters:
      name - the name.
    • isFormSpecified

      public boolean isFormSpecified()
      Description copied from interface: XmlSchemaNamedWithForm
      True if this item has a specified form, false if it inherits from the parent schema.
      Specified by:
      isFormSpecified in interface XmlSchemaNamedWithForm
      Returns:
    • getForm

      public XmlSchemaForm getForm()
      Description copied from interface: XmlSchemaNamedWithForm
      Get the current form, which may be inherited from the parent schema. This will never return XmlSchemaForm.NONE.
      Specified by:
      getForm in interface XmlSchemaNamedWithForm
      Returns:
    • setForm

      public void setForm(XmlSchemaForm form)
      Description copied from interface: XmlSchemaNamedWithForm
      Set the schema form.
      Specified by:
      setForm in interface XmlSchemaNamedWithForm
      Parameters:
      form - Schema form. Pass in XmlSchemaForm.NONE to inherit from the parent schema.
    • getWireName

      public QName getWireName()
      Description copied from interface: XmlSchemaNamedWithForm
      The name of this item as it is sent 'over the wire' or stored in an XML file. If the form is unqualified, this has "" for a namespaceURI. Otherwise, it is the same as getQName().
      Specified by:
      getWireName in interface XmlSchemaNamedWithForm
      Returns:
    • isRef

      public boolean isRef()
      Specified by:
      isRef in interface XmlSchemaItemWithRefBase
      Returns:
      true if this object has a non-null ref.
    • getTargetQName

      public QName getTargetQName()
      Specified by:
      getTargetQName in interface XmlSchemaItemWithRefBase
      Returns:
      the Qualified Name of the target of the ref.
    • getRefBase

      public XmlSchemaRefBase getRefBase()
      Specified by:
      getRefBase in interface XmlSchemaItemWithRefBase
      Returns:
      the non-generic reference object.