public class WiktionaryPageFilter extends Object implements IWiktionaryPageFilter
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 IWiktionaryEdition
s of different
entry languages.Modifier and Type | Field and Description |
---|---|
protected Set<ILanguage> |
allowedEntryLanguages |
Constructor and Description |
---|
WiktionaryPageFilter()
Initializes a page filter without any filter restrictions.
|
Modifier and Type | Method and Description |
---|---|
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 . |
public WiktionaryPageFilter()
public void clear()
public void clearAllowedEntryLanguages()
public Iterable<ILanguage> getAllowedEntryLanguages()
public void setAllowedEntryLanguages(ILanguage... allowedEntryLanguages)
IWiktionaryPage
. If no language is specified, the restriction
on the entry language will be cleared.public void setAllowedEntryLanguages(Collection<ILanguage> allowedEntryLanguages)
IWiktionaryPage
. If no language is specified, the restriction
on the entry language will be cleared.protected boolean acceptEntryLanguage(IWiktionaryPage page)
public boolean accept(IWiktionaryPage page)
IWiktionaryPageFilter
true
if the given page should be accepted or
false
if it should be filtered out.accept
in interface IWiktionaryPageFilter
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.