FeatureCollectionType featureCollection = (FeatureCollectionType) object;
if (!featureCollection.getFeature().isEmpty()) {
if (featureCollection.getFeature().size() > 1) {
// wrap in a single
return new CompositeFeatureCollection(featureCollection.getFeature());
}
// just return the single
return featureCollection.getFeature().iterator().next();
}
} else if (GML.featureMember.equals(name)) {
// check the WFS configuration, if encode featureMembers is selected on WFS
// configuration page, return null;
if (!encodeFeatureMember) {
return null;
}
FeatureCollectionType featureCollection = (FeatureCollectionType) object;
if (!featureCollection.getFeature().isEmpty()) {
if (featureCollection.getFeature().size() > 1) {
// wrap in a single
return new CompositeFeatureCollection(featureCollection.getFeature());
}
// just return the single
return featureCollection.getFeature().iterator().next();
}