@Test public void testSetPropertyTypeFromEntityIdValue() { PropertyIdValue pid = this.dataObjectFactory .getPropertyIdValue("P1001", this.siteIri); assertEquals(this.propertyRegister.setPropertyTypeFromEntityIdValue( pid, this.dataObjectFactory.getItemIdValue("Q20", this.siteIri)), DatatypeIdValue.DT_ITEM); assertEquals(this.propertyRegister.setPropertyTypeFromEntityIdValue( pid, this.dataObjectFactory.getPropertyIdValue("P58", this.siteIri)), DatatypeIdValue.DT_PROPERTY); assertEquals(this.propertyRegister.setPropertyTypeFromEntityIdValue( pid, this.dataObjectFactory.getLexemeIdValue("L343", this.siteIri)), DatatypeIdValue.DT_LEXEME); assertEquals(this.propertyRegister.setPropertyTypeFromEntityIdValue( pid, this.dataObjectFactory.getFormIdValue("L343-F1", this.siteIri)), DatatypeIdValue.DT_FORM); assertEquals(this.propertyRegister.setPropertyTypeFromEntityIdValue( pid, this.dataObjectFactory.getSenseIdValue("L343-S34", this.siteIri)), DatatypeIdValue.DT_SENSE); }
public String setPropertyTypeFromEntityIdValue( PropertyIdValue propertyIdValue, EntityIdValue value) { try { return EntityIdValueImpl.guessEntityTypeFromId(value.getId()); } catch (IllegalArgumentException e) { logger.warn("Could not determine datatype of "+ propertyIdValue.getId() + "."); logger.warn("Example value "+value.getId()+ " is not recognized as a valid entity id."); logger.warn("Perhaps this is a newly introduced datatype not supported by this version of wdtk."); logger.warn("Consider upgrading the library to a newer version."); return null; } }
PropertyRegister { public String setPropertyTypeFromEntityIdValue( PropertyIdValue propertyIdValue, EntityIdValue value) { try { return EntityIdValueImpl.guessEntityTypeFromId(value.getId()); } catch (IllegalArgumentException e) { logger.warn("Could not determine datatype of "+ propertyIdValue.getId() + "."); logger.warn("Example value "+value.getId()+ " is not recognized as a valid entity id."); logger.warn("Perhaps this is a newly introduced datatype not supported by this version of wdtk."); logger.warn("Consider upgrading the library to a newer version."); return null; } } }
PropertyRegister { public String setPropertyTypeFromEntityIdValue( PropertyIdValue propertyIdValue, EntityIdValue value) { try { return EntityIdValueImpl.guessEntityTypeFromId(value.getId()); } catch (IllegalArgumentException e) { logger.warn("Could not determine datatype of "+ propertyIdValue.getId() + "."); logger.warn("Example value "+value.getId()+ " is not recognized as a valid entity id."); logger.warn("Perhaps this is a newly introduced datatype not supported by this version of wdtk."); logger.warn("Consider upgrading the library to a newer version."); return null; } } PropertyRegister(String uriPatternPropertyId,
			ApiConnection apiConnection, String siteUri); }
PropertyRegister { public String setPropertyTypeFromEntityIdValue( PropertyIdValue propertyIdValue, EntityIdValue value) { try { return EntityIdValueImpl.guessEntityTypeFromId(value.getId()); } catch (IllegalArgumentException e) { logger.warn("Could not determine datatype of "+ propertyIdValue.getId() + "."); logger.warn("Example value "+value.getId()+ " is not recognized as a valid entity id."); logger.warn("Perhaps this is a newly introduced datatype not supported by this version of wdtk."); logger.warn("Consider upgrading the library to a newer version."); return null; } } PropertyRegister(String uriPatternPropertyId,
			ApiConnection apiConnection, String siteUri); static PropertyRegister getWikidataPropertyRegister(); String getUriPrefix(); String getPropertyType(PropertyIdValue propertyIdValue); void setPropertyType(PropertyIdValue propertyIdValue,
			String datatypeIri); String getPropertyUriPattern(PropertyIdValue propertyIdValue); String setPropertyTypeFromEntityIdValue(
			PropertyIdValue propertyIdValue, EntityIdValue value); String setPropertyTypeFromGlobeCoordinatesValue(
			PropertyIdValue propertyIdValue, GlobeCoordinatesValue value); String setPropertyTypeFromQuantityValue(
			PropertyIdValue propertyIdValue, QuantityValue value); String setPropertyTypeFromStringValue(
			PropertyIdValue propertyIdValue, StringValue value); String setPropertyTypeFromTimeValue(PropertyIdValue propertyIdValue,
			TimeValue value); String setPropertyTypeFromMonolingualTextValue(
			PropertyIdValue propertyIdValue, MonolingualTextValue value); void fetchUsingSPARQL(URI endpoint); }
PropertyRegister { public String setPropertyTypeFromEntityIdValue( PropertyIdValue propertyIdValue, EntityIdValue value) { try { return EntityIdValueImpl.guessEntityTypeFromId(value.getId()); } catch (IllegalArgumentException e) { logger.warn("Could not determine datatype of "+ propertyIdValue.getId() + "."); logger.warn("Example value "+value.getId()+ " is not recognized as a valid entity id."); logger.warn("Perhaps this is a newly introduced datatype not supported by this version of wdtk."); logger.warn("Consider upgrading the library to a newer version."); return null; } } PropertyRegister(String uriPatternPropertyId,
			ApiConnection apiConnection, String siteUri); static PropertyRegister getWikidataPropertyRegister(); String getUriPrefix(); String getPropertyType(PropertyIdValue propertyIdValue); void setPropertyType(PropertyIdValue propertyIdValue,
			String datatypeIri); String getPropertyUriPattern(PropertyIdValue propertyIdValue); String setPropertyTypeFromEntityIdValue(
			PropertyIdValue propertyIdValue, EntityIdValue value); String setPropertyTypeFromGlobeCoordinatesValue(
			PropertyIdValue propertyIdValue, GlobeCoordinatesValue value); String setPropertyTypeFromQuantityValue(
			PropertyIdValue propertyIdValue, QuantityValue value); String setPropertyTypeFromStringValue(
			PropertyIdValue propertyIdValue, StringValue value); String setPropertyTypeFromTimeValue(PropertyIdValue propertyIdValue,
			TimeValue value); String setPropertyTypeFromMonolingualTextValue(
			PropertyIdValue propertyIdValue, MonolingualTextValue value); void fetchUsingSPARQL(URI endpoint);  }