Package org.geoserver.importer

Examples of org.geoserver.importer.ValidationException


            //parse the date format to ensure its legal
            try {
                this.datePattern.dateFormat();
            }
            catch(IllegalArgumentException iae) {
                throw new ValidationException("Invalid date parsing format",iae);
            }
        }
    }
View Full Code Here


        } else if ("AttributeRemapTransform".equalsIgnoreCase(type)) {
            Class clazz;
            try {
                clazz = Class.forName( json.getString("target") );
            } catch (ClassNotFoundException cnfe) {
                throw new ValidationException("unable to locate target class " + json.getString("target"));
            }
            transform = new AttributeRemapTransform(json.getString("field"), clazz);
        } else if ("AttributesToPointGeometryTransform".equalsIgnoreCase(type)) {
            String latField = json.getString("latField");
            String lngField = json.getString("lngField");
            transform = new AttributesToPointGeometryTransform(latField, lngField);
        } else if ("ReprojectTransform".equalsIgnoreCase(type)){
            CoordinateReferenceSystem source = json.has("source") ? crs(json.getString("source")) : null;
            CoordinateReferenceSystem target = json.has("target") ? crs(json.getString("target")) : null;

            try {
                transform = new ReprojectTransform(source, target);
            }
            catch(Exception e) {
                throw new ValidationException("Error parsing reproject transform", e);
            }
        } else {
            throw new ValidationException("Invalid transform type '" + type + "'");
        }
        return transform;
    }
View Full Code Here

TOP

Related Classes of org.geoserver.importer.ValidationException

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.