Package org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01

Examples of org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01.PropertyType


    }

    protected XmlObject buildPropValueChangeNotifDocXmlBean( Object[] oldValue, Object[] newValue )
    {
        ResourcePropertyValueChangeNotificationDocument propValueChangeNotifDocXBean = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType propValueChangeNotifXBean = propValueChangeNotifDocXBean.addNewResourcePropertyValueChangeNotification();
        ResourcePropertyValueChangeNotificationType.OldValue oldValueXBean = propValueChangeNotifXBean.addNewOldValue();
        if ( oldValue != null )
        {
            for ( int i = 0; i < oldValue.length; i++ )
            {
                XmlBeanUtils.addChildElement( oldValueXBean, (XmlObject) oldValue[i] );
            }
        }
        else
        {
            oldValueXBean.setNil();
        }
        ResourcePropertyValueChangeNotificationType.NewValue newValueXBean = propValueChangeNotifXBean.addNewNewValue();
        if ( newValue != null )
        {
            for ( int i = 0; i < newValue.length; i++ )
            {
                XmlBeanUtils.addChildElement( newValueXBean, (XmlObject) newValue[i] );
View Full Code Here


     * @throws Exception on error
     */
    public void testAddChildElement()
            throws Exception
    {
        ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType = ResourcePropertyValueChangeNotificationType.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType.OldValue oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
        XmlBeanUtils.addChildElement( oldValue, XmlObject.Factory.parse( "<foo/>" ) );
        XmlObject[] childElems = XmlBeanUtils.getChildElements( oldValue, new QName( "foo" ) );
        assertEquals( 1, childElems.length );
        XmlObject fooElem = childElems[0];
        childElems = XmlBeanUtils.getChildElements( fooElem, new QName( "foo" ) );
        //assertEquals( 0, childElems.length );  // a bug in XmlBeans causes this assertion to fail

        resourcePropertyValueChangeNotificationType = ResourcePropertyValueChangeNotificationType.Factory.newInstance();
        oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
        CurrentTimeDocument currentTimeDocument = CurrentTimeDocument.Factory.newInstance();
        currentTimeDocument.setCurrentTime( Calendar.getInstance( ) );
        XmlObject newXBean = XmlBeanUtils.copyXmlBean( currentTimeDocument.xgetCurrentTime() );
        XmlBeanUtils.addChildElement( oldValue, newXBean );
        childElems = XmlBeanUtils.getChildElements( oldValue, new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime" ) );
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 insertResourceProperty( XmlObject[] propElems )
    {
        SetResourcePropertiesPortTypeImpl setProvider = new SetResourcePropertiesPortTypeImpl( m_resourceContext );
        SetResourcePropertiesDocument setDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setType = setDocument.addNewSetResourceProperties();
        InsertType insertType = setType.addNewInsert();
        for ( int i = 0; i < propElems.length; i++ )
        {
            XmlBeanUtils.addChildElement( insertType, propElems[i] );
        }
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] );
        }
View Full Code Here

    }

    protected void deleteResourceProperty( QName propName )
    {
        SetResourcePropertiesPortTypeImpl setProvider = new SetResourcePropertiesPortTypeImpl( m_resourceContext );
        SetResourcePropertiesDocument setDocument = SetResourcePropertiesDocument.Factory.newInstance();
        SetResourcePropertiesDocument.SetResourceProperties setType = setDocument.addNewSetResourceProperties();
        DeleteType deleteType = setType.addNewDelete();
        deleteType.setResourceProperty( propName );       
        setProvider.setResourceProperties( setDocument ).getSetResourcePropertiesResponse();
    }
View Full Code Here

        if ( LOG.isDebugEnabled() )
        {
            LOG.debug( MSG.getMessage( Keys.SET_RP_REQ, requestDoc ) );
        }

        SetResourcePropertiesResponseDocument responseDoc = createResponseDocument();
        SetResourcePropertiesDocument.SetResourceProperties requestElem = requestDoc.getSetResourceProperties();

        InsertType[] insertElems = requestElem.getInsertArray();
        for ( int i = 0; i < insertElems.length; i++ )
        {
View Full Code Here

        return responseDoc;
    }

    private SetResourcePropertiesResponseDocument createResponseDocument()
    {
        SetResourcePropertiesResponseDocument responseDoc =
                SetResourcePropertiesResponseDocument.Factory.newInstance();
        responseDoc.addNewSetResourcePropertiesResponse();
        return responseDoc;
    }
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

TOP

Related Classes of org.oasisOpen.docs.wsrf.x2004.x10.wsrfWSResourceMetadataDescriptor10Draft01.PropertyType

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.