public class DatatypeIdImpl extends Object implements DatatypeIdValue
DatatypeIdValue
. This is not actually
present in JSON but needed to satisfy the interface.Modifier and Type | Field and Description |
---|---|
static String |
JSON_DT_COMMONS_MEDIA
String used to refer to the property datatype
DatatypeIdValue.DT_COMMONS_MEDIA in JSON. |
static String |
JSON_DT_EDTF
String used to refer to the property datatype
DatatypeIdValue.DT_EDTF in JSON. |
static String |
JSON_DT_EXTERNAL_ID
String used to refer to the property datatype
DatatypeIdValue.DT_EXTERNAL_ID in JSON. |
static String |
JSON_DT_GEO_SHAPE
String used to refer to the property datatype
DatatypeIdValue.DT_GEO_SHAPE in JSON. |
static String |
JSON_DT_GLOBE_COORDINATES
String used to refer to the property datatype
DatatypeIdValue.DT_GLOBE_COORDINATES in JSON. |
static String |
JSON_DT_ITEM
String used to refer to the property datatype
DatatypeIdValue.DT_ITEM in JSON. |
static String |
JSON_DT_MATH
String used to refer to the property datatype
DatatypeIdValue.DT_MATH in JSON. |
static String |
JSON_DT_MONOLINGUAL_TEXT
String used to refer to the property datatype
DatatypeIdValue.DT_MONOLINGUAL_TEXT in JSON. |
static String |
JSON_DT_PROPERTY
String used to refer to the property datatype
DatatypeIdValue.DT_PROPERTY in JSON. |
static String |
JSON_DT_QUANTITY
String used to refer to the property datatype
DatatypeIdValue.DT_QUANTITY in JSON. |
static String |
JSON_DT_STRING
String used to refer to the property datatype
DatatypeIdValue.DT_STRING in JSON. |
static String |
JSON_DT_TIME
String used to refer to the property datatype
DatatypeIdValue.DT_TIME in JSON. |
static String |
JSON_DT_URL
String used to refer to the property datatype
DatatypeIdValue.DT_ITEM in JSON. |
DT_COMMONS_MEDIA, DT_EDTF, DT_EXTERNAL_ID, DT_FORM, DT_GEO_SHAPE, DT_GLOBE_COORDINATES, DT_ITEM, DT_LEXEME, DT_MATH, DT_MEDIA_INFO, DT_MONOLINGUAL_TEXT, DT_PROPERTY, DT_QUANTITY, DT_SENSE, DT_STRING, DT_TABULAR_DATA, DT_TIME, DT_URL
Constructor and Description |
---|
DatatypeIdImpl(DatatypeIdValue other)
Copy constructor.
|
DatatypeIdImpl(String iri)
Deprecated.
|
DatatypeIdImpl(String iri,
String jsonString)
Constructs an object representing the datatype id from an IRI denoting the datatype,
as well as a string corresponding to its JSON serialization.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static String |
getDatatypeIriFromJsonDatatype(String jsonDatatype)
Returns the WDTK datatype IRI for the property datatype as represented by
the given JSON datatype string.
|
String |
getIri()
Get the IRI of this entity.
|
static String |
getJsonDatatypeFromDatatypeIri(String datatypeIri)
Deprecated.
this method is unreliable and will be removed in a future release.
|
String |
getJsonString()
Returns the string used to represent this datatype in JSON.
|
int |
hashCode() |
String |
toString() |
public static final String JSON_DT_ITEM
DatatypeIdValue.DT_ITEM
in JSON.public static final String JSON_DT_PROPERTY
DatatypeIdValue.DT_PROPERTY
in JSON.public static final String JSON_DT_GLOBE_COORDINATES
DatatypeIdValue.DT_GLOBE_COORDINATES
in JSON.public static final String JSON_DT_URL
DatatypeIdValue.DT_ITEM
in JSON.public static final String JSON_DT_COMMONS_MEDIA
DatatypeIdValue.DT_COMMONS_MEDIA
in JSON.public static final String JSON_DT_TIME
DatatypeIdValue.DT_TIME
in JSON.public static final String JSON_DT_QUANTITY
DatatypeIdValue.DT_QUANTITY
in JSON.public static final String JSON_DT_STRING
DatatypeIdValue.DT_STRING
in JSON.public static final String JSON_DT_MONOLINGUAL_TEXT
DatatypeIdValue.DT_MONOLINGUAL_TEXT
in JSON.public static final String JSON_DT_EXTERNAL_ID
DatatypeIdValue.DT_EXTERNAL_ID
in JSON.public static final String JSON_DT_MATH
DatatypeIdValue.DT_MATH
in JSON.public static final String JSON_DT_GEO_SHAPE
DatatypeIdValue.DT_GEO_SHAPE
in JSON.public static final String JSON_DT_EDTF
DatatypeIdValue.DT_EDTF
in JSON.public DatatypeIdImpl(DatatypeIdValue other)
public DatatypeIdImpl(String iri) throws IllegalArgumentException
DatatypeIdImpl(String, String)
DatatypeIdImpl(String, String)
.iri
- the WDTK IRI for the datatypeIllegalArgumentException
- if the given datatype string could not be matched to a known
datatype or was nullpublic DatatypeIdImpl(String iri, String jsonString) throws IllegalArgumentException
iri
- the WDTK IRI for the datatype. This can be null.jsonString
- the JSON representation of the datatype. This cannot be null.IllegalArgumentException
- if the given datatype string could not be matched to a known
datatype or was nullpublic static String getDatatypeIriFromJsonDatatype(String jsonDatatype)
jsonDatatype
- the JSON datatype string; case-sensitiveIllegalArgumentException
- if the given datatype string is not knownpublic static String getJsonDatatypeFromDatatypeIri(String datatypeIri)
datatypeIri
- the WDTK datatype IRI string; case-sensitiveIllegalArgumentException
- if the given datatype string is not knownpublic String getJsonString()
getJsonString
in interface DatatypeIdValue
public String getIri()
DatatypeIdValue
getIri
in interface DatatypeIdValue
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