diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java index 10c2d27..91036f8 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java @@ -47,6 +47,7 @@ public class PropertyChecker public static final String WEEKS = "^\\d*(,\\d*){0,52}$"; public static final String DAYS = "^\\d*(,\\d*){0,365}$"; public static final String COUNTRY_CODE = "^[a-zA-Z]{2}$"; + public static final String DECIMAL_DEGREE = "^[+-]?\\d+[,\\.]\\d{1,8}$"; public static final String SUBS = "^subs\\.\\S+$"; public static final String METRICS_NAME = "^metrics\\.\\S+\\.name$"; @@ -131,8 +132,8 @@ public class PropertyChecker this.organizationRules.add("organization.country.name", STRING, PropertyMode.WISHED); this.organizationRules.add("organization.country.code", COUNTRY_CODE, PropertyMode.MANDATORY); this.organizationRules.add("organization.funding.*", "^organization\\.funding\\.\\S+$", STRING, PropertyMode.OPTIONAL); - this.organizationRules.add("organization.geolocation.latitude", STRING, PropertyMode.OPTIONAL); - this.organizationRules.add("organization.geolocation.longitude", STRING, PropertyMode.OPTIONAL); + this.organizationRules.add("organization.geolocation.latitude", DECIMAL_DEGREE, PropertyMode.OPTIONAL); + this.organizationRules.add("organization.geolocation.longitude", DECIMAL_DEGREE, PropertyMode.OPTIONAL); this.organizationRules.add("organization.geolocation.address", STRING, PropertyMode.OPTIONAL); this.organizationRules.add(SUBS, URL, PropertyMode.OPTIONAL);