KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
19  * A businessEntity has a "discoveryURLs" attribute which is a collection of these.
20  * Consists of an attribute whose value designates the URL use type convention
21  * and a string found within the body of the element. The use type will be
22  * "businessEntity" or "businessEntityExt" according to the containing object being
23  * saved. Each time a businessEntity object is saved this collection is augmented
24  * with the new URL identifying the newly saved object. The useType can be an
25  * empty string ("") if the discoveryURL is used in a find_business message.
26  *
27  * @author Steve Viens (sviens@apache.org)
28  */

29 public class DiscoveryURL implements RegistryObject
30 {
31   String JavaDoc useType;
32   String JavaDoc urlValue;
33
34   /**
35    * Construct a new discoveryURL with null usetype and url values.
36    */

37   public DiscoveryURL()
38   {
39   }
40
41   /**
42    * Construct a new discoveryURL with the given usetype and url.
43    * @param type The usetype of this discoveryURL.
44    * @param url The url of this discoveryURL
45    */

46   public DiscoveryURL(String JavaDoc type,String JavaDoc url)
47   {
48     this.useType = type;
49     this.urlValue = url;
50   }
51
52   /**
53    * Sets the usetype of this discoveryURL to the given usetype.
54    * @param useType The new usetype of this discoveryURL.
55    */

56   public void setUseType(String JavaDoc useType)
57   {
58     this.useType = useType;
59   }
60
61   /**
62    * Returns the usetype of this discoveryURL.
63    * @return The usetype of this discoveryURL.
64    */

65   public String JavaDoc getUseType()
66   {
67     return this.useType;
68   }
69
70   /**
71    * Sets the url of this discoveryURL to the given url.
72    *
73    * @param url The new url of this discoveryURL.
74    */

75   public void setValue(String JavaDoc url)
76   {
77     this.urlValue = url;
78   }
79
80   /**
81    * Returns the url of this discoveryURL.
82    * @return The url of this discoveryURL.
83    */

84   public String JavaDoc getValue()
85   {
86     return this.urlValue;
87   }
88 }
Popular Tags