// Calculate the name, then add the value
Map<String, Object> nameContext = new HashMap<String, Object>();
nameContext.put("namespace", fieldType.getName().getNamespace());
nameContext.put("name", fieldType.getName().getName());
ValueType valueType = fieldType.getValueType();
nameContext.put("type", formatValueTypeName(valueType));
nameContext.put("baseType", valueType.getBaseName().toLowerCase());
// If there's no nested value type, revert to the current value type. This is practical for dynamic
// fields that match on types like "*,LIST<+>".
ValueType nestedValueType = valueType.getNestedValueType() != null ? valueType.getNestedValueType() : valueType;
nameContext.put("nestedType", formatValueTypeName(nestedValueType));
nameContext.put("nestedBaseType", nestedValueType.getBaseName().toLowerCase());
nameContext.put("deepestNestedBaseType", valueType.getDeepestValueType().getBaseName().toLowerCase());
boolean isList = valueType.getBaseName().equals("LIST");
nameContext.put("multiValue", isList);