org.xbrlapi.aspects
Class PeriodDomain
java.lang.Object
org.xbrlapi.aspects.DomainImpl
org.xbrlapi.aspects.PeriodDomain
- All Implemented Interfaces:
- Serializable, Comparator<AspectValue>, Domain, StoreHandler
public class PeriodDomain
- extends DomainImpl
- implements Domain
- See Also:
- Serialized Form
|
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
| Methods inherited from class org.xbrlapi.aspects.DomainImpl |
allowsMissingValues, getAllAspectValues, getChildren, getDepth, getParent, getSize, getStore, hasChildren, hasParent, isFinite, isRoot |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.log4j.Logger logger
PeriodDomain
public PeriodDomain(Store store)
throws XBRLException
- Throws:
XBRLException
getAspectId
public URI getAspectId()
- Specified by:
getAspectId in interface Domain
- Returns:
- the URI identifying the aspect that this is a domain for.
- See Also:
Domain.getAspectId()
isInDomain
public boolean isInDomain(AspectValue candidate)
throws XBRLException
- Specified by:
isInDomain in interface Domain
- Parameters:
candidate - The candidate aspect value.
- Returns:
- true if the aspect value is in the domain and false otherwise.
- Throws:
XBRLException- See Also:
Domain.isInDomain(AspectValue)
compare
public int compare(AspectValue first,
AspectValue second)
- Specified by:
compare in interface Comparator<AspectValue>
- Parameters:
first - The first aspect valuesecond - The second aspect value
- Returns:
- -1 if the first aspect value is less than the second, 0 if they
are equal and 1 if the first aspect value is greater than the
second. Any aspect values that are not in this domain
are placed last in the aspect value ordering.
Otherwise, the comparison is based upon date/time ordering
of the end-date/instants and if that ordering is equal or indeterminate,
on the date/time ordering of the start-date/instants.
If the ordering remains indeterminate, then the periods are
treated as equal.
Missing values are ranked last among aspect values of the same type.