Skip to content

Commit

Permalink
Cleaned up get getDataTypeId()
Browse files Browse the repository at this point in the history
* Fixed spelling of method
* Changed JavaDoc to be consistent with other get...Value methods
* Added FIXME for an open problem as discussed previously in email
  • Loading branch information
mkroetzsch committed Mar 18, 2014
1 parent 6510550 commit 5ea5be4
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public PropertyDocument convertToPropertyDocument(JSONObject jsonObject,
.getMltv(KEY_ALIAS, jsonObject);

String jsonDataTypeId = jsonObject.getString(KEY_DATATYPE);
DatatypeIdValue datatypeId = this.getDataTypeId(jsonDataTypeId);
DatatypeIdValue datatypeId = this.getDatatypeIdValue(jsonDataTypeId);

result = this.factory.getPropertyDocument(propertyId, labels,
descriptions, aliases, datatypeId);
Expand Down Expand Up @@ -796,15 +796,15 @@ private ValueSnak getValueSnak(JSONArray jsonValueSnak)
}

/**
* Transforms a given string into a DatatypeIdValue.
* Creates a DatatypeIdValue for the given datatype id.
*
* @param jsonDataTypeId
* is the string to be converted. Must not be null.
* @return the appropriate DatatypeIdValue-instance.
* the id of the datatype
* @return the corresponding DatatypeIdValue
*/
private DatatypeIdValue getDataTypeId(String jsonDataTypeId) {
// assert jsonDataTypeId != null : "Given JSON datatype id was null";

private DatatypeIdValue getDatatypeIdValue(String jsonDataTypeId) {
// FIXME This is not correct. The datatype id in JSON is not the
// datatype that we need to use in the datamodel.
return this.factory.getDatatypeIdValue(jsonDataTypeId);
}

Expand Down

0 comments on commit 5ea5be4

Please sign in to comment.