com.ihr.xbrl.mapper.filters

## Class XBRLCTimeFilter

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

- All Implemented Interfaces:
    XBRLFacetFilter

      public class XBRLCTimeFilter
      extends java.lang.Object
      implements XBRLFacetFilter

  The Class XBRLCTimeFilter.
  Author:
    Ignacio

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `XBRLCTimeFilter.DurationFilter` The Class DurationFilter.
    `static class` | `XBRLCTimeFilter.TimeFilter` The Class TimeFilter.
    `static class` | `XBRLCTimeFilter.TimeFilterPosition` The Enum TimeFilterPosition.
    `static class` | `XBRLCTimeFilter.XBRLCDurationAnyFilter` The Class XBRLCDurationAnyFilter.
    `static class` | `XBRLCTimeFilter.XBRLCDurationDurationFilter` The Class XBRLCDurationDurationFilter.
    `static class` | `XBRLCTimeFilter.XBRLCDurationLongestFilter` The Class XBRLCDurationLongestFilter.
    `static class` | `XBRLCTimeFilter.XBRLCDurationShortestFilter` The Class XBRLCDurationShortestFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeAnyFilter` The Class XBRLCTimeAnyFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeDateFilter` The Class XBRLCTimeDateFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeLatestFilter` The Class XBRLCTimeLatestFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeOldestFilter` The Class XBRLCTimeOldestFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeSameEndFilter` The Class XBRLCTimeSameEndFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeSameInstantFilter` The Class XBRLCTimeSameInstantFilter.
    `static class` | `XBRLCTimeFilter.XBRLCTimeSameStartFilter` The Class XBRLCTimeSameStartFilter.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLCTimeFilter(java.lang.String id, XBRLCTimeFilter.DurationFilter durationFilter, XBRLCTimeFilter.TimeFilter startFilter, XBRLCTimeFilter.TimeFilter endFilter)` Instantiates a new XBRLC time filter.
    `XBRLCTimeFilter(java.lang.String id, XBRLCTimeFilter.TimeFilter instantFilter)` Instantiates a new XBRLC 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(XBRLFilterContext context)` Gets the date end.
    `java.util.GregorianCalendar` | `getDateInstant(XBRLFilterContext context)` Gets the date instant.
    `java.util.GregorianCalendar` | `getDateStart(XBRLFilterContext context)` Gets the date start.
    `java.lang.String` | `getId()` Gets the id.
    `boolean` | `isDuration()` Checks if is duration.
    `boolean` | `isInstant()` Checks if is instant.
    `boolean` | `matches(XBRLFact fact, XBRLFilterContext context)` Return a boolean value indicating if the fact passes the filter.
    `boolean` | `matches(XBRLPeriod p, XBRLFilterContext context)` Matches.
    `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

    - #### XBRLCTimeFilter

          public XBRLCTimeFilter(java.lang.String id,
                         XBRLCTimeFilter.TimeFilter instantFilter)

      Instantiates a new XBRLC time filter.
      Parameters:
        `id` - the id
        `instantFilter` - the instant filter

    - #### XBRLCTimeFilter

          public XBRLCTimeFilter(java.lang.String id,
                         XBRLCTimeFilter.DurationFilter durationFilter,
                         XBRLCTimeFilter.TimeFilter startFilter,
                         XBRLCTimeFilter.TimeFilter endFilter)

      Instantiates a new XBRLC time filter.
      Parameters:
        `id` - the id
        `durationFilter` - the duration filter
        `startFilter` - the start filter
        `endFilter` - the end filter

  - ### Method Detail

    - #### getDateEnd

          public java.util.GregorianCalendar getDateEnd(XBRLFilterContext context)

      Gets the date end.
      Parameters:
        `context` - the context
      Returns:
        the date end

    - #### getDateStart

          public java.util.GregorianCalendar getDateStart(XBRLFilterContext context)

      Gets the date start.
      Parameters:
        `context` - the context
      Returns:
        the date start

    - #### getDateInstant

          public java.util.GregorianCalendar getDateInstant(XBRLFilterContext context)

      Gets the date instant.
      Parameters:
        `context` - the context
      Returns:
        the date instant

    - #### isDuration

          public boolean isDuration()

      Checks if is duration.
      Returns:
        true, if is duration

    - #### isInstant

          public boolean isInstant()

      Checks if is instant.
      Returns:
        true, if is instant

    - #### 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

    - #### matches

          public boolean matches(XBRLPeriod p,
                        XBRLFilterContext context)

      Matches.
      Parameters:
        `p` - the p
        `context` - the context
      Returns:
        true, if successful

    - #### createFilterNode

          public org.jdom.Element createFilterNode()
                                            throws LoaderException

      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
      Throws:
        `LoaderException` - the loader exception

    - #### getId

          public java.lang.String getId()

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

    - #### compileFilter

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

      Compile filter.
      Parameters:
        `filterNode` - the filter node
        `xp` - the xp
      Returns:
        the XBRL facet filter
      Throws:
        `LoaderException` - the loader exception

    - #### setId

          public void setId(java.lang.String id)

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