KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > SharedRelationships


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;
17
18 import java.util.Vector JavaDoc;
19
20 /**
21  * @author Anou Manavalan
22  * @author Steve Viens (sviens@apache.org)
23  */

24 public class SharedRelationships implements RegistryObject
25 {
26   Vector JavaDoc keyedReferenceVector;
27   String JavaDoc direction;
28
29   /**
30    *
31    */

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

39   public SharedRelationships(Vector JavaDoc refs)
40   {
41     this.keyedReferenceVector = refs;
42   }
43
44   /**
45    * @return Returns the direction.
46    */

47   public String JavaDoc getDirection()
48   {
49     return direction;
50   }
51   
52   /**
53    * @param direction The direction to set.
54    */

55   public void setDirection(String JavaDoc direction)
56   {
57     this.direction = direction;
58   }
59   
60   /**
61    *
62    */

63   public void addKeyedReference(KeyedReference ref)
64   {
65     if (this.keyedReferenceVector == null)
66       this.keyedReferenceVector = new Vector JavaDoc();
67     this.keyedReferenceVector.add(ref);
68   }
69
70   /**
71    *
72    */

73   public Vector JavaDoc getKeyedReferenceVector()
74   {
75     return this.keyedReferenceVector;
76   }
77
78   /**
79    *
80    */

81   public void setKeyedReferenceVector(Vector JavaDoc refs)
82   {
83     this.keyedReferenceVector = refs;
84   }
85
86   /**
87    *
88    */

89   public int size()
90   {
91     if (this.keyedReferenceVector != null)
92       return this.keyedReferenceVector.size();
93     else
94       return 0;
95   }
96 }
Popular Tags