com.ihr.xbrl.mapper.source

## Class ExcelDataSource

- java.lang.Object
- - com.ihr.xbrl.mapper.source.worksheet.AbstractWorksheetDataSource
  - - com.ihr.xbrl.mapper.source.ExcelDataSource

- All Implemented Interfaces:
    HasSomethingToSay, HasMethod, HasMult, XBRLDataSource, XBRLDataSourceMapIdInUse

      public class ExcelDataSource
      extends AbstractWorksheetDataSource

  The Class ExcelDataSource.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExcelDataSource()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getSampleData(java.lang.Object data)` This method is used by the mapper editor during test cycles of the mapper The implemented class should use the incoming data to produce an object that the mapper can use later to produce an instance document .
    `SheetPointFactory` | `getSheetPointFactory()` Gets the sheet point factory.
    `net.sf.saxon.value.AtomicValue` | `getValue(java.lang.String mapIdentifier, int index, XBRLContext context, net.sf.saxon.type.SimpleType type)` Each data item has mapIdentifier string each used concept in the taxonomy has at least one mapIdentifier returns the Value to be sent to the fact item. null is allowed and will be considered as no input data available
    `void` | `startOfDocument(XBRLInstance instance, java.lang.Object[] inputs, DTSLoadingBarInterface bar)` Called by the MapEngine when a new instance that requires this data source is going to be created.

    - ### Methods inherited from class com.ihr.xbrl.mapper.source.worksheet.AbstractWorksheetDataSource

      `addMap, addOrModifyRound, addRuleMap, createConfigFileContent, createOrGetRoundIdentifier, deleteRegion, delRound, delRuleMap, endOfDocument, endOfFact, getCells, getConfigFile, getContext, getDefaultZeroValuePolicyType, getExactMode, getExactModeValue, getFootnote, getFootnoteCellAndLang, getFootnoteLang, getFormat, getFormatValue, getHistoricalMessage, getMapId, getMapIdentifierReferences, getMapIterator, getMapSheetPoint, getMethod, getMethod, getMult, getMult, getNumberOfValues, getRound, getRoundingIdentifiers, getRoundMode, getRuleCells, getSourceReference, getUnit, getZeroValuePolicy, init, isConfigfileRequired, isInputFileRequired, isMapIdentifierInUse, isNil, isTupleSourceRequired, moveRegion, removeMap, save, setConfigFile, setDefaultRounding, setDefaultZeroValuePolicyType, startOfFact, verifyRule`

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

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

    - ### Methods inherited from interface com.ihr.xbrl.mapper.source.XBRLDataSource

      `equals, hashCode`

- - ### Constructor Detail

    - #### ExcelDataSource

          public ExcelDataSource()

  - ### Method Detail

    - #### startOfDocument

          public void startOfDocument(XBRLInstance instance,
                             java.lang.Object[] inputs,
                             DTSLoadingBarInterface bar)
                               throws MapException

      Description copied from interface: `XBRLDataSource`
      Called by the MapEngine when a new instance that requires this data source is going to be created. Can be used to open connections to data sources. Be careful when processing the inputs because the same mapper could use more than one driver and inputs are shared across all the drivers. Don't assume there will always be just one driver providing data to the mapper.
      Parameters:
        `instance` - this is the instance document.
        `inputs` - Input parameters, they are different objects for each driver.
        `bar` - this is an optional parameter, if not null, the driver can send messages to inform about the initialization process
      Throws:
        `MapException` - the map exception

    - #### getValue

          public net.sf.saxon.value.AtomicValue getValue(java.lang.String mapIdentifier,
                                                int index,
                                                XBRLContext context,
                                                net.sf.saxon.type.SimpleType type)
                                                  throws MapException

      Description copied from interface: `XBRLDataSource`
      Each data item has mapIdentifier string each used concept in the taxonomy has at least one mapIdentifier returns the Value to be sent to the fact item. null is allowed and will be considered as no input data available
      Parameters:
        `mapIdentifier` - String
        `index` - int
        `context` - XBRLContext the XBRL Context for the fact being reported. The context should not be modified here.
        `type` - This is that target schema type obtained from the element definition
      Returns:
        net.sf.saxon.Value
      Throws:
        `MapException` - the map exception

    - #### getSampleData

          public java.lang.Object getSampleData(java.lang.Object data)
                                         throws MapException

      Description copied from interface: `XBRLDataSource`
      This method is used by the mapper editor during test cycles of the mapper The implemented class should use the incoming data to produce an object that the mapper can use later to produce an instance document .
      Parameters:
        `data` - object
      Returns:
        another object
      Throws:
        `MapException` - in the case the input object cannot be used

    - #### getSheetPointFactory

          public SheetPointFactory getSheetPointFactory()

      Description copied from class: `AbstractWorksheetDataSource`
      Gets the sheet point factory.
      Specified by:
        `getSheetPointFactory` in class `AbstractWorksheetDataSource`
      Returns:
        the sheet point factory