com.ihr.xbrl.dts

## Class InstanceBuilder

- java.lang.Object
- - com.ihr.xbrl.dts.InstanceBuilder

-     public class InstanceBuilder
      extends java.lang.Object

  This class provides methods to create sample instance documents according to a DTS It creates a fact item per concept definition in the DTS.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InstanceBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildConcepts(XBRLInstance instance)` Creates facts in the instance according to concepts in the DTS The instance MUST have at least one unit, one instant context and one duration context.
    `void` | `buildFacts(XBRLFactsList fc, java.util.Iterator<?> iterC)` Builds the facts.
    `void` | `setBoolean(boolean boolean1)` Sets the boolean.
    `void` | `setCtxDurationBOP(XBRLContext ctxDurationBOP)` Sets the ctx duration bop.
    `void` | `setCtxDurationOther(XBRLContext ctxDurationOther)` Sets the ctx duration other.
    `void` | `setCtxInstantBOP(XBRLContext ctxInstantBOP)` Sets the ctx instant bop.
    `void` | `setCtxInstantOther(XBRLContext ctxInstantOther)` Sets the ctx instant other.
    `void` | `setDate(java.util.GregorianCalendar date)` Sets the date.
    `void` | `setFormatting(java.lang.String formatting)` Sets the formatting.
    `void` | `setNill(boolean nillable)` Sets the nill.
    `void` | `setNumber(java.lang.Number number)` Sets the number.
    `void` | `setPrecision(boolean b)` Sets the precision.
    `void` | `setString(java.lang.String string)` Sets the string.
    `void` | `setUnit(XBRLUnit unit)` Sets the unit.

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

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

- - ### Constructor Detail

    - #### InstanceBuilder

          public InstanceBuilder()

  - ### Method Detail

    - #### buildConcepts

          public void buildConcepts(XBRLInstance instance)
                             throws InstanceBuilderException

      Creates facts in the instance according to concepts in the DTS The instance MUST have at least one unit, one instant context and one duration context.
      Parameters:
        `instance` - XBRLInstance, the instance that will be populated with new facts
      Throws:
        `InstanceBuilderException` - if the instance does not contain a unit or a required context

    - #### buildFacts

          public void buildFacts(XBRLFactsList fc,
                        java.util.Iterator<?> iterC)

      Builds the facts.
      Parameters:
        `fc` - the fc
        `iterC` - the iter c

    - #### setNill

          public void setNill(boolean nillable)

      Sets the nill.
      Parameters:
        `nillable` - the new nill

    - #### setString

          public void setString(java.lang.String string)

      Sets the string.
      Parameters:
        `string` - the new string

    - #### setBoolean

          public void setBoolean(boolean boolean1)

      Sets the boolean.
      Parameters:
        `boolean1` - the new boolean

    - #### setNumber

          public void setNumber(java.lang.Number number)

      Sets the number.
      Parameters:
        `number` - the new number

    - #### setDate

          public void setDate(java.util.GregorianCalendar date)

      Sets the date.
      Parameters:
        `date` - the new date

    - #### setPrecision

          public void setPrecision(boolean b)

      Sets the precision.
      Parameters:
        `b` - the new precision

    - #### setFormatting

          public void setFormatting(java.lang.String formatting)

      Sets the formatting.
      Parameters:
        `formatting` - the new formatting

    - #### setCtxDurationBOP

          public void setCtxDurationBOP(XBRLContext ctxDurationBOP)

      Sets the ctx duration bop.
      Parameters:
        `ctxDurationBOP` - the new ctx duration bop

    - #### setCtxDurationOther

          public void setCtxDurationOther(XBRLContext ctxDurationOther)

      Sets the ctx duration other.
      Parameters:
        `ctxDurationOther` - the new ctx duration other

    - #### setCtxInstantBOP

          public void setCtxInstantBOP(XBRLContext ctxInstantBOP)

      Sets the ctx instant bop.
      Parameters:
        `ctxInstantBOP` - the new ctx instant bop

    - #### setCtxInstantOther

          public void setCtxInstantOther(XBRLContext ctxInstantOther)

      Sets the ctx instant other.
      Parameters:
        `ctxInstantOther` - the new ctx instant other

    - #### setUnit

          public void setUnit(XBRLUnit unit)

      Sets the unit.
      Parameters:
        `unit` - the new unit