diff --git a/lib/constants.js b/lib/constants.js index 14aa7861b..b061b57c3 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -23,9 +23,7 @@ * Modified by: Daniel Calvo - ATOS Research & Innovation */ -const LOCATION_TYPE = 'geo:point'; const LOCATION_DEFAULT = '0, 0'; -const DATETIME_TYPE = 'DateTime'; const DATETIME_DEFAULT = '1970-01-01T00:00:00.000Z'; const ATTRIBUTE_DEFAULT = ' '; @@ -36,10 +34,18 @@ const ATTRIBUTE_DEFAULT = ' '; * @return {String} A default value to use in the entity */ function getInitialValueForType(type) { - switch (type) { - case LOCATION_TYPE: + switch (type.toLowerCase()) { + case 'geoproperty': return LOCATION_DEFAULT; - case DATETIME_TYPE: + case 'point': + return LOCATION_DEFAULT; + case 'geo:point': + return LOCATION_DEFAULT; + case 'datetime': + return DATETIME_DEFAULT; + case 'date': + return DATETIME_DEFAULT; + case 'time': return DATETIME_DEFAULT; default: return ATTRIBUTE_DEFAULT;