Package net.opengis.cat.csw20

Examples of net.opengis.cat.csw20.UpdateType


            return sl.getValue();
        }
    }
   
    private Object getScheme(List<SimpleLiteral> elements, String name, int idx) {
        SimpleLiteral sl = getSimpleLiteral(elements, name, idx);
        if(sl == null) {
            return null;
        } else {
            return sl.getScheme();
        }
    }
View Full Code Here


    }
   
   
    @Test
    public void testParseSummaryRecord() throws Exception {
        SummaryRecordType sr = (SummaryRecordType) parser.parse(getClass().getResourceAsStream("SummaryRecord.xml"));
        assertEquals("00180e67-b7cf-40a3-861d-b3a09337b195", sr.getIdentifier().get(0).getValue());
        assertEquals("Image2000 Product 1 (at1) Multispectral", sr.getTitle().get(0).getValue());
        assertEquals("dataset", sr.getType().getValue());
        assertEquals("imagery", sr.getSubject().get(0).getValue());
        assertEquals("baseMaps", sr.getSubject().get(1).getValue());
        assertEquals("earthCover", sr.getSubject().get(2).getValue());
        assertEquals("BIL", sr.getFormat().get(0).getValue());
        assertEquals("2004-10-04 00:00:00", sr.getModified().get(0).getValue());
        String abs = "IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems.";
        assertEquals(abs, sr.getAbstract().get(0).getValue());
    }
View Full Code Here

        assertEquals(abs, sr.getAbstract().get(0).getValue());
    }
   
    @Test
    public void testRoundTripSummaryRecord() throws Exception {
        SummaryRecordType sr = (SummaryRecordType) parser.parse(getClass().getResourceAsStream("SummaryRecord.xml"));
        String encoded = encoder.encodeAsString(sr, CSW.SummaryRecord);
        SummaryRecordType reparsed = (SummaryRecordType) parser.parse(new StringReader(encoded));
        assertTrue(EMFUtils.emfEquals(sr, reparsed));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTransactionResponse(TransactionResponseType newTransactionResponse, NotificationChain msgs) {
        TransactionResponseType oldTransactionResponse = transactionResponse;
        transactionResponse = newTransactionResponse;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.HARVEST_RESPONSE_TYPE__TRANSACTION_RESPONSE, oldTransactionResponse, newTransactionResponse);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTransactionSummary(TransactionSummaryType newTransactionSummary, NotificationChain msgs) {
        TransactionSummaryType oldTransactionSummary = transactionSummary;
        transactionSummary = newTransactionSummary;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.TRANSACTION_RESPONSE_TYPE__TRANSACTION_SUMMARY, oldTransactionSummary, newTransactionSummary);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

        TransactionType t = (TransactionType) parse();
        assertNotNull(t);
       
        assertEquals(1, t.getAbstractTransactionAction().size());
       
        UpdateType u = (UpdateType) t.getAbstractTransactionAction().get(0);
        assertEquals(1, u.getProperty().size());
       
        PropertyType p = u.getProperty().get(0);
        assertEquals("population", p.getValueReference().getValue().getLocalPart());
        assertEquals("4070000", p.getValue());
       
        Id id = (Id) u.getFilter();
        assertNotNull(id);
        assertTrue(id.getIDs().contains("BuiltUpA_1M.10131"));
    }
View Full Code Here

    public static boolean invokeSetResourceProperty(String prop, String value, String filesystemEPRUrl)
    {
        SetResourcePropertiesDocument setResourcePropertiesDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setResourceProperties = setResourcePropertiesDocument.addNewSetResourceProperties();
        UpdateType updateType = UpdateType.Factory.newInstance();

        XmlObject simpleType = XmlBeanUtils.addChildElement(updateType, QName.valueOf(prop));
        XmlBeanUtils.setValue(simpleType, value);
        setResourceProperties.setUpdateArray(new UpdateType[]{updateType});
View Full Code Here

    protected void updateResourceProperty( XmlObject[] propElems )
    {
        SetResourcePropertiesPortTypeImpl setProvider = new SetResourcePropertiesPortTypeImpl( m_resourceContext );
        SetResourcePropertiesDocument setDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setType = setDocument.addNewSetResourceProperties();
        UpdateType updateType = setType.addNewUpdate();
        for ( int i = 0; i < propElems.length; i++ )
        {
            XmlBeanUtils.addChildElement( updateType, propElems[i] );
        }
        setProvider.setResourceProperties( setDocument ).getSetResourcePropertiesResponse();
View Full Code Here

        ResourceProperty resourceProp = resource.getResourcePropertySet().get( SushiPropertyQNames.EBI );
        resourceProp.setCallback( callback );

        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        UpdateDocument updateDoc = UpdateDocument.Factory.newInstance();
        UpdateType update = updateDoc.addNewUpdate();

        XmlObject xmlObject =
                XmlObject.Factory.parse( "<foo:Ebi xmlns:foo=\"http://ws.apache.org/resource/properties/test/sushi\">"
                + newValue + "</foo:Ebi>" );
        XmlBeanUtils.addChildElement( update, xmlObject );
View Full Code Here

        m_resourceContext = new SushiResourceContext( true );
        insertXsdAnyPropElem();
        assertPropHasOneElemWithGivenValue( SushiPropertyQNames.FUGU, INITIAL_PROP_VALUE_FUGU );
        SetResourcePropertiesProvider set_provider = new SetResourcePropertiesProvider( m_resourceContext );
        UpdateDocument updateDoc = UpdateDocument.Factory.newInstance();
        UpdateType update = updateDoc.addNewUpdate();
        XmlObject anyXBean = createXsdAnyPropElem();
        final String newValue = "yummy!";
        XmlBeanUtils.setValue( anyXBean, newValue );
        XmlBeanUtils.addChildElement( update, anyXBean );
        set_provider.updateResourceProperty( updateDoc.getUpdate() );
View Full Code Here

TOP

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

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.