Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.FeatureTypeInfo


        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++) {
View Full Code Here


        metas = new ArrayList(layerCount);

       
        try {
            for (int i = 0; i < layerCount; i++) {
                FeatureTypeInfo finfo = requestedLayers[i];
                Query q = new DefaultQuery( finfo.getTypeName(), null, getFInfoFilter,request.getFeatureCount(), Query.ALL_NAMES, null );
                FeatureResults match = finfo.getFeatureSource().getFeatures(q);

                //this was crashing Gml2FeatureResponseDelegate due to not setting
                //the featureresults, thus not being able of querying the SRS
                //if (match.getCount() > 0) {
                    results.add(match);
View Full Code Here

        List queries = null;
        freq.setQueries(queries);

        GetFeatureResults getFeatureResults = new GetFeatureResults(freq);
        FeatureTypeInfo finfo;
        FeatureResults fresults;
        int i = 0;

        for (Iterator it = results.iterator(); it.hasNext(); i++) {
            fresults = (FeatureResults) it.next();
View Full Code Here

                throw new WmsException(msg, getClass().getName());
            }

            String currStyleName;
            Style currStyle;
            FeatureTypeInfo currLayer;

            for (int i = 0; i < numLayers; i++) {
                currStyleName = (String) styleNames.get(i);
                currLayer = layers[i];

                if ((null == currStyleName) || "".equals(currStyleName)) {
                    currStyle = currLayer.getDefaultStyle();
                } else {
                    currStyle = findStyle(request, currStyleName);

                    if (currStyle == null) {
                        String msg = "No default style has been defined for "
                            + currLayer.getName();
                        throw new WmsException(msg,
                            "StyleNotDefined");
                    }
                }
View Full Code Here

        }

        final List layers = new ArrayList();
        final List styles = new ArrayList();

        FeatureTypeInfo currLayer;
        Style currStyle;

        if (null != libraryModeLayers) {
            int lCount = libraryModeLayers.length;
View Full Code Here

        String layerName = null;

        for (int i = 0; i < layerCount; i++) {
            layerName = (String) layerNames.get(i);

            FeatureTypeInfo ftype = findLayer(request, layerName);
            featureTypes[i] = ftype;
        }

        return featureTypes;
    }
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,
View Full Code Here

        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);
View Full Code Here

    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);
    File previewDir = new File(sc.getRealPath("data/generated"));
   
    //File previewDir = new File(rootDir, "data/generated");
    if (!previewDir.exists())
      previewDir.mkdirs();
   
    try {
      emptyGeneratedDirectory(previewDir)// clear the contents of the directory
    } catch (ConfigurationException e) {
      e.printStackTrace();
    }
      
    // 3) Go through each FeatureType and collect information && write out config files
    for (Iterator it = ftypes.iterator(); it.hasNext();)
    {
      layer = (FeatureTypeInfo) it.next();
      Envelope bbox = layer.getLatLongBoundingBox();
      if (layer.isEnabled())
      {
        // prepare strings for web output
        ftList.add(layer.getNameSpace().getPrefix()+"_"+layer.getFeatureType().getTypeName())// FeatureType name
        ftnsList.add(layer.getNameSpace().getPrefix()+":"+layer.getFeatureType().getTypeName() );
        dsList.add(layer.getDataStoreInfo().getId())// DataStore info
        // bounding box of the FeatureType
        bboxList.add(bbox.getMinX()+", "+bbox.getMinY()+", "+bbox.getMaxX()+", "+bbox.getMaxY());
        //save out the mapbuilder files
        makeMapBuilderFiles(previewDir, layer, bbox);
View Full Code Here

TOP

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

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.