req.executeLarge(tempFile);
List<Namespace> namespaces = new ArrayList<Namespace>();
namespaces.add(Namespace.getNamespace("gml", "http://www.opengis.net/gml"));
XmlElementReader reader = new XmlElementReader(new FileInputStream(tempFile), "gml:featureMembers/*", namespaces);
if (!reader.hasNext()) {
namespaces.add(Namespace.getNamespace("wfs", "http://www.opengis.net/wfs"));
reader = new XmlElementReader(new FileInputStream(tempFile), "wfs:FeatureCollection/gml:featureMember", namespaces);
}
while (reader.hasNext()) {
stylesheetDirectory = schemaMan.getSchemaDir(params.outputSchema) + Geonet.Path.WFS_STYLESHEETS;
Element records = Xml.transform(reader.next(), stylesheetDirectory + "/" + params.stylesheet, ssParams);
harvest(records, fragmentHarvester);
}
} finally {
if (!tempFile.delete() && tempFile.exists()) {