コード例 #1
0
ファイル: WMS.java プロジェクト: roarbra/geoserver
  /** @return a list of all getFeatureInfo content types */
  public List<String> getAvailableFeatureInfoFormats() {
    List<String> mimeTypes = new ArrayList<String>();
    for (GetFeatureInfoOutputFormat format :
        WMSExtensions.findFeatureInfoFormats(applicationContext)) {

      mimeTypes.add(format.getContentType());
    }
    return mimeTypes;
  }
コード例 #2
0
ファイル: WMS.java プロジェクト: roarbra/geoserver
 /** @return a list of all allowed getFeature info content types */
 public List<String> getAllowedFeatureInfoFormats() {
   List<String> mimeTypes = new ArrayList<String>();
   for (GetFeatureInfoOutputFormat format :
       WMSExtensions.findFeatureInfoFormats(applicationContext)) {
     if (isAllowedGetFeatureInfoFormat(format) == false) {
       continue; // skip this format
     }
     mimeTypes.add(format.getContentType());
   }
   return mimeTypes;
 }
コード例 #3
0
ファイル: WMS.java プロジェクト: roarbra/geoserver
  /**
   * @param requestFormat
   * @return a {@link GetFeatureInfoOutputFormat} that can handle the requested mime type or {@code
   *     null} if none if found
   */
  public GetFeatureInfoOutputFormat getFeatureInfoOutputFormat(String requestFormat) {
    List<GetFeatureInfoOutputFormat> outputFormats;
    outputFormats = WMSExtensions.findFeatureInfoFormats(applicationContext);

    for (GetFeatureInfoOutputFormat format : outputFormats) {
      if (format.canProduce(requestFormat)) {
        return format;
      }
    }
    return null;
  }