XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Interface Filter

All Superinterfaces:
Serializable
All Known Implementing Classes:
FilterImpl

public interface Filter
extends Serializable

Filter

A filter defines a filtration of a set of facts based upon aspect value matching.

A filter only uses one aspect value for a given aspect.

Author:
Geoff Shuetrim (geoff@galexy.net)

Method Summary
 void addCriterion(AspectValue criterion)
           
 boolean filtersOn(URI aspectId)
           
 Set<Fact> getMatchingFacts(FactSet candidateFacts)
           
 void removeAllCriteria()
          Removes all selection criteria from the filter.
 void removeCriterion(URI aspectId)
           
 

Method Detail

addCriterion

void addCriterion(AspectValue criterion)
                  throws XBRLException
Parameters:
criterion - The aspect value to use as a filtration selection criterion.
Throws:
XBRLException - if any of the parameters are null.

removeCriterion

void removeCriterion(URI aspectId)
Parameters:
aspectId - The aspect ID for the aspect that is to have its selection criterion removed from this filter. This method does nothing if the filter is not currently applying a criterion for the specified aspect.

removeAllCriteria

void removeAllCriteria()
Removes all selection criteria from the filter.


filtersOn

boolean filtersOn(URI aspectId)
Parameters:
aspectId - The aspect ID for the aspect that is to have its selection criterion removed from this filter.
Returns:
true if the filter has a selection criterion for the given aspect.

getMatchingFacts

Set<Fact> getMatchingFacts(FactSet candidateFacts)
Parameters:
candidateFacts - The facts to be filtered.
Returns:
the subset of facts with aspect values that match the aspect values that constitute the criteria in applied by the filter.

Get Java XBRL API implementation at SourceForge.net.