You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by st...@apache.org on 2003/10/05 09:01:40 UTC

cvs commit: ws-axis/java/src/org/apache/axis/encoding TypeMapping.java TypeMappingDelegate.java TypeMappingImpl.java

stevel      2003/10/05 00:01:40

  Modified:    java/src/org/apache/axis/encoding TypeMapping.java
                        TypeMappingDelegate.java TypeMappingImpl.java
  Log:
  bracing and javadocs
  
  Revision  Changes    Path
  1.9       +1 -1      ws-axis/java/src/org/apache/axis/encoding/TypeMapping.java
  
  Index: TypeMapping.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/TypeMapping.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TypeMapping.java	22 Apr 2003 19:34:25 -0000	1.8
  +++ TypeMapping.java	5 Oct 2003 07:01:40 -0000	1.9
  @@ -120,7 +120,7 @@
       /**
        * Gets the Class mapped to QName.
        * @param xmlType qname or null
  -     * @return javaType class or type
  +     * @return javaType class for type or null for no mapping
        */
       public Class getClassForQName(QName xmlType);
   
  
  
  
  1.12      +39 -11    ws-axis/java/src/org/apache/axis/encoding/TypeMappingDelegate.java
  
  Index: TypeMappingDelegate.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/TypeMappingDelegate.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TypeMappingDelegate.java	22 Apr 2003 19:34:25 -0000	1.11
  +++ TypeMappingDelegate.java	5 Oct 2003 07:01:40 -0000	1.12
  @@ -82,17 +82,27 @@
       // Delegate or throw an exception
       
       public String[] getSupportedEncodings() {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getSupportedEncodings();
  +        }
           return null;
       }
   
       public void setSupportedEncodings(String[] namespaceURIs) {
  -        if (delegate != null)
  +        if (delegate != null) {
               delegate.setSupportedEncodings(namespaceURIs);
  +        }
       }
  -    
  -    public void register(Class javaType, QName xmlType, 
  +
  +    /**
  +     * always throws an exception
  +     * @param javaType
  +     * @param xmlType
  +     * @param sf
  +     * @param dsf
  +     * @throws JAXRPCException
  +     */
  +    public void register(Class javaType, QName xmlType,
                            javax.xml.rpc.encoding.SerializerFactory sf,
                            javax.xml.rpc.encoding.DeserializerFactory dsf)
           throws JAXRPCException {        
  @@ -105,40 +115,56 @@
           getSerializer(Class javaType, QName xmlType)
           throws JAXRPCException
       {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getSerializer(javaType, xmlType);
  +        }
           return null;
       }
       public javax.xml.rpc.encoding.SerializerFactory
           getSerializer(Class javaType) 
           throws JAXRPCException 
       {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getSerializer(javaType);
  +        }
           return null;
       }
   
       public javax.xml.rpc.encoding.DeserializerFactory
           getDeserializer(Class javaType, QName xmlType)
           throws JAXRPCException {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getDeserializer(javaType, xmlType);
  +        }
           return null;
       }
       public javax.xml.rpc.encoding.DeserializerFactory 
           getDeserializer(QName xmlType)
           throws JAXRPCException {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getDeserializer(xmlType);
  +        }
           return null;
       }
   
  +    /**
  +     * always throws an exception
  +     * @param javaType
  +     * @param xmlType
  +     * @throws JAXRPCException
  +     */
       public void removeSerializer(Class javaType, QName xmlType)
           throws JAXRPCException {
           throw new JAXRPCException(
                   Messages.getMessage("delegatedTypeMapping"));
       }
   
  +    /**
  +     * always throws an exception
  +     * @param javaType
  +     * @param xmlType
  +     * @throws JAXRPCException
  +     */
       public void removeDeserializer(Class javaType, QName xmlType)
           throws JAXRPCException {
           throw new JAXRPCException(
  @@ -160,19 +186,21 @@
        * @return xmlType qname or null
        */
       public QName getTypeQName(Class javaType) {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getTypeQName(javaType);
  +        }
           return null;
       }
       
       /**
        * Gets the Class mapped to QName.
        * @param xmlType qname or null
  -     * @return javaType class or type
  +     * @return javaType class for type or null for no mappingor delegate
        */
       public Class getClassForQName(QName xmlType) {
  -        if (delegate != null)
  +        if (delegate != null) {
               return delegate.getClassForQName(xmlType);
  +        }
           return null;
       }
   }
  
  
  
  1.44      +6 -3      ws-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java
  
  Index: TypeMappingImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TypeMappingImpl.java	3 Jul 2003 16:48:24 -0000	1.43
  +++ TypeMappingImpl.java	5 Oct 2003 07:01:40 -0000	1.44
  @@ -608,16 +608,19 @@
       /**
        * Gets the Class mapped to QName.
        * @param xmlType qname or null
  -     * @return javaType class or type
  +     * @return javaType class for type or null for no mapping
        */
       public Class getClassForQName(QName xmlType) {
  -        if (xmlType == null)
  +        if (xmlType == null) {
               return null;
  -        
  +        }
  +
           //log.debug("getClassForQName xmlType =" + xmlType);
           Class javaType = null;
  +        //look for it in our map
           Pair pair = (Pair) qName2Pair.get(xmlType);
           if (pair == null && delegate != null) {
  +            //on no match, delegate
               javaType = delegate.getClassForQName(xmlType);
           } else if (pair != null) {
               javaType = pair.javaType;