Author: scamp
Date: Tue Mar 29 10:03:13 2005
New Revision: 159406

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


Modified:
    
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
    
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/ipmiserver/IpmiserverResource.java
    
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java

Modified: 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java?view=diff&r1=159405&r2=159406
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
 (original)
+++ 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/blackberry/BlackberryResource.java
 Tue Mar 29 10:03:13 2005
@@ -88,7 +88,7 @@
         /** Properties **/
         resourceProperty = 
resourcePropertySet.get(BlackberryPropertyQNames.RESOURCEID);
         ResourceIdDocument resourceIdDocument = 
ResourceIdDocument.Factory.newInstance();
-        resourceIdDocument.setResourceId((String)getID());
+        resourceIdDocument.setResourceId( "urn:" +(String)getID());
         resourceProperty.add(resourceIdDocument);
 
         resourceProperty = 
resourcePropertySet.get(BlackberryPropertyQNames.ALLOCATEDSTORAGE);

Modified: 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/ipmiserver/IpmiserverResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/ipmiserver/IpmiserverResource.java?view=diff&r1=159405&r2=159406
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/ipmiserver/IpmiserverResource.java
 (original)
+++ 
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/ipmiserver/IpmiserverResource.java
 Tue Mar 29 10:03:13 2005
@@ -1,9 +1,8 @@
 
 package org.apache.ws.resource.example.ipmiserver;
 
-import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
 import org.apache.ws.muws.v1_0.capability.IdentityCapability;
-import org.apache.ws.resource.example.blackberry.BlackberryPropertyQNames;
+import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.xmlbeans.XmlObject;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument;
@@ -65,9 +64,9 @@
         resourceProperty.add(manageabilityCapabilityDocument);
 
         /** Properties **/
-        resourceProperty = 
resourcePropertySet.get(BlackberryPropertyQNames.RESOURCEID);
+        resourceProperty = 
resourcePropertySet.get(IpmiserverPropertyQNames.RESOURCEID);
         ResourceIdDocument resourceIdDocument = 
ResourceIdDocument.Factory.newInstance();
-        resourceIdDocument.setResourceId((String)getID());
+        resourceIdDocument.setResourceId( "urn:" +(String)getID());
         resourceProperty.add(resourceIdDocument);
 
         resourceProperty = 
resourcePropertySet.get(IpmiserverPropertyQNames.CPUUSAGE);

Modified: 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
URL: 
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java?view=diff&r1=159405&r2=159406
==============================================================================
--- 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
 (original)
+++ 
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
 Tue Mar 29 10:03:13 2005
@@ -15,10 +15,10 @@
 import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
 import org.apache.ws.notification.topics.TopicSpace;
 import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
-import org.apache.ws.resource.example.blackberry.BlackberryPropertyQNames;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.util.XmlBeanUtils;
 import org.apache.xmlbeans.GDurationBuilder;
+import org.apache.xmlbeans.XmlObject;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.CurrentOperationalStateDocument;
 import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric;
 import 
org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.EndpointDescriptionsDocument;
@@ -45,9 +45,11 @@
 import 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.StateTransitionType;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.StateType;
 import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmPbm.MatchDocument;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
 import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferencePropertiesType;
 
+import javax.xml.namespace.QName;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.Calendar;
@@ -65,6 +67,7 @@
      */
     public static final 
org.apache.ws.notification.base.v1_2.impl.WsnNamespaceVersionHolderImpl 
SPEC_NAMESPACE_SET = new 
org.apache.ws.notification.base.v1_2.impl.WsnNamespaceVersionHolderImpl();
 
+    private String SERVICES_URL = "http://localhost:8080/muse/services";;
     /**
      * Initializes this resource's state (properties, etc.).
      */
@@ -168,9 +171,9 @@
         resourceProperty.add( manageabilityCapabilityDocument );
        
         /** Properties **/
-        resourceProperty = resourcePropertySet.get( 
BlackberryPropertyQNames.RESOURCEID );
+        resourceProperty = resourcePropertySet.get( 
WeatherstationPropertyQNames.RESOURCEID );
         ResourceIdDocument resourceIdDocument = 
ResourceIdDocument.Factory.newInstance();
-        resourceIdDocument.setResourceId( (String) getID() );
+        resourceIdDocument.setResourceId( "urn:" + (String) getID() );
         resourceProperty.add( resourceIdDocument );
         resourceProperty.addChangeListener( identityCapability );//add for 
management events
 
@@ -203,18 +206,33 @@
         //todo this is only started....
         resourceProperty = resourcePropertySet.get( 
WeatherstationPropertyQNames.RELATIONSHIP );
         resourceProperty.addChangeListener( relationshipCapability );//add for 
management events
+
         RelationshipDocument relationshipDocument = 
RelationshipDocument.Factory.newInstance();
 
         //add new type
         RelationshipType relationshipType = 
relationshipDocument.addNewRelationship();
-        relationshipType.setName( "" );//set name of relationship type
-        //relationshipType.setAccessEndpointReference();//need EPR
+        //relationshipType.setName( "" );//set name of relationship type  
OPTIONAL
+        //relationshipType.setAccessEndpointReference();//need EPR    optional
 
+        QName qName = 
QName.valueOf("{http://everest-weather.org/wsdm/samples/2005/04/schema}ResourceID";);
         //add a participant
         RelationshipParticipantType relationshipParticipantType = 
relationshipType.addNewParticipant();
-        relationshipParticipantType.setResourceId( "" );
-        relationshipParticipantType.setRole( "" );
-        
//relationshipParticipantType.setManageabilityEndpointReferenceArray();   //EPR 
Array
+        relationshipParticipantType.setResourceId(  "urn:weather1" );
+        relationshipParticipantType.setRole( "urn://parent" );//uri
+        EndpointReferenceType manageabilityEndpointReferenceType = 
relationshipParticipantType.addNewManageabilityEndpointReference();
+        
manageabilityEndpointReferenceType.addNewAddress().setStringValue(SERVICES_URL+"/weatherstation");
+        ReferencePropertiesType referencePropertiesType = 
manageabilityEndpointReferenceType.addNewReferenceProperties();
+        XmlObject key1 = 
XmlBeanUtils.addChildElement(referencePropertiesType,qName);
+        XmlBeanUtils.setValue(key1, "weather1");
+
+        RelationshipParticipantType relationshipParticipantType2 = 
relationshipType.addNewParticipant();
+        relationshipParticipantType2.setResourceId(  "urn:weather2" );//spec 
optional
+        relationshipParticipantType2.setRole(  "urn://child1" );//uri
+        EndpointReferenceType manageabilityEndpointReferenceType2 = 
relationshipParticipantType.addNewManageabilityEndpointReference();
+        
manageabilityEndpointReferenceType2.addNewAddress().setStringValue(SERVICES_URL+"/weatherstation");
+        ReferencePropertiesType referencePropertiesType2 = 
manageabilityEndpointReferenceType2.addNewReferenceProperties();
+        XmlObject key2 = 
XmlBeanUtils.addChildElement(referencePropertiesType2,qName);
+        XmlBeanUtils.setValue(key2, "weather2");
 
         //add a relationshiptype
         RelationshipTypeType relationshipTypeType = 
relationshipType.addNewType();
@@ -244,7 +262,7 @@
         EndpointReferenceDocument endpointReferenceDocument = 
EndpointReferenceDocument.Factory.newInstance();
         EndpointReferenceType endpointReferenceType = 
endpointReferenceDocument.addNewEndpointReference();//temporary
         AttributedURI attributedURI = endpointReferenceType.addNewAddress();
-        
attributedURI.setStringValue("http://localhost:8080/muse/services/blackberry";);
+        attributedURI.setStringValue(SERVICES_URL+"/blackberry");
         //endpointReferenceDocument.setEndpointReference(null);//todo need the 
real epr for interop
         resourceProperty.add( endpointReferenceDocument );
         resourceProperty.addChangeListener( mowsIdentificationCapability );
@@ -252,7 +270,7 @@
         resourceProperty = resourcePropertySet.get( 
WeatherstationPropertyQNames.ENDPOINTDESCRIPTIONS );
         EndpointDescriptionsDocument endpointDescriptionsDocument = 
EndpointDescriptionsDocument.Factory.newInstance();
         EndpointDescriptionsDocument.EndpointDescriptions endpointDescriptions 
= endpointDescriptionsDocument.addNewEndpointDescriptions();
-        endpointDescriptions.addDescription( 
"http://localhost:8080/muse/services/blackberry?wsdl"; );
+        endpointDescriptions.addDescription( SERVICES_URL+ "/blackberry?wsdl" 
);
         resourceProperty.add( endpointDescriptionsDocument );
         resourceProperty.addChangeListener( mowsIdentificationCapability );
 



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

Reply via email to