Examples of FeatureTypeInfoDTO


Examples of org.vfny.geoserver.global.dto.FeatureTypeInfoDTO

     *
     * @throws ConfigurationException When an error occurs.
     */
    protected FeatureTypeInfoDTO loadFeaturePt2(Element fTypeRoot)
        throws ConfigurationException {
        FeatureTypeInfoDTO ft = new FeatureTypeInfoDTO();

        ft.setName(ReaderUtils.getChildText(fTypeRoot, "name", true));
        ft.setTitle(ReaderUtils.getChildText(fTypeRoot, "title", true));
        ft.setAbstract(ReaderUtils.getChildText(fTypeRoot, "abstract"));

        String keywords = ReaderUtils.getChildText(fTypeRoot, "keywords");

        if (keywords != null) {
            List l = new LinkedList();
            String[] ss = keywords.split(",");

            for (int i = 0; i < ss.length; i++)
                l.add(ss[i].trim());

            ft.setKeywords(l);
        }

        ft.setDataStoreId(ReaderUtils.getAttribute(fTypeRoot, "datastore", true));
        ft.setSRS(Integer.parseInt(ReaderUtils.getChildText(fTypeRoot, "SRS",
                    true)));

        Element tmp = ReaderUtils.getChildElement(fTypeRoot, "styles");

        if (tmp != null) {
            ft.setDefaultStyle(ReaderUtils.getAttribute(tmp, "default", false));
        }

        // Modif C. Kolbowicz - 06/10/2004
        Element legendURL = ReaderUtils.getChildElement(fTypeRoot, "LegendURL");

        if (legendURL != null) {
            LegendURLDTO legend = new LegendURLDTO();
            legend.setWidth(Integer.parseInt(ReaderUtils.getAttribute(
                        legendURL, "width", true)));
            legend.setHeight(Integer.parseInt(ReaderUtils.getAttribute(
                        legendURL, "height", true)));
            legend.setFormat(ReaderUtils.getChildText(legendURL, "Format", true));
            legend.setOnlineResource(ReaderUtils.getAttribute(
                    ReaderUtils.getChildElement(legendURL, "OnlineResource",
                        true), "xlink:href", true));
            ft.setLegendURL(legend);
        }

        //-- Modif C. Kolbowicz - 06/10/2004
        ft.setLatLongBBox(loadLatLongBBox(ReaderUtils.getChildElement(
                    fTypeRoot, "latLonBoundingBox")));

        Element numDecimalsElem = ReaderUtils.getChildElement(fTypeRoot,
                "numDecimals", false);

        if (numDecimalsElem != null) {
            ft.setNumDecimals(ReaderUtils.getIntAttribute(numDecimalsElem,
                    "value", false, 8));
        }

        ft.setDefinitionQuery(loadDefinitionQuery(fTypeRoot));

        return ft;
    }
View Full Code Here

Examples of org.vfny.geoserver.global.dto.FeatureTypeInfoDTO

  }

  private static Map createFeatureTypes() {
    Map map = new HashMap();

    FeatureTypeInfoDTO ftDto;

    for (int i = 0; i < AbstractCiteDataTest.CITE_TYPE_NAMES.length; i++) {
      String typeName = AbstractCiteDataTest.CITE_TYPE_NAMES[i];
      ftDto = new FeatureTypeInfoDTO();
      ftDto.setAbstract(typeName + " abstract");
      ftDto.setDataStoreId("cite");
      ftDto.setDefaultStyle(typeName);
      ftDto.setDirName(null);
      ftDto.setName(typeName);
      ftDto.setSRS(4326);
      ftDto.setTitle("title for " + typeName);

      map.put(typeName, ftDto);
    }

    return map;
View Full Code Here

Examples of org.vfny.geoserver.global.dto.FeatureTypeInfoDTO

        if (r) {
            Iterator i = m.keySet().iterator();

            while (i.hasNext() && r) {
                String key = (String) i.next();
                FeatureTypeInfoDTO f = (FeatureTypeInfoDTO) m.get(key);

                if (f == null) {
                    r = false;
                } else {
                    r = r && (key == f.getName());
                    r = r && (f.getSchemaAttributes() != null);
                }
            }
        }

        assertTrue(r);
View Full Code Here

Examples of org.vfny.geoserver.global.dto.FeatureTypeInfoDTO

                if (r) {
                    Iterator i = mp.keySet().iterator();

                    while (i.hasNext() && r) {
                        String key = (String) i.next();
                        FeatureTypeInfoDTO f = (FeatureTypeInfoDTO) mp.get(key);

                        if (f == null) {
                            r = false;
                        } else {
                            r = r && (key == f.getName());
                            r = r && (f.getSchemaAttributes() != null);
                        }
                    }
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.