Package org.apache.commons.xml

Examples of org.apache.commons.xml.XmlSchemaDateFormat


         {
            metricAttribs.setChangeType( ChangeType.forString( value ) );
         }
         else if ( NameUtils.toQName( name ).equals( Muws05Constants.METRIC_ATTRIBUTE_LAST_UPDATED ) )
         {
            metricAttribs.setLastUpdated( new XmlSchemaDateFormat(  ).parse( value ) );
         }
         else if ( NameUtils.toQName( name ).equals( Muws05Constants.METRIC_ATTRIBUTE_RESET_AT ) )
         {
            metricAttribs.setResetAt( new XmlSchemaDateFormat(  ).parse( value ) );
         }
         else if ( NameUtils.toQName( name ).equals( Muws05Constants.METRIC_ATTRIBUTE_TIME_SCOPE ) )
         {
            metricAttribs.setTimeScope( TimeScope.forString( value ) );
         }
View Full Code Here


    * @throws Exception on error
    */
   public void testUpdateReadOnlyProp(  )
   throws Exception
   {
      String dateTimeValue = new XmlSchemaDateFormat(  ).format( new Date(  ) );
      assertUpdateReadOnlyPropertyThrowsFault( ResourceLifetime11Constants.RESOURCE_PROP_QNAME_CURRENT_TIME,
                                               dateTimeValue );
      assertUpdateReadOnlyPropertyThrowsFault( ResourceLifetime11Constants.RESOURCE_PROP_QNAME_TERMINATION_TIME,
                                               dateTimeValue );
      assertUpdateReadOnlyPropertyThrowsFault( Muws05Constants.RESOURCE_PROP_QNAME_RESOURCE_ID, RESOURCE_ID );
View Full Code Here

      Date          clientTime    = new Date(  );
      SOAPElement[] responseElems = m_resourcePropsMgr.getResourceProperty( propQName );
      assertNotNull( responseElems );
      assertEquals( 1, responseElems.length );
      assertElementQNameEquals( responseElems[0], propQName );
      Date serverTime = new XmlSchemaDateFormat(  ).parse( responseElems[0].getValue(  ) );
      assertTrue( ( serverTime.getTime(  ) - clientTime.getTime(  ) ) < 1000 );
   }
View Full Code Here

TOP

Related Classes of org.apache.commons.xml.XmlSchemaDateFormat

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.