parseMeasures(json, resource);
return resource;
}
private void parseResourceFields(Object json, Resource resource) {
WSUtils utils = WSUtils.getINSTANCE();
resource.setId(utils.getInteger(json, "id"))
.setKey(utils.getString(json, "key"))
.setName(utils.getString(json, "name"))
.setLongName(utils.getString(json, "lname"))
.setCopy(utils.getInteger(json, "copy"))
.setScope(utils.getString(json, "scope"))
.setQualifier(utils.getString(json, "qualifier"))
.setLanguage(utils.getString(json, "lang"))
.setDescription(utils.getString(json, "description"))
.setDate(utils.getDateTime(json, "date"))
.setCreationDate(utils.getDateTime(json, "creationDate"))
.setVersion(utils.getString(json, "version"))
.setPeriod1Mode(utils.getString(json, "p1"))
.setPeriod1Param(utils.getString(json, "p1p"))
.setPeriod1Date(utils.getDateTime(json, "p1d"))
.setPeriod2Mode(utils.getString(json, "p2"))
.setPeriod2Param(utils.getString(json, "p2p"))
.setPeriod2Date(utils.getDateTime(json, "p2d"))
.setPeriod3Mode(utils.getString(json, "p3"))
.setPeriod3Param(utils.getString(json, "p3p"))
.setPeriod3Date(utils.getDateTime(json, "p3d"))
.setPeriod4Mode(utils.getString(json, "p4"))
.setPeriod4Param(utils.getString(json, "p4p"))
.setPeriod4Date(utils.getDateTime(json, "p4d"))
.setPeriod5Mode(utils.getString(json, "p5"))
.setPeriod5Param(utils.getString(json, "p5p"))
.setPeriod5Date(utils.getDateTime(json, "p5d"));
}