Examples of MetricAttributesImpl


Examples of org.apache.ws.muws.metric.impl.MetricAttributesImpl

    * @throws Exception on error
    */
   public static MetricAttributes getMetricAttributes( SOAPElement soapElem )
   throws Exception
   {
      MetricAttributes metricAttribs = new MetricAttributesImpl(  );
      Iterator         attribIter = soapElem.getAllAttributes(  );
      while ( attribIter.hasNext(  ) )
      {
         Name   name  = (Name) attribIter.next(  );
         String value = soapElem.getAttributeValue( name );
         LOG.debug( "Found MuWS metric attribute " + name.getQualifiedName(  ) + "=" + value + " in element "
                    + soapElem.getElementName(  ).getQualifiedName(  ) );
         if ( NameUtils.toQName( name ).equals( Muws05Constants.METRIC_ATTRIBUTE_CHANGE_TYPE ) )
         {
            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 ) );
         }
      }

      return metricAttribs;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.