com.ihr.xbrl.om.taxonomy

## Class XSDAttributeDefinition

- java.lang.Object
- - com.ihr.xbrl.om.taxonomy.XSDAttributeDefinition

-     public class XSDAttributeDefinition
      extends java.lang.Object

  Represents an attribute definition in an XML Schema. This class contains information about the content of the attribute definition in an XML shema type.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `OPTIONAL` The Constant OPTIONAL.
    `static int` | `PROHIBITED` The Constant PROHIBITED.
    `static int` | `REQUIRED` The Constant REQUIRED.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSDAttributeDefinition(DTSContainer dts, net.sf.saxon.s9api.XdmNode node)` Instantiates a new XSD attribute definition.
    `XSDAttributeDefinition(java.lang.String name, java.lang.String use, javax.xml.namespace.QName type, java.lang.String _default, java.lang.String fixed, java.lang.String form, java.lang.String id, javax.xml.namespace.QName ref)` Creates a new XSDAttribute definition some of the attributes are optional and can be reported using null.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `org.jdom.Element` | `generateElement(org.jdom.Namespace xsNs)` Creates an element definition that represents this attribute definition in an XML Schema.
    `java.lang.String` | `getDefault()` Gets the default.
    `java.lang.String` | `getFixed()` Gets the fixed.
    `java.lang.String` | `getForm()` Gets the form.
    `java.lang.String` | `getId()` Gets the id.
    `java.lang.String` | `getName()` Gets the name.
    `javax.xml.namespace.QName` | `getRef()` Gets the ref.
    `javax.xml.namespace.QName` | `getType()` Gets the type.
    `java.lang.String` | `getUse()` Gets the use.
    `static java.lang.String` | `getUse(java.lang.Integer use)` Gets the use.
    `static java.lang.Integer` | `getUse(java.lang.String strUse)` Gets the use.
    `int` | `hashCode()`
    `void` | `setDefault(java.lang.String _default)` Sets the default.
    `void` | `setFixed(java.lang.String fixed)` Sets the fixed.
    `void` | `setForm(java.lang.String form)` Sets the form.
    `void` | `setId(java.lang.String id)` Sets the id.
    `void` | `setName(java.lang.String name)` Sets the name.
    `void` | `setRef(javax.xml.namespace.QName ref)` Sets the ref.
    `void` | `setType(javax.xml.namespace.QName type)` Sets the type.
    `void` | `setUse(java.lang.String use)` Sets the use.

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OPTIONAL

          public static final int OPTIONAL

      The Constant OPTIONAL.
      See Also:
        Constant Field Values

    - #### PROHIBITED

          public static final int PROHIBITED

      The Constant PROHIBITED.
      See Also:
        Constant Field Values

    - #### REQUIRED

          public static final int REQUIRED

      The Constant REQUIRED.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XSDAttributeDefinition

          public XSDAttributeDefinition(java.lang.String name,
                                java.lang.String use,
                                javax.xml.namespace.QName type,
                                java.lang.String _default,
                                java.lang.String fixed,
                                java.lang.String form,
                                java.lang.String id,
                                javax.xml.namespace.QName ref)
                                 throws XBRLInconsistentDTSException

      Creates a new XSDAttribute definition some of the attributes are optional and can be reported using null. Some others are not compatible like ref and name attributes.
      Parameters:
        `name` - the name
        `use` - the use
        `type` - the type
        `_default` - the _default
        `fixed` - the fixed
        `form` - the form
        `id` - the id
        `ref` - the ref
      Throws:
        `XBRLInconsistentDTSException` - raised if there are inconsistencies in the definition of the attribute

    - #### XSDAttributeDefinition

          public XSDAttributeDefinition(DTSContainer dts,
                                net.sf.saxon.s9api.XdmNode node)
                                 throws XBRLInconsistentDTSException

      Instantiates a new XSD attribute definition.
      Parameters:
        `dts` - the dts
        `node` - the node
      Throws:
        `XBRLInconsistentDTSException` - the XBRL inconsistent dts exception

  - ### Method Detail

    - #### getUse

          public static java.lang.Integer getUse(java.lang.String strUse)
                                          throws java.lang.IllegalArgumentException

      Gets the use.
      Parameters:
        `strUse` - the str use
      Returns:
        the use
      Throws:
        `java.lang.IllegalArgumentException` - the illegal argument exception

    - #### getUse

          public static java.lang.String getUse(java.lang.Integer use)

      Gets the use.
      Parameters:
        `use` - the use
      Returns:
        the use

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getName

          public java.lang.String getName()

      Gets the name.
      Returns:
        the name

    - #### setName

          public void setName(java.lang.String name)

      Sets the name.
      Parameters:
        `name` - the name to set

    - #### getUse

          public java.lang.String getUse()

      Gets the use.
      Returns:
        the use

    - #### setUse

          public void setUse(java.lang.String use)

      Sets the use.
      Parameters:
        `use` - the use to set

    - #### getType

          public javax.xml.namespace.QName getType()

      Gets the type.
      Returns:
        the type

    - #### setType

          public void setType(javax.xml.namespace.QName type)

      Sets the type.
      Parameters:
        `type` - the type to set

    - #### getDefault

          public java.lang.String getDefault()

      Gets the default.
      Returns:
        the _default

    - #### setDefault

          public void setDefault(java.lang.String _default)

      Sets the default.
      Parameters:
        `_default` - the _default to set

    - #### getFixed

          public java.lang.String getFixed()

      Gets the fixed.
      Returns:
        the fixed

    - #### setFixed

          public void setFixed(java.lang.String fixed)

      Sets the fixed.
      Parameters:
        `fixed` - the fixed to set

    - #### getForm

          public java.lang.String getForm()

      Gets the form.
      Returns:
        the form

    - #### setForm

          public void setForm(java.lang.String form)

      Sets the form.
      Parameters:
        `form` - the form to set

    - #### getId

          public java.lang.String getId()

      Gets the id.
      Returns:
        the id

    - #### setId

          public void setId(java.lang.String id)

      Sets the id.
      Parameters:
        `id` - the id to set

    - #### getRef

          public javax.xml.namespace.QName getRef()

      Gets the ref.
      Returns:
        the ref

    - #### setRef

          public void setRef(javax.xml.namespace.QName ref)

      Sets the ref.
      Parameters:
        `ref` - the ref to set

    - #### generateElement

          public org.jdom.Element generateElement(org.jdom.Namespace xsNs)
                                           throws XBRLSerializationException

      Creates an element definition that represents this attribute definition in an XML Schema.
      Parameters:
        `xsNs` - Namespace so no need to define it multiple times
      Returns:
        Element
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception