public interface StatementDocument extends EntityDocument
| Modifier and Type | Method and Description |
|---|---|
default Statement |
findStatement(PropertyIdValue propertyIdValue)
Returns the unique
Statement for the given property, or null if
there are zero or many statements for this property. |
default Statement |
findStatement(String propertyId)
Returns the unique
Statement for the given property, or null if
there are zero or many statements for this property. |
default EntityIdValue |
findStatementEntityIdValue(PropertyIdValue propertyIdValue)
Returns the unique
EntityIdValue for the given property, or null
if there are zero or many such values given in statements for this
property. |
default EntityIdValue |
findStatementEntityIdValue(String propertyId)
Returns the unique
EntityIdValue for the given property, or null
if there are zero or many such values given in statements for this
property. |
default GlobeCoordinatesValue |
findStatementGlobeCoordinatesValue(PropertyIdValue propertyIdValue)
Returns the unique
GlobeCoordinatesValue for the given property,
or null if there are zero or many such values given in statements for
this property. |
default GlobeCoordinatesValue |
findStatementGlobeCoordinatesValue(String propertyId)
Returns the unique
GlobeCoordinatesValue for the given property,
or null if there are zero or many such values given in statements for
this property. |
default StatementGroup |
findStatementGroup(PropertyIdValue propertyIdValue)
Returns the
StatementGroup for the given property, or null if
there are no statements for this property. |
default StatementGroup |
findStatementGroup(String propertyId)
Returns the
StatementGroup for the given property, or null if
there are no statements for this property. |
default ItemIdValue |
findStatementItemIdValue(PropertyIdValue propertyIdValue)
Returns the unique
ItemIdValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default ItemIdValue |
findStatementItemIdValue(String propertyId)
Returns the unique
ItemIdValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default MonolingualTextValue |
findStatementMonolingualTextValue(PropertyIdValue propertyIdValue)
Returns the unique
MonolingualTextValue for the given property,
or null if there are zero or many such values given in statements for
this property. |
default MonolingualTextValue |
findStatementMonolingualTextValue(String propertyId)
Returns the unique
MonolingualTextValue for the given property,
or null if there are zero or many such values given in statements for
this property. |
default PropertyIdValue |
findStatementPropertyIdValue(PropertyIdValue propertyIdValue)
Returns the unique
PropertyIdValue for the given property, or
null if there are zero or many such values given in statements for this
property. |
default PropertyIdValue |
findStatementPropertyIdValue(String propertyId)
Returns the unique
PropertyIdValue for the given property, or
null if there are zero or many such values given in statements for this
property. |
default QuantityValue |
findStatementQuantityValue(PropertyIdValue propertyIdValue)
Returns the unique
QuantityValue for the given property, or null
if there are zero or many such values given in statements for this
property. |
default QuantityValue |
findStatementQuantityValue(String propertyId)
Returns the unique
QuantityValue for the given property, or null
if there are zero or many such values given in statements for this
property. |
default StringValue |
findStatementStringValue(PropertyIdValue propertyIdValue)
Returns the unique
StringValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default StringValue |
findStatementStringValue(String propertyId)
Returns the unique
StringValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default TimeValue |
findStatementTimeValue(PropertyIdValue propertyIdValue)
Returns the unique
TimeValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default TimeValue |
findStatementTimeValue(String propertyId)
Returns the unique
TimeValue for the given property, or null if
there are zero or many such values given in statements for this property. |
default Value |
findStatementValue(PropertyIdValue propertyIdValue)
Returns the unique
Value for the given property, or null if there
are zero or many values given in statements for this property. |
default Value |
findStatementValue(String propertyId)
Returns the unique
Value for the given property, or null if there
are zero or many values given in statements for this property. |
default Iterator<Statement> |
getAllStatements()
Returns an iterator that provides access to all statements, without
considering the statement groups.
|
List<StatementGroup> |
getStatementGroups()
Return the list of all StatementGroups stored for this item.
|
default boolean |
hasStatement(PropertyIdValue propertyIdValue)
Returns true if there is a statement for the given property.
|
default boolean |
hasStatement(String propertyId)
Returns true if there is a statement for the given property.
|
default boolean |
hasStatementValue(PropertyIdValue propertyIdValue,
Set<? extends Value> values)
Returns true if there is a statement for the given property and one of
the given values.
|
default boolean |
hasStatementValue(PropertyIdValue propertyIdValue,
Value value)
Returns true if there is a statement for the given property and value.
|
default boolean |
hasStatementValue(String propertyId,
Set<? extends Value> values)
Returns true if there is a statement for the given property and one of
the given values.
|
default boolean |
hasStatementValue(String propertyId,
Value value)
Returns true if there is a statement for the given property and value.
|
StatementDocument |
withoutStatementIds(Set<String> statementIds)
Returns a new version of this document where all statements matching
any of the statement ids provided have been removed.
|
StatementDocument |
withRevisionId(long newRevisionId)
Returns a copy of this document with an updated revision id.
|
StatementDocument |
withStatement(Statement statement)
Returns a new version of this document which includes the
statement provided.
|
getEntityId, getRevisionIdList<StatementGroup> getStatementGroups()
default Iterator<Statement> getAllStatements()
default StatementGroup findStatementGroup(PropertyIdValue propertyIdValue)
StatementGroup for the given property, or null if
there are no statements for this property. This is a convenience method
for accessing the data that can be obtained via
getStatementGroups().propertyIdValue - the property to search forStatementGroup or nulldefault StatementGroup findStatementGroup(String propertyId)
StatementGroup for the given property, or null if
there are no statements for this property. Only the string id of the
property is compared, not the site id. This is useful in situations where
all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forStatementGroup or nulldefault boolean hasStatement(PropertyIdValue propertyIdValue)
getStatementGroups().propertyIdValue - the property to search fordefault boolean hasStatement(String propertyId)
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search fordefault boolean hasStatementValue(PropertyIdValue propertyIdValue, Value value)
getStatementGroups().propertyIdValue - the property to search forvalue - the value to searchdefault boolean hasStatementValue(String propertyId, Value value)
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forvalue - the value to searchdefault boolean hasStatementValue(PropertyIdValue propertyIdValue, Set<? extends Value> values)
getStatementGroups().propertyIdValue - the property to search forvalues - the set of values to searchdefault boolean hasStatementValue(String propertyId, Set<? extends Value> values)
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forvalues - the set of values to searchdefault Statement findStatement(PropertyIdValue propertyIdValue)
Statement for the given property, or null if
there are zero or many statements for this property. This is a
convenience method for accessing the data that can be obtained via
getStatementGroups().propertyIdValue - the property to search forStatement or nulldefault Statement findStatement(String propertyId)
Statement for the given property, or null if
there are zero or many statements for this property. Only the string id
of the property is compared, not the site id. This is useful in
situations where all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forStatement or nulldefault Value findStatementValue(PropertyIdValue propertyIdValue)
Value for the given property, or null if there
are zero or many values given in statements for this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forValue or nulldefault Value findStatementValue(String propertyId)
Value for the given property, or null if there
are zero or many values given in statements for this property. Only the
string id of the property is compared, not the site id. This is useful in
situations where all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forValue or nulldefault StringValue findStatementStringValue(PropertyIdValue propertyIdValue)
StringValue for the given property, or null if
there are zero or many such values given in statements for this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forStringValue or nulldefault StringValue findStatementStringValue(String propertyId)
StringValue for the given property, or null if
there are zero or many such values given in statements for this property.
Only the string id of the property is compared, not the site id. This is
useful in situations where all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forStringValue or nulldefault QuantityValue findStatementQuantityValue(PropertyIdValue propertyIdValue)
QuantityValue for the given property, or null
if there are zero or many such values given in statements for this
property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forQuantityValue or nulldefault QuantityValue findStatementQuantityValue(String propertyId)
QuantityValue for the given property, or null
if there are zero or many such values given in statements for this
property. Only the string id of the property is compared, not the site
id. This is useful in situations where all data is known to come from a
single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forQuantityValue or nulldefault GlobeCoordinatesValue findStatementGlobeCoordinatesValue(PropertyIdValue propertyIdValue)
GlobeCoordinatesValue for the given property,
or null if there are zero or many such values given in statements for
this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forGlobeCoordinatesValue or nulldefault GlobeCoordinatesValue findStatementGlobeCoordinatesValue(String propertyId)
GlobeCoordinatesValue for the given property,
or null if there are zero or many such values given in statements for
this property. Only the string id of the property is compared, not the
site id. This is useful in situations where all data is known to come
from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forGlobeCoordinatesValue or nulldefault TimeValue findStatementTimeValue(PropertyIdValue propertyIdValue)
TimeValue for the given property, or null if
there are zero or many such values given in statements for this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forTimeValue or nulldefault TimeValue findStatementTimeValue(String propertyId)
TimeValue for the given property, or null if
there are zero or many such values given in statements for this property.
Only the string id of the property is compared, not the site id. This is
useful in situations where all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forTimeValue or nulldefault MonolingualTextValue findStatementMonolingualTextValue(PropertyIdValue propertyIdValue)
MonolingualTextValue for the given property,
or null if there are zero or many such values given in statements for
this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forMonolingualTextValue or nulldefault MonolingualTextValue findStatementMonolingualTextValue(String propertyId)
MonolingualTextValue for the given property,
or null if there are zero or many such values given in statements for
this property. Only the string id of the property is compared, not the
site id. This is useful in situations where all data is known to come
from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forMonolingualTextValue or nulldefault ItemIdValue findStatementItemIdValue(PropertyIdValue propertyIdValue)
ItemIdValue for the given property, or null if
there are zero or many such values given in statements for this property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forItemIdValue or nulldefault ItemIdValue findStatementItemIdValue(String propertyId)
ItemIdValue for the given property, or null if
there are zero or many such values given in statements for this property.
Only the string id of the property is compared, not the site id. This is
useful in situations where all data is known to come from a single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forItemIdValue or nulldefault PropertyIdValue findStatementPropertyIdValue(PropertyIdValue propertyIdValue)
PropertyIdValue for the given property, or
null if there are zero or many such values given in statements for this
property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forPropertyIdValue or nulldefault PropertyIdValue findStatementPropertyIdValue(String propertyId)
PropertyIdValue for the given property, or
null if there are zero or many such values given in statements for this
property. Only the string id of the property is compared, not the site
id. This is useful in situations where all data is known to come from a
single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forPropertyIdValue or nulldefault EntityIdValue findStatementEntityIdValue(PropertyIdValue propertyIdValue)
EntityIdValue for the given property, or null
if there are zero or many such values given in statements for this
property.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyIdValue - the property to search forEntityIdValue or nulldefault EntityIdValue findStatementEntityIdValue(String propertyId)
EntityIdValue for the given property, or null
if there are zero or many such values given in statements for this
property. Only the string id of the property is compared, not the site
id. This is useful in situations where all data is known to come from a
single site.
This is a convenience method for accessing the data that can be obtained
via getStatementGroups().
propertyId - the property to search forEntityIdValue or nullStatementDocument withRevisionId(long newRevisionId)
withRevisionId in interface EntityDocumentStatementDocument withStatement(Statement statement)
statement - the statement to add or update in the documentStatementDocument withoutStatementIds(Set<String> statementIds)
statementIds - the identifiers of the statements to removeCopyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage