Exemple #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;
  }
Exemple #2
0
 /** Returns all allowed map output formats. */
 public Collection<GetMapOutputFormat> getAllowedMapFormats() {
   List<GetMapOutputFormat> result = new ArrayList<GetMapOutputFormat>();
   for (GetMapOutputFormat producer : WMSExtensions.findMapProducers(applicationContext)) {
     if (isAllowedGetMapFormat(producer)) {
       result.add(producer);
     }
   }
   return result;
 }
Exemple #3
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;
 }
Exemple #4
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;
  }
Exemple #5
0
  public Set<String> getAvailableLegendGraphicsFormats() {

    List<GetLegendGraphicOutputFormat> formats;
    formats = WMSExtensions.findLegendGraphicFormats(applicationContext);

    Set<String> mimeTypes = new HashSet<String>();
    for (GetLegendGraphicOutputFormat format : formats) {
      mimeTypes.add(format.getContentType());
    }
    return mimeTypes;
  }
Exemple #6
0
  /**
   * Grabs the list of allowed MIME-Types for the GetMap operation from the set of {@link
   * GetMapOutputFormat}s registered in the application context.
   *
   * @param applicationContext The application context where to grab the GetMapOutputFormats from.
   * @see GetMapOutputFormat#getContentType()
   */
  public Set<String> getAvailableMapFormatNames() {

    final Collection<GetMapOutputFormat> producers;
    producers = WMSExtensions.findMapProducers(applicationContext);
    final Set<String> formats = new HashSet<String>();

    for (GetMapOutputFormat producer : producers) {
      formats.addAll(producer.getOutputFormatNames());
    }
    return formats;
  }
Exemple #7
0
  /** @return all allowed GetMap format names */
  public Set<String> getAllowedMapFormatNames() {

    final Collection<GetMapOutputFormat> producers;
    producers = WMSExtensions.findMapProducers(applicationContext);
    final Set<String> formats = new HashSet<String>();

    for (GetMapOutputFormat producer : producers) {
      if (isAllowedGetMapFormat(producer) == false) {
        continue; // skip this producer, its mime type is not allowed
      }
      formats.addAll(producer.getOutputFormatNames());
    }

    return formats;
  }
Exemple #8
0
 public Collection<RenderedImageMapResponse> getAvailableMapResponses() {
   return WMSExtensions.findMapResponses(applicationContext);
 }
Exemple #9
0
 /**
  * @param outputFormat desired output format mime type
  * @return the GetLegendGraphicOutputFormat that can handle {@code mimeType}, or {@code null} if
  *     none is found
  */
 public GetLegendGraphicOutputFormat getLegendGraphicOutputFormat(final String outputFormat) {
   GetLegendGraphicOutputFormat format;
   format = WMSExtensions.findLegendGraphicFormat(outputFormat, applicationContext);
   return format;
 }
Exemple #10
0
 /**
  * @param mimeType the mime type to look a GetMapOutputFormat for
  * @return the GetMapOutputFormat that can handle {@code mimeType}, or {@code null} if none is
  *     found
  */
 public GetMapOutputFormat getMapOutputFormat(final String mimeType) {
   GetMapOutputFormat outputFormat;
   outputFormat = WMSExtensions.findMapProducer(mimeType, applicationContext);
   return outputFormat;
 }
Exemple #11
0
 /** Returns all {@link ExtendedCapabilitiesProvider} extensions. */
 public List<ExtendedCapabilitiesProvider> getAvailableExtendedCapabilitiesProviders() {
   return WMSExtensions.findExtendedCapabilitiesProviders(applicationContext);
 }
Exemple #12
0
 /** Returns all map output formats. */
 public Collection<GetMapOutputFormat> getAvailableMapFormats() {
   return WMSExtensions.findMapProducers(applicationContext);
 }