Exemplo n.º 1
0
  /** @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;
  }
Exemplo n.º 2
0
 /** @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;
 }
Exemplo n.º 3
0
  /**
   * @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;
  }