if (f.getRange().isArray()) {
// handle all kinds of arrays
FeatureStructure featureValue = featureStructure.getFeatureValue(f);
// ArrayFS is a special kind of CommonArrayFS
if (featureValue instanceof ArrayFS) {
ArrayFS array = (ArrayFS) featureValue;
if (array != null) {
String text = "Array" + "[" + array.size() + "]";
PrimitiveFeatureTreeNode arrayNode = new PrimitiveFeatureTreeNode(this, f, text);
parent.addChild(arrayNode);
int size = array.size();
for (int i = 0; i < size; i++) {
FeatureStructure fs = array.get(i);
if (fs instanceof FeatureStructure) {
Type fsType = fs.getType();
if (expandable(fsType, parentTypes)) {
ITreeNode fsNode;
if (fs instanceof AnnotationFS) {
AnnotationFS faa = (AnnotationFS) fs;
fsNode = new AnnotationTreeNode(arrayNode, faa, parentTypes);
} else {
fsNode = new TypeTreeNode(arrayNode, fsType);
}
arrayNode.addChild(fsNode);
}
}
}
}
} else if (featureValue instanceof CommonArrayFS) {
// handle all other kind of CommonArrayFS nodes (ArrayFS handled above)
CommonArrayFS array = (CommonArrayFS) featureValue;
String text = "[" + StringUtils.join(array.toStringArray(), ", ") + "]";
parent.addChild(new ArrayFeatureTreeNode(this, f, text));
}
} else if (f.getRange().isPrimitive()) {
if ("uima.cas.AnnotationBase:sofa".equals(f.getName())) {
} else {