View Javadoc

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;
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 generic;
28    String operator;
29    Properties properties;
30  
31    /***
32     * Constructs a new initialized Addressline instance.
33     */
34    public RegistryInfo()
35    {
36      properties = new Properties();
37    } 
38  
39    /***
40     *
41     * @param genericValue
42     */
43    public void setGeneric(String genericValue)
44    {
45      this.generic = genericValue;
46    }
47  
48    /***
49     *
50     * @return String UDDI generic value.
51     */
52    public String getGeneric()
53    {
54      return this.generic;
55    }
56  
57    /***
58     *
59     */
60    public void setOperator(String operator)
61    {
62      this.operator = operator;
63    }
64  
65    /***
66     *
67     */
68    public String 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 name,String 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 getProperty(String name)
89    {
90      return (String)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 getProperties()
110   {
111     return properties;
112   }
113 }