public class PostFilterByLanguage extends Object implements PostFilter
Keep only those pages that contain some data for the specified language and remove the trailing level 2 language header left by the prefilter.
IMPORTANT! This filter is written specifically to run after the LanguagePrefilter SAX filter is applied. This SAX filter assures that all
text segments begin with the expected language string (e.g.,
"==Polish=="). If you don't apply the SAX filter, you need a different
post-filter
that checks to see if the revision text contains the
languageString.
KEEP_ALL, KEEP_NONE| Constructor and Description |
|---|
PostFilterByLanguage() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
keepPage(PageType page)
Determines whether
page should be retained or discarded. |
boolean |
keepRevision(RevisionType revision,
PageType page)
Determines whether
revision should be retained or discarded. |
public boolean keepPage(PageType page)
PostFilterpage should be retained or discarded.keepPage in interface PostFilterpage - the PageType object under considerationtrue if page should be kept, false
otherwise.public boolean keepRevision(RevisionType revision, PageType page)
PostFilterrevision should be retained or discarded.keepRevision in interface PostFilterrevision - the RevisionType object under considerationpage - the PageType of the object containing this revision.true if revision should be kept, false otherwise.