Author: scamp
Date: Fri Jun  3 09:22:22 2005
New Revision: 179829

URL: http://svn.apache.org/viewcvs?rev=179829&view=rev
Log: (empty)

Modified:
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/WeatherStationService.java
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/HumidityCallback.java
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/TemperatureCallback.java
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/VisibilityCallback.java
    
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirService.java
    incubator/muse/trunk/src/ieeedemo/src/test/IEEEDemoTest.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
    
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/WeatherStationService.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/WeatherStationService.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/WeatherStationService.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/WeatherStationService.java
 Fri Jun  3 09:22:22 2005
@@ -1,18 +1,12 @@
 package org.wsdmdemo.service.weatherStation;
 
-import org.apache.ws.resource.PropertiesResource;
 import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.properties.ResourceProperty;
 import 
org.apache.ws.resource.properties.v2004_06.porttype.impl.SetResourcePropertiesPortTypeImpl;
 import org.apache.ws.util.XmlBeanUtils;
-import org.apache.xmlbeans.XmlObject;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument;
 import 
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesDocument;
 import 
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.SetResourcePropertiesResponseDocument;
 import 
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.UpdateType;
-import org.wsdmdemo.service.InteropConstants;
-import org.wsdmdemo.service.InteropRequestUtils;
-import org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationDocument;
 
 /**
  * **** NOTE: This file will not be overwritten during generation ****
@@ -68,27 +62,27 @@
         
org.wsdmdemo.service.weatherStation.RecalibrateResponseDocument.RecalibrateResponse
 response = responseDocument.addNewRecalibrateResponse();
 
         //set status to partially unavailable
-        
changeOperationalStatus(OperationalStatusDocument.OperationalStatus.PARTIALLY_AVAILABLE);
+        
//changeOperationalStatus(OperationalStatusDocument.OperationalStatus.PARTIALLY_AVAILABLE);
 
         //remove service from dir
-        ResourceProperty resourceProperty = 
((PropertiesResource)getResource()).getResourcePropertySet().get(WeatherStationPropertyQNames.RESOURCEID);
-        
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument 
prop_name = 
(org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument) 
resourceProperty.get(0);
-        String id = prop_name.getResourceId();
-        RemoveWeatherStationDocument removeWeatherStationDocument = 
RemoveWeatherStationDocument.Factory.newInstance();
-        
org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationDocument.RemoveWeatherStation
 removeWeatherStation = 
removeWeatherStationDocument.addNewRemoveWeatherStation();
-        removeWeatherStation.setResourceId(id);
+        //ResourceProperty resourceProperty = 
((PropertiesResource)getResource()).getResourcePropertySet().get(WeatherStationPropertyQNames.RESOURCEID);
+        
//org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument 
prop_name = 
(org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument) 
resourceProperty.get(0);
+        //String id = prop_name.getResourceId();
+        //RemoveWeatherStationDocument removeWeatherStationDocument = 
RemoveWeatherStationDocument.Factory.newInstance();
+        
//org.wsdmdemo.service.weatherStationDir.RemoveWeatherStationDocument.RemoveWeatherStation
 removeWeatherStation = 
removeWeatherStationDocument.addNewRemoveWeatherStation();
+        //removeWeatherStation.setResourceId(id);
 
         //need to send request.
-        XmlObject xmlObject = 
InteropRequestUtils.sendRequest(removeWeatherStationDocument,"http://wsdmdemo.org/service/weather-station-dir/RemoveWeatherStation";,
 InteropConstants.DIR_SERVICE_ADDRESS);
+        //XmlObject xmlObject = 
InteropRequestUtils.sendRequest(removeWeatherStationDocument,"http://wsdmdemo.org/service/weather-station-dir/RemoveWeatherStation";,
 InteropConstants.DIR_SERVICE_ADDRESS);
 
-        try
+        /*try
         {
             wait(RECONFIGURATION_PAUSE);
         }
         catch (InterruptedException e)
         {
             ;
-        }
+        }*/
 
         //set status to unavailable
         
changeOperationalStatus(OperationalStatusDocument.OperationalStatus.UNAVAILABLE);

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/HumidityCallback.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/HumidityCallback.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/HumidityCallback.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/HumidityCallback.java
 Fri Jun  3 09:22:22 2005
@@ -4,6 +4,7 @@
 import org.apache.ws.resource.properties.ResourcePropertyCallback;
 import org.apache.ws.resource.properties.impl.CallbackFailedException;
 import org.wsdmdemo.service.InteropConstants;
+import org.wsdmdemo.service.weatherStation.HumidityMetricType;
 
 import java.util.Calendar;
 
@@ -18,10 +19,9 @@
     public ResourceProperty refreshProperty(ResourceProperty resourceProperty) 
throws CallbackFailedException
     {
         Calendar resetAt = Calendar.getInstance();
-        org.wsdmdemo.service.weatherStation.HumidityDocument prop_humidity =  
(org.wsdmdemo.service.weatherStation.HumidityDocument) resourceProperty.get(0);
-        org.wsdmdemo.service.weatherStation.HumidityMetricType 
humidityMetricType = prop_humidity.addNewHumidity();
-        
humidityMetricType.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp, 
InteropConstants.MAX_HUMIDITY, InteropConstants.MIN_HUMIDITY));
-        humidityMetricType.setResetAt(resetAt);
+        HumidityMetricType prop_humidity =  (HumidityMetricType) 
resourceProperty.get(0);
+        
prop_humidity.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp, 
InteropConstants.MAX_HUMIDITY, InteropConstants.MIN_HUMIDITY));
+        prop_humidity.setResetAt(resetAt);
         return resourceProperty;
     }
 }

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/TemperatureCallback.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/TemperatureCallback.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/TemperatureCallback.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/TemperatureCallback.java
 Fri Jun  3 09:22:22 2005
@@ -4,6 +4,7 @@
 import org.apache.ws.resource.properties.ResourcePropertyCallback;
 import org.apache.ws.resource.properties.impl.CallbackFailedException;
 import org.wsdmdemo.service.InteropConstants;
+import org.wsdmdemo.service.weatherStation.TemperatureMetricType;
 
 import java.util.Calendar;
 
@@ -18,10 +19,9 @@
     public ResourceProperty refreshProperty(ResourceProperty resourceProperty) 
throws CallbackFailedException
     {
         Calendar resetAt = Calendar.getInstance();
-        org.wsdmdemo.service.weatherStation.TemperatureDocument 
prop_temperature = (org.wsdmdemo.service.weatherStation.TemperatureDocument) 
resourceProperty.get(0);
-        org.wsdmdemo.service.weatherStation.TemperatureMetricType 
temperatureMetricType = prop_temperature.addNewTemperature();
-        
temperatureMetricType.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp,
 InteropConstants.MAX_TEMP, InteropConstants.MIN_TEMP));
-        temperatureMetricType.setResetAt(resetAt);
+        TemperatureMetricType prop_temperature = (TemperatureMetricType) 
resourceProperty.get(0);        
+        
prop_temperature.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp, 
InteropConstants.MAX_TEMP, InteropConstants.MIN_TEMP));
+        prop_temperature.setResetAt(resetAt);
         return resourceProperty;
     }
 }

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/VisibilityCallback.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/VisibilityCallback.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/VisibilityCallback.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStation/callbacks/VisibilityCallback.java
 Fri Jun  3 09:22:22 2005
@@ -4,6 +4,7 @@
 import org.apache.ws.resource.properties.ResourcePropertyCallback;
 import org.apache.ws.resource.properties.impl.CallbackFailedException;
 import org.wsdmdemo.service.InteropConstants;
+import org.wsdmdemo.service.weatherStation.VisibilityMetricType;
 
 import java.util.Calendar;
 
@@ -18,10 +19,9 @@
     public ResourceProperty refreshProperty(ResourceProperty resourceProperty) 
throws CallbackFailedException
     {
         Calendar resetAt = Calendar.getInstance();
-        org.wsdmdemo.service.weatherStation.VisibilityDocument prop_visibility 
= (org.wsdmdemo.service.weatherStation.VisibilityDocument) 
resourceProperty.get(0);
-        org.wsdmdemo.service.weatherStation.VisibilityMetricType 
visibilityMetricType = prop_visibility.addNewVisibility();
-        visibilityMetricType.setResetAt(resetAt);
-        
visibilityMetricType.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp,
 InteropConstants.MAX_VISIBILITY, InteropConstants.MIN_VISIBILITY));
+        VisibilityMetricType prop_visibility = (VisibilityMetricType) 
resourceProperty.get(0);
+        prop_visibility.setResetAt(resetAt);
+        
prop_visibility.setDoubleValue(CallbackUtils.getNextRandomValue(m_lastTemp, 
InteropConstants.MAX_VISIBILITY, InteropConstants.MIN_VISIBILITY));
         return resourceProperty;
     }
 }

Modified: 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirService.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirService.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirService.java
 (original)
+++ 
incubator/muse/trunk/src/ieeedemo/src/java/org/wsdmdemo/service/weatherStationDir/WeatherStationDirService.java
 Fri Jun  3 09:22:22 2005
@@ -146,7 +146,7 @@
 
         //add the new ws as the other participant
         RelationshipParticipantType relationshipParticipantType2 = 
relationshipType.addNewParticipant();
-        
relationshipParticipantType2.setResourceId(getResourceId(dirEndpointReferenceType));
+        relationshipParticipantType2.setResourceId(getResourceId(addedEpr));
         relationshipParticipantType2.setRole("urn://child");//uri
         relationshipParticipantType.setManageabilityEndpointReferenceArray(new 
EndpointReferenceType[]{addedEpr});
 

Modified: incubator/muse/trunk/src/ieeedemo/src/test/IEEEDemoTest.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/ieeedemo/src/test/IEEEDemoTest.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- incubator/muse/trunk/src/ieeedemo/src/test/IEEEDemoTest.java (original)
+++ incubator/muse/trunk/src/ieeedemo/src/test/IEEEDemoTest.java Fri Jun  3 
09:22:22 2005
@@ -5,16 +5,18 @@
 import 
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
 import org.wsdmdemo.service.InteropRequestUtils;
 import org.wsdmdemo.service.InteropConstants;
+import org.wsdmdemo.service.weatherStation.WeatherStationPropertyQNames;
 import 
org.wsdmdemo.service.weatherClientConfig.WeatherClientConfigPropertyQNames;
 import org.wsdmdemo.service.weatherStationDir.AddWeatherStationDocument;
 import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument;
 
 import java.net.URL;
 
+import junit.framework.TestCase;
 /**
  * @author Sal Campana
  */
-public class IEEEDemoTest extends AbstractOneAxisTestCase
+public class IEEEDemoTest extends TestCase
 {
     private static final String WEATHER_STATION_1_EPR_URL = 
System.getProperty(InteropConstants.WS1_EPR_URL,"http://localhost:8080/muse/epr/weather-station-1-epr.xml";);
     private static final String WEATHER_STATION_DIR_SERVICE_URL = 
System.getProperty(InteropConstants.WS_DIR_SERVICE_URL,"http://localhost:8080/muse/services/WeatherStationDir";);
@@ -34,6 +36,11 @@
         GetResourcePropertyDocument getResourcePropertyDocument = 
GetResourcePropertyDocument.Factory.newInstance();
         
getResourcePropertyDocument.setGetResourceProperty(WeatherClientConfigPropertyQNames.WEATHERSTATIONREFERENCE);
         XmlObject getResp = 
InteropRequestUtils.sendRequest(getResourcePropertyDocument,"http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties",new
 XmlBeansEndpointReference(clientConfigEpr.getEndpointReference()));
+
+
+        getResourcePropertyDocument = 
GetResourcePropertyDocument.Factory.newInstance();
+        
getResourcePropertyDocument.setGetResourceProperty(WeatherStationPropertyQNames.TEMPERATURE);
+        getResp = 
InteropRequestUtils.sendRequest(getResourcePropertyDocument,"http://wsdmdemo.org/service/weather-station-dir/GetResourceProperties",new
 XmlBeansEndpointReference(weatherStationEprDoc.getEndpointReference()));
 
        /* //retrieve the metrics
         GetMultipleResourcePropertiesDocument 
getMultipleResourcePropertiesDocument = 
GetMultipleResourcePropertiesDocument.Factory.newInstance();

Modified: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
 (original)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserResource.java
 Fri Jun  3 09:22:22 2005
@@ -66,8 +66,8 @@
         org.apache.ws.notification.topics.TopicSpaceSet topicSpaceSet = 
getTopicSpaceSet();
         TopicSpace topicSpace = new 
TopicSpaceImpl(MuwsConstants.NSURI_MUWS_PART2_TOPICS);
 
-        Topic manageabilityEndpointCreation = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME);
-        Topic manageabilityEndpointDestruction = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME);
+        Topic manageabilityEndpointCreation = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_CREATION_NAME,
 false);
+        Topic manageabilityEndpointDestruction = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABILITY_ENPOINT_DESTRUCTION_NAME,
 false);
 
         XmlBeansAdvertisementTopicImpl manageableResourceCreation = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_CREATION_NAME);
         XmlBeansAdvertisementTopicImpl manageableResourceDestruction = new 
XmlBeansAdvertisementTopicImpl(AdvertisementCapability.TOPIC_MANAGEABLE_RESOURCE_DESTRUCTION_NAME);

Modified: 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java?rev=179829&r1=179828&r2=179829&view=diff
==============================================================================
--- 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java
 (original)
+++ 
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/topics/impl/XmlBeansAdvertisementTopicImpl.java
 Fri Jun  3 09:22:22 2005
@@ -38,6 +38,11 @@
         super(topicName);
     }
 
+    public XmlBeansAdvertisementTopicImpl(String topicName, boolean isVisible)
+    {
+        super(topicName);
+        setIsVisible(isVisible);
+    }
     /**
      * Handles the event when a creation occurs.  Builds a CreationNotification
      * and sends notif to subscribers
@@ -126,4 +131,8 @@
         return mgmtEventDoc;
     }
 
+    public boolean isVisible()
+    {
+        return m_isVisible;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to