org.ceryle.wiki.plugin.assertion.filter
Class AssociationToAssertionFilter

java.lang.Object
  extended by org.ceryle.wiki.plugin.assertion.filter.AssociationToAssertionFilter
All Implemented Interfaces:
QueryFilter

public class AssociationToAssertionFilter
extends Object
implements QueryFilter

Filters the provided Collection of Associations, only returning those whose scope indicates they are Assertion-based Associations. This is usually the initial filter in a chain.

Version:
$Id: AssociationToAssertionFilter.java,v 1.3 2007-06-15 12:10:15 altheim Exp $
Author:
Murray Altheim

Constructor Summary
AssociationToAssertionFilter()
           
 
Method Summary
 Collection filter(Collection collection, TopicMap topicmap, Object scopeAssertion)
          Returns a Collection of Associations in the TopicMap topicmap having a Scope indicating that they are based on Assertions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationToAssertionFilter

public AssociationToAssertionFilter()
Method Detail

filter

public Collection filter(Collection collection,
                         TopicMap topicmap,
                         Object scopeAssertion)
Returns a Collection of Associations in the TopicMap topicmap having a Scope indicating that they are based on Assertions. The optional Topic type serves as a filter on the result: if non-null the resulting Collection will contain only those Associations having that scope.

Specified by:
filter in interface QueryFilter
Parameters:
collection - the source Collection of TopicMap Associations (if null, all Associations in the TopicMap are queried)
topicmap - the TopicMap to query
scopeAssertion - the Assertion scoping Topic
Returns:
a Collection containing the result of the query (never null)
Throws:
FilterException - if an error occurs during filter processing.
ClassCastException - if the filter is non-null and not the expected class.


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.