org.ceryle.wiki.plugin.assertion.filter
Class PredicateFilter
java.lang.Object
org.ceryle.wiki.plugin.assertion.filter.PredicateFilter
- All Implemented Interfaces:
- QueryFilter
public class PredicateFilter
- extends Object
- implements QueryFilter
Filters the provided Collection of Associations with the
optional Topic predicate, requiring a match on
Association type.
- Version:
- $Id: PredicateFilter.java,v 1.2 2007-06-15 12:10:15 altheim Exp $
- Author:
- Murray Altheim
|
Method Summary |
Collection |
filter(Collection associations,
TopicMap topicmap,
Object predicate)
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 |
PredicateFilter
public PredicateFilter()
filter
public Collection filter(Collection associations,
TopicMap topicmap,
Object predicate)
throws FilterException
- 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 type.
- Specified by:
filter in interface QueryFilter
- Parameters:
associations - the source Collectiontopicmap - the TopicMap to querypredicate - the optional predicate/typing 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.