org.xbrlapi.aspects
Class PeriodAspectValue
java.lang.Object
org.xbrlapi.aspects.AspectValueImpl
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
|
logger
protected static final org.apache.log4j.Logger logger
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.
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.