Package net.opengis.ows10.impl

Examples of net.opengis.ows10.impl.ServiceIdentificationTypeImpl


    /**
     * @return the operation metadata advertised in the capabilities for the given operation
     * @see #getServerSupportedOutputFormats(WFSOperationType)
     */
    protected OperationType getOperationMetadata(final WFSOperationType operation) {
        final OperationsMetadataType operationsMetadata = capabilities.getOperationsMetadata();
        @SuppressWarnings("unchecked")
        final List<OperationType> operations = operationsMetadata.getOperation();
        final String expectedOperationName = operation.getName();
        for (OperationType operationType : operations) {
            String operationName = operationType.getName();
            if (expectedOperationName.equalsIgnoreCase(operationName)) {
                return operationType;
View Full Code Here


        }
        return keywords;
    }

    private OperationType getOperationMetadata(WFSOperationType operation) {
        final OperationsMetadataType operationsMetadata = capabilities.getOperationsMetadata();
        final List<OperationType> operations = operationsMetadata.getOperation();
        final String expectedOperationName = operation.getName();
        for (OperationType operationType : operations) {
            String operationName = operationType.getName();
            if (expectedOperationName.equalsIgnoreCase(operationName)) {
                return operationType;
View Full Code Here

        // assertFeatureTypeList(caps);
        // assertFilterCapabilities(caps);
    }

    private void assertOperationsMetadataDeeGree(WFSCapabilitiesType caps) {
        OperationsMetadataType om = caps.getOperationsMetadata();
        assertNotNull(om);

        assertEquals(6, om.getOperation().size());

        OperationType getCapsOp = (OperationType) om.getOperation().get(2);
        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://demo.deegree.org/deegree-wfs/services?", ((RequestMethodType) dcp
                .getHTTP().getGet().get(0)).getHref());
        assertEquals("http://demo.deegree.org/deegree-wfs/services", ((RequestMethodType) dcp
                .getHTTP().getPost().get(0)).getHref());

        assertEquals("GetFeature", ((OperationType) om.getOperation().get(0)).getName());
        assertEquals("DescribeFeatureType", ((OperationType) om.getOperation().get(1)).getName());
        assertEquals("GetFeatureWithLock", ((OperationType) om.getOperation().get(3)).getName());
        assertEquals("LockFeature", ((OperationType) om.getOperation().get(4)).getName());
        assertEquals("Transaction", ((OperationType) om.getOperation().get(5)).getName());
    }
View Full Code Here

        assertEquals("WFS", sa.getServiceType().getValue());
        assertEquals("1.0.0", sa.getServiceTypeVersion());
    }

    void assertOperationsMetadata(WFSCapabilitiesType caps) {
        OperationsMetadataType om = caps.getOperationsMetadata();
        assertNotNull(om);

        // assertEquals(6, om.getOperation().size());

        OperationType getCapsOp = (OperationType) om.getOperation().get(0);
        assertEquals("GetCapabilities", getCapsOp.getName());
        assertEquals(2, getCapsOp.getDCP().size());

        DCPType dcp1 = (DCPType) getCapsOp.getDCP().get(0);
        DCPType dcp2 = (DCPType) getCapsOp.getDCP().get(1);
        assertEquals(1, dcp1.getHTTP().getGet().size());
        assertEquals(1, dcp2.getHTTP().getPost().size());

        assertEquals("http://localhost:8080/geoserver/wfs?request=GetCapabilities",
                ((RequestMethodType) dcp1.getHTTP().getGet().get(0)).getHref());
        assertEquals("http://localhost:8080/geoserver/wfs", ((RequestMethodType) dcp2.getHTTP()
                .getPost().get(0)).getHref());

        assertEquals("DescribeFeatureType", ((OperationType) om.getOperation().get(1)).getName());
        assertEquals(2, ((OperationType) om.getOperation().get(1)).getDCP().size());
        assertEquals("GetFeature", ((OperationType) om.getOperation().get(2)).getName());
        assertEquals(2, ((OperationType) om.getOperation().get(2)).getDCP().size());
        assertEquals("Transaction", ((OperationType) om.getOperation().get(3)).getName());
        assertEquals(2, ((OperationType) om.getOperation().get(3)).getDCP().size());
        assertEquals("LockFeature", ((OperationType) om.getOperation().get(4)).getName());
        assertEquals(2, ((OperationType) om.getOperation().get(4)).getDCP().size());
        assertEquals("GetFeatureWithLock", ((OperationType) om.getOperation().get(5)).getName());
        assertEquals(2, ((OperationType) om.getOperation().get(5)).getDCP().size());
       
    }
View Full Code Here

        "   </ows:Constraint>"+
        "  </ows:ExtendedCapabilities>"+
        " </ows:OperationsMetadata>";

        buildDocument(xml);
        OperationsMetadataType ops = (OperationsMetadataType) parse();
        assertNotNull(ops);
    }
View Full Code Here

    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        Ows10Factory ows10Factory = Ows10Factory.eINSTANCE;

        OperationsMetadataType om = ows10Factory.createOperationsMetadataType();

        Node request = node.getChild("Request");

        OperationType operation;
View Full Code Here

        assertEquals("+49-251-7474-400", ci.getPhone().getVoice());
        assertEquals("Marting-Luther-King-Weg 24", ci.getAddress().getDeliveryPoint());
        assertEquals("Muenster", ci.getAddress().getCity());
        assertEquals("mailto:conterra@conterra.de", ci.getOnlineResource().getHref());
       
        OperationsMetadataType opm = caps.getOperationsMetadata();
        assertEquals(6, opm.getOperation().size());
        OperationType gr = (OperationType) opm.getOperation().get(0);
        assertEquals("GetRecords", gr.getName());
        DCPType dcp = (DCPType) gr.getDCP().get(0);
        RequestMethodType rm = (RequestMethodType) dcp.getHTTP().getPost().get(0);
        assertEquals("http://tc22-test:9090/soapService/services/CSWDiscovery", rm.getHref());
        assertEquals(6, gr.getParameter().size());
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testExtendedCapabilities() throws Exception {
        Csw20Factory cswf = Csw20Factory.eINSTANCE;
        Ows10Factory owsf = Ows10Factory.eINSTANCE;
        CapabilitiesType caps = cswf.createCapabilitiesType();
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);
        final String rimNamespace = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";
        om.setExtendedCapabilities(new EncoderDelegate() {
           
            @Override
            public void encode(ContentHandler output) throws Exception {
                AttributesImpl atts = new AttributesImpl();
                output.startPrefixMapping("rim", rimNamespace);
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetOperationsMetadata(OperationsMetadataType newOperationsMetadata, NotificationChain msgs) {
    OperationsMetadataType oldOperationsMetadata = operationsMetadata;
    operationsMetadata = newOperationsMetadata;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ows10Package.CAPABILITIES_BASE_TYPE__OPERATIONS_METADATA, oldOperationsMetadata, newOperationsMetadata);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
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);

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

View Full Code Here

TOP

Related Classes of net.opengis.ows10.impl.ServiceIdentificationTypeImpl

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.