Package net.opengis.cat.csw20

Examples of net.opengis.cat.csw20.DeleteType


        // 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());
    }
View Full Code Here


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetRangeOfValues(RangeOfValuesType newRangeOfValues, NotificationChain msgs) {
        RangeOfValuesType oldRangeOfValues = rangeOfValues;
        rangeOfValues = newRangeOfValues;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.DOMAIN_VALUES_TYPE__RANGE_OF_VALUES, oldRangeOfValues, newRangeOfValues);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        GetRecordByIdResponseType response = (GetRecordByIdResponseType) parser.parse(getClass().getResourceAsStream(
                "GetRecordByIdResponse.xml"));
        assertNotNull(response);
        EList<AbstractRecordType> records = response.getAbstractRecord();
        assertEquals(1, records.size());
        RecordType record = (RecordType) records.get(0);
    }
View Full Code Here

        assertTrue(EMFUtils.emfEquals(sr, reparsed));
    }
   
    @Test
    public void testParseRecord() throws Exception {
        RecordType record = (RecordType) parser.parse(getClass().getResourceAsStream("Record.xml"));
        BoundingBoxType bbox = record.getBoundingBox().get(0);
        assertEquals(14.05, bbox.getLowerCorner().get(0));
        assertEquals(46.46, bbox.getLowerCorner().get(1));
        assertEquals(17.24, bbox.getUpperCorner().get(0));
        assertEquals(48.42, bbox.getUpperCorner().get(1));
       
        EList<SimpleLiteral> dcElements = record.getDCElement();
        assertEquals(11, dcElements.size());
       
        assertEquals("00180e67-b7cf-40a3-861d-b3a09337b195", getValue(dcElements, "identifier"));
        assertEquals("Image2000 Product 1 (at1) Multispectral", getValue(dcElements, "title"));
        assertEquals("dataset", getValue(dcElements, "type"));
View Full Code Here

        super(Csw20Factory.eINSTANCE, CSW.RecordType);
    }
   
    @Override
    public List getProperties(Object object, XSDElementDeclaration element) throws Exception {
        RecordType record = (RecordType) object;
       
        List result = new ArrayList();
        XSDParticle previous = null;
        String previousName = null;
        for (SimpleLiteral sl : record.getDCElement()) {
            XSDSchema dctSchema = DCT.getInstance().getSchema();
            XSDElementDeclaration declaration = dctSchema.resolveElementDeclaration(sl.getName());
            if(declaration.getTypeDefinition() == null) {
                XSDSchema dcSchema = DC.getInstance().getSchema();
                declaration = dcSchema.resolveElementDeclaration(sl.getName());
            }
            if(declaration != null) {
                XSDParticle particle;
                if(previousName != null && sl.getName().equals(previousName)) {
                    particle = previous;
                } else {
                    particle = buildParticle(declaration);
                    previous = particle;
                    previousName = sl.getName();
                }
                result.add(new Object[] {particle, sl});
            }
        }
       
        if(record.getBoundingBox() != null && record.getBoundingBox().size() > 0) {
            for (Object box : record.getBoundingBox()) {
                XSDElementDeclaration bboxElement;
                if(box instanceof WGS84BoundingBoxType) {
                    bboxElement = OWS.getInstance().getSchema().resolveElementDeclaration("WGS84BoundingBox");
                } else {
                    bboxElement = OWS.getInstance().getSchema().resolveElementDeclaration("BoundingBox");
View Full Code Here

        assertEquals(abs, getValue(dcElements, "abstract", 0));
    }
   
    @Test
    public void testRoundTripRecord() throws Exception {
        RecordType record = (RecordType) parser.parse(getClass().getResourceAsStream("Record.xml"));
        String encoded = encoder.encodeAsString(record, CSW.Record);
        System.out.println(encoded);
        RecordType reparsed = (RecordType) parser.parse(new StringReader(encoded));
        assertTrue(EMFUtils.emfEquals(record, reparsed));
    }
View Full Code Here

    @Override
    public void write(Object value, OutputStream output, Operation operation) throws IOException,
            ServiceException {
        CSWRecordsResult result = (CSWRecordsResult) value;
        RequestBaseType request = (RequestBaseType) operation.getParameters()[0];
        CSWInfo csw = gs.getService(CSWInfo.class);

        // check the output schema is valid
        if (result.getRecords() != null) {
            FeatureType recordSchema = result.getRecords().getSchema();
View Full Code Here

    @Override
    public void write(Object value, OutputStream output, Operation operation) throws IOException,
            ServiceException {
        CloseableIterator<String> result = (CloseableIterator<String>) value;
        RequestBaseType request = (RequestBaseType) operation.getParameters()[0];
        CSWInfo csw = gs.getService(CSWInfo.class);

        transformResponse(output, result, request, csw);
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetSearchStatus(RequestStatusType newSearchStatus, NotificationChain msgs) {
        RequestStatusType oldSearchStatus = searchStatus;
        searchStatus = newSearchStatus;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.GET_RECORDS_RESPONSE_TYPE__SEARCH_STATUS, oldSearchStatus, newSearchStatus);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public ResultType createResultTypeFromString(EDataType eDataType, String initialValue) {
        ResultType result = ResultType.get(initialValue);
        if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
        return result;
    }
View Full Code Here

TOP

Related Classes of net.opengis.cat.csw20.DeleteType

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.