com.ihr.xbrl.dts

## Interface ContextProvider

- All Known Subinterfaces:
    InstanceExplorerInterface
  All Known Implementing Classes:
    DimensionalInstanceExplorer, InstanceExplorer, InstanceExplorerAbstract

      public interface ContextProvider

  This interface provides methods that are able to provide compatible contexts for a XBRLFactItem while it stores all XBRLContexts in an instance document, only those that belongs to the same "column" are "compatible" contexts for a XBRLFactItem. An instance of this class stores information about the contexts associated with a "column" and provides a list of "compatible" contexts for a XBRLFactItem. This class can be used to prepare a pop-up menu so the user can choose the context to apply for a XBRLFact item inside a XBRLGFactNumeric or XBRLGFactNonNumeric object
  Author:
    Ignacio

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContext(XBRLContext newContext)` Adds a new context to this context provider.
    `void` | `factChangedContext(XBRLFactItem fact, XBRLContext oldContext, XBRLContext newContext)` Informs the Context provider that the fact has changed its context information.
    `java.util.Iterator<XBRLContext>` | `getCompatibleContexts(XBRLFactItem fact)` Returns an iterator over compatible contexts for this fact.

- - ### Method Detail

    - #### getCompatibleContexts

          java.util.Iterator<XBRLContext> getCompatibleContexts(XBRLFactItem fact)

      Returns an iterator over compatible contexts for this fact. the first element in the iterator is the context currently associated to the fact.
      Parameters:
        `fact` - the fact
      Returns:
        Iterator<XBRLContext>

    - #### addContext

          void addContext(XBRLContext newContext)

      Adds a new context to this context provider. This happens when the user creates a new context
      Parameters:
        `newContext` - XBRLContext to add

    - #### factChangedContext

          void factChangedContext(XBRLFactItem fact,
                                XBRLContext oldContext,
                                XBRLContext newContext)

      Informs the Context provider that the fact has changed its context information.
      Parameters:
        `fact` - the fact
        `oldContext` - the old context
        `newContext` - the new context