com.ihr.xbrl.om.exLinks

## Class XBRLlrrAndRelationshipConstraints

- java.lang.Object
- - com.ihr.xbrl.om.exLinks.XBRLlrrAndRelationshipConstraints

-     public class XBRLlrrAndRelationshipConstraints
      extends java.lang.Object

  The purpose of this class is to centralize here all information related to validation of relationships. This class will be a an instance per DTSContainer and all methods will be thread safe. During class initialization the latest version of the lrr will be used as input to populate the internal structures. Then the internal structures will be populated with the information from other sources such as processors. Other processors may add constraints to the singleton as they are created. if the processors's surrounding specification is defining constraints to the relationships they define in link:arcroleType elements
  Since:
    2.7.7
  Author:
    Ignacio

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `XBRLlrrAndRelationshipConstraints.ExtraRelationshipValidationInterface` This interface defines a method for classes implementing additional validation constraints for a relationship that cannot be implemented in a generic way.
    `static class` | `XBRLlrrAndRelationshipConstraints.RelationshipConstraints` Defines what is going to be validated on every relationship.
    `static class` | `XBRLlrrAndRelationshipConstraints.RelationshipConstraintsBase` The Class RelationshipConstraintsBase.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLlrrAndRelationshipConstraints(DTSContainer dts)` Disallow creating new instances of this processor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConstraints(java.lang.String arcRole, XBRLlrrAndRelationshipConstraints.RelationshipConstraints newConstraints)` Adds new constraints to this processor.
    `void` | `clear()` Releases all constraints read and memory used on this class.
    `static XBRLlrrAndRelationshipConstraints.RelationshipConstraints` | `createConstraints(java.lang.String processor, java.lang.Class<? extends XBRLValidationException> errorIfFromNotItem, java.lang.Class<? extends XBRLValidationException> errorIfFromNotAbstract, java.lang.Class<? extends XBRLValidationException> errorIfFromNotNumeric, java.lang.Class<? extends XBRLValidationException> errorIfToNotItem, java.lang.Class<? extends XBRLValidationException> errorIfToNotAbstract, java.lang.Class<? extends XBRLValidationException> errorIfToNotNumeric, XBRLlrrAndRelationshipConstraints.ExtraRelationshipValidationInterface extraValidationInstance)` Creates a new instance of the relationships constraints.
    `DTSContainer` | `getContainer()` Access to the DTSContainer .
    `XBRLValidationReport` | `validateRelationship(XBRLRelationship rel)` Validates the relationship received against the constraints stored in this class.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XBRLlrrAndRelationshipConstraints

          public XBRLlrrAndRelationshipConstraints(DTSContainer dts)

      Disallow creating new instances of this processor.
      Parameters:
        `dts` - the dts

  - ### Method Detail

    - #### createConstraints

          public static XBRLlrrAndRelationshipConstraints.RelationshipConstraints createConstraints(java.lang.String processor,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfFromNotItem,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfFromNotAbstract,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfFromNotNumeric,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfToNotItem,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfToNotAbstract,
                                                                                    java.lang.Class<? extends XBRLValidationException> errorIfToNotNumeric,
                                                                                    XBRLlrrAndRelationshipConstraints.ExtraRelationshipValidationInterface extraValidationInstance)

      Creates a new instance of the relationships constraints. This method is used by processors to add new validation constraints
      Parameters:
        `processor` - the processor
        `errorIfFromNotItem` - the error if from not item
        `errorIfFromNotAbstract` - the error if from not abstract
        `errorIfFromNotNumeric` - the error if from not numeric
        `errorIfToNotItem` - the error if to not item
        `errorIfToNotAbstract` - the error if to not abstract
        `errorIfToNotNumeric` - the error if to not numeric
        `extraValidationInstance` - the extra validation instance
      Returns:
        new instance of a RelatinshipConstraints class

    - #### clear

          public void clear()

      Releases all constraints read and memory used on this class.

      After calling this method it will not be possible to validate new relationships.

    - #### getContainer

          public DTSContainer getContainer()

      Access to the DTSContainer .
      Returns:
        the container

    - #### addConstraints

          public void addConstraints(java.lang.String arcRole,
                            XBRLlrrAndRelationshipConstraints.RelationshipConstraints newConstraints)

      Adds new constraints to this processor. This method is used by processors during the processor initialization phase.
      Parameters:
        `arcRole` - the arc role
        `newConstraints` - the new constraints

    - #### validateRelationship

          public XBRLValidationReport validateRelationship(XBRLRelationship rel)

      Validates the relationship received against the constraints stored in this class.
      Parameters:
        `rel` - the rel
      Returns:
        the XBRL validation report