use of alien4cloud.tosca.parser.impl.base.SetParser in project alien4cloud by alien4cloud.
the class SetMappingBuilder method buildMapping.
@Override
public MappingTarget buildMapping(MappingNode mappingNode, ParsingContextExecution context) {
Map<String, String> map = ParserUtils.parseStringMap(mappingNode, context);
SetParser parser;
if (map.get(KEY) == null) {
parser = baseParserFactory.getSetParser(baseParserFactory.getReferencedParser(map.get(TYPE)), "sequence of " + map.get(TYPE));
} else {
parser = baseParserFactory.getSetParser(baseParserFactory.getReferencedParser(map.get(TYPE)), "map of " + map.get(TYPE), map.get(KEY));
}
return new MappingTarget(map.get(SET), parser);
}
Aggregations