Package net.opengis.ows10

Examples of net.opengis.ows10.CodeType


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetServiceType(CodeType newServiceType, NotificationChain msgs) {
    CodeType oldServiceType = serviceType;
    serviceType = newServiceType;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.SERVICE_IDENTIFICATION_TYPE__SERVICE_TYPE, oldServiceType, newServiceType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetIdentifier(CodeType newIdentifier, NotificationChain msgs) {
    CodeType oldIdentifier = identifier;
    identifier = newIdentifier;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.IDENTIFICATION_TYPE__IDENTIFIER, oldIdentifier, newIdentifier);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

            if (kw != null) {
                si.getKeywords().add(kw);
            }

            CodeType CSW = owsf.createCodeType();
            CSW.setValue("CSW");
            si.setServiceType(CSW);
            si.setServiceTypeVersion(CSW_VERSION);
            si.setFees(csw.getFees());

            if (csw.getAccessConstraints() != null) {
View Full Code Here

       
        OperationType getCapsOp = (OperationType) om.getOperation().get(0);
        assertEquals("GetCapabilities", getCapsOp.getName());
        assertEquals( 1, getCapsOp.getDCP().size());
       
        DCPType dcp = (DCPType) getCapsOp.getDCP().get(0);
        assertEquals( 1, dcp.getHTTP().getGet().size() );
        assertEquals( 1, dcp.getHTTP().getPost().size() );
       
        assertEquals( "http://localhost:8080/geoserver/wfs", ((RequestMethodType) dcp.getHTTP().getGet().get(0)).getHref() );
        assertEquals( "http://localhost:8080/geoserver/wfs", ((RequestMethodType) dcp.getHTTP().getPost().get(0)).getHref() );
       
        assertEquals("DescribeFeatureType", ((OperationType) om.getOperation().get(1)).getName());
        assertEquals(1, ((OperationType) om.getOperation().get(1)).getDCP().size());
        assertEquals("GetFeature", ((OperationType) om.getOperation().get(2)).getName());
        assertEquals(1, ((OperationType) om.getOperation().get(2)).getDCP().size());
View Full Code Here

            ByteArrayOutputStream trace = new ByteArrayOutputStream();
            exception.printStackTrace(new PrintStream(trace));
            e.getExceptionText().add(new String(trace.toByteArray()));
        }

        ExceptionReportType report = factory.createExceptionReportType();
        report.setVersion("1.0.0");
        report.getException().add(e);

        request.getHttpResponse().setContentType("application/xml");

        //response.setCharacterEncoding( "UTF-8" );
        OWSConfiguration configuration = new OWSConfiguration();
View Full Code Here

        document = dom(xml);
        Object result = parse(OWS.EXCEPTIONREPORT);

        assertNotNull(result);
        assertTrue(result instanceof ExceptionReportType);
        ExceptionReportType er = (ExceptionReportType) result;

        assertEquals("1.0.0", er.getVersion());
        assertEquals(1, er.getException().size());
        ExceptionType ex = (ExceptionType) er.getException().get(0);
        assertEquals("InvalidParameterValue", ex.getExceptionCode());
        assertEquals("service", ex.getLocator());
        assertEquals(1, ex.getExceptionText().size());
        assertEquals("No service: ( madeUp )", ex.getExceptionText().get(0));
    }
View Full Code Here

     * Writes out an OWS ExceptionReport document.
     */
    public void handleServiceException(ServiceException exception, Request request) {
        Ows10Factory factory = Ows10Factory.eINSTANCE;

        ExceptionType e = factory.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 = factory.createExceptionReportType();
        report.setVersion("1.0.0");
        report.getException().add(e);
View Full Code Here

        assertTrue(result instanceof ExceptionReportType);
        ExceptionReportType er = (ExceptionReportType) result;

        assertEquals("1.0.0", er.getVersion());
        assertEquals(1, er.getException().size());
        ExceptionType ex = (ExceptionType) er.getException().get(0);
        assertEquals("InvalidParameterValue", ex.getExceptionCode());
        assertEquals("service", ex.getLocator());
        assertEquals(1, ex.getExceptionText().size());
        assertEquals("No service: ( madeUp )", ex.getExceptionText().get(0));
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        GetCapabilitiesType getCapabilities;

        if ((value != null) && value instanceof GetCapabilitiesType) {
            getCapabilities = (GetCapabilitiesType) value;
        } else {
            getCapabilities = owsfactory.createGetCapabilitiesType();
        }

        getCapabilities.setAcceptVersions((AcceptVersionsType) node.getChildValue(
                AcceptVersionsType.class));
        getCapabilities.setSections((SectionsType) node.getChildValue(SectionsType.class));
        getCapabilities.setAcceptFormats((AcceptFormatsType) node.getChildValue(
                AcceptFormatsType.class));
        getCapabilities.setUpdateSequence((String) node.getAttributeValue("updateSequence"));

        return getCapabilities;
    }
View Full Code Here

        assertEquals( "application/xml", response.getMimeType(null,null));
    }
  
    public void testEncode() throws Exception {
        Ows10Factory f = Ows10Factory.eINSTANCE;
        GetCapabilitiesType caps = f.createGetCapabilitiesType();
        AcceptVersionsType versions = f.createAcceptVersionsType();
        caps.setAcceptVersions( versions );
       
        versions.getVersion().add( "1.0.0" );
        versions.getVersion().add( "1.1.0" );
       
        ByteArrayOutputStream output = new ByteArrayOutputStream();
View Full Code Here

TOP

Related Classes of net.opengis.ows10.CodeType

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.