@Override public WikidataValue visit(EntityIdValue value) { if (value.getEntityType().equals(EntityIdValue.ET_ITEM)) { return WikidataValue.forItem(Integer.valueOf(value.getId().substring(1))); } else if (value.getEntityType().equals(EntityIdValue.ET_PROPERTY)) { return WikidataValue.forProperty(Integer.valueOf(value.getId().substring(1))); } else { throw new IllegalArgumentException("Unknown entity type: " + value.getEntityType()); } }
@Override public WikidataValue visit(EntityIdValue value) { if (value.getEntityType().equals(EntityIdValue.ET_ITEM)) { return WikidataValue.forItem(Integer.valueOf(value.getId().substring(1))); } else if (value.getEntityType().equals(EntityIdValue.ET_PROPERTY)) { return WikidataValue.forProperty(Integer.valueOf(value.getId().substring(1))); } else { throw new IllegalArgumentException("Unknown entity type: " + value.getEntityType()); } }