com.ihr.xbrl.om.taxonomy

## Class XBRLArcroleType

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.taxonomy.XBRLRoleAndArcroleTypes
    - - com.ihr.xbrl.om.taxonomy.XBRLArcroleType

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, XBRLRelationshipPoint, Thinable, XBRLValidation, XMLHasParent, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<XBRLRoleType>, javax.xml.namespace.NamespaceContext

      public class XBRLArcroleType
      extends XBRLRoleAndArcroleTypes
      implements java.io.Serializable

  This class represents an arcrole type definition in a DTS.

  An arcrole type definition can be of 3 types:

  1. Static: defined in the XBRL 2.1 specification without a real declaration of link:arcroleType
  2. Regular: defined in a linkbase and declared using link:arcroleType and referenced using link:arcroleRef
  3. Virtual: used in a linkbase that is not generic linkbase and not a linkbase defined in the XBRL 2.1 specification and not declared using link:arcroleType
  The XBRL 2.1 specification defines 3 possible values for the cycles on networks using arcroleTypes. This type defines constants ANY, UNDIRECTED and NONE as possible values for the cycles Allowed property of an arcrole type definition.
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation

      `XBRLValidation.Direction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ANY` ANY cycle is allowed (bitmap), DIRECTED and UNDIRECTED
    `static javax.xml.namespace.QName` | `arcroleTypeQName` The Constant arcroleTypeQName.
    `static int` | `NONE` NONE (no) cycles are allowed, this includes DIRECTED and UNDIRECTED cycles detection.
    `static XBRLArcroleType` | `STANDARD_CONCEPT_LABEL` The standard concept label.
    `static XBRLArcroleType` | `STANDARD_CONCEPT_REFERENCE` The standard concept reference.
    `static XBRLArcroleType` | `STANDARD_ESSENCE_ALIAS` The standard essence alias.
    `static XBRLArcroleType` | `STANDARD_FACT_FOOTNOTE` Static arcroles.
    `static XBRLArcroleType` | `STANDARD_GENERAL_SPECIAL` The standard general special.
    `static XBRLArcroleType` | `STANDARD_PARENT_CHILD` The standard parent child.
    `static XBRLArcroleType` | `STANDARD_REQUIRES_ELEMENT` The standard requires element.
    `static XBRLArcroleType` | `STANDARD_SIMILAR_TUPLES` The standard similar tuples.
    `static XBRLArcroleType` | `STANDARD_SUMMATION_ITEM` The standard summation item.
    `static int` | `UNDIRECTED` UNDIRECTED cycles are allowed (bitmap).

    - ### Fields inherited from class com.ihr.xbrl.om.XMLFragment

      `CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, HIDE_COMMON_ACCURACY, idQName, NO_POSITION, OrderComparator, OrderComparator2, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLArcroleType(DTSContainer newDTS)` Creates a "virtual" arcrole type.
    `XBRLArcroleType(DTSContainer dts, java.lang.String uri, int cyclesAllowed)` Creates a new XBRLArcroleType for the specific values of the uri and cyclesAllowed.
    `XBRLArcroleType(DTSContainer newDTS, XBRLArcroleType other)` Instantiates a new XBRL arcrole type.
    `XBRLArcroleType(XBRLArcroleType other)` Instantiates a new XBRL arcrole type.
    `XBRLArcroleType(XBRLTaxonomy parent, net.sf.saxon.s9api.XdmNode node)` Creates a new XBRLArcroleType object from a node in a file.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addUse(XBRLRelationship here)` Adds the use.
    `void` | `clear()` Frees-up the memory used by this object.
    `void` | `delUse(XBRLRelationship rel)` Del use.
    `boolean` | `equals(java.lang.Object other)` Sets a new XPathFunctionResolver for this object.
    `org.jdom.Element` | `generateNode(boolean relativize, java.net.URI base)` Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
    `XBRLArcroleRef` | `getArcroleRef(XBRLDocument parent)` Creates an XBRLArcroleRef object that points to this arcroleRef and that can be serialized.
    `int` | `getCyclesAllowed()` Returns an integer constant according to the value of the cyclesAllowed attribute on the arcrole type definition.
    `static java.lang.String` | `getCyclesAllowed(int code)` Gets the cycles allowed.
    `static java.lang.Integer` | `getCyclesAllowed(java.lang.String code)` Gets the cycles allowed.
    `java.lang.String` | `getFriendlyName()` Returns a string description that represents the element content in a form that users can understand.
    `java.util.Iterator<XBRLRelationship>` | `getUses()` Access to the [arcrole uses] property The returned objects in the iterator are instances of XBRLRelationship elements.
    `int` | `hashCode()`
    `void` | `setCyclesAllowed(int cyclesAllowedCode)` Sets the cycles allowed.
    `java.lang.String` | `toString()` Returns the XML representation of this object as an String.

    - ### Methods inherited from class com.ihr.xbrl.om.taxonomy.XBRLRoleAndArcroleTypes

      `addRef, addUsedOn, compareTo, generateLocatorToNode, getDefinition, getElements, getFriendlyName, getHRefURI, getParent, getURI, getUsedOn, getValidationReport, invalidate, invalidate, isOnValidation, isStatic, isUsedOn, isVirtual, removeUsedOn, sameUsedOn, setDefinition, setId, setParent, setStatic, setURI, setVirtual, validate`

    - ### Methods inherited from class com.ihr.xbrl.om.XMLFragment

      `addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElementsHashCode, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getGenericLabelText, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticContext, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathExecutable, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, isXdmDocumentAttached, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolve_equal2, resolveHRef, resolveHRef, s_equal2, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setRegenerateNodeIfnotFound, setValue, setValue, setVariablesDefined, size, thin, valueEquals, xEqual`

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

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

- - ### Field Detail

    - #### arcroleTypeQName

          public static final javax.xml.namespace.QName arcroleTypeQName

      The Constant arcroleTypeQName.

    - #### ANY

          public static final int ANY

      ANY cycle is allowed (bitmap), DIRECTED and UNDIRECTED
      See Also:
        Constant Field Values

    - #### UNDIRECTED

          public static final int UNDIRECTED

      UNDIRECTED cycles are allowed (bitmap). DIRECTED cycles are not allowed.
      See Also:
        Constant Field Values

    - #### NONE

          public static final int NONE

      NONE (no) cycles are allowed, this includes DIRECTED and UNDIRECTED cycles detection.
      See Also:
        Constant Field Values

    - #### STANDARD_FACT_FOOTNOTE

          public static XBRLArcroleType STANDARD_FACT_FOOTNOTE

      Static arcroles.

    - #### STANDARD_CONCEPT_LABEL

          public static XBRLArcroleType STANDARD_CONCEPT_LABEL

      The standard concept label.

    - #### STANDARD_CONCEPT_REFERENCE

          public static XBRLArcroleType STANDARD_CONCEPT_REFERENCE

      The standard concept reference.

    - #### STANDARD_PARENT_CHILD

          public static XBRLArcroleType STANDARD_PARENT_CHILD

      The standard parent child.

    - #### STANDARD_SUMMATION_ITEM

          public static XBRLArcroleType STANDARD_SUMMATION_ITEM

      The standard summation item.

    - #### STANDARD_GENERAL_SPECIAL

          public static XBRLArcroleType STANDARD_GENERAL_SPECIAL

      The standard general special.

    - #### STANDARD_ESSENCE_ALIAS

          public static XBRLArcroleType STANDARD_ESSENCE_ALIAS

      The standard essence alias.

    - #### STANDARD_SIMILAR_TUPLES

          public static XBRLArcroleType STANDARD_SIMILAR_TUPLES

      The standard similar tuples.

    - #### STANDARD_REQUIRES_ELEMENT

          public static XBRLArcroleType STANDARD_REQUIRES_ELEMENT

      The standard requires element.

  - ### Constructor Detail

    - #### XBRLArcroleType

          public XBRLArcroleType(XBRLTaxonomy parent,
                         net.sf.saxon.s9api.XdmNode node)
                          throws XBRLValidationException

      Creates a new XBRLArcroleType object from a node in a file.
      Parameters:
        `parent` - the parent
        `node` - the node
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### XBRLArcroleType

          public XBRLArcroleType(DTSContainer dts,
                         java.lang.String uri,
                         int cyclesAllowed)

      Creates a new XBRLArcroleType for the specific values of the uri and cyclesAllowed. The new arcrole type will be declared as regular arcrole so it shall be assigned a taxonomy parent. The new arcrole type has no parent assigned until `XBRLRoleAndArcroleTypes.setParent(XBRLTaxonomy)` is called.
      Parameters:
        `dts` - the dts
        `uri` - the uri
        `cyclesAllowed` - the cycles allowed

    - #### XBRLArcroleType

          public XBRLArcroleType(XBRLArcroleType other)

      Instantiates a new XBRL arcrole type.
      Parameters:
        `other` - the other

    - #### XBRLArcroleType

          public XBRLArcroleType(DTSContainer newDTS,
                         XBRLArcroleType other)

      Instantiates a new XBRL arcrole type.
      Parameters:
        `newDTS` - the new dts
        `other` - the other

    - #### XBRLArcroleType

          public XBRLArcroleType(DTSContainer newDTS)

      Creates a "virtual" arcrole type. Change properties (included the virtual property if this is going to be serialized) after creation
      Parameters:
        `newDTS` - the new dts

  - ### Method Detail

    - #### addUse

          public void addUse(XBRLRelationship here)

      Adds the use.
      Parameters:
        `here` - the here

    - #### delUse

          public void delUse(XBRLRelationship rel)

      Del use.
      Parameters:
        `rel` - the rel

    - #### getUses

          public java.util.Iterator<XBRLRelationship> getUses()

      Access to the [arcrole uses] property The returned objects in the iterator are instances of XBRLRelationship elements.
      Returns:
        Iterator

    - #### getCyclesAllowed

          public int getCyclesAllowed()

      Returns an integer constant according to the value of the cyclesAllowed attribute on the arcrole type definition.
      - the value 0 means ANY
      - the value 1 means UNDIRECTED
      - the value 2 means DIRECTED
      - the value 3 means NONE
      Note that the value 2 is not supported by the XBRL 2.1 specification
      Returns:
        integer constant

    - #### setCyclesAllowed

          public void setCyclesAllowed(int cyclesAllowedCode)

      Sets the cycles allowed.
      Parameters:
        `cyclesAllowedCode` - the new cycles allowed

    - #### getCyclesAllowed

          public static java.lang.String getCyclesAllowed(int code)

      Gets the cycles allowed.
      Parameters:
        `code` - the code
      Returns:
        the cycles allowed

    - #### getCyclesAllowed

          public static java.lang.Integer getCyclesAllowed(java.lang.String code)

      Gets the cycles allowed.
      Parameters:
        `code` - the code
      Returns:
        the cycles allowed

    - #### toString

          public java.lang.String toString()

      Description copied from class: `XMLFragment`
      Returns the XML representation of this object as an String.
      Overrides:
        `toString` in class `XMLFragment`
      Returns:
        the string

    - #### equals

          public boolean equals(java.lang.Object other)

      Description copied from class: `XMLFragment`
      Sets a new XPathFunctionResolver for this object.
      Overrides:
        `equals` in class `XBRLRoleAndArcroleTypes`
      Parameters:
        `other` - the other
      Returns:
        true, if successful

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `XBRLRoleAndArcroleTypes`

    - #### getArcroleRef

          public XBRLArcroleRef getArcroleRef(XBRLDocument parent)

      Creates an XBRLArcroleRef object that points to this arcroleRef and that can be serialized.
      Parameters:
        `parent` - the parent
      Returns:
        XBRLArcroleRef

    - #### clear

          public void clear()

      Frees-up the memory used by this object.
      Overrides:
        `clear` in class `XMLFragment`

    - #### generateNode

          public org.jdom.Element generateNode(boolean relativize,
                                      java.net.URI base)
                                        throws XBRLSerializationException

      Description copied from class: `XMLFragment`
      Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class
      Overrides:
        `generateNode` in class `XBRLRoleAndArcroleTypes`
      Parameters:
        `relativize` - boolean indicating if URIs should be relativized to the base URI (see next argument)
        `base` - the URI to which some attributes of this object should be relativided
      Returns:
        a clone of the surrounding jdom Element so it can be incorporated into multiple trees
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### getFriendlyName

          public java.lang.String getFriendlyName()

      Description copied from class: `XMLFragment`
      Returns a string description that represents the element content in a form that users can understand. This method may be overridden by parent classes.

      Remarks, this method may return very long names not suitable for user interface

      Overrides:
        `getFriendlyName` in class `XMLFragment`
      Returns:
        Non empty String. Internationalization is enabled