Package org.vfny.geoserver.global.dto

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


        throws IOException, ServletException {
        ServletContext sc = request.getSession().getServletContext();

        WMSDTO wmsDTO = null;
        WFSDTO wfsDTO = null;
        GeoServerDTO geoserverDTO = null;
        DataDTO dataDTO = null;
        //DJB: changed for geoserver_data_dir   
       // File rootDir = new File(sc.getRealPath("/"));
       
        File rootDir =  GeoserverDataDirectory.getGeoserverDataDirectory(sc);
View Full Code Here


     * </p>
     *
     * @return DTO the generated object
     */
    public Object toDTO() {
        GeoServerDTO dto = new GeoServerDTO();
        dto.setCharSet(charSet);
        dto.setLoggingLevel(loggingLevel);
        dto.setMaxFeatures(maxFeatures);
        dto.setNumDecimals(numDecimals);
        dto.setSchemaBaseUrl(schemaBaseUrl);
        dto.setVerbose(verbose);
        dto.setAdminUserName(adminUserName);
        dto.setAdminPassword(adminPassword);
        dto.setVerboseExceptions(verboseExceptions);
        dto.setLoggingToFile(loggingToFile);
        dto.setLogLocation(logLocation);
       
        ContactDTO cdto = new ContactDTO();
        dto.setContact(cdto);

        cdto.setAddress(address);
        cdto.setAddressCity(addressCity);
        cdto.setAddressCountry(addressCountry);
        cdto.setAddressPostalCode(addressPostalCode);
View Full Code Here

     * @return a copy of the data in a GeoServerDTO representation
     *
     * @see org.vfny.geoserver.config.DataStructure#toDTO()
     */
    public GeoServerDTO toDTO() {
        GeoServerDTO g = new GeoServerDTO();
        g.setMaxFeatures(maxFeatures);
        g.setVerbose(verbose);
        g.setAdminPassword(adminPassword);
        g.setAdminUserName(adminUserName);
        g.setNumDecimals(numDecimals);
        g.setLoggingLevel(loggingLevel);
        g.setCharSet(charSet);
        g.setSchemaBaseUrl(schemaBaseUrl);
    g.setVerboseExceptions(verboseExceptions);
        g.setContact((ContactDTO) contact.toDTO());
        g.setLoggingToFile(loggingToFile);
        g.setLogLocation(logLocation);

        return g;
    }
View Full Code Here

        LOGGER.finer("In method storeServices");
        cw.writeln("<?config.xml version=\"1.0\" encoding=\"UTF-8\"?>");
        cw.comment("Service level configuration");
        cw.openTag("serverConfiguration");

        GeoServerDTO g = geoServer;

        if (g != null) {
            cw.openTag("global");

            if (g.getLoggingLevel() != null) {
                cw.comment(
                    "Defines the logging level.  Common options are SEVERE,\n"
                    + "WARNING, INFO, CONFIG, FINER, FINEST, in order of\n"
                    + "Increasing statements logged.");
                cw.textTag("loggingLevel", g.getLoggingLevel().getName());
            }

            cw.valueTag("loggingToFile",g.getLoggingToFile()+"");
            if (g.getLogLocation() != null) {
                cw.textTag("logLocation", g.getLogLocation());
            }

            /*if(g.getBaseUrl()!=null && g.getBaseUrl()!=""){
               cw.comment("The base URL where this servlet will run.  If running locally\n"+
               "then http://localhost:8080 (or whatever port you're running on)\n"+
               "should work.  If you are serving to the world then this must be\n"+
               "the location where the geoserver servlets appear");
               cw.textTag("URL",g.getBaseUrl());
               }*/
            cw.comment("Sets the max number of Features returned by GetFeature");
            cw.valueTag("maxFeatures", "" + g.getMaxFeatures());
            cw.comment("Whether newlines and indents should be returned in \n"
                + "XML responses.  Default is false");
            cw.valueTag("verbose", "" + g.isVerbose());
            cw.comment(
                "Whether the Service Exceptions returned to clients should contain\n"
                + "full java stack traces (useful for debugging). ");
            cw.valueTag("verboseExceptions", "" + g.isVerboseExceptions());
            cw.comment(
                "Sets the max number of decimal places past the zero returned in\n"
                + "a GetFeature response.  Default is 4");
            cw.valueTag("numDecimals", "" + g.getNumDecimals());

            if (g.getCharSet() != null) {
                cw.comment(
                    "Sets the global character set.  This could use some more testing\n"
                    + "from international users, but what it does is sets the encoding\n"
                    + "globally for all postgis database connections (the charset tag\n"
                    + "in FeatureTypeConfig), as well as specifying the encoding in the return\n"
                    + "config.xml header and mime type.  The default is UTF-8.  Also be warned\n"
                    + "that GeoServer does not check if the CharSet is valid before\n"
                    + "attempting to use it, so it will fail miserably if a bad charset\n"
                    + "is used.");
                cw.valueTag("charSet", g.getCharSet().toString());
            }

            if ((g.getSchemaBaseUrl() != null) && (g.getSchemaBaseUrl() != "")) {
                cw.comment(
                    "Define a base url for the location of the wfs schemas.\n"
                    + "By default GeoServer loads and references its own at\n"
                    + "<URL>/data/capabilities. Uncomment to enable.  The\n"
                    + "standalone Tomcat server needs SchemaBaseUrl defined\n"
                    + "for validation.");
                cw.textTag("SchemaBaseUrl", g.getSchemaBaseUrl());
            }

            if ((g.getAdminUserName() != null) && (g.getAdminUserName() != "")) {
                cw.comment(
                    "Defines the user name of the administrator for log in\n"
                    + "to the web based administration tool.");
                cw.textTag("adminUserName", g.getAdminUserName());
            }

            if ((g.getAdminPassword() != null) && (g.getAdminPassword() != "")) {
                cw.comment(
                    "Defines the password of the administrator for log in\n"
                    + "to the web based administration tool.");
                cw.textTag("adminPassword", g.getAdminPassword());
            }

            if (g.getContact() != null) {
                storeContact(g.getContact(), cw);
            }

            cw.closeTag("global");
        }

View Full Code Here

     */
    protected XMLConfigReader(ServletContext context) {
      this.context = context;
      wms = new WMSDTO();
        wfs = new WFSDTO();
        geoServer = new GeoServerDTO();
        data = new DataDTO();
        root = new File(".");
    }
View Full Code Here

    public XMLConfigReader(File root, ServletContext context) throws ConfigurationException {
        this.root = root;
        this.context = context;
        wms = new WMSDTO();
        wfs = new WFSDTO();
        geoServer = new GeoServerDTO();
        data = new DataDTO();
        load();
        initialized = true;
       
    }
View Full Code Here

     *        configuration.
     *
     * @throws ConfigurationException When an error occurs.
     */
    protected void loadGlobal(Element globalElem) throws ConfigurationException {
        geoServer = new GeoServerDTO();
        LOGGER.finer("parsing global configuration parameters");

        Level loggingLevel = getLoggingLevel(globalElem);
        geoServer.setLoggingLevel(loggingLevel);

View Full Code Here

        ServletContext sc = request.getSession().getServletContext();

        try {
            WMSDTO wmsDTO = getWMSConfig().toDTO();
            WFSDTO wfsDTO = getWFSConfig().toDTO();
            GeoServerDTO geoserverDTO = getGlobalConfig().toDTO();
            DataDTO dataDTO = getDataConfig().toDTO();

            getWFS(request).load(wfsDTO);
            getWMS(request).load(wmsDTO);
            getWFS(request).getGeoServer().load(geoserverDTO,sc);
View Full Code Here

    }

    public void testStoreBlank() {
        try {
            XMLConfigWriter.store(new WMSDTO(), new WFSDTO(),
                new GeoServerDTO(), root1);
        } catch (ConfigurationException e) {
            fail(e.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.dto.GeoServerDTO

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.