de.tudarmstadt.ukp.jwktl.api.filter
Class WiktionaryPageFilter

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.api.filter.WiktionaryPageFilter
All Implemented Interfaces:
IWiktionaryPageFilter
Direct Known Subclasses:
WiktionaryEntryFilter

public class WiktionaryPageFilter
extends Object
implements IWiktionaryPageFilter

Default implementation of the IWiktionaryPageFilter interface which provides the possibility of filtering out pages with certain entry languages. This is useful if a IWiktionaryCollection is used to access multiple IWiktionaryEditions of different entry languages.

Author:
Christian M. Meyer

Field Summary
protected  Set<ILanguage> allowedEntryLanguages
           
 
Constructor Summary
WiktionaryPageFilter()
          Initializes a page filter without any filter restrictions.
 
Method Summary
 boolean accept(IWiktionaryPage page)
          Return true if the given page should be accepted or false if it should be filtered out.
protected  boolean acceptEntryLanguage(IWiktionaryPage page)
           
 void clear()
          Clears all filter options.
 void clearAllowedEntryLanguages()
          Clears the list of allowed entry languages.
 Iterable<ILanguage> getAllowedEntryLanguages()
          Return an iterable of the list of all allowed entry languages.
 void setAllowedEntryLanguages(Collection<ILanguage> allowedEntryLanguages)
          Define the set of entry languages which are allowed for a IWiktionaryPage.
 void setAllowedEntryLanguages(ILanguage... allowedEntryLanguages)
          Define the set of entry languages which are allowed for a IWiktionaryPage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowedEntryLanguages

protected Set<ILanguage> allowedEntryLanguages
Constructor Detail

WiktionaryPageFilter

public WiktionaryPageFilter()
Initializes a page filter without any filter restrictions.

Method Detail

clear

public void clear()
Clears all filter options.


clearAllowedEntryLanguages

public void clearAllowedEntryLanguages()
Clears the list of allowed entry languages.


getAllowedEntryLanguages

public Iterable<ILanguage> getAllowedEntryLanguages()
Return an iterable of the list of all allowed entry languages.


setAllowedEntryLanguages

public void setAllowedEntryLanguages(ILanguage... allowedEntryLanguages)
Define the set of entry languages which are allowed for a IWiktionaryPage. If no language is specified, the restriction on the entry language will be cleared.


setAllowedEntryLanguages

public void setAllowedEntryLanguages(Collection<ILanguage> allowedEntryLanguages)
Define the set of entry languages which are allowed for a IWiktionaryPage. If no language is specified, the restriction on the entry language will be cleared.


acceptEntryLanguage

protected boolean acceptEntryLanguage(IWiktionaryPage page)

accept

public boolean accept(IWiktionaryPage page)
Description copied from interface: IWiktionaryPageFilter
Return true if the given page should be accepted or false if it should be filtered out.

Specified by:
accept in interface IWiktionaryPageFilter


Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.