View Javadoc

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 tModelKey;
29    Name name;
30  
31    /***
32     * default constructor
33     */
34    public TModelInfo()
35    {
36    }
37  
38    /***
39     *
40     */
41    public TModelInfo(String key,String name)
42    {
43      this.tModelKey = key;
44      setNameValue(name);
45    }
46  
47    /***
48     *
49     */
50    public void setTModelKey(String key)
51    {
52      this.tModelKey = key;
53    }
54  
55    /***
56     *
57     */
58    public void setNameValue(String nameValue)
59    {
60        if (nameValue == null) {
61            this.name = null;
62        } else {
63            this.name = new Name(nameValue);
64        }
65    }
66  
67    /***
68      * Sets the name of this tModel to the given name.
69      *
70      * @param name The new name of this tModel.
71      */
72    public void setName(Name name)
73    {
74        this.name = name;
75    }
76  
77    /***
78     *
79     */
80    public String getTModelKey()
81    {
82      return tModelKey;
83    }
84  
85    /***
86     *
87     */
88    public String getNameValue()
89    {
90        if (this.name == null) {
91            return null;
92        } else {
93            return this.name.getValue();
94        }
95    }
96  
97    /***
98     *
99     */
100   public Name getName()
101   {
102       return this.name;
103   }
104 }