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.Description;
21 import org.apache.juddi.datatype.Name;
22 import org.apache.juddi.datatype.RegistryObject;
23
24 /***
25 * "Each businessInfo structure contains company name and optional description
26 * data, along with a collection element named serviceInfos that in turn can
27 * contain one or more serviceInfo structures" - UDDI Version 2.0 Data Structure
28 * Reference
29 *
30 * @author Steve Viens (sviens@apache.org)
31 */
32 public class BusinessInfo implements RegistryObject
33 {
34 String businessKey;
35 Vector nameVector;
36 Vector descVector;
37 ServiceInfos infos;
38
39 /***
40 * default constructor
41 */
42 public BusinessInfo()
43 {
44 }
45
46 /***
47 * copy constructor
48 */
49 public BusinessInfo(BusinessInfo bizInfo)
50 {
51 businessKey = bizInfo.getBusinessKey();
52 nameVector = bizInfo.getNameVector();
53 descVector = bizInfo.getDescriptionVector();
54 infos = bizInfo.getServiceInfos();
55 }
56
57 /***
58 *
59 */
60 public BusinessInfo(String key)
61 {
62 this.businessKey = key;
63 }
64
65 /***
66 *
67 */
68 public void setBusinessKey(String key)
69 {
70 this.businessKey = key;
71 }
72
73 /***
74 *
75 */
76 public String getBusinessKey()
77 {
78 return this.businessKey;
79 }
80
81 /***
82 *
83 */
84 public void addName(Name name)
85 {
86 if (this.nameVector == null)
87 this.nameVector = new Vector();
88 this.nameVector.add(name);
89 }
90
91 /***
92 *
93 */
94 public void setNameVector(Vector names)
95 {
96 this.nameVector = names;
97 }
98
99 /***
100 *
101 */
102 public Vector getNameVector()
103 {
104 return this.nameVector;
105 }
106
107 /***
108 *
109 */
110 public void addDescription(Description desc)
111 {
112 if (this.descVector == null)
113 this.descVector = new Vector();
114 this.descVector.add(desc);
115 }
116
117 /***
118 *
119 */
120 public void setDescriptionVector(Vector descriptions)
121 {
122 this.descVector = descriptions;
123 }
124
125 /***
126 *
127 */
128 public Vector getDescriptionVector()
129 {
130 return this.descVector;
131 }
132
133 /***
134 *
135 */
136 public void addServiceInfo(ServiceInfo info)
137 {
138 if (this.infos == null)
139 this.infos = new ServiceInfos();
140 this.infos.addServiceInfo(info);
141 }
142
143 /***
144 *
145 */
146 public void setServiceInfos(ServiceInfos infos)
147 {
148 this.infos = infos;
149 }
150
151 /***
152 *
153 */
154 public ServiceInfos getServiceInfos()
155 {
156 return this.infos;
157 }
158 }