1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.datatype.response;
17
18 import java.util.Vector;
19
20 import org.apache.juddi.datatype.BusinessKey;
21 import org.apache.juddi.datatype.Description;
22 import org.apache.juddi.datatype.KeyedReference;
23 import org.apache.juddi.datatype.Name;
24 import org.apache.juddi.datatype.RegistryObject;
25 import org.apache.juddi.datatype.SharedRelationships;
26
27 /***
28 * @author Steve Viens (sviens@apache.org)
29 * @author Anou Manavalan
30 */
31 public class RelatedBusinessInfo implements RegistryObject
32 {
33 String businessKey;
34 Vector nameVector;
35 Vector descVector;
36 SharedRelationships sharedRelationships;
37
38 /***
39 * default constructor
40 */
41 public RelatedBusinessInfo()
42 {
43 }
44
45 /***
46 * copy constructor
47 */
48 public RelatedBusinessInfo(RelatedBusinessInfo bizInfo)
49 {
50 businessKey = bizInfo.getBusinessKey();
51 nameVector = bizInfo.getNameVector();
52 descVector = bizInfo.getDescriptionVector();
53 sharedRelationships = bizInfo.getSharedRelationships();
54 }
55
56 /***
57 *
58 */
59 public RelatedBusinessInfo(String key)
60 {
61 this.businessKey = key;
62 }
63
64 /***
65 *
66 */
67 public void setBusinessKey(String key)
68 {
69 this.businessKey = key;
70 }
71
72 /***
73 *
74 */
75 public String getBusinessKey()
76 {
77 return this.businessKey;
78 }
79
80 /***
81 *
82 */
83 public void addName(Name name)
84 {
85 if (this.nameVector == null)
86 this.nameVector = new Vector();
87 this.nameVector.add(name);
88 }
89
90 /***
91 *
92 */
93 public void setNameVector(Vector names)
94 {
95 this.nameVector = names;
96 }
97
98 /***
99 *
100 */
101 public Vector getNameVector()
102 {
103 return this.nameVector;
104 }
105
106 /***
107 *
108 */
109 public void addDescription(Description desc)
110 {
111 if (this.descVector == null)
112 this.descVector = new Vector();
113 this.descVector.add(desc);
114 }
115
116 /***
117 *
118 */
119 public void setDescriptionVector(Vector descriptions)
120 {
121 this.descVector = descriptions;
122 }
123
124 /***
125 *
126 */
127 public Vector getDescriptionVector()
128 {
129 return this.descVector;
130 }
131
132 /***
133 *
134 */
135 public void addKeyedReference(KeyedReference ref)
136 {
137 if (this.sharedRelationships == null)
138 this.sharedRelationships = new SharedRelationships();
139 this.sharedRelationships.addKeyedReference(ref);
140 }
141
142 /***
143 * @return SharedRelationships
144 */
145 public SharedRelationships getSharedRelationships()
146 {
147 return this.sharedRelationships;
148 }
149
150 /***
151 * @param relationships
152 */
153 public void setSharedRelationships(SharedRelationships relationships)
154 {
155 this.sharedRelationships = relationships;
156 }
157
158 /***
159 *
160 */
161 public void setBusinessKey(BusinessKey businessKey)
162 {
163 if ((businessKey != null) && (businessKey.getValue() != null))
164 this.setBusinessKey(businessKey.getValue());
165 }
166
167 }