com.ihr.xbrl.om.taxonomy

## Class XBRLRoleAndArcroleTypes

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

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, XBRLRelationshipPoint, Thinable, XBRLValidation, XMLHasParent, java.lang.Cloneable, java.lang.Comparable<XBRLRoleType>, javax.xml.namespace.NamespaceContext
  Direct Known Subclasses:
    XBRLArcroleType, XBRLRoleType

      public abstract class XBRLRoleAndArcroleTypes
      extends XMLFragment
      implements XBRLValidation, java.lang.Comparable<XBRLRoleType>

  The Class XBRLRoleAndArcroleTypes.

- - ### Nested Class Summary

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

      `XBRLValidation.Direction`

  - ### Field Summary

    - ### 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
    `XBRLRoleAndArcroleTypes(DTSContainer newDTS, XBRLRoleAndArcroleTypes other)` Instantiates a new XBRL role and arcrole types.
    `XBRLRoleAndArcroleTypes(XBRLRoleAndArcroleTypes other)` Instantiates a new XBRL role and arcrole types.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRef(XBRLDocument doc)` When a role or arcrole is referenced via roleRef its is annotated here.
    `void` | `addUsedOn(XBRLUsedOn on)` Adds the used on.
    `int` | `compareTo(XBRLRoleType o)`
    `boolean` | `equals(java.lang.Object other)` Sets a new XPathFunctionResolver for this object.
    `XBRLLocator` | `generateLocatorToNode(boolean relativize, java.net.URI base)` Generates an XBRLLocator object pointing to this node.
    `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
    `java.lang.String` | `getDefinition()` Access to the [Definition] property.
    `java.util.Iterator<XMLFragment>` | `getElements()` For complex type resources this returns an iterator with all children XML fragments This method may be overwriten by other classes in the hierarchy.
    `java.lang.String` | `getFriendlyName(int modifiers, LabelsProvider lp)` Returns a string description that represents the element content in a form that users can understand.
    `java.net.URI` | `getHRefURI()` Creates a URI pointing to the roleType or arcroleType .
    `XBRLTaxonomy` | `getParent()` access to the [Parent] property.
    `java.lang.String` | `getURI()` Access to the [Role URI]/[Arcrole URI] property.
    `java.util.Iterator<XBRLUsedOn>` | `getUsedOn()` Gets the used on.
    `XBRLValidationReport` | `getValidationReport()` Access to the last stored validation report.
    `int` | `hashCode()`
    `void` | `invalidate()` Invalidates the XBRLFact for XBRL validation.
    `boolean` | `invalidate(XBRLValidation.Direction dir)` Invalidates this object and the elements in the XML tree according with the parameter in dir This method is used by GUI tools that requires to reset validation before a manual validation cycle is started.
    `boolean` | `isOnValidation()` When validation is a recursive process, this function returns true if the object going to be validated is already under validation.
    `boolean` | `isStatic()` Returns true for role types and arcrole types defined in the XBRL 2.1 specification
    `boolean` | `isUsedOn(javax.xml.namespace.QName here)` returns true if the element represented by the QName can legally use this XBRLRoleType This method considers roles defined in the XBRL 2.1 specification, virtual roles undefined in the DTS and used in generic linkbases and roles properly defined in XBRL linkbases
    `boolean` | `isVirtual()` Returns true for role types not referenced using roleRef elements or arcrole type not referenced via arcroleRef elements but valid because they are used within custom extended linkbases.
    `void` | `removeUsedOn(XBRLUsedOn on)` Removes the used on.
    `boolean` | `sameUsedOn(XBRLRoleAndArcroleTypes o)` Same used on.
    `void` | `setDefinition(java.lang.String newValue)` Sets the definition string for a role and arcrole types.
    `void` | `setId(java.lang.String id)` Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment.
    `void` | `setParent(XBRLTaxonomy newParent)` Changes the [Parent] property.
    `void` | `setStatic(boolean newValue)` Used by the API when a static role or arcrole URI is defined.
    `void` | `setURI(java.lang.String newURI)` Sets or changes the URI of this role type.
    `void` | `setVirtual(boolean newValue)` Used by the APO when a virtual role or arcrole URI is defined.
    `XBRLValidationReport` | `validate(XBRLPlugInProcessor proc)` Executes validation on the instance object and returns a validation report.

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

      `addAttribute, addChild, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clear, 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, getFriendlyName, 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, toString, valueEquals, xEqual`

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

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

- - ### Constructor Detail

    - #### XBRLRoleAndArcroleTypes

          public XBRLRoleAndArcroleTypes(XBRLRoleAndArcroleTypes other)

      Instantiates a new XBRL role and arcrole types.
      Parameters:
        `other` - the other

    - #### XBRLRoleAndArcroleTypes

          public XBRLRoleAndArcroleTypes(DTSContainer newDTS,
                                 XBRLRoleAndArcroleTypes other)

      Instantiates a new XBRL role and arcrole types.
      Parameters:
        `newDTS` - the new dts
        `other` - the other

  - ### Method Detail

    - #### 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 `XMLFragment`
      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

    - #### getDefinition

          public java.lang.String getDefinition()

      Access to the [Definition] property. If there is no definition this function returns null
      Returns:
        String

    - #### setDefinition

          public void setDefinition(java.lang.String newValue)

      Sets the definition string for a role and arcrole types. The string may be null in this case the role or arcrole type will have no definition
      Parameters:
        `newValue` - the new definition

    - #### getParent

          public XBRLTaxonomy getParent()

      access to the [Parent] property. This is the taxonomy in which the role/arcrole type is defined
      Specified by:
        `getParent` in interface `XMLHasParent`
      Overrides:
        `getParent` in class `XMLFragment`
      Returns:
        XBRLTaxonomy

    - #### setId

          public void setId(java.lang.String id)
                     throws XBRLInconsistentDTSException

      Description copied from class: `XMLFragment`
      Sets the content of the id attribute of this element the ID MUST not have any space, but null is allowed and removes an id from an XML Fragment. This method may be overwritten by other classes that require storing an indexed table of elements and IDs in order to prevent duplicate IDs to exist
      Overrides:
        `setId` in class `XMLFragment`
      Parameters:
        `id` - the new ID
      Throws:
        `XBRLInconsistentDTSException` - if the id is not lexicographically valid

    - #### setParent

          public void setParent(XBRLTaxonomy newParent)

      Changes the [Parent] property. This is the taxonomy in which the role/arcrole type is defined
      Parameters:
        `newParent` - the new parent

    - #### getUsedOn

          public java.util.Iterator<XBRLUsedOn> getUsedOn()

      Gets the used on.
      Returns:
        the used on

    - #### addUsedOn

          public void addUsedOn(XBRLUsedOn on)

      Adds the used on.
      Parameters:
        `on` - the on

    - #### removeUsedOn

          public void removeUsedOn(XBRLUsedOn on)

      Removes the used on.
      Parameters:
        `on` - the on

    - #### isUsedOn

          public boolean isUsedOn(javax.xml.namespace.QName here)

      returns true if the element represented by the QName can legally use this XBRLRoleType

      This method considers roles defined in the XBRL 2.1 specification, virtual roles undefined in the DTS and used in generic linkbases and roles properly defined in XBRL linkbases

      Parameters:
        `here` - the node element to check for
      Returns:
        boolean value

    - #### isStatic

          public boolean isStatic()

      Returns true for role types and arcrole types defined in the XBRL 2.1 specification
      Returns:
        boolean

    - #### isVirtual

          public boolean isVirtual()

      Returns true for role types not referenced using roleRef elements or arcrole type not referenced via arcroleRef elements but valid because they are used within custom extended linkbases.
      Returns:
        boolean

    - #### setStatic

          public void setStatic(boolean newValue)

      Used by the API when a static role or arcrole URI is defined.
      Parameters:
        `newValue` - the new static

    - #### setVirtual

          public void setVirtual(boolean newValue)

      Used by the APO when a virtual role or arcrole URI is defined.
      Parameters:
        `newValue` - the new virtual

    - #### getURI

          public java.lang.String getURI()

      Access to the [Role URI]/[Arcrole URI] property.
      Returns:
        String

    - #### setURI

          public void setURI(java.lang.String newURI)

      Sets or changes the URI of this role type. If there was an existing role type the old role type URI is unregistered from the DTS and the new role type is registered. Virtual or Static role types are not registered. virtual and static properties should be set before setURI is called.
      Parameters:
        `newURI` - the new uri

    - #### equals

          public boolean equals(java.lang.Object other)

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

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `XMLFragment`

    - #### sameUsedOn

          public boolean sameUsedOn(XBRLRoleAndArcroleTypes o)

      Same used on.
      Parameters:
        `o` - the o
      Returns:
        true, if successful

    - #### getHRefURI

          public java.net.URI getHRefURI()

      Creates a URI pointing to the roleType or arcroleType .
      Returns:
        URI

    - #### addRef

          public void addRef(XBRLDocument doc)

      When a role or arcrole is referenced via roleRef its is annotated here.
      Parameters:
        `doc` - the doc

    - #### getElements

          public java.util.Iterator<XMLFragment> getElements()

      Description copied from class: `XMLFragment`
      For complex type resources this returns an iterator with all children XML fragments This method may be overwriten by other classes in the hierarchy.
      Overrides:
        `getElements` in class `XMLFragment`
      Returns:
        Iterator

    - #### getFriendlyName

          public java.lang.String getFriendlyName(int modifiers,
                                         LabelsProvider lp)

      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 override by parent classes.

      This function accepts flags that are defined as constants in XMLFragment in order to modify the output.

      - `XMLFragment.XPOINTER` includes the element position in the source file using the XPointer specification. Note, if the document is created from objects the value may not be available
      - `XMLFragment.XPATH` includes the element position in the source file using XPATH. Note, if the document is created from objects the value may not be available
      - `XMLFragment.NO_POSITION` does not include the element position in the source file.
      - `XMLFragment.CONCEPT_QNAME` for XBRLItem, XBRLTuple and XMLElementDefinition.
      - `XMLFragment.CONCEPT_LABEL` for XBRLItem and XBRLTuple.
      - `XMLFragment.FACT_QNAME` for facts.
      - `XMLFragment.FACT_CONCEPT_LABEL` for facts.
      - `XMLFragment.SHORT_TEXT` for resources, returns the resource text, id or xlink:label
      - `XMLFragment.EASY_TO_READ` for contexts, returns the context date and dimensions in a user friendly text representation
      Overrides:
        `getFriendlyName` in class `XMLFragment`
      Parameters:
        `modifiers` - integer
        `lp` - the lp
      Returns:
        Non empty String. Internationalization is enabled

    - #### generateLocatorToNode

          public XBRLLocator generateLocatorToNode(boolean relativize,
                                          java.net.URI base)
                                            throws java.net.URISyntaxException

      Generates an XBRLLocator object pointing to this node.
      Parameters:
        `relativize` - the relativize
        `base` - the base
      Returns:
        the XBRL locator
      Throws:
        `java.net.URISyntaxException` - the URI syntax exception

    - #### getValidationReport

          public XBRLValidationReport getValidationReport()

      Description copied from interface: `XBRLValidation`
      Access to the last stored validation report.
      Specified by:
        `getValidationReport` in interface `XBRLValidation`
      Returns:
        XBRLValidationReport or null if the object has not been validated or no errors exists

    - #### invalidate

          public void invalidate()

      Description copied from interface: `XBRLValidation`
      Invalidates the XBRLFact for XBRL validation.
      Specified by:
        `invalidate` in interface `XBRLValidation`

    - #### invalidate

          public boolean invalidate(XBRLValidation.Direction dir)

      Description copied from interface: `XBRLValidation`
      Invalidates this object and the elements in the XML tree according with the parameter in dir

      This method is used by GUI tools that requires to reset validation before a manual validation cycle is started.

      Specified by:
        `invalidate` in interface `XBRLValidation`
      Parameters:
        `dir` - see the `XBRLValidation.Direction` enumeration for more information.
      Returns:
        true, if successful

    - #### validate

          public XBRLValidationReport validate(XBRLPlugInProcessor proc)

      Description copied from interface: `XBRLValidation`
      Executes validation on the instance object and returns a validation report.

      The validation result may be cached internally. A call to `XBRLValidation.invalidate(Direction)` clears the validation cache.

      Specified by:
        `validate` in interface `XBRLValidation`
      Parameters:
        `proc` - the processor under which the object is going to be validated. Note the same object can be validated on multiple processors.
      Returns:
        the validation report or null if no errors.

    - #### isOnValidation

          public boolean isOnValidation()

      Description copied from interface: `XBRLValidation`
      When validation is a recursive process, this function returns true if the object going to be validated is already under validation. This prevents a recursive loop to enter the same validation component in an infinite loop.
      Specified by:
        `isOnValidation` in interface `XBRLValidation`
      Returns:
        true if the document is under validation. Means, the validation has not finished.

    - #### compareTo

          public int compareTo(XBRLRoleType o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<XBRLRoleType>`