You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2006/08/30 02:42:48 UTC

svn commit: r438315 - in /incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl: WSDLLoader.java WSDLLoaderImpl.java

Author: rfeng
Date: Tue Aug 29 17:42:48 2006
New Revision: 438315

URL: http://svn.apache.org/viewvc?rev=438315&view=rev
Log:
Fix checkstyle complaints

Modified:
    incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoader.java
    incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java

Modified: incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoader.java?rev=438315&r1=438314&r2=438315&view=diff
==============================================================================
--- incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoader.java (original)
+++ incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoader.java Tue Aug 29 17:42:48 2006
@@ -26,28 +26,29 @@
 import javax.xml.namespace.QName;
 
 /**
- * Interface for implementations that allow WSDL definitions to be loaded.
- * Currently we do not have a complete solution for handling both WSDL2.0 and WSDL1.1 definitions
- * so the current implementation only deals with loading WSDL1.1. This will change in the near future
- * (for example when Woden supports both forms) so all WSDL1.1 specific methods are deprecated.
- *
+ * Interface for implementations that allow WSDL definitions to be loaded. Currently we do not have a complete solution
+ * for handling both WSDL2.0 and WSDL1.1 definitions so the current implementation only deals with loading WSDL1.1. This
+ * will change in the near future (for example when Woden supports both forms) so all WSDL1.1 specific methods are
+ * deprecated.
+ * 
  * @version $Rev$ $Date$
  */
 public interface WSDLLoader {
     /**
      * Load a WSDL 1.1 Definition for a namespace from one of specified locations.
-     *
+     * 
      * @param namespace the namespace whose definition should be loaded
      * @param locations a set of possible locations to load from
      * @return the loaded Definition
      * @throws WSDLException if there was a problem loading the definition
      */
     @Deprecated
-    Definition loadDefinition(String namespace, Collection<WSDLLocation> locations) throws WSDLException, UnresolveableResourceException;
+    Definition loadDefinition(String namespace, Collection<WSDLLocation> locations)
+        throws WSDLException, UnresolveableResourceException;
 
     /**
      * Load a WSDL 1.1 Definition from the specified location
-     *
+     * 
      * @param location the location to load from
      * @return the loaded Definition
      * @throws WSDLException if there was a problem loading the definition
@@ -57,10 +58,10 @@
 
     /**
      * Return the WSDL1.1 PortType for the specified interface IRI.
-     *
+     * 
      * @param interfaceIRI the WSDL2.0 interface IRI
      * @param wsdlLocation the location of the WSDL instance
-     * @param base         a Classloader from which to load
+     * @param base a Classloader from which to load
      * @return the specified port type
      */
     @Deprecated
@@ -69,29 +70,29 @@
 
     /**
      * Parses a WSDL2.0 wsdlLocation attribute definition and returns a Collection of all locations it contains.
-     *
+     * 
      * @param wsdlLocation a list of namespace/location pairs as specified by WSDL2.0
-     * @param base         a ClassLoader to use to resolve relative URLs
+     * @param base a ClassLoader to use to resolve relative URLs
      * @return a collection of locations parsed from the string
      * @throws InvalidWSDLLocationException
      */
     Collection<WSDLLocation> getLocations(String wsdlLocation, ClassLoader base) throws InvalidWSDLLocationException;
 
     /**
-     * Returns the fully qualified name of a WSDL interface parsed from a IRI as defined by WSDL2.0.
-     * The value of the IRI defines the namespace, the fragment specifies the interface component; for example
+     * Returns the fully qualified name of a WSDL interface parsed from a IRI as defined by WSDL2.0. The value of the
+     * IRI defines the namespace, the fragment specifies the interface component; for example
      * <code>http://example.org/TicketAgent.wsdl20#wsdl.interface(TicketAgent)</code>
-     *
+     * 
      * @param interfaceIRI the IRI for the interface
      * @return the qualified name of the interface
      * @throws UnresolveableResourceException if the URI is relative
-     * @throws InvalidFragmentException       if the fragment is incorrectly formed
+     * @throws InvalidFragmentException if the fragment is incorrectly formed
      */
     QName getInterfaceName(URI interfaceIRI) throws UnresolveableResourceException, InvalidFragmentException;
 
     /**
      * Returns an interface parsed from a wsdl.interface fragment.
-     *
+     * 
      * @param fragment the fragment value
      * @return the interface name
      * @throws InvalidFragmentException if the fragment is incorrectly formed
@@ -100,7 +101,7 @@
 
     /**
      * Returns a namespace parsed from an IRI. This is the URI with any fragment removed.
-     *
+     * 
      * @param iri the IRI
      * @return a namespace created by stripping fragment information from the URI
      * @throws UnresolveableResourceException if the URI is relative

Modified: incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java?rev=438315&r1=438314&r2=438315&view=diff
==============================================================================
--- incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java (original)
+++ incubator/tuscany/java/sca/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLLoaderImpl.java Tue Aug 29 17:42:48 2006
@@ -38,6 +38,7 @@
  */
 public class WSDLLoaderImpl implements WSDLLoader {
     private final WSDLFactory wsdlFactory;
+
     private final ExtensionRegistry registry;
 
     public WSDLLoaderImpl() throws WSDLException {
@@ -74,8 +75,8 @@
         Definition definition = reader.readWSDL(location.getLocation().toString());
         String definitionNamespace = definition.getTargetNamespace();
         if (namespace != null && !namespace.equals(definitionNamespace)) {
-            throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
-                                    namespace + " != " + definition.getTargetNamespace());
+            throw new WSDLException(WSDLException.CONFIGURATION_ERROR, namespace + " != "
+                    + definition.getTargetNamespace());
         }
         return definition;
     }
@@ -121,8 +122,7 @@
         String[] parts = fragment.split("\\s");
         for (String part : parts) {
             if (part.startsWith("wsdl.interface(") && part.charAt(part.length() - 1) == ')') {
-                part = part.substring(15, part.length() - 1);
-                return part;
+                return part.substring(15, part.length() - 1);
             }
         }
         throw new InvalidFragmentException(fragment);
@@ -130,8 +130,7 @@
 
     public String getNamespace(URI iri) throws UnresolveableResourceException {
         if (!iri.isAbsolute()) {
-            UnresolveableResourceException ure =
-                new UnresolveableResourceException("no namespace defined in " + iri);
+            UnresolveableResourceException ure = new UnresolveableResourceException("no namespace defined in " + iri);
             ure.setIdentifier(iri.toString());
             throw ure;
         }



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