public class XBRLPeriod extends XMLFragment implements java.lang.Cloneable
XMLFragment.NodeNameIterator<T extends XMLFragment>, XMLFragment.NodeTypeIterator<T extends XMLFragment>
Modifier and Type | Field and Description |
---|---|
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 net.sf.saxon.om.StructuredQName |
sqnPeriodNode
The Constant sqnPeriodNode.
|
static java.util.Comparator<XBRLPeriod> |
TimeSorterInstance
Sorts Periods so they are ordered according to the following criteria:
(a) duration periods are ordered according to the date in the middle of the period.
|
static java.util.Comparator<XBRLPeriod> |
TimeSorterReverseInstance
Sorts Periods as reverse TimeSorter order.
|
ADD_NAMESPACE_INHERIT, baseQName, CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, FACT_VALUE, HIDE_COMMON_ACCURACY, idQName, langQName, nil, NO_POSITION, OrderComparator, OrderComparator2, OrderComparatorReverse, PERIOD_BOP, PERIOD_TYPE, PERIOD_VALUE, RELATIONSHIP_TYPE, RESOURCE_TYPE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER
Constructor and Description |
---|
XBRLPeriod(DTSContainer dts,
boolean forever)
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 Calendar used in the parameter.
|
XBRLPeriod(DTSContainer dts,
java.util.GregorianCalendar start,
java.util.GregorianCalendar end,
boolean bHasTimeZone,
boolean bHasTime)
Instantiates a new XBRL period.
|
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(XMLFragment node)
Creates a XBRLPeriod reading the content of the XMLFragment node supplied as a parameter.
|
Modifier and Type | Method and Description |
---|---|
static java.util.GregorianCalendar |
adjust24h(java.util.GregorianCalendar calendar,
boolean sign)
Adjust24h.
|
void |
clear()
Clear.
|
XBRLPeriod |
clone()
Clone.
|
XBRLPeriod |
clone(DTSContainer newDTS)
Clone.
|
boolean |
equals(java.lang.Object other)
Equals.
|
XMLFragment |
generateNode()
Generate node.
|
static net.sf.saxon.value.CalendarValue |
getCalendarValue(java.lang.CharSequence cs)
Gets the calendar value.
|
java.util.GregorianCalendar |
getComparableDate()
Gets the comparable date.
|
java.lang.String |
getDate(int type)
String representation of the date in the period. adjusted according to XBRL specification rules.
|
XMLFragment |
getElementEndDate()
Gets the element end date.
|
XMLFragment |
getElementForever()
Gets the element forever.
|
XMLFragment |
getElementInstant()
Gets the element instant.
|
XMLFragment |
getElementStartDate()
Gets the element start date.
|
net.sf.saxon.tree.linked.NodeImpl |
getFirstChild() |
java.lang.String |
getFriendlyName()
Gets the friendly name.
|
java.lang.String |
getFriendlyName(int use)
Gets the friendly name.
|
java.lang.String |
getFriendlyName(int modifiers,
LabelsProvider lp)
Gets the friendly name.
|
java.util.GregorianCalendar |
getGregorianCalendarDate(int type)
Returns the value of the date for the type requested.
|
net.sf.saxon.tree.linked.NodeImpl |
getLastChild() |
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".
|
int |
getNumberOfChildren() |
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.
|
boolean |
hasChildNodes() |
int |
hashCode()
Hash code.
|
boolean |
isDuration()
Checks if is duration.
|
boolean |
isForever()
Checks if is forever.
|
boolean |
isHasDateAndTime()
Returns true if the date contains date and time.
|
boolean |
isHasTimeZone()
Returns true if the date contains time zone.
|
boolean |
isInstant()
Checks if is instant.
|
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.
|
static XBRLPeriod |
make(DTSContainer dts)
Make.
|
boolean |
s_equal2(java.lang.Object other)
S equal 2.
|
void |
setDate(int type,
java.lang.String strDate)
Sets the value of the specified field.
|
void |
setForever()
Change this period to a <forever/> period.
|
XBRLValidationReport |
validate()
Produces a XBRLValidationReport object for this period object.
|
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addChild, addChildArray, addChildAt, addChildNode, addChildNodeArray, addChildNodeAt, addChildNodeInBatch, addComment, addFromRelationship, addNamespace, addNamespace, addPropertyChangeListener, addToRelationship, changeBase, checkBase, childExists, commitBatch, copy, createComment, delAttribute, delAttribute, delete, equalXdmValues, findFirstNodeOfClass, findPosition, firePropertyChangeEvent, generateId, generateLocatorToNode, generatePrefix, getAllAttributes, getAttribute, getAttributeAtomicValue, getAttributeBooleanValue, getAttributeGroundedValue, getAttributeQNameValue, getAttributes, getAttributeValue, getBase, getBase, getBooleanValue, getChildren, getChildStringValue, getConfiguration, getContainer, getContainerDocumentURI, getDocument, getElement, getElement, getElements, getFirstChildNoComment, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getId, getInScopeNamespaces, getLang, getLastChildNoComment, getNamePool, getNamespaceBinding, getNamespaceURI, getNextSiblingNoComment, getNodeName, getNthElement, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getParentDocument, getParentXBRL, getPrefix, getPrefixes, getPropertyChangeListeners, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPath, getXPathFromXPointer, getXPathNamespaceContext, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerXPath2Scheme, initialise, internalToString, isAttribute, isChangeHashEnabled, isDead, isEmpty, isHashDependsOnAtribute, isNamespaceDefined, isNil, moveNamespacesUp, objEquals, objHashCode, reindex, removeChild, removeChildNode, removeFromRelationship, removeNamespace, removePropertyChangeListener, removeToRelationship, replace, replaceChild, replaceStringValue, resetElements, resolveHRef, s_equal2_xp2, s_equal2_xp2, s_equal2, s_equal2, s_equal2, setAttributeList, setAttributes, setBase, setChildrenClone, setDirty, setElements, setId, setLang, setModified, setNamespaceDeclarations, setNamespaces, setNil, setNodeName, setRawParentXBRL, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, valueEquals, xEqual
addAttribute, addNamespace, generateId, getAttributeList, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getDeclaredNamespaces, getDocumentRoot, getLineNumber, getNameCode, getNamespaceList, getNodeKind, getRoot, getSchemaType, getSystemId, getTypeAnnotation, getURIForPrefix, gsetAttributeCollection, isId, isInScopeNamespace, isNilled, iteratePrefixes, removeAttribute, removeTypeAnnotation, rename, setLocation, setNameCode, setNamespaceList, setSystemId, setTypeAnnotation
atomize, compareOrder, comparePosition, getDisplayName, getDocumentNumber, getFingerprint, getLocalPart, getNextInDocument, getNextSibling, getParent, getPhysicalRoot, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getSiblingPosition, getSuccessorElement, getURI, head, insertSiblings, isDeleted, isIdref, isSameNodeInfo, iterate, iterateAxis, iterateAxis, newBuilder, replace
public static final java.util.Comparator<XBRLPeriod> TimeSorterInstance
(a) duration periods are ordered according to the date in the middle of the period.
(b) instant periods are ordered according to the date represented.
(c) Forever periods are duration periods. they are equal to forever periods or always start earlier that any other duration period. Forever period and instant period comparison result in -1.
(d) Instant and Duration periods are ordered according to a date that is in the middle of the period
public static final java.util.Comparator<XBRLPeriod> TimeSorterReverseInstance
public static final javax.xml.namespace.QName periodNode
public static final net.sf.saxon.om.StructuredQName sqnPeriodNode
public static final int DATE_INSTANT
public static final int DATE_START
public static final int DATE_END
public XBRLPeriod(XMLFragment node)
node
- XMLFragment XML node s9api where data will be read frompublic XBRLPeriod(DTSContainer dts, boolean forever)
dts
- DTSContainerforever
- true if is foreverpublic XBRLPeriod(DTSContainer dts, java.lang.String startDate, java.lang.String endDate)
dts
- - DTSContainerstartDate
- - Date string in ISO 8601 formatendDate
- - Date string in ISO 8601 formatpublic XBRLPeriod(DTSContainer dts, java.lang.String instantDate)
dts
- - DTSContainerinstantDate
- - Date string in ISO 8601 formatpublic XBRLPeriod(DTSContainer dts, java.util.GregorianCalendar instant, boolean bHasTimeZone, boolean bHasTime)
dts
- - DTSContainerinstant
- - Gregorian CalendarbHasTimeZone
- the b has time zonebHasTime
- the b has timepublic XBRLPeriod(DTSContainer dts, java.util.GregorianCalendar start, java.util.GregorianCalendar end, boolean bHasTimeZone, boolean bHasTime)
dts
- the dtsstart
- the startend
- the endbHasTimeZone
- the b has time zonebHasTime
- the b has timepublic java.util.GregorianCalendar getComparableDate()
public static XBRLPeriod make(DTSContainer dts)
dts
- the dtspublic void clear() throws java.lang.Throwable
clear
in class XMLFragment
java.lang.Throwable
- the throwablepublic XBRLPeriod clone()
clone
in class XMLFragment
public XBRLPeriod clone(DTSContainer newDTS)
clone
in class XMLFragment
newDTS
- the new DTSpublic static net.sf.saxon.value.CalendarValue getCalendarValue(java.lang.CharSequence cs) throws net.sf.saxon.trans.XPathException
cs
- the csnet.sf.saxon.trans.XPathException
- the x path exceptionpublic XMLFragment getElementEndDate()
public XMLFragment getElementStartDate()
public XMLFragment getElementInstant()
public XMLFragment getElementForever()
public XBRLItem.PeriodType getPeriodType()
public java.lang.String getFriendlyName()
getFriendlyName
in class XMLFragment
public java.lang.String getFriendlyName(int use)
getFriendlyName
in class XMLFragment
use
- the usepublic java.lang.String getFriendlyName(int modifiers, LabelsProvider lp)
getFriendlyName
in class XMLFragment
modifiers
- the modifierslp
- the lppublic 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_ENDpublic java.lang.String getRawDate(int type)
type
- code indicating what to obtain. DATE_INSTANT, DATE_START or DATE_ENDpublic java.util.GregorianCalendar getGregorianCalendarDate(int type)
type
- one of the constants belowpublic java.util.GregorianCalendar getRawGregorianCalendarDate(int type)
type
- one of the constants belowpublic static java.util.GregorianCalendar adjust24h(java.util.GregorianCalendar calendar, boolean sign)
calendar
- the calendarsign
- boolean (true) to add 24 hours (false) to substract 24 hourspublic XBRLValidationReport validate()
public boolean equals(java.lang.Object other)
equals
in interface net.sf.saxon.om.NodeInfo
equals
in class XMLFragment
other
- the otherpublic boolean s_equal2(java.lang.Object other)
s_equal2
in class XMLFragment
other
- the otherpublic int hashCode()
hashCode
in interface net.sf.saxon.om.NodeInfo
hashCode
in class XMLFragment
public XMLFragment generateNode() throws XBRLSerializationException
generateNode
in class XMLFragment
XBRLSerializationException
- the XBRL serialization exceptionpublic 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 informationpublic 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 truepublic void setDate(int type, java.lang.String strDate) throws XBRLValidationException
type
- this is the field, DATE_END, DATE_INSTANT, DATE_STARTstrDate
- iso8601 date stringXBRLValidationException
- the XBRL validation exceptionpublic java.util.Date getRawDateUtil(int code)
code
- this is the field, DATE_END, DATE_INSTANT, DATE_STARTpublic java.lang.String getLocalizedPeriodType()
public static java.lang.String getLocalizedPeriodType(XBRLItem.PeriodType periodType)
periodType
- constant indicating XBRLItem.INSTANT or XBRLItem.DURATIONpublic boolean isHasDateAndTime()
public boolean isHasTimeZone()
public void setForever()
public final boolean hasChildNodes()
hasChildNodes
in interface net.sf.saxon.om.NodeInfo
hasChildNodes
in class net.sf.saxon.tree.linked.NodeImpl
public final int getNumberOfChildren()
public final net.sf.saxon.tree.linked.NodeImpl getFirstChild()
getFirstChild
in interface net.sf.saxon.tree.util.SteppingNode<net.sf.saxon.tree.linked.NodeImpl>
getFirstChild
in class net.sf.saxon.tree.linked.NodeImpl
public final net.sf.saxon.tree.linked.NodeImpl getLastChild()
getLastChild
in class net.sf.saxon.tree.linked.NodeImpl
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa