Class DatatypeIdImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.DatatypeIdImpl
- All Implemented Interfaces:
DatatypeIdValue
Jackson implementation of
DatatypeIdValue
. This is not actually
present in JSON but needed to satisfy the interface.- Author:
- Fredo Erxleben, Antonin Delpeuch
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
String used to refer to the property datatypeDatatypeIdValue.DT_COMMONS_MEDIA
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_EDTF
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_EXTERNAL_ID
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_GEO_SHAPE
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_GLOBE_COORDINATES
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_ITEM
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_MATH
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_MONOLINGUAL_TEXT
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_PROPERTY
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_QUANTITY
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_STRING
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_TIME
in JSON.static final String
String used to refer to the property datatypeDatatypeIdValue.DT_ITEM
in JSON.Fields inherited from interface org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue
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 Summary
ConstructorDescriptionDatatypeIdImpl
(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.DatatypeIdImpl
(DatatypeIdValue other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static String
getDatatypeIriFromJsonDatatype
(String jsonDatatype) Returns the WDTK datatype IRI for the property datatype as represented by the given JSON datatype 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.Returns the string used to represent this datatype in JSON.int
hashCode()
toString()
-
Field Details
-
JSON_DT_ITEM
String used to refer to the property datatypeDatatypeIdValue.DT_ITEM
in JSON.- See Also:
-
JSON_DT_PROPERTY
String used to refer to the property datatypeDatatypeIdValue.DT_PROPERTY
in JSON.- See Also:
-
JSON_DT_GLOBE_COORDINATES
String used to refer to the property datatypeDatatypeIdValue.DT_GLOBE_COORDINATES
in JSON.- See Also:
-
JSON_DT_URL
String used to refer to the property datatypeDatatypeIdValue.DT_ITEM
in JSON.- See Also:
-
JSON_DT_COMMONS_MEDIA
String used to refer to the property datatypeDatatypeIdValue.DT_COMMONS_MEDIA
in JSON.- See Also:
-
JSON_DT_TIME
String used to refer to the property datatypeDatatypeIdValue.DT_TIME
in JSON.- See Also:
-
JSON_DT_QUANTITY
String used to refer to the property datatypeDatatypeIdValue.DT_QUANTITY
in JSON.- See Also:
-
JSON_DT_STRING
String used to refer to the property datatypeDatatypeIdValue.DT_STRING
in JSON.- See Also:
-
JSON_DT_MONOLINGUAL_TEXT
String used to refer to the property datatypeDatatypeIdValue.DT_MONOLINGUAL_TEXT
in JSON.- See Also:
-
JSON_DT_EXTERNAL_ID
String used to refer to the property datatypeDatatypeIdValue.DT_EXTERNAL_ID
in JSON.- See Also:
-
JSON_DT_MATH
String used to refer to the property datatypeDatatypeIdValue.DT_MATH
in JSON.- See Also:
-
JSON_DT_GEO_SHAPE
String used to refer to the property datatypeDatatypeIdValue.DT_GEO_SHAPE
in JSON.- See Also:
-
JSON_DT_EDTF
String used to refer to the property datatypeDatatypeIdValue.DT_EDTF
in JSON.- See Also:
-
-
Constructor Details
-
DatatypeIdImpl
Copy constructor. -
DatatypeIdImpl
Deprecated.Constructs an object representing the datatype id from a IRI denoting the datatype. It also tries to determine the JSON datatype based on this IRI, based on a buggy heuristic. If you also happen to have the JSON datatype at hand, better useDatatypeIdImpl(java.lang.String,java.lang.String)
.- Parameters:
iri
- the WDTK IRI for the datatype- Throws:
IllegalArgumentException
- if the given datatype string could not be matched to a known datatype or was null
-
DatatypeIdImpl
Constructs an object representing the datatype id from an IRI denoting the datatype, as well as a string corresponding to its JSON serialization. This constructor is meant to be used for JSON deserialization.- Parameters:
iri
- the WDTK IRI for the datatype. This can be null.jsonString
- the JSON representation of the datatype. This cannot be null.- Throws:
IllegalArgumentException
- if the given datatype string could not be matched to a known datatype or was null
-
-
Method Details
-
getDatatypeIriFromJsonDatatype
Returns the WDTK datatype IRI for the property datatype as represented by the given JSON datatype string.- Parameters:
jsonDatatype
- the JSON datatype string; case-sensitive- Throws:
IllegalArgumentException
- if the given datatype string is not known
-
getJsonDatatypeFromDatatypeIri
Deprecated.this method is unreliable and will be removed in a future release.Returns the JSON datatype for the property datatype as represented by the given WDTK datatype IRI string.- Parameters:
datatypeIri
- the WDTK datatype IRI string; case-sensitive- Throws:
IllegalArgumentException
- if the given datatype string is not known
-
getJsonString
Returns the string used to represent this datatype in JSON.- Specified by:
getJsonString
in interfaceDatatypeIdValue
-
getIri
Description copied from interface:DatatypeIdValue
Get the IRI of this entity.- Specified by:
getIri
in interfaceDatatypeIdValue
- Returns:
- String with the IRI
-
toString
-
equals
-
hashCode
public int hashCode()
-
DatatypeIdImpl(String, String)