Package net.opengis.ows20.impl

Examples of net.opengis.ows20.impl.AbstractReferenceBaseTypeImpl


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetUOM(DomainMetadataType newUOM, NotificationChain msgs) {
        DomainMetadataType oldUOM = uOM;
        uOM = newUOM;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows20Package.UN_NAMED_DOMAIN_TYPE__UOM, oldUOM, newUOM);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetReferenceSystem(DomainMetadataType newReferenceSystem, NotificationChain msgs) {
        DomainMetadataType oldReferenceSystem = referenceSystem;
        referenceSystem = newReferenceSystem;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows20Package.UN_NAMED_DOMAIN_TYPE__REFERENCE_SYSTEM, oldReferenceSystem, newReferenceSystem);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        ExceptionType e = Ows20Factory.eINSTANCE.createExceptionType();
        e.setExceptionCode("testCode");
        e.setLocator("testLocator");
        e.setExceptionText("testText");

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();
        report.setVersion("2.0");
        report.getException().add(e);

        Encoder encoder = new Encoder(new OWSConfiguration());
        encoder.setIndenting(true);
        encoder.setIndentSize(2);
       
View Full Code Here

        String version = null;
        if (useServiceVersion && request.getServiceDescriptor() != null) {
            version = request.getServiceDescriptor().getVersion().toString();
        }

        ExceptionReportType report = exceptionReport( exception, verboseExceptions, version );
       
        HttpServletResponse response = request.getHttpResponse();
        if (!request.isSOAP()) {
            //there will already be a SOAP mime type
            response.setContentType("application/xml");
View Full Code Here

            sb.append(new String(trace.toByteArray()));
        }

        e.setExceptionText(sb.toString());

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();

        version = version != null ? version : "2.0.0";
        report.setVersion(version);
        report.getException().add(e);

        return report;
    }
View Full Code Here

public class ExceptionReportTest {

    @Test
    public void testEncodeException() throws Exception {
        ExceptionType e = Ows20Factory.eINSTANCE.createExceptionType();
        e.setExceptionCode("testCode");
        e.setLocator("testLocator");
        e.setExceptionText("testText");

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();
        report.setVersion("2.0");
        report.getException().add(e);
View Full Code Here

    }

    public static ExceptionReportType exceptionReport(ServiceException exception,
        boolean verboseExceptions, String version) {

        ExceptionType e = Ows20Factory.eINSTANCE.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);
        sb.append("\n");
        sb.append(exception.getExceptionText()); // check this
//        e.getExceptionText().add(sb.toString());
//        e.getExceptionText().addAll(exception.getExceptionText());

        if(verboseExceptions) {
            //add the entire stack trace
            //exception.
            sb.append("\nDetails:\n");
            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            sb.append(new String(trace.toByteArray()));
        }

        e.setExceptionText(sb.toString());

        ExceptionReportType report = Ows20Factory.eINSTANCE.createExceptionReportType();

        version = version != null ? version : "2.0.0";
        report.setVersion(version);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetHTTP(HTTPType newHTTP, NotificationChain msgs) {
        HTTPType oldHTTP = hTTP;
        hTTP = newHTTP;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows20Package.DCP_TYPE__HTTP, oldHTTP, newHTTP);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetLanguages(LanguagesType newLanguages, NotificationChain msgs) {
        LanguagesType oldLanguages = languages;
        languages = newLanguages;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows20Package.CAPABILITIES_BASE_TYPE__LANGUAGES, oldLanguages, newLanguages);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetNoValues(NoValuesType newNoValues, NotificationChain msgs) {
        NoValuesType oldNoValues = noValues;
        noValues = newNoValues;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows20Package.UN_NAMED_DOMAIN_TYPE__NO_VALUES, oldNoValues, newNoValues);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

TOP

Related Classes of net.opengis.ows20.impl.AbstractReferenceBaseTypeImpl

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.