Package net.opengis.cat.csw20.impl

Examples of net.opengis.cat.csw20.impl.EmptyTypeImpl


   
    public void testEncodeFull() throws Exception {
        // setup the request
        CSWRecordsResult response = getCSWResponse();
        response.setElementSet(null);
        GetRecordsType request = getCSWRequest();

        // transform it into a GetRecordsResponse (this time with the canonical location)
        CSWRecordTransformer tx = new CSWRecordTransformer(request, true);
        tx.setIndentation(2);
        StringWriter sw = new StringWriter();
View Full Code Here


        assertXpathEvaluatesTo("Vestibulum quis ipsum sit amet metus imperdiet vehicula. Nulla scelerisque cursus mi.",  xpathBase + "dct:abstract", dom);
    }


    private GetRecordsType getCSWRequest() {
        GetRecordsType request = Csw20Factory.eINSTANCE.createGetRecordsType();
        request.setBaseUrl("http://localhost:8080/geoserver/csw");
        return request;
    }
View Full Code Here

        Object request = operation.getParameters()[0];
        if (request instanceof GetRecordByIdType) {
            GetRecordByIdType gr = (GetRecordByIdType) request;
            return gr.getOutputSchema();
        } else if (request instanceof GetRecordsType) {
            GetRecordsType gr = (GetRecordsType) request;
            return gr.getOutputSchema();
        } else {
            throw new IllegalArgumentException("Unsupported request object type: " + request);
        }
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetListOfValues(ListOfValuesType newListOfValues, NotificationChain msgs) {
        ListOfValuesType oldListOfValues = listOfValues;
        listOfValues = newListOfValues;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.DOMAIN_VALUES_TYPE__LIST_OF_VALUES, oldListOfValues, newListOfValues);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetConstraint(QueryConstraintType newConstraint, NotificationChain msgs) {
        QueryConstraintType oldConstraint = constraint;
        constraint = newConstraint;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.UPDATE_TYPE__CONSTRAINT, oldConstraint, newConstraint);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetConstraint(QueryConstraintType newConstraint, NotificationChain msgs) {
        QueryConstraintType oldConstraint = constraint;
        constraint = newConstraint;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.QUERY_TYPE__CONSTRAINT, oldConstraint, newConstraint);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetConstraint(QueryConstraintType newConstraint, NotificationChain msgs) {
        QueryConstraintType oldConstraint = constraint;
        constraint = newConstraint;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.DELETE_TYPE__CONSTRAINT, oldConstraint, newConstraint);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        assertEquals(2, names.size());
        assertEquals(new QName("http://purl.org/dc/terms/", "abstract"), names.get(0));
        assertEquals(new QName("http://purl.org/dc/elements/1.1/", "title"), names.get(1));

        // The filter
        QueryConstraintType constraint = query.getConstraint();
        assertEquals("1.1.0", constraint.getVersion());
        Filter filter = CQL.toFilter("AnyText like '%polution%'");
        assertEquals(filter, constraint.getFilter());
    }
View Full Code Here

        // check the attributes
        assertEquals("application/xml", gr.getOutputFormat());
        assertEquals("urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", gr.getOutputSchema());

        // the query
        QueryType query = (QueryType) gr.getQuery();
        List<QName> expected = new ArrayList<QName>();
        String rimNamespace = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";
        expected.add(new QName(rimNamespace, "Service"));
        expected.add(new QName(rimNamespace, "Classification"));
        expected.add(new QName(rimNamespace, "Association"));
        assertEquals(expected, query.getTypeNames());

        // the element set name
        ElementSetNameType esn = query.getElementSetName();
        expected.clear();
        expected.add(new QName(rimNamespace, "Service"));
        assertEquals(expected, esn.getTypeNames());
        assertEquals(ElementSetType.BRIEF, esn.getValue());
       
        // the sort by properties
        SortBy[] sorts = query.getSortBy();
        assertEquals(2, sorts.length);
        assertEquals("rim:foo", sorts[0].getPropertyName().getPropertyName());
        assertEquals(SortOrder.ASCENDING, sorts[0].getSortOrder());
        assertEquals("rim:bar", sorts[1].getPropertyName().getPropertyName());
        assertEquals(SortOrder.DESCENDING, sorts[1].getSortOrder());
View Full Code Here

        assertEquals(new Integer(1), gr.getStartPosition());
        assertEquals(new Integer(5), gr.getMaxRecords());
        assertEquals(ResultType.RESULTS, gr.getResultType());

        // the query
        QueryType query = (QueryType) gr.getQuery();
        List<QName> expected = new ArrayList<QName>();
        expected.add(new QName("http://www.opengis.net/cat/csw/2.0.2", "Record"));
        assertEquals(expected, query.getTypeNames());

        // the element names
        List<QName> names = query.getElementName();
        assertEquals(2, names.size());
        assertEquals(new QName("http://purl.org/dc/terms/", "abstract"), names.get(0));
        assertEquals(new QName("http://purl.org/dc/elements/1.1/", "title"), names.get(1));

        // The filter
        QueryConstraintType constraint = query.getConstraint();
        assertEquals("1.1.0", constraint.getVersion());
        Filter filter = CQL.toFilter("AnyText like '%polution%'");
        assertEquals(filter, constraint.getFilter());
    }
View Full Code Here

TOP

Related Classes of net.opengis.cat.csw20.impl.EmptyTypeImpl

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.