throws IOException {
this.compressOutput = formatNameCompressed.equalsIgnoreCase(outputFormat);
this.results = results;
FeatureRequest request = results.getRequest();
GeoServer config = request.getWFS().getGeoServer();
transformer = new FeatureTransformer();
FeatureTypeNamespaces ftNames = transformer.getFeatureTypeNamespaces();
int maxFeatures = request.getMaxFeatures();
int serverMaxFeatures = config.getMaxFeatures();
if (maxFeatures > serverMaxFeatures) {
maxFeatures = serverMaxFeatures;
}
StringBuffer typeNames = new StringBuffer();
FeatureResults features;
FeatureTypeInfo meta = null;
NameSpaceInfo namespace;
int resCount = results.getResultsetsCount();
Map ftNamespaces = new HashMap(resCount);
for (int resIndex = 0; resIndex < resCount; resIndex++) {
features = results.getFeatures(resIndex);
meta = results.getTypeInfo(resIndex);
namespace = meta.getDataStoreInfo().getNameSpace();
String uri = namespace.getUri();
ftNames.declareNamespace(features.getSchema(),
namespace.getPrefix(), uri);
if (ftNamespaces.containsKey(uri)) {
String location = (String) ftNamespaces.get(uri);
ftNamespaces.put(uri, location + "," + meta.getName());
} else {
ftNamespaces.put(uri,
request.getBaseUrl() + "wfs/"
+ "DescribeFeatureType?typeName=" + meta.getName());
}
}
System.setProperty("javax.xml.transform.TransformerFactory",
"org.apache.xalan.processor.TransformerFactoryImpl");
transformer.setIndentation(config.isVerbose() ? INDENT_SIZE
: (NO_FORMATTING));
transformer.setNumDecimals(config.getNumDecimals());
transformer.setFeatureBounding(request.getWFS().isFeatureBounding());
transformer.setEncoding(request.getWFS().getGeoServer().getCharSet());
String wfsSchemaLoc = request.getSchemaBaseUrl()
+ "wfs/1.0.0/WFS-basic.xsd";