Search in sources :

Example 1 with WFSInfoImpl

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() + "'");
}
Also used : GMLInfoImpl(org.geoserver.wfs.GMLInfoImpl) GMLInfo(org.geoserver.wfs.GMLInfo) Version(org.geotools.util.Version) WFSInfoImpl(org.geoserver.wfs.WFSInfoImpl)

Aggregations

GMLInfo (org.geoserver.wfs.GMLInfo)1 GMLInfoImpl (org.geoserver.wfs.GMLInfoImpl)1 WFSInfoImpl (org.geoserver.wfs.WFSInfoImpl)1 Version (org.geotools.util.Version)1