Package net.opengis.ows10

Examples of net.opengis.ows10.ExceptionType


    /**
     * @see ServiceInfo#getPublisher()
     */
    public URI getPublisher() {
        ServiceProviderType serviceProvider = capabilities.getServiceProvider();
        if (null == serviceProvider) {
            return null;
        }
        OnlineResourceType providerSite = serviceProvider.getProviderSite();
        if (null == providerSite) {
            return null;
        }
        String href = providerSite.getHref();
        try {
View Full Code Here


            operationList.add(OperationType.UPDATE_LITERAL);
            operationList.add(OperationType.DELETE_LITERAL);
            OutputFormatListType outputFormat = factory.createOutputFormatListType();
            outputFormat.getFormat().add("GML2");
            ft.setOutputFormats(outputFormat);
            WGS84BoundingBoxType bbox = Ows10Factory.eINSTANCE.createWGS84BoundingBoxType();
            bbox.setCrs("urn:ogc:crs:EPSG:6.7:4326");
            ft.getWGS84BoundingBox().add(bbox);
            ftl.getFeatureType().add(ft);
        }

        final Document dom = encode(ftl, WFS.FeatureTypeList);
View Full Code Here

    public ReferencedEnvelope getWGS84BoundingBox() {

        @SuppressWarnings("unchecked")
        List<WGS84BoundingBoxType> bboxList = eType.getWGS84BoundingBox();
        if (bboxList != null && bboxList.size() > 0) {
            WGS84BoundingBoxType bboxType = bboxList.get(0);
            @SuppressWarnings("unchecked")
            List<Double> lowerCorner = bboxType.getLowerCorner();
            @SuppressWarnings("unchecked")
            List<Double> upperCorner = bboxType.getUpperCorner();
            double minLon = (Double) lowerCorner.get(0);
            double minLat = (Double) lowerCorner.get(1);
            double maxLon = (Double) upperCorner.get(0);
            double maxLat = (Double) upperCorner.get(1);
View Full Code Here

     */
    public ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName) {
        final FeatureTypeType featureTypeInfo = getFeatureTypeInfo(typeName);
        List<WGS84BoundingBoxType> bboxList = featureTypeInfo.getWGS84BoundingBox();
        if (bboxList != null && bboxList.size() > 0) {
            WGS84BoundingBoxType bboxType = bboxList.get(0);
            List lowerCorner = bboxType.getLowerCorner();
            List upperCorner = bboxType.getUpperCorner();
            double minLon = (Double) lowerCorner.get(0);
            double minLat = (Double) lowerCorner.get(1);
            double maxLon = (Double) upperCorner.get(0);
            double maxLat = (Double) upperCorner.get(1);

View Full Code Here

        assertEquals("EPSG:4326", featureType.getDefaultSRS());

        List<WGS84BoundingBoxType> wgs84BoundingBox = featureType.getWGS84BoundingBox();
        assertEquals(1, wgs84BoundingBox.size());

        WGS84BoundingBoxType bbox = wgs84BoundingBox.get(0);
        assertEquals("EPSG:4326", bbox.getCrs());
        assertEquals(BigInteger.valueOf(2), bbox.getDimensions());

        assertEquals(-74.047185D, (Double) bbox.getLowerCorner().get(0), 1E-6);
        assertEquals(40.679648D, (Double) bbox.getLowerCorner().get(1), 1E-6);
        assertEquals(-73.90782D, (Double) bbox.getUpperCorner().get(0), 1E-6);
        assertEquals(40.882078D, (Double) bbox.getUpperCorner().get(1), 1E-6);

    }
View Full Code Here

        Double minx = Double.valueOf((String) node.getAttributeValue("minx"));
        Double miny = Double.valueOf((String) node.getAttributeValue("miny"));
        Double maxx = Double.valueOf((String) node.getAttributeValue("maxx"));
        Double maxy = Double.valueOf((String) node.getAttributeValue("maxy"));
        WGS84BoundingBoxType bbox = Ows10Factory.eINSTANCE.createWGS84BoundingBoxType();
        bbox.setCrs("EPSG:4326");
        bbox.setDimensions(BigInteger.valueOf(2));
        bbox.setLowerCorner(Arrays.asList(minx, miny));
        bbox.setUpperCorner(Arrays.asList(maxx, maxy));

        return bbox;

    }
View Full Code Here

    }

    public static ExceptionReportType exceptionReport(
            ServiceException exception, boolean verboseExceptions) {
       
        ExceptionType e = f.createExceptionType();

        if (exception.getCode() != null) {
            e.setExceptionCode(exception.getCode());
        } else {
            //set a default
            e.setExceptionCode("NoApplicableCode");
        }

        e.setLocator(exception.getLocator());

        //add the message
        StringBuffer sb = new StringBuffer();
        OwsUtils.dumpExceptionMessages(exception, sb, true);
        e.getExceptionText().add(sb.toString());
        e.getExceptionText().addAll(exception.getExceptionText());

        if(verboseExceptions) {
            //add the entire stack trace
            //exception.
            e.getExceptionText().add("Details:");
            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = f.createExceptionReportType();
        report.setVersion("1.1.0");
        report.getException().add(e);
View Full Code Here

        assertNotNull(response);

        // we should get an exception
        ExceptionReportType report = response.getExceptionResponse();
        assertNotNull(report);
        ExceptionType exception = (ExceptionType) report.getException().get(0);
        String errorMessage = exception.getExceptionText().get(0).toString();
        assertTrue(errorMessage.contains(processIdenLocal));
    }
View Full Code Here

    }

    public static ExceptionReportType exceptionReport(ServiceException exception,
        boolean verboseExceptions, String version) {
       
        ExceptionType e = f.createExceptionType();

        if (exception.getCode() != null) {
            e.setExceptionCode(exception.getCode());
        } else {
            //set a default
            e.setExceptionCode("NoApplicableCode");
        }

        e.setLocator(exception.getLocator());

        //add the message
        StringBuffer sb = new StringBuffer();
        OwsUtils.dumpExceptionMessages(exception, sb, true);
        e.getExceptionText().add(sb.toString());
        e.getExceptionText().addAll(exception.getExceptionText());

        if(verboseExceptions) {
            //add the entire stack trace
            //exception.
            e.getExceptionText().add("Details:");
            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = f.createExceptionReportType();
       
        version = version != null ? version : "1.1.0";
View Full Code Here

    }
   
    public static ExceptionReportType exceptionReport(
            ServiceException exception, boolean verboseExceptions) {
       
        ExceptionType e = f.createExceptionType();

        if (exception.getCode() != null) {
            e.setExceptionCode(exception.getCode());
        } else {
            //set a default
            e.setExceptionCode("NoApplicableCode");
        }

        e.setLocator(exception.getLocator());

        //add the message
        StringBuffer sb = new StringBuffer();
        OwsUtils.dumpExceptionMessages(exception, sb, true);
        e.getExceptionText().add(sb.toString());
        e.getExceptionText().addAll(exception.getExceptionText());

        if(verboseExceptions) {
            //add the entire stack trace
            //exception.
            e.getExceptionText().add("Details:");
            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = f.createExceptionReportType();
        report.setVersion("1.1.0");
        report.getException().add(e);
View Full Code Here

TOP

Related Classes of net.opengis.ows10.ExceptionType

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.