private void writeIndexCoding(IndexCoding indexCoding, NVariable variable) throws IOException { CfIndexCodingPart.writeIndexCoding(indexCoding, variable); final String[] indexNames = indexCoding.getIndexNames(); final StringBuilder descriptions = new StringBuilder(); for (String indexName : indexNames) { final MetadataAttribute index = indexCoding.getIndex(indexName); if (index != null) { final String description = index.getDescription(); if (description != null) { descriptions.append(description); } } descriptions.append(DESCRIPTION_SEPARATOR); } variable.addAttribute(INDEX_DESCRIPTIONS, descriptions.toString().trim()); variable.addAttribute(INDEX_CODING_NAME, indexCoding.getName()); }