import java.util.List;
import java.util.Map;
+import org.apache.commons.lang.StringUtils;
+
import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.description.NaturalLanguageTerm;
import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
}
}
QuantitativeDescription.append(spanEnd);
- textData.putText(QuantitativeDescription.toString(), languages.get(0)); // which language should be put here ?
+ textData.putText(languages.get(0), QuantitativeDescription.toString()); // which language should be put here ?
textData.setFormat(TextFormat.NewInstance(null, "HTML",null )); // the data format is set (not yet real HTML)
return textData;
}
+ protected String buildFeature(Feature feature, boolean doItBetter){
+ if (feature==null || feature.getLabel()==null) return "";
+ else {
+ if (doItBetter) {
+ String betterString = StringUtils.substringBefore(feature.getLabel(), "<");
+ return StringUtils.removeEnd(betterString, " ");
+ }
+ else return feature.getLabel();
+ }
+ }
+
private String spanClass(String classString){
return("<span class=\""+classString+"\">");
}