public int getWatermarkPosition() { WatermarkInfo watermark = getServiceInfo().getWatermark(); Position position = watermark.getPosition(); return position.getCode(); }
public void setWatermarkPosition(int watermarkPosition) { WatermarkInfo.Position p = WatermarkInfo.Position.get( watermarkPosition ); wms.getWatermark().setPosition(p); //this.watermarkPosition = watermarkPosition; }
protected WMSInfo createServiceFromScratch(GeoServer gs) { WMSInfo wms = new WMSInfoImpl(); wms.setName("WMS"); return wms; }
public int getJpegCompression() { WMSInfo serviceInfo = getServiceInfo(); return getMetadataPercentage( serviceInfo.getMetadata(), JPEG_COMPRESSION, JPEG_COMPRESSION_DEFAULT); }
/** * Checks is a getMap mime type is allowed * * @param format */ public boolean isAllowedGetMapFormat(GetMapOutputFormat format) { if (getServiceInfo().isGetMapMimeTypeCheckingEnabled() == false) return true; Set<String> mimeTypes = getServiceInfo().getGetMapMimeTypes(); return mimeTypes.contains(format.getMimeType()); }
public String getGlobalWatermarkingURL() { WatermarkInfo watermark = getServiceInfo().getWatermark(); return watermark.getURL(); }
private static String guessCharset(WMSMapContent mapContent) { GetMapRequest request = mapContent.getRequest(); if (request != null && request.getRequestCharset() != null) { String requestCharset = request.getRequestCharset(); return requestCharset; } return "UTF-8"; }
public int getWatermarkPosition() { return wms.getWatermark().getPosition().getCode(); //return watermarkPosition; }
public boolean isEnabled() { WMSInfo serviceInfo = getServiceInfo(); return serviceInfo.isEnabled(); }
@Override public WMSMapContent beforeRender(WMSMapContent mapContent) { mapContent.addLayer(layer); return super.beforeRender(mapContent); } };
/** * If TRUE is returned GetFeatureInfo results should NOT be reproject to the map coordinate * reference system. * * @return GetFeatureInfo results reprojection allowance */ public boolean isFeaturesReprojectionDisabled() { return getServiceInfo().isFeaturesReprojectionDisabled(); }
public int getWatermarkTransparency() { return wms.getWatermark().getTransparency(); //return watermarkTransparency; }
public String getGlobalWatermarkingURL() { return wms.getWatermark().getURL(); //return globalWatermarkingURL; }
public void setWatermarkTransparency(int watermarkTransparency) { wms.getWatermark().setTransparency(watermarkTransparency); //this.watermarkTransparency = watermarkTransparency; }
public void setGlobalWatermarking(boolean globalWatermarking) { wms.getWatermark().setEnabled(globalWatermarking); //this.globalWatermarking = globalWatermarking; }
public void setGlobalWatermarkingURL(String globalWatermarkingURL) { wms.getWatermark().setURL( globalWatermarkingURL ); //this.globalWatermarkingURL = globalWatermarkingURL; }
/** * Set optional layer title (from MapLayerInfo). * * <p>Note {@link #legends} entry must all ready be added. * * @param featureTypeName * @param title Layer title from MapLayerInfo * @deprecated Use getLegendRequest(name).setTitle(title); */ public void setTitle(Name featureTypeName, String title) { getLegend(featureTypeName).setTitle(title); }
public int getKmScore() { return getMetadataPercentage( getServiceInfo().getMetadata(), KML_KMSCORE, KML_KMSCORE_DEFAULT); }
public int getPngCompression() { WMSInfo serviceInfo = getServiceInfo(); return getMetadataPercentage( serviceInfo.getMetadata(), PNG_COMPRESSION, PNG_COMPRESSION_DEFAULT); }