|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbrlapi.aspects.FactSetImpl
public class FactSetImpl
The implementation requires high performance for
the FactSet.getAspectValues(Fact) method
and the FactSet.getFacts(AspectValue) method.
It should be noted that a fact will map to multiple aspect values
and that an aspect value will, in general, map to multiple facts.
To support this performance requirement, a FactSet is implemented using three one-to-many maps . These are based on synchronised versions of the Google Collections Multimap.
| Constructor Summary | |
|---|---|
FactSetImpl(AspectModel model)
|
|
| Method Summary | ||
|---|---|---|
void |
addFact(Fact fact)
Adds the fact to the fact set, computing the aspect values for the fact for each aspect in the fact set's aspect model. |
|
|
addFacts(Collection<F> facts)
Adds the facts to the fact set, computing the aspect values for the facts for each aspect in the fact set's aspect model. |
|
void |
emptyLocalLabelCache()
This method simply empties the label cache that is a local property of the fact set. |
|
AspectModel |
getAspectModel()
|
|
AspectValue |
getAspectValue(URI aspectId,
Fact fact)
|
|
int |
getAspectValueCount(URI aspectId)
|
|
String |
getAspectValueLabel(AspectValue value,
List<String> locales,
List<URI> resourceRoles,
List<URI> linkRoles)
This is a convenience method to give access to the labels generated by the labellers for the values of each aspect in the fact set's aspect model. |
|
String |
getAspectValueLabel(AspectValue value,
String locale,
URI resourceRole,
URI linkRole)
This is a convenience method to give access to the labels generated by the labellers for the values of each aspect in the fact set's aspect model. |
|
Set<AspectValue> |
getAspectValues()
|
|
Collection<AspectValue> |
getAspectValues(Fact fact)
|
|
Collection<AspectValue> |
getAspectValues(URI aspectId)
|
|
Set<Fact> |
getFacts()
|
|
Set<Fact> |
getFacts(AspectValue value)
|
|
Set<Fact> |
getFacts(Collection<AspectValue> values)
|
|
AspectModel |
getModel()
|
|
Collection<Aspect> |
getPopulatedAspects()
|
|
List<Fact> |
getRootFacts(URI aspectId)
|
|
long |
getSize()
|
|
boolean |
hasAspectValue(AspectValue value)
|
|
boolean |
hasFact(Fact fact)
|
|
boolean |
isPopulated(URI aspectId)
|
|
boolean |
isSingular(URI aspectId)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FactSetImpl(AspectModel model)
throws XBRLException
model - The aspect model determining the aspects to work with.
XBRLException| Method Detail |
|---|
public AspectModel getModel()
getModel in interface FactSetFactSet.getModel()public AspectModel getAspectModel()
getAspectModel in interface FactSetFactSet.getAspectModel()
public <F extends Fact> void addFacts(Collection<F> facts)
throws XBRLException
FactSet
addFacts in interface FactSetfacts - The facts to add.
XBRLExceptionFactSet.addFacts(Collection)
public void addFact(Fact fact)
throws XBRLException
FactSet
addFact in interface FactSetfact - The fact to add.
XBRLExceptionFactSet.addFact(Fact)public Set<AspectValue> getAspectValues()
getAspectValues in interface FactSetFactSet.getAspectValues()
public Collection<AspectValue> getAspectValues(Fact fact)
throws XBRLException
getAspectValues in interface FactSetfact - The fact.
XBRLExceptionFactSet.getAspectValues(Fact)
public AspectValue getAspectValue(URI aspectId,
Fact fact)
throws XBRLException
getAspectValue in interface FactSetaspectId - the ID of the aspect to get the aspect value for.fact - The fact.
XBRLExceptionFactSet.getAspectValue(URI, Fact)public Collection<AspectValue> getAspectValues(URI aspectId)
getAspectValues in interface FactSetaspectId - The ID of the aspect.
FactSet.getAspectValues(URI)public int getAspectValueCount(URI aspectId)
getAspectValueCount in interface FactSetaspectId - The ID of the aspect.
FactSet.getAspectValueCount(URI)public Set<Fact> getFacts()
getFacts in interface FactSetFactSet.getFacts()public Set<Fact> getFacts(AspectValue value)
getFacts in interface FactSetvalue - The aspect value.
FactSet.getFacts(AspectValue)public Set<Fact> getFacts(Collection<AspectValue> values)
getFacts in interface FactSetvalues - The collection of aspect values that the
returned facts must have.
FactSet.getFacts(Collection)public boolean hasAspectValue(AspectValue value)
hasAspectValue in interface FactSetvalue - The aspect value to test for.
FactSet.hasAspectValue(AspectValue)public boolean hasFact(Fact fact)
hasFact in interface FactSetfact - The fact to test for.
FactSet.hasFact(Fact)public long getSize()
getSize in interface FactSetFactSet.getSize()public boolean isPopulated(URI aspectId)
isPopulated in interface FactSetaspectId - The ID of the aspect.
FactSet.isPopulated(URI)public boolean isSingular(URI aspectId)
isSingular in interface FactSetaspectId - The ID of the aspect.
FactSet.isSingular(URI)
public List<Fact> getRootFacts(URI aspectId)
throws XBRLException
getRootFacts in interface FactSetaspectId - The ID of the aspect of interest.
XBRLExceptionFactSet.getRootFacts(URI)
public Collection<Aspect> getPopulatedAspects()
throws XBRLException
getPopulatedAspects in interface FactSetXBRLExceptionFactSet.getPopulatedAspects()public void emptyLocalLabelCache()
FactSet
emptyLocalLabelCache in interface FactSetFactSet.emptyLocalLabelCache()
public String getAspectValueLabel(AspectValue value,
List<String> locales,
List<URI> resourceRoles,
List<URI> linkRoles)
throws XBRLException
FactSet
getAspectValueLabel in interface FactSetvalue - The aspect valuelocales - The list of label locales from first, most preferred to last,
least preferred. The list can include nulls or it can be null.resourceRoles - The list of label XLink resource roles from first, most
preferred to last, least preferred. The list can include nulls
or it can be null.linkRoles - The label link role from first, most preferred to last, least
preferred. The list can include nulls or it can be null.
XBRLException - if the aspect is not in the aspect model.FactSet.getAspectValueLabel(AspectValue, java.util.List, java.util.List, java.util.List)
public String getAspectValueLabel(AspectValue value,
String locale,
URI resourceRole,
URI linkRole)
throws XBRLException
FactSet
getAspectValueLabel in interface FactSetvalue - The aspect valuelocale - The label localeresourceRole - The label XLink resource rolelinkRole - The label link role
XBRLException - if the aspect is not in the aspect model.FactSet.getAspectValueLabel(AspectValue, java.lang.String, java.net.URI, java.net.URI)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||