com.ihr.xbrl.mapper.filters

## Class XBRLTimeFilter

- java.lang.Object
- - com.ihr.xbrl.mapper.filters.XBRLTimeFilter

- All Implemented Interfaces:
    XBRLFacetFilter

      public class XBRLTimeFilter
      extends java.lang.Object
      implements XBRLFacetFilter

  This is a filter over the time dimension in the context it matches if the context is inside the limits stablished by the two dates For periods. Use the period Start and period End dates. For instant. Use the same date in the two parameters Forever contexts always match
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLTimeFilter(java.lang.String id, java.util.GregorianCalendar dateStart, java.util.GregorianCalendar dateEnd)` Instantiates a new XBRL time filter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static XBRLFacetFilter` | `compileFilter(net.sf.saxon.s9api.XdmNode filterNode, net.sf.saxon.s9api.XPathCompiler xp)` Compile filter.
    `org.jdom.Element` | `createFilterNode()` Returns a node representing the serialization of this filter so it can be created later from the node.
    `java.util.GregorianCalendar` | `getDateEnd()` Gets the date end.
    `java.util.GregorianCalendar` | `getDateStart()` Gets the date start.
    `java.lang.String` | `getId()` Gets the id.
    `boolean` | `matches(XBRLFact fact, XBRLFilterContext context)` Return a boolean value indicating if the fact passes the filter.
    `void` | `setDateEnd(java.util.GregorianCalendar dateEnd)` Sets the date end.
    `void` | `setDateStart(java.util.GregorianCalendar dateStart)` Sets the date start.
    `void` | `setId(java.lang.String id)` Sets the id.

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

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

- - ### Constructor Detail

    - #### XBRLTimeFilter

          public XBRLTimeFilter(java.lang.String id,
                        java.util.GregorianCalendar dateStart,
                        java.util.GregorianCalendar dateEnd)

      Instantiates a new XBRL time filter.
      Parameters:
        `id` - the id
        `dateStart` - the date start
        `dateEnd` - the date end

  - ### Method Detail

    - #### matches

          public boolean matches(XBRLFact fact,
                        XBRLFilterContext context)

      Description copied from interface: `XBRLFacetFilter`
      Return a boolean value indicating if the fact passes the filter. true - match false - no match
      Specified by:
        `matches` in interface `XBRLFacetFilter`
      Parameters:
        `fact` - XBRLFact to test
        `context` - the context
      Returns:
        boolean

    - #### getDateEnd

          public java.util.GregorianCalendar getDateEnd()

      Gets the date end.
      Returns:
        the dateEnd

    - #### setDateEnd

          public void setDateEnd(java.util.GregorianCalendar dateEnd)

      Sets the date end.
      Parameters:
        `dateEnd` - the dateEnd to set

    - #### getDateStart

          public java.util.GregorianCalendar getDateStart()

      Gets the date start.
      Returns:
        the dateStart

    - #### setDateStart

          public void setDateStart(java.util.GregorianCalendar dateStart)

      Sets the date start.
      Parameters:
        `dateStart` - the dateStart to set

    - #### createFilterNode

          public org.jdom.Element createFilterNode()

      Description copied from interface: `XBRLFacetFilter`
      Returns a node representing the serialization of this filter so it can be created later from the node.
      Specified by:
        `createFilterNode` in interface `XBRLFacetFilter`
      Returns:
        org.jdom.Element

    - #### compileFilter

          public static XBRLFacetFilter compileFilter(net.sf.saxon.s9api.XdmNode filterNode,
                                      net.sf.saxon.s9api.XPathCompiler xp)

      Compile filter.
      Parameters:
        `filterNode` - the filter node
        `xp` - the xp
      Returns:
        the XBRL facet filter

    - #### getId

          public java.lang.String getId()

      Description copied from interface: `XBRLFacetFilter`
      Gets the id.
      Specified by:
        `getId` in interface `XBRLFacetFilter`
      Returns:
        the id

    - #### setId

          public void setId(java.lang.String id)

      Description copied from interface: `XBRLFacetFilter`
      Sets the id.
      Specified by:
        `setId` in interface `XBRLFacetFilter`
      Parameters:
        `id` - the new id