KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > example > webservice > types > Cardinality


1 /**
2  * Cardinality.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6  */

7
8 package org.alfresco.example.webservice.types;
9
10 public class Cardinality implements java.io.Serializable JavaDoc {
11     private java.lang.String JavaDoc _value_;
12     private static java.util.HashMap JavaDoc _table_ = new java.util.HashMap JavaDoc();
13
14     // Constructor
15
protected Cardinality(java.lang.String JavaDoc value) {
16         _value_ = value;
17         _table_.put(_value_,this);
18     }
19
20     public static final java.lang.String JavaDoc _value1 = "0..1";
21     public static final java.lang.String JavaDoc _value2 = "1";
22     public static final java.lang.String JavaDoc _value3 = "*";
23     public static final java.lang.String JavaDoc _value4 = "1..*";
24     public static final Cardinality value1 = new Cardinality(_value1);
25     public static final Cardinality value2 = new Cardinality(_value2);
26     public static final Cardinality value3 = new Cardinality(_value3);
27     public static final Cardinality value4 = new Cardinality(_value4);
28     public java.lang.String JavaDoc getValue() { return _value_;}
29     public static Cardinality fromValue(java.lang.String JavaDoc value)
30           throws java.lang.IllegalArgumentException JavaDoc {
31         Cardinality enumeration = (Cardinality)
32             _table_.get(value);
33         if (enumeration==null) throw new java.lang.IllegalArgumentException JavaDoc();
34         return enumeration;
35     }
36     public static Cardinality fromString(java.lang.String JavaDoc value)
37           throws java.lang.IllegalArgumentException JavaDoc {
38         return fromValue(value);
39     }
40     public boolean equals(java.lang.Object JavaDoc obj) {return (obj == this);}
41     public int hashCode() { return toString().hashCode();}
42     public java.lang.String JavaDoc toString() { return _value_;}
43     public java.lang.Object JavaDoc readResolve() throws java.io.ObjectStreamException JavaDoc { return fromValue(_value_);}
44     public static org.apache.axis.encoding.Serializer getSerializer(
45            java.lang.String JavaDoc mechType,
46            java.lang.Class JavaDoc _javaType,
47            javax.xml.namespace.QName JavaDoc _xmlType) {
48         return
49           new org.apache.axis.encoding.ser.EnumSerializer(
50             _javaType, _xmlType);
51     }
52     public static org.apache.axis.encoding.Deserializer getDeserializer(
53            java.lang.String JavaDoc mechType,
54            java.lang.Class JavaDoc _javaType,
55            javax.xml.namespace.QName JavaDoc _xmlType) {
56         return
57           new org.apache.axis.encoding.ser.EnumDeserializer(
58             _javaType, _xmlType);
59     }
60     // Type metadata
61
private static org.apache.axis.description.TypeDesc typeDesc =
62         new org.apache.axis.description.TypeDesc(Cardinality.class);
63
64     static {
65         typeDesc.setXmlType(new javax.xml.namespace.QName JavaDoc("http://www.alfresco.org/ws/model/content/1.0", "Cardinality"));
66     }
67     /**
68      * Return type metadata object
69      */

70     public static org.apache.axis.description.TypeDesc getTypeDesc() {
71         return typeDesc;
72     }
73
74 }
75
Popular Tags