01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.jee;
18:
19: import javax.xml.bind.annotation.XmlAccessType;
20: import javax.xml.bind.annotation.XmlAccessorType;
21: import javax.xml.bind.annotation.XmlAttribute;
22: import javax.xml.bind.annotation.XmlElement;
23: import javax.xml.bind.annotation.XmlID;
24: import javax.xml.bind.annotation.XmlType;
25: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
26: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
27:
28: /**
29: * The icon type contains small-icon and large-icon elements
30: * that specify the file names for small and large GIF, JPEG,
31: * or PNG icon images used to represent the parent element in a
32: * GUI tool.
33: * <p/>
34: * The xml:lang attribute defines the language that the
35: * icon file names are provided in. Its value is "en" (English)
36: * by default.
37: */
38: @XmlAccessorType(XmlAccessType.FIELD)
39: @XmlType(name="iconType",propOrder={"smallIcon","largeIcon"})
40: public class Icon implements Keyable<String> {
41:
42: @XmlElement(name="small-icon")
43: protected String smallIcon;
44: @XmlElement(name="large-icon")
45: protected String largeIcon;
46: @XmlAttribute
47: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
48: @XmlID
49: protected String id;
50: @XmlAttribute(namespace="http://www.w3.org/XML/1998/namespace")
51: protected String lang = "en";
52:
53: public String getSmallIcon() {
54: return smallIcon;
55: }
56:
57: public void setSmallIcon(String value) {
58: this .smallIcon = value;
59: }
60:
61: public String getLargeIcon() {
62: return largeIcon;
63: }
64:
65: public void setLargeIcon(String value) {
66: this .largeIcon = value;
67: }
68:
69: public String getId() {
70: return id;
71: }
72:
73: public void setId(String value) {
74: this .id = value;
75: }
76:
77: public String getLang() {
78: return lang;
79: }
80:
81: public void setLang(String value) {
82: this .lang = value;
83: }
84:
85: public String getKey() {
86: return getLang();
87: }
88: }
|