View Javadoc

    1   /*
    2    *
    3    * The Seasar Software License, Version 1.1
    4    *
    5    * Copyright (c) 2003-2004 The Seasar Project. All rights reserved.
    6    *
    7    * Redistribution and use in source and binary forms, with or
    8    * without modification, are permitted provided that the following
    9    * conditions are met:
    10   *
    11   * 1. Redistributions of source code must retain the above
    12   *    copyright notice, this list of conditions and the following
    13   *    disclaimer.
    14   *
    15   * 2. Redistributions in binary form must reproduce the above
    16   *    copyright notice, this list of conditions and the following
    17   *    disclaimer in the documentation and/or other materials provided
    18   *    with the distribution.
    19   *
    20   * 3. The end-user documentation included with the redistribution,
    21   *    if any, must include the following acknowledgement:
    22   *    "This product includes software developed by the
    23   *    Seasar Project (http://www.seasar.org/)."
    24   *    Alternately, this acknowledgement may appear in the software
    25   *    itself, if and wherever such third-party acknowledgements
    26   *    normally appear.
    27   *
    28   * 4. Neither the name "The Seasar Project" nor the names of its
    29   *    contributors may be used to endorse or promote products derived
    30   *    from this software without specific prior written permission of
    31   *    the Seasar Project.
    32   *
    33   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR
    34   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    35   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    36   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE SEASAR PROJECT
    37   * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    38   * INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    39   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    40   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    41   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    42   * WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING
    43   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    44   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    45   */
    46  package org.seasar.remoting.axis;
    47
    48  import org.apache.axis.Constants;
    49  import org.apache.axis.encoding.ser.BeanDeserializerFactory;
    50  import org.apache.axis.encoding.ser.BeanSerializerFactory;
    51
    52  /***
    53   * diconファイル中でタイプマッピング情報を設定するために使われます。
    54   *
    55   * @see ServiceDef#addTypeMapping(TypeMappingDef)
    56   * @author koichik
    57   */
    58  public class TypeMappingDef {
    59      //instance fields
    60      protected Class type;
    61      protected String localPart = "";
    62      protected String namespaceURI = "";
    63      protected String namespacePrefix = "";
    64      protected Class serializer = BeanSerializerFactory.class;
    65      protected Class deserializer = BeanDeserializerFactory.class;
    66      protected String encodingStyle = Constants.URI_DEFAULT_SOAP_ENC;
    67
    68      /***
    69       * Java型を返します。
    70       *
    71       * @return Returns the type.
    72       */
    73      public Class getType() {
    74          return type;
    75      }
    76
    77      /***
    78       * Java型を設定します。
    79       *
    80       * @param type
    81       *            The type to set.
    82       */
    83      public void setType(final Class type) {
    84          this.type = type;
    85      }
    86
    87      /***
    88       * XML型の名前空間URIを返します。
    89       *
    90       * @return Returns the namespaceURI.
    91       */
    92      public String getNamespaceURI() {
    93          return namespaceURI;
    94      }
    95
    96      /***
    97       * XML型の名前空間URIを設定します。
    98       *
    99       * @param namespaceURI
    100      *            The namespaceURI to set.
    101      */
    102     public void setNamespaceURI(final String namespaceURI) {
    103         this.namespaceURI = namespaceURI;
    104     }
    105
    106     /***
    107      * XML型のローカル名を返します。
    108      *
    109      * @return Returns the localPart.
    110      */
    111     public String getLocalPart() {
    112         return localPart;
    113     }
    114
    115     /***
    116      * XML型のローカル名を設定します。
    117      *
    118      * @param localPart
    119      *            The localPart to set.
    120      */
    121     public void setLocalPart(final String localPart) {
    122         this.localPart = localPart;
    123     }
    124
    125     /***
    126      * XML型の名前空間接頭辞を返します。
    127      *
    128      * @return Returns the namespacePrefix.
    129      */
    130     public String getNamespacePrefix() {
    131         return namespacePrefix;
    132     }
    133
    134     /***
    135      * XML型の名前空間接頭辞を設定します。
    136      *
    137      * @param namespacePrefix
    138      *            The namespacePrefix to set.
    139      */
    140     public void setNamespacePrefix(final String namespacePrefix) {
    141         this.namespacePrefix = namespacePrefix;
    142     }
    143
    144     /***
    145      * Java型からXML型へのシリアライザを返します。
    146      *
    147      * @return Returns the serializer.
    148      */
    149     public Class getSerializer() {
    150         return serializer;
    151     }
    152
    153     /***
    154      * Java型からXML型へのシリアライザを設定します。
    155      *
    156      * @param serializer
    157      *            The serializer to set.
    158      */
    159     public void setSerializer(final Class serializer) {
    160         this.serializer = serializer;
    161     }
    162
    163     /***
    164      * XML型からJava型へのデシリアライザを返します。
    165      *
    166      * @return Returns the deserializer.
    167      */
    168     public Class getDeserializer() {
    169         return deserializer;
    170     }
    171
    172     /***
    173      * XML型からJava型へのデシリアライザを設定します。
    174      *
    175      * @param deserializer
    176      *            The deserializer to set.
    177      */
    178     public void setDeserializer(final Class deserializer) {
    179         this.deserializer = deserializer;
    180     }
    181
    182     /***
    183      * エンコーディングスタイルを返します。
    184      *
    185      * @return Returns the encodingStyle.
    186      */
    187     public String getEncodingStyle() {
    188         return encodingStyle;
    189     }
    190
    191     /***
    192      * エンコーディングスタイルを設定します。
    193      *
    194      * @param encodingStyle
    195      *            The encodingStyle to set.
    196      */
    197     public void setEncodingStyle(final String encodingStyle) {
    198         this.encodingStyle = encodingStyle;
    199     }
    200 }