VectorLayerInfo info = layer.getLayerInfo();
builder.setName(info.getFeatureInfo().getDataSourceName());
builder.setCRS(mapCrs);
for (AttributeInfo attrInfo : info.getFeatureInfo().getAttributes()) {
if (attrInfo instanceof PrimitiveAttributeInfo) {
PrimitiveAttributeInfo prim = (PrimitiveAttributeInfo) attrInfo;
switch (prim.getType()) {
case BOOLEAN:
builder.add(prim.getName(), Boolean.class);
break;
case CURRENCY:
builder.add(prim.getName(), BigDecimal.class);
break;
case DATE:
builder.add(prim.getName(), Date.class);
break;
case DOUBLE:
builder.add(prim.getName(), Double.class);
break;
case FLOAT:
builder.add(prim.getName(), Float.class);
break;
case INTEGER:
builder.add(prim.getName(), Integer.class);
break;
case LONG:
builder.add(prim.getName(), Long.class);
break;
case SHORT:
builder.add(prim.getName(), Short.class);
break;
case STRING:
case URL:
case IMGURL:
builder.add(prim.getName(), String.class);
break;
default:
throw new IllegalStateException("Unknown primitive attribute type " + prim.getType());
}
} else if (attrInfo instanceof AssociationAttributeInfo) {
AssociationAttributeInfo ass = (AssociationAttributeInfo) attrInfo;
switch (ass.getType()) {
case MANY_TO_ONE: