XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Class PeriodAspectValue

java.lang.Object
  extended by org.xbrlapi.aspects.AspectValueImpl
      extended by org.xbrlapi.aspects.PeriodAspectValue
All Implemented Interfaces:
Serializable, AspectHandler, AspectValue

public class PeriodAspectValue
extends AspectValueImpl
implements AspectValue

See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
PeriodAspectValue()
          Missing aspect value constructor - relevant for tuples and nil facts.
PeriodAspectValue(Period period)
           
 
Method Summary
 boolean endIsDateOnly()
           
 URI getAspectId()
           
 XMLGregorianCalendar getEnd()
           
 String getId()
          This method must be implemented by each concrete aspect value class.
 XMLGregorianCalendar getInstant()
           
 String getRawEnd()
           
 String getRawInstant()
           
 String getRawStart()
           
 XMLGregorianCalendar getStart()
           
 boolean instantIsDateOnly()
           
 boolean isDuration()
           
 boolean isFiniteDuration()
           
 boolean isForever()
           
 boolean isInstant()
           
 boolean isMissing()
          This method must be implemented by each concrete aspect value class.
 boolean startIsDateOnly()
           
 
Methods inherited from class org.xbrlapi.aspects.AspectValueImpl
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

PeriodAspectValue

public PeriodAspectValue()
Missing aspect value constructor - relevant for tuples and nil facts.


PeriodAspectValue

public PeriodAspectValue(Period period)
                  throws XBRLException
Parameters:
period - The context period.
Throws:
XBRLException - if the parameter is null.
Method Detail

getId

public String getId()
Description copied from interface: AspectValue
This method must be implemented by each concrete aspect value class. The identifier associated with a "missing-value" aspect value is implementation dependent. You cannot assume that it will be the empty string or a null value.

Specified by:
getId in interface AspectValue
Returns:
the string value that uniquely identifies this aspect value, for a given aspect. This value is not generally human readable. The label handler methods are more suitable for obtaining human readable representations of aspect values. A unique value for missing aspect values needs to be generated by implementations of this method.
See Also:
AspectValue.getId()

getStart

public XMLGregorianCalendar getStart()
Returns:
the start date/time Calendar or null if it is not defined.

getEnd

public XMLGregorianCalendar getEnd()
Returns:
the end date/time Calendar or null if it is not defined.

getRawEnd

public String getRawEnd()
Returns:
the raw String representation of the finite duration end date or the instant date in a context period. Returns null if the period is forever or an instant.

getRawStart

public String getRawStart()
Returns:
the raw String representation of the finite duration start date in a context period. Returns null if the period is not a finite duration.

getRawInstant

public String getRawInstant()
Returns:
the raw String representation of the instant in a context period. Returns null if the period is not an instant.

getInstant

public XMLGregorianCalendar getInstant()
Returns:
the instant date/time Calendar or null if it is not defined.

isForever

public boolean isForever()
Returns:
true if the period is forever and false otherwise.

isDuration

public boolean isDuration()
Returns:
true if the period is forever and false otherwise.

isInstant

public boolean isInstant()

isFiniteDuration

public boolean isFiniteDuration()
Returns:
true if the period is a finite duration and false otherwise.

getAspectId

public URI getAspectId()
Specified by:
getAspectId in interface AspectHandler
Returns:
the aspect itself
See Also:
AspectHandler.getAspectId()

isMissing

public boolean isMissing()
Description copied from interface: AspectValue
This method must be implemented by each concrete aspect value class.

Specified by:
isMissing in interface AspectValue
Returns:
true if this aspect value represents a missing value and false otherwise.
See Also:
AspectValue.isMissing()

startIsDateOnly

public boolean startIsDateOnly()
Returns:
true if the period is a finite duration and the start date has no time component and false otherwise.

endIsDateOnly

public boolean endIsDateOnly()
Returns:
true if the period is a finite duration and the end date has no time component and false otherwise.

instantIsDateOnly

public boolean instantIsDateOnly()
Returns:
true if the period is an instant duration and the instant has no time component and false otherwise.

Get Java XBRL API implementation at SourceForge.net.