Examples of Ows10Factory


Examples of net.opengis.ows10.Ows10Factory

    /**
     * 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

Examples of net.opengis.ows10.Ows10Factory

    public void testGetMimeType() {
        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" );
       
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

        return ServiceIdentificationType.class;
    }

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

        String name = (String) node.getChildValue("Name");
        String title = (String) node.getChildValue("Title");
        String keywords = (String) node.getChildValue("Keywords");
        if (keywords != null) {
            KeywordsType kwd = ows10Factory.createKeywordsType();
            String[] split = (keywords).split(",");
            for (int i = 0; i < split.length; i++) {
                String kw = split[i].trim();
                kwd.getKeyword().add(kw);
            }
            service.getKeywords().add(kwd);
        }

        String abstract_ = (String) node.getChildValue("Abstract");
        String accessConstraints = (String) node.getChildValue("AccessConstraints");
        String fees = (String) node.getChildValue("Fees");
        // OnlineResource

        CodeType serviceType = ows10Factory.createCodeType();
        serviceType.setValue(name);
        service.setServiceType(serviceType);
       
        service.setServiceTypeVersion("1.0.0");
       
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

    }

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

        DCPType dcpType = ows10Factory.createDCPType();
        HTTPType httpType = ows10Factory.createHTTPType();
        dcpType.setHTTP(httpType);

        List<Node> httpChildren = node.getChildren("HTTP");
        for (Node http : httpChildren) {
            Node get = http.getChild("Get");
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

        return OperationsMetadataType.class;
    }

    @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

Examples of net.opengis.ows10.Ows10Factory

   
    @Test
    @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
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

   * <!-- end-user-doc -->
     * @generated
     */
  public static Ows10Factory init() {
        try {
            Ows10Factory theOws10Factory = (Ows10Factory)EPackage.Registry.INSTANCE.getEFactory("http://www.opengis.net/ows");
            if (theOws10Factory != null) {
                return theOws10Factory;
            }
        }
        catch (Exception exception) {
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

    public void testGetMimeType() {
        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" );
       
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

    /**
     * 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, false);
        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);

        if (!request.isSOAP()) {
            //there will already be a SOAP mime type
View Full Code Here

Examples of net.opengis.ows10.Ows10Factory

    public void testGetMimeType() {
        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" );
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.