KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > response > TModelInfo


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.juddi.datatype.response;
17
18 import org.apache.juddi.datatype.Name;
19 import org.apache.juddi.datatype.RegistryObject;
20
21 /**
22  * Part of RegisteredInfo.
23  *
24  * @author Steve Viens (sviens@apache.org)
25  */

26 public class TModelInfo implements RegistryObject
27 {
28   String JavaDoc tModelKey;
29   String JavaDoc nameValue;
30
31   /**
32    * default constructor
33    */

34   public TModelInfo()
35   {
36   }
37
38   /**
39    *
40    */

41   public TModelInfo(String JavaDoc key,String JavaDoc name)
42   {
43     this.tModelKey = key;
44     this.nameValue = name;
45   }
46
47   /**
48    *
49    */

50   public void setTModelKey(String JavaDoc key)
51   {
52     this.tModelKey = key;
53   }
54
55   /**
56    *
57    */

58   public void setNameValue(String JavaDoc nameValue)
59   {
60     this.nameValue = nameValue;
61   }
62
63   /**
64     * Sets the name of this tModel to the given name.
65     *
66     * @param name The new name of this tModel.
67     */

68   public void setName(Name name)
69   {
70     if (name != null)
71       this.nameValue = name.getValue();
72     else
73       this.nameValue = null;
74   }
75
76   /**
77    *
78    */

79   public String JavaDoc getTModelKey()
80   {
81     return tModelKey;
82   }
83
84   /**
85    *
86    */

87   public String JavaDoc getNameValue()
88   {
89     return nameValue;
90   }
91
92   /**
93    *
94    */

95   public Name getName()
96   {
97     if (this.nameValue != null)
98       return new Name(nameValue);
99     else
100       return null;
101   }
102 }
Popular Tags