test_class.declarator: d1 = new DatatypeIdImpl(DatatypeIdValue.DT_ITEM)
test_class.modifier: private final
test_class.original_string: private final DatatypeIdImpl d1 = new DatatypeIdImpl(DatatypeIdValue.DT_ITEM);
test_class.type: DatatypeIdImpl
test_class.var_name: d1
test_class.declarator: d2 = new DatatypeIdImpl("http://wikiba.se/ontology#WikibaseItem")
test_class.modifier: private final
test_class.original_string: private final DatatypeIdImpl d2 = new DatatypeIdImpl("http://wikiba.se/ontology#WikibaseItem");
test_class.type: DatatypeIdImpl
test_class.var_name: d2
test_class.declarator: d3 = new DatatypeIdImpl(DatatypeIdValue.DT_TIME)
test_class.modifier: private final
test_class.original_string: private final DatatypeIdImpl d3 = new DatatypeIdImpl(DatatypeIdValue.DT_TIME);
test_class.type: DatatypeIdImpl
test_class.var_name: d3
test_class.file: wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImplTest.java
test_class.identifier: DatatypeIdImplTest
test_case.body: @Test
  	public void testJsonForExternalId() {
  		assertEquals(
  				DatatypeIdImpl.getJsonDatatypeFromDatatypeIri(DatatypeIdImpl.DT_EXTERNAL_ID),
  				DatatypeIdImpl.JSON_DT_EXTERNAL_ID);
  	}
test_case.class_method_signature: DatatypeIdImplTest.testJsonForExternalId()
test_case.full_signature: @Test public void testJsonForExternalId()
test_case.identifier: testJsonForExternalId
test_case.invocations: assertEquals getJsonDatatypeFromDatatypeIri
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJsonForExternalId()
focal_class.declarator: JSON_DT_ITEM = "wikibase-item"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_ITEM = "wikibase-item";
focal_class.type: String
focal_class.var_name: JSON_DT_ITEM
focal_class.declarator: JSON_DT_PROPERTY = "wikibase-property"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_PROPERTY = "wikibase-property";
focal_class.type: String
focal_class.var_name: JSON_DT_PROPERTY
focal_class.declarator: JSON_DT_GLOBE_COORDINATES = "globe-coordinate"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_GLOBE_COORDINATES = "globe-coordinate";
focal_class.type: String
focal_class.var_name: JSON_DT_GLOBE_COORDINATES
focal_class.declarator: JSON_DT_URL = "url"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_URL = "url";
focal_class.type: String
focal_class.var_name: JSON_DT_URL
focal_class.declarator: JSON_DT_COMMONS_MEDIA = "commonsMedia"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_COMMONS_MEDIA = "commonsMedia";
focal_class.type: String
focal_class.var_name: JSON_DT_COMMONS_MEDIA
focal_class.declarator: JSON_DT_TIME = "time"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_TIME = "time";
focal_class.type: String
focal_class.var_name: JSON_DT_TIME
focal_class.declarator: JSON_DT_QUANTITY = "quantity"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_QUANTITY = "quantity";
focal_class.type: String
focal_class.var_name: JSON_DT_QUANTITY
focal_class.declarator: JSON_DT_STRING = "string"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_STRING = "string";
focal_class.type: String
focal_class.var_name: JSON_DT_STRING
focal_class.declarator: JSON_DT_MONOLINGUAL_TEXT = "monolingualtext"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_MONOLINGUAL_TEXT = "monolingualtext";
focal_class.type: String
focal_class.var_name: JSON_DT_MONOLINGUAL_TEXT
focal_class.declarator: JSON_DT_EXTERNAL_ID = "external-id"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_EXTERNAL_ID = "external-id";
focal_class.type: String
focal_class.var_name: JSON_DT_EXTERNAL_ID
focal_class.declarator: JSON_DT_MATH = "math"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_MATH = "math";
focal_class.type: String
focal_class.var_name: JSON_DT_MATH
focal_class.declarator: JSON_DT_GEO_SHAPE = "geo-shape"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_DT_GEO_SHAPE = "geo-shape";
focal_class.type: String
focal_class.var_name: JSON_DT_GEO_SHAPE
focal_class.declarator: JSON_DATATYPE_PATTERN = Pattern.compile("^[a-z\\-]+$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern JSON_DATATYPE_PATTERN = Pattern.compile("^[a-z\\-]+$");
focal_class.type: Pattern
focal_class.var_name: JSON_DATATYPE_PATTERN
focal_class.declarator: DATATYPE_ID_PATTERN = Pattern.compile("^http://wikiba\\.se/ontology#([a-zA-Z]+)$")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern DATATYPE_ID_PATTERN = Pattern.compile("^http://wikiba\\.se/ontology#([a-zA-Z]+)$");
focal_class.type: Pattern
focal_class.var_name: DATATYPE_ID_PATTERN
focal_class.declarator: iri
focal_class.modifier: private final
focal_class.original_string: private final String iri;
focal_class.type: String
focal_class.var_name: iri
focal_class.file: wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImpl.java
focal_class.identifier: DatatypeIdImpl
focal_class.interfaces: implements DatatypeIdValue
focal_class.class_method_signature: DatatypeIdImpl.getDatatypeIriFromJsonDatatype(String jsonDatatype)
focal_class.full_signature: public static String getDatatypeIriFromJsonDatatype(String jsonDatatype)
focal_class.identifier: getDatatypeIriFromJsonDatatype
focal_class.modifiers: public static
focal_class.parameters: (String jsonDatatype)
focal_class.return: String
focal_class.signature: String getDatatypeIriFromJsonDatatype(String jsonDatatype)
focal_class.class_method_signature: DatatypeIdImpl.getJsonDatatypeFromDatatypeIri(String datatypeIri)
focal_class.full_signature: public static String getJsonDatatypeFromDatatypeIri(String datatypeIri)
focal_class.identifier: getJsonDatatypeFromDatatypeIri
focal_class.modifiers: public static
focal_class.parameters: (String datatypeIri)
focal_class.return: String
focal_class.signature: String getJsonDatatypeFromDatatypeIri(String datatypeIri)
focal_class.class_method_signature: DatatypeIdImpl.DatatypeIdImpl(DatatypeIdValue other)
focal_class.full_signature: public  DatatypeIdImpl(DatatypeIdValue other)
focal_class.identifier: DatatypeIdImpl
focal_class.modifiers: public
focal_class.parameters: (DatatypeIdValue other)
focal_class.signature:  DatatypeIdImpl(DatatypeIdValue other)
focal_class.class_method_signature: DatatypeIdImpl.DatatypeIdImpl(String iri)
focal_class.full_signature: public  DatatypeIdImpl(String iri)
focal_class.identifier: DatatypeIdImpl
focal_class.modifiers: public
focal_class.parameters: (String iri)
focal_class.signature:  DatatypeIdImpl(String iri)
focal_class.class_method_signature: DatatypeIdImpl.getJsonString()
focal_class.full_signature: public String getJsonString()
focal_class.identifier: getJsonString
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getJsonString()
focal_class.class_method_signature: DatatypeIdImpl.getIri()
focal_class.full_signature: @Override public String getIri()
focal_class.identifier: getIri
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIri()
focal_class.class_method_signature: DatatypeIdImpl.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: DatatypeIdImpl.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: DatatypeIdImpl.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_method.body: public static String getJsonDatatypeFromDatatypeIri(String datatypeIri) {
  		switch (datatypeIri) {
  			case DatatypeIdValue.DT_ITEM:
  				return DatatypeIdImpl.JSON_DT_ITEM;
  			case DatatypeIdValue.DT_GLOBE_COORDINATES:
  				return DatatypeIdImpl.JSON_DT_GLOBE_COORDINATES;
  			case DatatypeIdValue.DT_URL:
  				return DatatypeIdImpl.JSON_DT_URL;
  			case DatatypeIdValue.DT_COMMONS_MEDIA:
  				return DatatypeIdImpl.JSON_DT_COMMONS_MEDIA;
  			case DatatypeIdValue.DT_TIME:
  				return DatatypeIdImpl.JSON_DT_TIME;
  			case DatatypeIdValue.DT_QUANTITY:
  				return DatatypeIdImpl.JSON_DT_QUANTITY;
  			case DatatypeIdValue.DT_STRING:
  				return DatatypeIdImpl.JSON_DT_STRING;
  			case DatatypeIdValue.DT_MONOLINGUAL_TEXT:
  				return DatatypeIdImpl.JSON_DT_MONOLINGUAL_TEXT;
  			case DatatypeIdValue.DT_PROPERTY:
  				return DatatypeIdImpl.JSON_DT_PROPERTY;
  			default:
  				//We apply the reverse algorithm of JacksonDatatypeId::getDatatypeIriFromJsonDatatype
  				Matcher matcher = DATATYPE_ID_PATTERN.matcher(datatypeIri);
  				if(!matcher.matches()) {
  					throw new IllegalArgumentException("Unknown datatype: " + datatypeIri);
  				}
  		
  				StringBuilder jsonDatatypeBuilder = new StringBuilder();
  				for(char ch : StringUtils.uncapitalize(matcher.group(1)).toCharArray()) {
  					if(Character.isUpperCase(ch)) {
  						jsonDatatypeBuilder
  								.append('-')
  								.append(Character.toLowerCase(ch));
  					} else {
  						jsonDatatypeBuilder.append(ch);
  					}
  				}
  				return jsonDatatypeBuilder.toString();
  		}
  	}
focal_method.class_method_signature: DatatypeIdImpl.getJsonDatatypeFromDatatypeIri(String datatypeIri)
focal_method.full_signature: public static String getJsonDatatypeFromDatatypeIri(String datatypeIri)
focal_method.identifier: getJsonDatatypeFromDatatypeIri
focal_method.invocations: matcher matches toCharArray uncapitalize group isUpperCase append append toLowerCase append toString
focal_method.modifiers: public static
focal_method.parameters: (String datatypeIri)
focal_method.return: String
focal_method.signature: String getJsonDatatypeFromDatatypeIri(String datatypeIri)