|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.dts.ColumnPeriod
public class ColumnPeriod
This is a class representing a logical reporting period. Logical reporting period includes a start position and an end position.
The difference with an XBRLPeriod is that the interpretation of the reporting date for instant data. Instant data belongs to a period that may not match with the data in the XBRLPeriod context.
A ColumnPeriod does not contains contexts associated. Contexts are associated to FactColumns. There is a one to one relationship between a ColumnPeriod and a Factcolumns object.
| Nested Class Summary | |
|---|---|
static class |
ColumnPeriod.ColumnPeriodDurationComparator
|
static class |
ColumnPeriod.ColumnPeriodEndComparator
|
static class |
ColumnPeriod.ColumnPeriodStartComparator
|
| Constructor Summary | |
|---|---|
ColumnPeriod(HasBoySupport boyManager,
ColumnPeriod period,
int dateStep)
Creates a new ColumnPeriod that starts at the same date as the column period in the parameter but extends to the end of the dateStep in the second parameter |
|
ColumnPeriod(HasBoySupport boyManager,
java.util.GregorianCalendar pStart,
int dateStep)
|
|
ColumnPeriod(HasBoySupport boyManager,
XBRLPeriod p,
int dateStep)
|
|
| Method Summary | |
|---|---|
boolean |
containsDate(java.util.GregorianCalendar date)
|
boolean |
containsExcl(XBRLPeriod p)
Calculates whether or not this ColumnPeriod contains the Period passed as a parameter. |
boolean |
containsIncl(XBRLPeriod p)
Calculates whether or not this ColumnPeriod contains the Period passed as a parameter. |
boolean |
equals(java.lang.Object obj)
|
int |
getBestFitDateStep()
Calculates the best fit date step for this column period |
static int |
getBestFitDateStep(XBRLPeriod period,
int instantValue)
Returns the value of the dateStep that better suites the value of the period indicated as a parameter. |
javax.xml.datatype.Duration |
getDuration()
Returns a Duration object representing the total length of this column |
java.util.GregorianCalendar |
getEnd()
|
java.util.GregorianCalendar |
getStart()
|
java.lang.String |
getStringColumnPeriod(int dateStep)
|
static java.lang.String |
getStringRepresentationOfDuration(javax.xml.datatype.Duration d,
int dateStep)
Returns a string representation of the duration object in the units indicated in the dateStep parameter. |
int |
hashCode()
|
boolean |
isForever()
|
java.util.GregorianCalendar |
normalizeDate(java.util.GregorianCalendar inDate)
Normalizes a date without paying attention to the date step. |
java.util.GregorianCalendar |
normalizeEnd(java.util.GregorianCalendar date,
int dateStep)
Prepare a new GregorianCalendar that corresponds to the end date of period according to the value of the dateStep |
java.util.GregorianCalendar |
normalizeStart(java.util.GregorianCalendar date,
int dateStep)
Prepare a new GregorianCalendar that corresponds to the beginning date of period according to the value of the dateStep |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ColumnPeriod.ColumnPeriodStartComparator COLUMN_PERIOD_START_COMPARATOR
public static final ColumnPeriod.ColumnPeriodEndComparator COLUMN_PERIOD_END_COMPARATOR
public static final ColumnPeriod.ColumnPeriodDurationComparator COLUMN_PERIOD_DURATION_COMPARATOR
| Constructor Detail |
|---|
public ColumnPeriod(HasBoySupport boyManager,
java.util.GregorianCalendar pStart,
int dateStep)
public ColumnPeriod(HasBoySupport boyManager,
XBRLPeriod p,
int dateStep)
public ColumnPeriod(HasBoySupport boyManager,
ColumnPeriod period,
int dateStep)
period - dateStep - | Method Detail |
|---|
public java.util.GregorianCalendar normalizeStart(java.util.GregorianCalendar date,
int dateStep)
date - dateStep -
public java.util.GregorianCalendar normalizeEnd(java.util.GregorianCalendar date,
int dateStep)
date - dateStep -
public java.util.GregorianCalendar getStart()
public java.util.GregorianCalendar getEnd()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getStringColumnPeriod(int dateStep)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isForever()
public boolean containsExcl(XBRLPeriod p)
true if the period is instant and the instant date is inside the boundaries of the column period or the period is duration and both dates are inside the boundaries of the column period AND the period is not in the boundaries of none of the column periods inside this column period (This is the meaning of the Excl suffix to this method).
p - a period
containsIncl(XBRLPeriod)public boolean containsIncl(XBRLPeriod p)
true if the period is instant and the instant date is inside the boundaries of the column period or the period is duration and both dates are inside the boundaries of the column period.
p - a period
containsExcl(XBRLPeriod)public boolean containsDate(java.util.GregorianCalendar date)
end -
public int getBestFitDateStep()
public static int getBestFitDateStep(XBRLPeriod period,
int instantValue)
If the period is instant, the instantValue is returned. If the context is
duration, then, depending on the duration length a value is returned.
If the value is 1 year then the value InstanceExplorer.YEARS is returned.
If the value is below 1 year and over 6 months then InstanceExplorer.HALVES is returned.
If the value is greater than a year the value -1 is returned (an error).
If the value is between 6 months and 3 months InstanceExplorer.QUARTERS is returned.
If the value is between 3 months and 1 months InstanceExplorer.QUARTERS is returned.
...
period - the XBRLPeriod to calculate the best fit durationinstantValue - the return value in case the period parameter is of instant type.
public javax.xml.datatype.Duration getDuration()
public static java.lang.String getStringRepresentationOfDuration(javax.xml.datatype.Duration d,
int dateStep)
throws NotRepresentableDurationException
d - a javax.xml.datatype.Duration instancedateStep - the units that the parameter d has to be divided to and for which a string representation will be created
NotRepresentableDurationException - in case of problemspublic java.util.GregorianCalendar normalizeDate(java.util.GregorianCalendar inDate)
gregorianCalendarDate -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||