XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class PeriodImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.FragmentImpl
          extended by org.xbrlapi.impl.ContextComponentImpl
              extended by org.xbrlapi.impl.PeriodImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, ContextComponent, Fragment, Period, XML

public class PeriodImpl
extends ContextComponentImpl
implements Period

Implementation of context period fragments for instants and durations.

Author:
Geoffrey Shuetrim (geoff@galexy.net)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xbrlapi.impl.XMLImpl
logger
 
Constructor Summary
PeriodImpl()
           
 
Method Summary
 boolean endHasTimezone()
           
 boolean endIsDateOnly()
           
 String getEnd()
           
 XMLGregorianCalendar getEndCalendar()
           
 String getInstant()
          Get the instant.
 XMLGregorianCalendar getInstantCalendar()
           
 String getStart()
           
 XMLGregorianCalendar getStartCalendar()
           
 boolean instantHasTimezone()
           
 boolean instantIsDateOnly()
           
 boolean isFiniteDurationPeriod()
          Returns true if the period is a duration.
 boolean isForeverPeriod()
          Returns true if the period is forever.
 boolean isInstantPeriod()
          Returns true if the period is an instant.
 boolean startHasTimezone()
           
 boolean startIsDateOnly()
           
 
Methods inherited from class org.xbrlapi.impl.ContextComponentImpl
getContext
 
Methods inherited from class org.xbrlapi.impl.FragmentImpl
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from class org.xbrlapi.impl.XMLImpl
appendMetadataElement, compareTo, equals, finalize, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.ContextComponent
getContext
 
Methods inherited from interface org.xbrlapi.Fragment
appendElementSchemeXPointer, appendID, getAllChildren, getAllChildrenIndices, getAncestorOrSelf, getChild, getChildren, getChildren, getChildrenIndices, getDataRootElement, getElementSchemeXPointerExpression, getIDXPointerExpression, getLabels, getLabels, getLabels, getLabelsWithLanguage, getLabelsWithLanguageAndResourceRole, getLabelsWithLanguageAndResourceRoleAndLinkRole, getLabelsWithResourceRole, getLanguage, getLanguage, getLanguageName, getLanguageName, getLocalname, getLocalnameFromQName, getNamespace, getNamespaceFromQName, getParent, getParentElement, getParentIndex, getPrefixFromQName, getReferences, getReferencesWithLanguage, getReferencesWithLanguageAndResourceRoleAndLinkRole, getReferencesWithLanguageAndRole, getReferencesWithResourceRole, getReferencingLocators, getSequenceToParentElement, getSequenceToParentElementAsString, getSimpleLinks, getURI, getXPath, getXPointerExpression, isAncestorOf, isChild, isNewFragment, isRoot, setParentIndex, setSequenceToParentElement, setURI
 
Methods inherited from interface org.xbrlapi.XML
appendMetadataElement, equals, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

PeriodImpl

public PeriodImpl()
Method Detail

isFiniteDurationPeriod

public boolean isFiniteDurationPeriod()
                               throws XBRLException
Description copied from interface: Period
Returns true if the period is a duration.

Specified by:
isFiniteDurationPeriod in interface Period
Throws:
XBRLException
See Also:
isFiniteDurationPeriod()

isInstantPeriod

public boolean isInstantPeriod()
                        throws XBRLException
Description copied from interface: Period
Returns true if the period is an instant.

Specified by:
isInstantPeriod in interface Period
Throws:
XBRLException
See Also:
isInstantPeriod()

isForeverPeriod

public boolean isForeverPeriod()
                        throws XBRLException
Description copied from interface: Period
Returns true if the period is forever.

Specified by:
isForeverPeriod in interface Period
Throws:
XBRLException
See Also:
isForeverPeriod()

getInstant

public String getInstant()
                  throws XBRLException
Description copied from interface: Period
Get the instant.

Specified by:
getInstant in interface Period
Returns:
the string value of the instant.
Throws:
XBRLException - if the period is not an instant.
See Also:
getInstant()

getStart

public String getStart()
                throws XBRLException
Specified by:
getStart in interface Period
Returns:
the start of the period.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
getStart()

getEnd

public String getEnd()
              throws XBRLException
Specified by:
getEnd in interface Period
Returns:
the end of the period.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
getEnd()

getEndCalendar

public XMLGregorianCalendar getEndCalendar()
                                    throws XBRLException
Specified by:
getEndCalendar in interface Period
Returns:
the end moment as a java.util.Calendar value. Note that the value is adjusted if necessary to reflect the AM/PM specifics of end dates in the XBRL 2.1 specification.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
Period.getEndCalendar()

getInstantCalendar

public XMLGregorianCalendar getInstantCalendar()
                                        throws XBRLException
Specified by:
getInstantCalendar in interface Period
Returns:
the instant moment as a java.util.Calendar value. Note that the value is adjusted if necessary to reflect the AM/PM specifics of instant dates in the XBRL 2.1 specification.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
Period.getInstantCalendar()

getStartCalendar

public XMLGregorianCalendar getStartCalendar()
                                      throws XBRLException
Specified by:
getStartCalendar in interface Period
Returns:
the start moment as a java.util.Calendar value.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
Period.getStartCalendar()

endHasTimezone

public boolean endHasTimezone()
                       throws XBRLException
Specified by:
endHasTimezone in interface Period
Returns:
true if the end of a finite duration specifies the timezone and false otherwise.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
endHasTimezone()

endIsDateOnly

public boolean endIsDateOnly()
                      throws XBRLException
Specified by:
endIsDateOnly in interface Period
Returns:
true if the end of a finite duration is specified as a date only, with no time (or timezone information) and false otherwise.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
endIsDateOnly()

instantHasTimezone

public boolean instantHasTimezone()
                           throws XBRLException
Specified by:
instantHasTimezone in interface Period
Returns:
true if an instant specifies the timezone and false otherwise.
Throws:
XBRLException - if the period is not an instant.
See Also:
instantHasTimezone()

instantIsDateOnly

public boolean instantIsDateOnly()
                          throws XBRLException
Specified by:
instantIsDateOnly in interface Period
Returns:
true if an instant is specified as a date only, with no time (or timezone information) and false otherwise.
Throws:
XBRLException - if the period is not an instant.
See Also:
instantIsDateOnly()

startHasTimezone

public boolean startHasTimezone()
                         throws XBRLException
Specified by:
startHasTimezone in interface Period
Returns:
true if the start of a finite duration specifies the timezone and false otherwise.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
startHasTimezone()

startIsDateOnly

public boolean startIsDateOnly()
                        throws XBRLException
Specified by:
startIsDateOnly in interface Period
Returns:
true if the start of a finite duration is specified as a date only, with no time (or timezone information) and false otherwise.
Throws:
XBRLException - if the period is not a finite duration.
See Also:
startIsDateOnly()

Get Java XBRL API implementation at SourceForge.net.