KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Properties JavaDoc;
19
20 import org.apache.juddi.datatype.RegistryObject;
21
22 /**
23  * @author Steve Viens (sviens@apache.org)
24  */

25 public class RegistryInfo implements RegistryObject
26 {
27   String JavaDoc generic;
28   String JavaDoc operator;
29   Properties JavaDoc properties;
30
31   /**
32    * Constructs a new initialized Addressline instance.
33    */

34   public RegistryInfo()
35   {
36     properties = new Properties JavaDoc();
37   }
38
39   /**
40    *
41    * @param genericValue
42    */

43   public void setGeneric(String JavaDoc genericValue)
44   {
45     this.generic = genericValue;
46   }
47
48   /**
49    *
50    * @return String UDDI generic value.
51    */

52   public String JavaDoc getGeneric()
53   {
54     return this.generic;
55   }
56
57   /**
58    *
59    */

60   public void setOperator(String JavaDoc operator)
61   {
62     this.operator = operator;
63   }
64
65   /**
66    *
67    */

68   public String JavaDoc getOperator()
69   {
70     return this.operator;
71   }
72   
73   /**
74    * @param name The name of the property being added.
75    * @param value The value of the property.
76    */

77   public void addProperty(String JavaDoc name,String JavaDoc value)
78   {
79     properties.put(name,value);
80   }
81
82   /**
83    * Returns the value of the desired property.
84    *
85    * @param name The name of the property being added.
86    * @return The value of the desired property.
87    */

88   public String JavaDoc getProperty(String JavaDoc name)
89   {
90     return (String JavaDoc)properties.get(name);
91   }
92   
93   /**
94    * Adds a property name/value pair to the Property object.
95    *
96    * @param prop Property object to add
97    */

98   public void addProperty(Property prop)
99   {
100     if (prop == null)
101       return;
102     
103     properties.put(prop.getName(),prop.getValue());
104   }
105   
106   /**
107    *
108    */

109   public Properties JavaDoc getProperties()
110   {
111     return properties;
112   }
113 }
Popular Tags