use of org.geoserver.wfs.WFSInfoImpl in project polymap4-core by Polymap4.
the class GeoServerLoader method createWFSInfo.
protected void createWFSInfo(IMap map) {
WFSInfoImpl wfs = new WFSInfoImpl();
wfs.setGeoServer(geoserver);
// XXX make this configurable (where to get authentication from when TRANSACTIONAL?)
wfs.setServiceLevel(ServiceLevel.BASIC);
wfs.setId(simpleName(map.id()) + "-wfs");
wfs.setOutputStrategy("SPEED");
addMaintainer(wfs, map);
// gml2
GMLInfo gml = new GMLInfoImpl();
gml.setOverrideGMLAttributes(true);
// (Boolean) properties.get( "srsXmlStyle" );
Boolean srsXmlStyle = false;
if (srsXmlStyle) {
gml.setSrsNameStyle(SrsNameStyle.XML);
} else {
gml.setSrsNameStyle(SrsNameStyle.NORMAL);
}
wfs.getGML().put(WFSInfo.Version.V_10, gml);
// gml3
gml = new GMLInfoImpl();
gml.setSrsNameStyle(SrsNameStyle.URN);
gml.setOverrideGMLAttributes(false);
wfs.getGML().put(WFSInfo.Version.V_11, gml);
// gml32
gml = new GMLInfoImpl();
gml.setSrsNameStyle(SrsNameStyle.URN2);
gml.setOverrideGMLAttributes(false);
wfs.getGML().put(WFSInfo.Version.V_20, gml);
wfs.getVersions().add(new Version("1.0.0"));
wfs.getVersions().add(new Version("1.1.0"));
wfs.getVersions().add(new Version("2.0.0"));
geoserver.add(wfs);
log.info("WFS: '" + wfs.getTitle() + "'");
}
Aggregations