org.xbrlapi.aspects
Class ConceptDomain
java.lang.Object
org.xbrlapi.aspects.DomainImpl
org.xbrlapi.aspects.ConceptDomain
- All Implemented Interfaces:
- Serializable, Comparator<AspectValue>, Domain, StoreHandler
public class ConceptDomain
- extends DomainImpl
- implements Domain
- See Also:
- Serialized Form
|
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
| 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
ConceptDomain
public ConceptDomain(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()
getAllAspectValues
public List<AspectValue> getAllAspectValues()
throws XBRLException
- Specified by:
getAllAspectValues in interface Domain- Overrides:
getAllAspectValues in class DomainImpl
- Returns:
- a list of all of the aspect values in the domain except for the
missing value. The list is ordered based on a depth first
traversal of the aspect values in the domain. Thus, parent values
come immediately before their child values and child values are
sorted by their strict ordering if there is one.
- Throws:
XBRLException- See Also:
Domain.getAllAspectValues()
getSize
public long getSize()
throws XBRLException
- Returns the number of non-abstract concepts in the data store.
- Specified by:
getSize in interface Domain- Overrides:
getSize in class DomainImpl
- Returns:
- the number of aspect values in the domain or null if
the domain size is infinite.
- Throws:
XBRLException- See Also:
Domain.getSize()
hasChildren
public boolean hasChildren(AspectValue value)
throws XBRLException
- Specified by:
hasChildren in interface Domain- Overrides:
hasChildren in class DomainImpl
- Parameters:
value - The aspect value.
- Returns:
- true if the aspect value has child aspect values and false
otherwise.
- Throws:
XBRLException- See Also:
Domain.hasChildren(AspectValue)
hasParent
public boolean hasParent(AspectValue child)
throws XBRLException
- Specified by:
hasParent in interface Domain- Overrides:
hasParent in class DomainImpl
- Parameters:
child - The child aspect value.
- Returns:
- true if this aspect value has a parent aspect value in the aspect
model and false otherwise.
- Throws:
XBRLException- See Also:
Domain.hasParent(AspectValue)
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)
isFinite
public boolean isFinite()
- Description copied from interface:
Domain
- The getSize() and the getAllAspectValues methods must only be implemented
if this method returns true. Otherwise they need to throw an exception.
- Specified by:
isFinite in interface Domain- Overrides:
isFinite in class DomainImpl
- Returns:
- true if the domain has a finite number of members in it and
false otherwise.
- See Also:
Domain.isFinite()
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 the natural ordering of
the concept namespaces and then the concept local names.
Missing values are ranked last among aspect values of the same type.