Package net.opengis.cat.csw20

Examples of net.opengis.cat.csw20.QueryType


        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

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

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setResultType(ResultType newResultType) {
        ResultType oldResultType = resultType;
        resultType = newResultType == null ? RESULT_TYPE_EDEFAULT : newResultType;
        boolean oldResultTypeESet = resultTypeESet;
        resultTypeESet = true;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Csw20Package.GET_RECORDS_TYPE__RESULT_TYPE, oldResultType, resultType, !oldResultTypeESet));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void unsetResultType() {
        ResultType oldResultType = resultType;
        boolean oldResultTypeESet = resultTypeESet;
        resultType = RESULT_TYPE_EDEFAULT;
        resultTypeESet = false;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.UNSET, Csw20Package.GET_RECORDS_TYPE__RESULT_TYPE, oldResultType, RESULT_TYPE_EDEFAULT, oldResultTypeESet));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetSearchResults(SearchResultsType newSearchResults, NotificationChain msgs) {
        SearchResultsType oldSearchResults = searchResults;
        searchResults = newSearchResults;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.GET_RECORDS_RESPONSE_TYPE__SEARCH_RESULTS, oldSearchResults, newSearchResults);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setType(SimpleLiteral newType) {
        SimpleLiteral oldType = type;
        type = newType;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Csw20Package.SUMMARY_RECORD_TYPE__TYPE, oldType, type));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setType(SimpleLiteral newType) {
        SimpleLiteral oldType = type;
        type = newType;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET, Csw20Package.BRIEF_RECORD_TYPE__TYPE, oldType, type));
    }
View Full Code Here

TOP

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

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.