Package org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema

Examples of org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema.IntegerMetric


      {
         GetResourcePropertyResponse response =
            getAcService(  ).getResourceProperty( ACSystemWsdmServiceWSResource.PropertyQNames.RESOURCESTATE );
         MessageElement               propElem = response.get_any(  )[0];

         ResourceStateDocument        stateDoc  = ResourceStateDocument.Factory.parse( propElem );
         StateInformation             stateInfo = stateDoc.getResourceState(  );

         Calendar                     timeEntered = stateInfo.getTimeEntered(  );
         String                       state       = stateInfo.getState(  );

         retValue = "AC SYSTEM STATE=" + state + "; TIME ENTERED=" + timeEntered.toString(  );
View Full Code Here


      {
         GetResourcePropertyResponse response =
            getSensorService( sensorId ).getResourceProperty( SensorWsdmServiceWSResource.PropertyQNames.RESOURCESTATE );
         MessageElement               propElem = response.get_any(  )[0];

         ResourceStateDocument        stateDoc  = ResourceStateDocument.Factory.parse( propElem );
         StateInformation             stateInfo = stateDoc.getResourceState(  );

         Calendar                     timeEntered = stateInfo.getTimeEntered(  );
         String                       state       = stateInfo.getState(  );

         retValue = "SENSOR '" + sensorId + "' STATE=" + state + "; TIME ENTERED=" + timeEntered.toString(  );
View Full Code Here

      else if ( qname.equals(PropertyQNames.RESOURCESTATE ) )
      {
         // just make sure the property exists
         if ( getProperties().getResourceState() == null )
         {
            StateInformation si = StateInformation.Factory.newInstance();
            si.setTimeEntered( Calendar.getInstance() );
            si.setState( Muws05Constants.RESOURCE_STATE_URI_UNAVAILABLE );
            getProperties().setResourceState( si );
         }
      }
      else if ( qname.equals( PropertyQNames.FIXEDTOPICSET ) )
      {
View Full Code Here

            final StateInfo[]        backendStateInfos = m_backendDiskBean.getStateInfoList(  );
            final StateInformation[] stateInfoXBeans = new StateInformation[backendStateInfos.length];

            for ( int i = 0; i < backendStateInfos.length; i++ )
            {
               final StateInformation stateInfoXBean = StateInformation.Factory.newInstance(  );
               stateInfoXBean.setState( backendStateInfos[i].getState(  ) );
               stateInfoXBean.setTimeEntered( backendStateInfos[i].getTimeEntered(  ) );
               stateInfoXBeans[i] = stateInfoXBean;
            }

            getProperties(  ).setStateInfoArray( stateInfoXBeans );
         }
View Full Code Here

                                                             {
                                                                StateInformation.class
                                                             } );
      }

      StateInformation stateInformation = StateInformation.Factory.newInstance(  );
      stateInformation.setState( stateURI );
      stateInformation.setTimeEntered( Calendar.getInstance(  ) );
      m_setResourceStateMethod.invoke( getPropertiesXmlBean(  ),
                                       new Object[]
                                       {
                                          stateInformation
                                       } );
View Full Code Here

      else if ( qname.equals(PropertyQNames.RESOURCESTATE ) )
      {
         // just make sure the property exists
         if ( getProperties().getResourceState() == null )
         {
            StateInformation si = StateInformation.Factory.newInstance();
            si.setTimeEntered( Calendar.getInstance() );
            si.setState( Muws05Constants.RESOURCE_STATE_URI_UNAVAILABLE );
            getProperties().setResourceState( si );
         }
      }
      else if ( qname.equals( PropertyQNames.FIXEDTOPICSET ) )
      {
View Full Code Here

         GetResourcePropertyResponse response =
            getAcService(  ).getResourceProperty( ACSystemWsdmServiceWSResource.PropertyQNames.RESOURCESTATE );
         MessageElement               propElem = response.get_any(  )[0];

         ResourceStateDocument        stateDoc  = ResourceStateDocument.Factory.parse( propElem );
         StateInformation             stateInfo = stateDoc.getResourceState(  );

         Calendar                     timeEntered = stateInfo.getTimeEntered(  );
         String                       state       = stateInfo.getState(  );

         retValue = "AC SYSTEM STATE=" + state + "; TIME ENTERED=" + timeEntered.toString(  );
      }
      catch ( Exception e )
      {
View Full Code Here

         GetResourcePropertyResponse response =
            getSensorService( sensorId ).getResourceProperty( SensorWsdmServiceWSResource.PropertyQNames.RESOURCESTATE );
         MessageElement               propElem = response.get_any(  )[0];

         ResourceStateDocument        stateDoc  = ResourceStateDocument.Factory.parse( propElem );
         StateInformation             stateInfo = stateDoc.getResourceState(  );

         Calendar                     timeEntered = stateInfo.getTimeEntered(  );
         String                       state       = stateInfo.getState(  );

         retValue = "SENSOR '" + sensorId + "' STATE=" + state + "; TIME ENTERED=" + timeEntered.toString(  );
      }
      catch ( Exception e )
      {
View Full Code Here

            resourceProperty.add(relationshipDocument);

            /*----------------- MOWS OperationalState props -----------------*/
            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.CURRENTOPERATIONALSTATE);
            CurrentOperationalStateDocument currentOperationalStateDocument = CurrentOperationalStateDocument.Factory.newInstance();
            currentOperationalStateDocument.addNewCurrentOperationalState();
            resourceProperty.add(currentOperationalStateDocument);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTOPERATIONALSTATETRANSITION);
            LastOperationalStateTransitionDocument lastOperationalStateTransitionDocument = LastOperationalStateTransitionDocument.Factory.newInstance();
            StateTransitionType stateTransitionType = lastOperationalStateTransitionDocument.addNewLastOperationalStateTransition();
View Full Code Here

        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

TOP

Related Classes of org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema.IntegerMetric

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.