public class DocumentDataFilter extends Object
EntityDocument
objects. This is used, e.g., to restrict only part of the data when copying
objects.Constructor and Description |
---|
DocumentDataFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
excludeAllLanguages()
Returns true if terms in all languages are excluded.
|
boolean |
excludeAllProperties()
Returns true if statements for all properties are excluded.
|
boolean |
excludeAllSiteLinks()
Returns true if site links for all sites are excluded.
|
Set<String> |
getLanguageFilter()
Returns the (possibly empty) set of language codes that are used to
filter data, or null if no such filter is configured (default).
|
Set<PropertyIdValue> |
getPropertyFilter()
Returns the (possibly empty) set of
PropertyIdValue objects that
are used to filter statements, or null if no such filter is configured
(default). |
Set<String> |
getSiteLinkFilter()
Returns the (possibly empty) set of site keys that are used to filter
SiteLink objects, or null if no such filter is configured
(default). |
boolean |
includeLanguage(String languageCode)
Returns true if the given language is included (not filtered).
|
boolean |
includePropertyId(PropertyIdValue propertyIdValue)
Returns true if the given property is included (not filtered).
|
boolean |
includeSiteLink(String siteLink)
Returns true if the given site link is included (not filtered).
|
void |
setLanguageFilter(Set<String> languageFilter)
Sets the (possibly empty) set of language codes that are used to filter
data.
|
void |
setPropertyFilter(Set<PropertyIdValue> propertyFilter)
Sets the (possibly empty) set of
PropertyIdValue objects that are
used to filter statements. |
void |
setSiteLinkFilter(Set<String> siteLinkFilter)
Sets the (possibly empty) set of site keys that are used to filter
SiteLink objects. |
public Set<String> getLanguageFilter()
public void setLanguageFilter(Set<String> languageFilter)
The language filter is not applied to monolingual text values in statements. Only labels, descriptions, and aliases are filtered.
languageFilter
- set of language codes to restrict topublic Set<PropertyIdValue> getPropertyFilter()
PropertyIdValue
objects that
are used to filter statements, or null if no such filter is configured
(default). If not equal to null, only statements using the given
properties will be included.public void setPropertyFilter(Set<PropertyIdValue> propertyFilter)
PropertyIdValue
objects that are
used to filter statements. Setting this to null disables this filter
(this is the default). If not equal to null, only statements using the
given properties will be included.
The property filter is not applied to qualifiers and references in statements. Only the main property of statements is filtered.
propertyFilter
- set of properties to use for filteringpublic Set<String> getSiteLinkFilter()
SiteLink
objects, or null if no such filter is configured
(default). If not equal to null, only site links for the given sites will
be included.public void setSiteLinkFilter(Set<String> siteLinkFilter)
SiteLink
objects. Setting this to null disables this filter (this
is the default). If not equal to null, only site links for the given
sites will be included.siteLinkFilter
- set of site keys to use for filteringpublic boolean includeLanguage(String languageCode)
languageCode
- code of the language to checkpublic boolean includePropertyId(PropertyIdValue propertyIdValue)
propertyIdValue
- property id to checkpublic boolean includeSiteLink(String siteLink)
siteLink
- key of the site to checkpublic boolean excludeAllLanguages()
public boolean excludeAllProperties()
public boolean excludeAllSiteLinks()
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage