public class EntityDocumentProcessorFilter extends Object implements EntityDocumentProcessor
EntityDocumentProcessor that acts as a filter,
removing some of the data from EntityDocument objects before passing
them on to another processor. There is an overhead involved in using this,
even if no filters are set, since a deep copy of the data is created to
filter it.| Constructor and Description |
|---|
EntityDocumentProcessorFilter(EntityDocumentProcessor entityDocumentProcessor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
processItemDocument(ItemDocument itemDocument)
Processes the given ItemDocument.
|
void |
processPropertyDocument(PropertyDocument propertyDocument)
Processes the given PropertyDocument.
|
void |
setLanguageFilter(Set<String> languageFilter)
Sets a language filter.
|
void |
setPropertyFilter(Set<PropertyIdValue> propertyFilter)
Sets a property filter.
|
void |
setSiteLinkFilter(Set<String> siteLinkFilter)
Sets a site link filter.
|
public EntityDocumentProcessorFilter(EntityDocumentProcessor entityDocumentProcessor)
entityDocumentProcessor - the processor to use on the filtered datapublic void setPropertyFilter(Set<PropertyIdValue> propertyFilter)
propertyFilter - set of language codes that should be retained (can be empty)DatamodelConverter.setOptionPropertyFilter(Set)public void setSiteLinkFilter(Set<String> siteLinkFilter)
siteLinkFilter - set of language codes that should be retained (can be empty)DatamodelConverter.setOptionSiteLinkFilter(Set)public void setLanguageFilter(Set<String> languageFilter)
languageFilter - set of language codes that should be retained (can be empty)DatamodelConverter.setOptionLanguageFilter(Set)public void processItemDocument(ItemDocument itemDocument)
EntityDocumentProcessorprocessItemDocument in interface EntityDocumentProcessoritemDocument - the ItemDocumentpublic void processPropertyDocument(PropertyDocument propertyDocument)
EntityDocumentProcessorprocessPropertyDocument in interface EntityDocumentProcessorpropertyDocument - the PropertyDocumentCopyright © 2014–2015 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage