messages.info("MapData-Config", "ResourceConf", "Loading resource definitions");
Ruleset defRuleset = resourceRegistry.getRuleset("definition");
Iterator<Section> sectionIterator = defRuleset.getSectionIterator();
while (sectionIterator.hasNext()) {
Section currSection = sectionIterator.next();
String name = currSection.getField("Name").getStringValue();
if (resourceDefinitions.containsKey(name)) {
String msg = "Resource " + name + " is already defined! "
+ "(resource names must be unique) (definitions.ruleset)";
throw new MapDefinitionException(msg);
}
String physUnitString = currSection.getField("StandardUnit").getStringValue();
PhysicalAmount.PhysicalUnit physUnit
= PhysicalAmount.PhysicalUnit.fromString(physUnitString);
if (physUnit == null) {
throw new RulesetException("While loading resource-definitions: "
+ physUnitString + " is not a valid "