Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.Data


         */
        private void handleLayers() {
            WMS wms = request.getWMS();
            start("Layer");

            Data catalog = wms.getData();
            Collection ftypes = catalog.getFeatureTypeInfos().values();
            FeatureTypeInfo layer;

            element("Title", wms.getTitle());
            element("Abstract", wms.getAbstract());

View Full Code Here


    FeatureTypeInfo fti;
    FeatureType ft;

    try {
      WMS wms = request.getWMS();
      Data catalog = wms.getData();
      fti = catalog.getFeatureTypeInfo(layer);
      ft = fti.getFeatureType();
    } catch (NoSuchElementException e) {
      throw new WmsException(layer + " layer does not exists.",
          "LayerNotDefined");
    } catch (IOException e) {
View Full Code Here

        if (layerCount == 0) {
            throw new WmsException("No LAYERS has been requested",
                getClass().getName());
        }

        Data catalog = req.getWMS().getData();
        LOGGER.fine(catalog.toString());

        String layerName = null;
        FeatureTypeInfo ftype = null;

        try {
            LOGGER.fine("looking featuretypeinfos");

            for (int i = 0; i < layerCount; i++) {
                layerName = (String) layers.get(i);
                LOGGER.fine("Looking for layer " + layerName);
                ftype = catalog.getFeatureTypeInfo(layerName);
                req.addLayer(ftype);
                LOGGER.fine(layerName + " found");
            }
        } catch (NoSuchElementException ex) {
            throw new WmsException(ex,
View Full Code Here

     *
     * @throws WmsException DOCUMENT ME!
     */
    public static FeatureTypeInfo findLayer(GetMapRequest request, String layerName)
        throws WmsException {
        Data catalog = request.getWMS().getData();
        FeatureTypeInfo ftype = null;

        try {
            ftype = catalog.getFeatureTypeInfo(layerName);
        } catch (NoSuchElementException ex) {
          WmsException e = new WmsException(ex,
                layerName + ": no such layer on this server", "LayerNotDefined");
          e.setCode("LayerNotDefined"); //DJB: added this for cite tests
          throw e;
View Full Code Here

            throw new WmsException("No QUERY_LAYERS has been requested",
                getClass().getName());
        }

        FeatureTypeInfo[] featureTypes = new FeatureTypeInfo[layerCount];
        Data catalog = null;
        catalog = request.getWMS().getData();

        String layerName = null;
        FeatureTypeInfo ftype = null;

        try {
            for (int i = 0; i < layerCount; i++) {
                layerName = (String) layers.get(i);
                ftype = catalog.getFeatureTypeInfo(layerName);
                featureTypes[i] = ftype;
            }
        } catch (NoSuchElementException ex) {
            throw new WmsException(ex,
                layerName + ": no such layer on this server",
View Full Code Here

   
    // 1) get the capabilities info so we can find out our feature types
    CapabilitiesRequest capRequest = new CapabilitiesRequest("WMS");
    capRequest.setHttpServletRequest(request);
    WMS wms = capRequest.getWMS();
    Data catalog = wms.getData();
    Collection ftypes = catalog.getFeatureTypeInfos().values();
    FeatureTypeInfo layer;
   
    // 2) delete any existing generated files in the generation directory
    ServletContext sc = request.getSession().getServletContext();
    File rootDir =  GeoserverDataDirectory.getGeoserverDataDirectory(sc);
View Full Code Here

   */
  private static void setUpMockGeoServer(MockHttpServletRequest request)
      throws ConfigurationException, IOException {

    final GeoServer mockGeoServer = new GeoServer();
    final Data citeData = createTestCiteData(mockGeoServer);
    WMSDTO wmsDto = newWmsDto();
    WMS wms = new WMS(wmsDto) {
      public Data getData() {
        return citeData;
      }
View Full Code Here

    dataDto.setDefaultNameSpacePrefix("cite");

    Map styles = createStyles(new File(dir, "styles"));
    dataDto.setStyles(styles);

    Data catalog = new Data(dataDto, dir, geoserver);
    return catalog;
  }
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.Data

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.