/** * Sets the id for the constructed statement. * * @param statementId * the id of the statement * @return builder object to continue construction */ public StatementBuilder withId(String statementId) { this.statementId = statementId; return getThis(); }
/** * Sets the id for the constructed statement. * * @param statementId * the id of the statement * @return builder object to continue construction */ public StatementBuilder withId(String statementId) { this.statementId = statementId; return getThis(); }
/** * Sets the main value for the constructed statement. * * @param value * the main value of the statement * @return builder object to continue construction */ public StatementBuilder withValue(Value value) { this.mainValue = value; return getThis(); }
/** * Sets the main snak of the statement to be a {{@link NoValueSnak}. * * @return builder object to continue construction */ public StatementBuilder withNoValue() { this.mainValue = null; this.noMainValue = true; return getThis(); }
/** * Sets the rank for the constructed statement. * * @param rank * the rank of the statement * @return builder object to continue construction */ public StatementBuilder withRank(StatementRank rank) { this.rank = rank; return getThis(); }
/** * Sets the main value for the constructed statement. * * @param value * the main value of the statement * @return builder object to continue construction */ public StatementBuilder withValue(Value value) { this.mainValue = value; return getThis(); }
/** * Sets the main snak of the statement to be a {{@link SomeValueSnak}. * * @return builder object to continue construction */ public StatementBuilder withSomeValue() { this.mainValue = null; this.noMainValue = false; return getThis(); }
/** * Sets the main snak of the statement to be a {{@link NoValueSnak}. * * @return builder object to continue construction */ public StatementBuilder withNoValue() { this.mainValue = null; this.noMainValue = true; return getThis(); }
/** * Sets the rank for the constructed statement. * * @param rank * the rank of the statement * @return builder object to continue construction */ public StatementBuilder withRank(StatementRank rank) { this.rank = rank; return getThis(); }
/** * Sets the main snak of the statement to be a {{@link SomeValueSnak}. * * @return builder object to continue construction */ public StatementBuilder withSomeValue() { this.mainValue = null; this.noMainValue = false; return getThis(); }
/** * Adds a reference to the constructed statement. * * @param reference * the reference to be added * @return builder object to continue construction */ public StatementBuilder withReference(Reference reference) { this.references.add(reference); return getThis(); }
/** * Adds a list of references to the constructed statement. * * @param references * the references to be added * @return builder object to continue construction */ public StatementBuilder withReferences(List<? extends Reference> references) { this.references.addAll(references); return getThis(); }
/** * Adds a reference to the constructed statement. * * @param reference * the reference to be added * @return builder object to continue construction */ public StatementBuilder withReference(Reference reference) { this.references.add(reference); return getThis(); }
/** * Adds a list of references to the constructed statement. * * @param references * the references to be added * @return builder object to continue construction */ public StatementBuilder withReferences(List<? extends Reference> references) { this.references.addAll(references); return getThis(); }
/** * Adds a qualifier {@link Snak} to the constructed statement. * * @param qualifier * the qualifier to add * @return builder object to continue construction */ public StatementBuilder withQualifier(Snak qualifier) { getQualifierList(qualifier.getPropertyId()).add(qualifier); return getThis(); }
/** * Adds all qualifiers from the given {@link SnakGroup} to the constructed * statement. * * @param qualifiers * the group of qualifiers to add * @return builder object to continue construction */ public StatementBuilder withQualifiers(SnakGroup qualifiers) { getQualifierList(qualifiers.getProperty()).addAll(qualifiers); return getThis(); }
/** * Adds a qualifier {@link Snak} to the constructed statement. * * @param qualifier * the qualifier to add * @return builder object to continue construction */ public StatementBuilder withQualifier(Snak qualifier) { getQualifierList(qualifier.getPropertyId()).add(qualifier); return getThis(); }
/** * Adds all qualifiers from the given {@link SnakGroup} to the constructed * statement. * * @param qualifiers * the group of qualifiers to add * @return builder object to continue construction */ public StatementBuilder withQualifiers(SnakGroup qualifiers) { getQualifierList(qualifiers.getProperty()).addAll(qualifiers); return getThis(); }
/** * Adds a {@link SomeValueSnak} qualifier with the given property to the * constructed statement. * * @param propertyIdValue * the property of the qualifier * @return builder object to continue construction */ public StatementBuilder withQualifierSomeValue( PropertyIdValue propertyIdValue) { withQualifier(factory.getSomeValueSnak(propertyIdValue)); return getThis(); }
/** * Adds a qualifier with the given property and value to the constructed * statement. * * @param propertyIdValue * the property of the qualifier * @param value * the value of the qualifier * @return builder object to continue construction */ public StatementBuilder withQualifierValue(PropertyIdValue propertyIdValue, Value value) { withQualifier(factory.getValueSnak(propertyIdValue, value)); return getThis(); }