public class FactsListClassifier
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FactsListClassifier.SearchCriteria
This class hold the parameters for a search.
|
static class |
FactsListClassifier.SkipExplicitDimTest
This is a class to create a singleton constant to serve as a
parameter to the search method to disable search by explicit
dimension value.
|
static class |
FactsListClassifier.SkipTypedDimTest
This is a class to create a singleton constant to serve as a
parameter to the search method to disable search by typed
dimension value.
|
Modifier and Type | Field and Description |
---|---|
static FactsListClassifier.SkipExplicitDimTest |
SKIPEXPLICITDIMTESTS
serves to disable search by dimensions in the search method.
|
static FactsListClassifier.SkipTypedDimTest |
SKIPTYPEDDIMTESTS
serves to disable search by dimensions in the search method.
|
Constructor and Description |
---|
FactsListClassifier(XBRLFactsList input,
DTSContainer dts)
This class maintains a set of facts indexed by the distinct values of the
facts aspects.
|
FactsListClassifier(XBRLFactsList input,
int aspectsFocus,
DTSContainer dts)
This class maintains a set of facts indexed by the distinct values of the
facts aspects.
|
Modifier and Type | Method and Description |
---|---|
void |
addAspects(XBRLFactsList instance,
int aspectsToCover)
Adds the aspects.
|
void |
addFact(XBRLFact fact)
Adds the fact.
|
void |
addFacts(XBRLFactsList input)
Adds all facts in the input XBRLFactsList using the aspects already configured.
|
void |
clear()
Clear all content including references to external resolvers.
|
void |
clearFacts()
Clear only stored facts by all aspects stored.
|
FactsListClassifier.SearchCriteria |
compileSeach(java.util.Collection<java.lang.Object> members)
Compile seach.
|
void |
delFact(XBRLFact fact)
Del fact.
|
java.util.Set<XBRLFact> |
getAllFacts()
Returns all facts stored.
|
java.util.Set<?> |
getAspectDistinctValues(Aspect ap)
Gets the aspect distinct values.
|
java.util.Set<?> |
getAspectDistinctValues(int aspect,
javax.xml.namespace.QName dimension)
Gets the aspect distinct values.
|
java.util.Set<Aspect> |
getAspects(int aspectKey)
Gets the aspects.
|
java.util.Iterator<Aspect> |
getAspectsByDistribution()
Returns an iterator over all aspects for which facts are classified
Before returning the iterator, all analyzed aspects are classified by
the number of distinct values for the aspect and the iterator returns
first the aspect with higher number of distinct values
This ensures a loop to find duplicates (for instance) will execute
as less loops as possible .
|
java.util.Set<XBRLFact> |
getByConcept(javax.xml.namespace.QName concept)
Gets the by concept.
|
java.util.Set<XBRLFact> |
getByExplicitDimension(javax.xml.namespace.QName dimension)
Gets the by explicit dimension.
|
java.util.Set<XBRLFact> |
getByExplicitDimensionAndMember(javax.xml.namespace.QName dimension,
javax.xml.namespace.QName member)
Gets the by explicit dimension and member.
|
java.util.Set<XBRLFact> |
getByTypedDimension(javax.xml.namespace.QName dimension)
Gets the by typed dimension.
|
CompanyKey |
getFirstCompany()
This method is required in order to work with multiple companies in the same XBRL report.
|
java.util.Collection<XBRLFact> |
search(java.util.Collection<java.lang.Object> members)
Searches for facts satisfying all aspects in the collection.
|
java.util.Collection<XBRLFact> |
search(java.util.Collection<java.lang.Object> members,
java.lang.StringBuilder log)
Searches for facts satisfying all aspects in the collection.
|
boolean |
searchByConcept(FactsListClassifier.SearchCriteria sc,
java.util.Set<XBRLFact> allPass,
java.lang.StringBuilder log)
Search by concept.
|
java.util.Set<XBRLFactItem> |
searchDimensionsANDAlt(java.util.Collection<DimensionAndMemberQNamesPair> input)
Search classified facts for all facts that contains all dimensions indicated in the input.
|
java.util.Set<XBRLFactItem> |
searchDimensionsOR(java.util.Collection<DimensionAndMemberQNamesPair> input)
Search classified facts for all facts that contains at least one of the dimension and member pairs indicated in the input.
|
java.util.Set<XBRLFactItem> |
searchExplicitDimensionsAND(java.util.Collection<DimensionAndMemberQNamesPair> input)
Search classified facts for all facts that contains all dimensions indicated in the input.
|
java.util.Set<XBRLFactItem> |
searchTypedDimensionsAND(java.util.Collection<DimensionAndFragmentMemberPair> input)
Search classified facts for all facts that contains all dimensions indicated in the input.
|
void |
setOpenAspectValueResolver(OpenAspectValueResolver externalResolver)
Sets the open aspect value resolver.
|
public static final FactsListClassifier.SkipExplicitDimTest SKIPEXPLICITDIMTESTS
public static final FactsListClassifier.SkipTypedDimTest SKIPTYPEDDIMTESTS
public FactsListClassifier(XBRLFactsList input, DTSContainer dts)
#FactsListClassifier(XBRLFactsList, int)
instead.input
- XBRLFactsList to processdts
- the DTSContainer. Can be null if input is not null and contains a DTSContainerpublic FactsListClassifier(XBRLFactsList input, int aspectsFocus, DTSContainer dts)
aspectsFocus
parameterinput
- XBRLFactsList to processaspectsFocus
- aspects this classifier will work on.
Use an OR bitmap from constants
defined in the CommonAspectRule class CommonAspectRule
dts
- the DTSContainer. Can be null if input is not null and contains a DTSContainerpublic java.util.Set<XBRLFactItem> searchExplicitDimensionsAND(java.util.Collection<DimensionAndMemberQNamesPair> input)
input
- Collection of pairs of QName and Memberpublic java.util.Set<XBRLFactItem> searchTypedDimensionsAND(java.util.Collection<DimensionAndFragmentMemberPair> input)
input
- Collection of pairs of QName and Memberpublic java.util.Set<XBRLFactItem> searchDimensionsANDAlt(java.util.Collection<DimensionAndMemberQNamesPair> input)
input
- Collection of pairs of QName and Memberpublic java.util.Set<XBRLFactItem> searchDimensionsOR(java.util.Collection<DimensionAndMemberQNamesPair> input)
input
- Collection of pairs of QName and Memberpublic void addFacts(XBRLFactsList input)
input
- the inputpublic void addFact(XBRLFact fact)
fact
- the factpublic java.util.Set<XBRLFact> getAllFacts()
public void delFact(XBRLFact fact)
fact
- the factpublic void clearFacts()
public void clear()
public java.util.Set<?> getAspectDistinctValues(Aspect ap)
ap
- the aspectpublic java.util.Set<?> getAspectDistinctValues(int aspect, javax.xml.namespace.QName dimension)
aspect
- the aspectdimension
- the dimensionpublic java.util.Collection<XBRLFact> search(java.util.Collection<java.lang.Object> members)
members
- this is a collection of criteria members to satisfy. Every aspect has specific values.
public FactsListClassifier.SearchCriteria compileSeach(java.util.Collection<java.lang.Object> members)
members
- the memberspublic boolean searchByConcept(FactsListClassifier.SearchCriteria sc, java.util.Set<XBRLFact> allPass, java.lang.StringBuilder log)
sc
- the scallPass
- the all passlog
- the logpublic java.util.Set<XBRLFact> getByConcept(javax.xml.namespace.QName concept)
concept
- the conceptpublic java.util.Set<XBRLFact> getByTypedDimension(javax.xml.namespace.QName dimension)
dimension
- the dimensionpublic java.util.Set<XBRLFact> getByExplicitDimension(javax.xml.namespace.QName dimension)
dimension
- the dimensionpublic java.util.Set<XBRLFact> getByExplicitDimensionAndMember(javax.xml.namespace.QName dimension, javax.xml.namespace.QName member)
dimension
- the dimensionmember
- the memberpublic java.util.Collection<XBRLFact> search(java.util.Collection<java.lang.Object> members, java.lang.StringBuilder log)
members
- this is a collection of criteria members to satisfy. Every aspect has specific values
for the concept aspect, the member is the concept QName as a QName instance. For the location aspect
the member is the parent XBRLFactsList that is the fact parent. For the period aspect the member
is the instance of the XBRLPeriod to filter. For the Entity aspect the member is the specific XBRLEntity
to search for. For the Unit aspect the member is the XBRLUnit to filter. For filtering dimensions and
dimension member values use instances of DimensionAndMemberQNamesPair or DimensionAndFragmentMemberPair
for explicit and typed dimensions respectively. Dimensions allow for multiple different values to be
provided. For the CompleteContext aspect you can use an instance of XBRLContext.log
- the logpublic CompanyKey getFirstCompany()
public void setOpenAspectValueResolver(OpenAspectValueResolver externalResolver)
externalResolver
- the new open aspect value resolverpublic java.util.Set<Aspect> getAspects(int aspectKey)
aspectKey
- the aspect keypublic void addAspects(XBRLFactsList instance, int aspectsToCover)
instance
- the instanceaspectsToCover
- the aspects to coverpublic java.util.Iterator<Aspect> getAspectsByDistribution()
Before returning the iterator, all analyzed aspects are classified by the number of distinct values for the aspect and the iterator returns first the aspect with higher number of distinct values
This ensures a loop to find duplicates (for instance) will execute as less loops as possible .
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa