1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.datatype;
17
18 /***
19 * Used in BusinessEntity as the Name of the BusinessEntity, in BusinessService
20 * as the name of the BusinessService and in TModel as the name of the TModel.
21 *
22 * @author Steve Viens (sviens@apache.org)
23 */
24 public class Name implements RegistryObject
25 {
26 String nameValue;
27 String langCode;
28
29 /***
30 * Construct a new initialized name instance.
31 */
32 public Name()
33 {
34 }
35
36 /***
37 * Construct a new name from a String.
38 *
39 * @param name The name of the new name-object.
40 */
41 public Name(String name)
42 {
43 setValue(name);
44 }
45
46 /***
47 * Construct a new name with a given name.
48 *
49 * @param name The name of the new name-object.
50 * @param lang The language of the new name-object.
51 */
52 public Name(String name,String lang)
53 {
54 setValue(name);
55 setLanguageCode(lang);
56 }
57
58 /***
59 * Sets the name of this name-object to the new given name.
60 *
61 * @param newName The new name for this name-object.
62 */
63 public void setValue(String newName)
64 {
65 this.nameValue = newName;
66 }
67
68 /***
69 * Returns the name of this name-object.
70 *
71 * @return The name of this name-object.
72 */
73 public String getValue()
74 {
75 return this.nameValue;
76 }
77
78 /***
79 * Sets the name of this name-object to the new given name.
80 *
81 * @param newLang The new name for this name-object.
82 */
83 public void setLanguageCode(String newLang)
84 {
85 this.langCode = newLang;
86 }
87
88 /***
89 * Returns the LanguageCode of this Name object.
90 *
91 * @return The LanguageCode of this name-object.
92 */
93 public String getLanguageCode()
94 {
95 return this.langCode;
96 }
97 }