KickJava   Java API By Example, From Geeks To Geeks.

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


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  * @author Steve Viens (sviens@apache.org)
23  */

24 public class PublisherInfo implements RegistryObject
25 {
26   String JavaDoc publisherID;
27   String JavaDoc nameValue;
28
29   /**
30    * default constructor
31    */

32   public PublisherInfo()
33   {
34   }
35
36   /**
37    *
38    */

39   public PublisherInfo(String JavaDoc pubID)
40   {
41     this.publisherID = pubID;
42   }
43
44   /**
45    *
46    */

47   public PublisherInfo(String JavaDoc pubID,String JavaDoc name)
48   {
49     this.publisherID = pubID;
50     this.nameValue = name;
51   }
52
53   /**
54    *
55    */

56   public void setPublisherID(String JavaDoc pubID)
57   {
58     this.publisherID = pubID;
59   }
60
61   /**
62    *
63    */

64   public String JavaDoc getPublisherID()
65   {
66     return publisherID;
67   }
68
69   /**
70    *
71    */

72   public void setNameValue(String JavaDoc nameValue)
73   {
74     this.nameValue = nameValue;
75   }
76
77   /**
78     * Sets the name of this tModel to the given name.
79     *
80     * @param name The new name of this tModel.
81     */

82   public void setName(Name name)
83   {
84     if (name != null)
85       this.nameValue = name.getValue();
86     else
87       this.nameValue = null;
88   }
89
90   /**
91    *
92    */

93   public String JavaDoc getNameValue()
94   {
95     return nameValue;
96   }
97
98   /**
99    *
100    */

101   public Name getName()
102   {
103     if (this.nameValue != null)
104       return new Name(nameValue);
105     else
106       return null;
107   }
108 }
Popular Tags