|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.om.XMLFragment
com.ihr.xbrl.om.instance.XBRLPeriod
public class XBRLPeriod
A period information according to the content of the context container in the XBRL 2.1 specification.
| Field Summary | |
|---|---|
static int |
DATE_END
Constant to refer to the END date or datetime of this period |
static int |
DATE_INSTANT
Constant to refer to the INSTANT date or datetime of this period |
static int |
DATE_START
Constant to refer to the START date or datetime of this period |
static javax.xml.namespace.QName |
periodNode
Constant xbrli:period used during serialization of periods |
static com.ihr.xbrl.om.instance.XBRLPeriod.TimeSorter |
TimeSorterInstance
|
| Fields inherited from class com.ihr.xbrl.om.XMLFragment |
|---|
CONCEPT_LABEL, CONCEPT_QNAME, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, idQName, NO_POSITION, OrderComparator, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER |
| Constructor Summary | |
|---|---|
XBRLPeriod(DTSContainer dts)
Creates a FOREVER period |
|
XBRLPeriod(DTSContainer dts,
java.util.GregorianCalendar instant,
boolean bHasTimeZone,
boolean bHasTime)
Creates a INSTANT period with the instant date The date value will be set to the Gregorian Calender used in the parameter |
|
XBRLPeriod(DTSContainer dts,
java.util.GregorianCalendar start,
java.util.GregorianCalendar end,
boolean bHasTimeZone,
boolean bHasTime)
|
|
XBRLPeriod(DTSContainer dts,
java.lang.String instantDate)
Creates a INSTANT period with the instantDate Note: As dates are in ISO 8601 format, the date representation "2007-08-31" is assumed to be in the NO_TIMEZONE time zone. |
|
XBRLPeriod(DTSContainer dts,
java.lang.String startDate,
java.lang.String endDate)
Creates a DURATION period with the startDate and endDate Note: As dates are in ISO 8601 format, the date representation "2007-08-31" is assumed to be in the NO_TIMEZONE time zone. |
|
XBRLPeriod(DTSContainer dts,
net.sf.saxon.s9api.XdmNode node)
Creates a XBRLPeriod reading the content of the XdmNode node supplied as a parameter |
|
XBRLPeriod(XBRLPeriod other)
Creates an new period as a copy of the current period. |
|
| Method Summary | |
|---|---|
static java.util.GregorianCalendar |
adjust24h(java.util.GregorianCalendar calendar,
boolean sign)
|
void |
clear()
Frees-up used memory This method should not be invoqued on live objects in the DTS. |
XBRLPeriod |
clone()
|
XBRLPeriod |
clone(DTSContainer newDTS)
|
boolean |
equals(java.lang.Object other)
Sets a new XPathFunctionResolver for this object |
org.jdom.Element |
generateNode(boolean relativize,
java.net.URI base)
Serializes to a jdom Element the representation of the properties of this Information Item This method should be called from classes derived from this class |
java.util.GregorianCalendar |
getComparableDate()
|
java.lang.String |
getDate(int type)
String representation of the date in the period. adjusted according to XBRL specification rules. |
java.util.Iterator<XMLFragment> |
getElements()
For complex type resources this returns an iterator with all children XML fragments Tthis method may be overwriten by other classes in the hierarchy |
java.lang.String |
getFriendlyName()
Returns a string description that represents the element content in a form that users can understand. |
java.lang.String |
getFriendlyName(int modifiers,
LabelsProvider lp)
Returns a string description that represents the element content in a form that users can understand. |
java.util.GregorianCalendar |
getGregorianCalendarDate(int type)
Returns the value of the date for the type requested. |
java.lang.String |
getLocalizedPeriodType()
Returns a localized string representing the period type. this is, in English "instant" or "duration". |
static java.lang.String |
getLocalizedPeriodType(XBRLItem.PeriodType periodType)
Returns a localized string representing the period type. this is, in English "instant" or "duration". |
XBRLItem.PeriodType |
getPeriodType()
Returns XBRLItem.DURATION or XBRLItem.INSTANT depending on the context period information. |
java.lang.String |
getRawDate(int type)
String representation of the date in the period. |
java.util.Date |
getRawDateUtil(int code)
Returns the raw date (the one specified by syntax) in the context. |
java.util.GregorianCalendar |
getRawGregorianCalendarDate(int type)
Returns the value of the date for the type requested. |
int |
hashCode()
|
boolean |
isDuration()
|
boolean |
isForever()
|
boolean |
isInstant()
|
static java.lang.String |
iso8601(java.util.GregorianCalendar c,
boolean hasTimezone,
boolean hasTime)
Returns a string representation in iso8601 standard with the value of variable c yyyy-MM-dd'T'HH:mm:ss.SSSZ is the complete patters that can be used some parts of this pattern can be omited according to the values of hasTimezone and hasTime below. |
static java.util.GregorianCalendar |
iso8601(java.lang.String value,
boolean bAdd24h)
Converts a string of the format yyyy-MM-dd to the apropriate GregorianCalendar object. |
boolean |
s_equal2(java.lang.Object other)
Resolves s_equal2 comparison of this node against the other node. |
void |
setDate(int type,
java.lang.String strDate)
Sets the value of the specified field |
java.lang.String |
toString()
Returns the XML representation of this object as an String |
XBRLValidationReport |
validate()
Produces a XBRLValidationReport object for this period object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static com.ihr.xbrl.om.instance.XBRLPeriod.TimeSorter TimeSorterInstance
public static final javax.xml.namespace.QName periodNode
public static final int DATE_INSTANT
public static final int DATE_START
public static final int DATE_END
| Constructor Detail |
|---|
public XBRLPeriod(DTSContainer dts,
net.sf.saxon.s9api.XdmNode node)
dts - DTSContainer for this new periodnode - XdmNode XML node s9api where data will be read frompublic XBRLPeriod(DTSContainer dts)
dts - DTSContainer
public XBRLPeriod(DTSContainer dts,
java.lang.String startDate,
java.lang.String endDate)
dts - - DTSContainerstartDate - - Date string in ISO 8601 formatendDate - - Date string in ISO 8601 format
public XBRLPeriod(DTSContainer dts,
java.lang.String instantDate)
dts - - DTSContainerinstantDate - - Date string in ISO 8601 format
public XBRLPeriod(DTSContainer dts,
java.util.GregorianCalendar instant,
boolean bHasTimeZone,
boolean bHasTime)
dts - - DTSContainerinstant - - Gregorian Calendar
public XBRLPeriod(DTSContainer dts,
java.util.GregorianCalendar start,
java.util.GregorianCalendar end,
boolean bHasTimeZone,
boolean bHasTime)
public XBRLPeriod(XBRLPeriod other)
other - XBRLPeriod| Method Detail |
|---|
public java.util.GregorianCalendar getComparableDate()
public void clear()
throws java.lang.Throwable
XMLFragmentThis method should not be invoqued on live objects in the DTS. It is automatically invoqued by the API when an object is no longer used and referenced by other objects. It is save not to call it directly.
clear in class XMLFragmentjava.lang.Throwablepublic XBRLPeriod clone()
clone in class XMLFragmentpublic XBRLPeriod clone(DTSContainer newDTS)
clone in class XMLFragmentpublic XBRLItem.PeriodType getPeriodType()
public java.lang.String getFriendlyName()
XMLFragmentRemarks, this method may return very long names not suitable for user interface
getFriendlyName in class XMLFragment
public java.lang.String getFriendlyName(int modifiers,
LabelsProvider lp)
XMLFragmentThis function accepts flags that are defined as constants in XMLFragment in order to modify the output.
getFriendlyName in class XMLFragmentmodifiers - integer
public boolean isInstant()
public boolean isDuration()
public boolean isForever()
public java.lang.String getDate(int type)
type - code indicating what to obtain. DATE_INSTANT, DATE_START or DATE_END
public java.lang.String getRawDate(int type)
type - code indicating what to obtain. DATE_INSTANT, DATE_START or DATE_END
public java.util.GregorianCalendar getGregorianCalendarDate(int type)
type - one of the constants below
public java.util.GregorianCalendar getRawGregorianCalendarDate(int type)
type - one of the constants below
public static java.util.GregorianCalendar adjust24h(java.util.GregorianCalendar calendar,
boolean sign)
calendar - sign - boolean (true) to add 24 hours (false) to substract 24 hours
public XBRLValidationReport validate()
public boolean equals(java.lang.Object other)
XMLFragment
equals in class XMLFragmentpublic boolean s_equal2(java.lang.Object other)
XMLFragment
s_equal2 in class XMLFragmentother - The other node (preferably an XMLFragment) that contains a non null NodeInfo document.
public int hashCode()
hashCode in class XMLFragment
public org.jdom.Element generateNode(boolean relativize,
java.net.URI base)
throws XBRLSerializationException
XMLFragment
generateNode in class XMLFragmentrelativize - boolean indicating if URIs should be relativized to the base URI (see next argument)base - the URI to which some attributes of this object should be relativided
XBRLSerializationException
public static java.lang.String iso8601(java.util.GregorianCalendar c,
boolean hasTimezone,
boolean hasTime)
c - GregorianCalendarhasTimezone - boolean value, true means c has time zone informationhasTime - boolean value, true means c has time information
public static java.util.GregorianCalendar iso8601(java.lang.String value,
boolean bAdd24h)
value - string in the format yyyy-MM-ddbAdd24h - for period end dates this must be set to true
public void setDate(int type,
java.lang.String strDate)
throws XBRLValidationException
type - this is the field, DATE_END, DATE_INSTANT, DATE_STARTstrDate - iso8601 date string
XBRLValidationExceptionpublic java.util.Date getRawDateUtil(int code)
code - this is the field, DATE_END, DATE_INSTANT, DATE_START
public java.lang.String toString()
XMLFragment
toString in class XMLFragmentpublic java.util.Iterator<XMLFragment> getElements()
XMLFragment
getElements in class XMLFragmentpublic java.lang.String getLocalizedPeriodType()
public static java.lang.String getLocalizedPeriodType(XBRLItem.PeriodType periodType)
periodType - constant indicating XBRLItem.INSTANT or XBRLItem.DURATION
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||