You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by ae...@apache.org on 2007/02/26 15:33:16 UTC

svn commit: r511816 - /webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java

Author: aeberbac
Date: Mon Feb 26 06:33:15 2007
New Revision: 511816

URL: http://svn.apache.org/viewvc?view=rev&rev=511816
Log:
MUSE-171: Added metadata support to the tooling. This means that 
wsdlmerge now will merge metadata documents referenced from the list of
wsdls to merge. Also the code generation takes in metadata documents
if they are available. Currently only the proxy generator pays attention
to metadata, I'll update the server synthesizer. Also moved the copyProperty
stuff out of the MetadataDescriptor and into wsdlmerge, thanks Dan.

Also added a MuseRuntimeException which subclasses RuntimeException and
captures the message id of the error. This is for automated testing
to make sure that error messages are the correct ones.

MUSE-161: Added a WsdlEnvironment that will go out and fetch remote files.

Modified:
    webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java

Modified: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java?view=diff&rev=511816&r1=511815&r2=511816
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/metadata/impl/SimpleMetadataDescriptor.java Mon Feb 26 06:33:15 2007
@@ -16,7 +16,6 @@
 
 package org.apache.muse.ws.resource.metadata.impl;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -26,17 +25,16 @@
 
 import javax.xml.namespace.QName;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
 import org.apache.muse.util.StringUtils;
 import org.apache.muse.util.messages.Messages;
 import org.apache.muse.util.messages.MessagesFactory;
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.addressing.soap.SoapFault;
 import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
 import org.apache.muse.ws.resource.metadata.WsrmdConstants;
 import org.apache.muse.ws.resource.properties.impl.WsrpUtils;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.util.xml.XmlUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 /**
  * 
@@ -141,51 +139,6 @@
         }
     }
     
-    public void addProperties(MetadataDescriptor otherRMD)
-    {
-        Iterator i = otherRMD.getPropertyNames().iterator();
-        
-        //
-        // for each property, we have to make a deep copy of all 
-        // attributes and elements and add them to the new definition
-        //
-        while (i.hasNext())
-        {
-            QName name = (QName)i.next();
-            
-            String mutability = otherRMD.getMutability(name);
-            String modifiability = otherRMD.getModifiability(name);
-            Collection initialValues = new ArrayList(otherRMD.getInitialValues(name));
-            Collection staticValues = new ArrayList(otherRMD.getStaticValues(name));
-            Collection validValues = new ArrayList(otherRMD.getValidValues(name));
-            
-            PropertyMetadata copy = new PropertyMetadata(name, modifiability, mutability);
-            copy.setInitialValues(initialValues);
-            copy.setStaticValues(staticValues);
-            copy.setValidValues(validValues);
-            
-            //
-            // ValidValueRange will only exist if ValidValues was empty
-            //
-            if (validValues.isEmpty())
-            {
-                copy.setLowerBound(otherRMD.getLowerBound(name));
-                copy.setUpperBound(otherRMD.getUpperBound(name));
-            }
-            
-            Iterator j = otherRMD.getExtendedMetadataNames(name).iterator();
-            
-            while (j.hasNext())
-            {
-                QName metadataName = (QName)j.next();
-                String metadataValue = otherRMD.getExtendedMetadata(name, metadataName);
-                copy.setExtendedMetadata(metadataName, metadataValue);
-            }
-            
-            addProperty(copy);
-        }
-    }
-    
     private void addProperty(PropertyMetadata property)
     {
         QName name = property.getPropertyName();
@@ -370,7 +323,7 @@
     {
         return _wsdlLocation;
     }
-
+    
     public boolean hasProperty(QName propertyQName)
     {
         return _propertiesByQName.containsKey(propertyQName);



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org