public class PropertyDocumentBuilder extends EntityDocumentBuilder<PropertyDocumentBuilder,PropertyDocument>
PropertyDocument objects.| Modifier | Constructor and Description |
|---|---|
protected |
PropertyDocumentBuilder(PropertyDocument initialDocument)
Constructor when building the property document from an existing one.
|
protected |
PropertyDocumentBuilder(PropertyIdValue propertyIdValue,
DatatypeIdValue datatype)
Constructor when building the property document from scratch.
|
| Modifier and Type | Method and Description |
|---|---|
PropertyDocument |
build()
Returns the
ItemDocument that has been built. |
static PropertyDocumentBuilder |
forPropertyIdAndDatatype(PropertyIdValue propertyIdValue,
DatatypeIdValue datatype)
Starts the construction of an
PropertyDocument with the given id. |
static PropertyDocumentBuilder |
forPropertyIdAndDatatype(PropertyIdValue propertyIdValue,
String datatypeId)
Deprecated.
|
static PropertyDocumentBuilder |
forPropertyIdAndJsonDatatype(PropertyIdValue propertyIdValue,
String datatypeId)
Starts the construction of an
PropertyDocument with the given id. |
static PropertyDocumentBuilder |
fromPropertyDocument(PropertyDocument initialDocument)
Starts the construction of an
PropertyDocument from the existing
document. |
protected PropertyDocumentBuilder |
getThis()
Returns the current object with the correct builder type.
|
PropertyDocumentBuilder |
withEntityId(EntityIdValue entityId)
Changes the entity value id for the constructed document.
|
getStatementGroups, withAlias, withAlias, withDescription, withDescription, withLabel, withLabel, withRevisionId, withStatementprepareBuildprotected PropertyDocumentBuilder(PropertyIdValue propertyIdValue, DatatypeIdValue datatype)
propertyIdValue - id of the newly constructed property documentdatatype - the datatype of the newly constructed property documentprotected PropertyDocumentBuilder(PropertyDocument initialDocument)
initialDocument - the initial property document to start the build frompublic static PropertyDocumentBuilder forPropertyIdAndDatatype(PropertyIdValue propertyIdValue, DatatypeIdValue datatype)
PropertyDocument with the given id.propertyIdValue - id of the newly constructed property documentdatatype - the datatype of the newly constructed property documentpublic static PropertyDocumentBuilder fromPropertyDocument(PropertyDocument initialDocument)
PropertyDocument from the existing
document.initialDocument - the existing document to start the build frompublic static PropertyDocumentBuilder forPropertyIdAndDatatype(PropertyIdValue propertyIdValue, String datatypeId)
forPropertyIdAndJsonDatatype(PropertyIdValue, String)PropertyDocument with the given id.propertyIdValue - id of the newly constructed property documentdatatypeId - the datatype id of the newly constructed property document,
e.g., DatatypeIdValue.DT_ITEM.public static PropertyDocumentBuilder forPropertyIdAndJsonDatatype(PropertyIdValue propertyIdValue, String datatypeId)
PropertyDocument with the given id.propertyIdValue - id of the newly constructed property documentdatatypeId - the datatype id of the newly constructed property document,
e.g., DatatypeIdValue.DT_ITEM.public PropertyDocumentBuilder withEntityId(EntityIdValue entityId)
EntityDocument.getEntityId().withEntityId in class EntityDocumentBuilder<PropertyDocumentBuilder,PropertyDocument>entityId - the entity id, which must be an ItemIdValuepublic PropertyDocument build()
ItemDocument that has been built.build in class AbstractDataObjectBuilder<PropertyDocumentBuilder,PropertyDocument>IllegalStateException - if the object was built alreadyprotected PropertyDocumentBuilder getThis()
AbstractDataObjectBuildergetThis in class AbstractDataObjectBuilder<PropertyDocumentBuilder,PropertyDocument>Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage