Package org.everestWeather.wsdm.samples.x2005.x04.schema

Examples of org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationHome


      {
         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

 
  /**
   * prepare request
   * */
  protected CreateSMSDocument getCreateSMSDocument(String ...keyValueParams){
    CreateSMSDocument in=CreateSMSDocument.Factory.newInstance();
    in.addNewCreateSMS();
    if(initialLifeTime>0){
      in.getCreateSMS().addNewTerminationTime().setCalendarValue(getTermTime());
    }
    if(storageType!=null){
      if(log.isDebugEnabled()) {
        log.debug("Will create storage of type : "+storageType);
      }
      StorageDescriptionType desc=in.getCreateSMS().addNewStorageDescription();
      desc.setStorageBackendType(storageType);
      if(keyValueParams.length>1){
        //other parameters from the cmdline as key=value
        StorageBackendParameters params=desc.addNewStorageBackendParameters();
        for(int i=1;i<keyValueParams.length;i++){
View Full Code Here

 
  /**
   * prepare request
   * */
  protected CreateSMSDocument getCreateSMSDocument(String ...keyValueParams){
    CreateSMSDocument in=CreateSMSDocument.Factory.newInstance();
    in.addNewCreateSMS();
    if(initialLifeTime>0){
      in.getCreateSMS().addNewTerminationTime().setCalendarValue(getTermTime());
    }
    if(storageType!=null){
      if(log.isDebugEnabled()) {
        log.debug("Will create storage of type : "+storageType);
      }
      StorageDescriptionType desc=in.getCreateSMS().addNewStorageDescription();
      desc.setStorageBackendType(storageType);
      if(keyValueParams.length>1){
        //other parameters from the cmdline as key=value
        StorageBackendParameters params=desc.addNewStorageBackendParameters();
        for(int i=1;i<keyValueParams.length;i++){
View Full Code Here

TOP

Related Classes of org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationHome

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.