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

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

public class AssociationConverter
extends Object
implements QueryFilter

Converts the provided Collection of TM4J Associations to a Collection of Assertions. This is a one-way deal. The conversion method convert(Association) can also be called for a single Association-to-Assertion conversion.

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

Constructor Summary
AssociationConverter(WikiMapManager manager)
           
 
Method Summary
 Assertion convert(Association assoc)
          Converts the TMAPI Association to an Assertion, returning null if it does not fit the basic template.
 Collection filter(Collection associations, TopicMap topicmap, Object object)
          Provided a Collection of TMAPI Associations, returns them converted to Assertions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssociationConverter

public AssociationConverter(WikiMapManager manager)
                     throws TopicMapException
Throws:
TopicMapException
Method Detail

filter

public Collection filter(Collection associations,
                         TopicMap topicmap,
                         Object object)
                  throws FilterException
Provided a Collection of TMAPI Associations, returns them converted to Assertions.

Specified by:
filter in interface QueryFilter
Parameters:
associations - the source Collection.
topicmap - the TopicMap used.
object - ignored.
Returns:
a Collection containing the Assertions.
Throws:
FilterException - if an error occurs during conversion.

convert

public Assertion convert(Association assoc)
                  throws FilterException
Converts the TMAPI Association to an Assertion, returning null if it does not fit the basic template.

Parameters:
assoc - the source Association.
Returns:
the converted Assertion.
Throws:
FilterException - if an error occurs during conversion.


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