View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  package org.kuali.student.r2.lum.clu.dto;
16  
17  import org.kuali.student.r2.common.dto.MetaInfo;
18  //import org.w3c.dom.Element;
19  
20  import javax.xml.bind.annotation.XmlAccessType;
21  import javax.xml.bind.annotation.XmlAccessorType;
22  import javax.xml.bind.annotation.XmlElement;
23  import javax.xml.bind.annotation.XmlType;
24  import java.io.Serializable;
25  import java.util.Map;
26  
27  import javax.xml.bind.annotation.XmlAttribute;
28  import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
29  import org.kuali.student.r2.common.dto.RichTextInfo;
30  import org.kuali.student.r2.lum.clu.infc.LuCode;
31  
32  /**
33   * Detailed information about learning unit codes.
34   */
35  @XmlAccessorType(XmlAccessType.FIELD)
36  @XmlType(name = "LuCodeInfo", propOrder = {"id",
37      "typeKey",
38      "descr",
39      "value",
40      "meta",
41      "attributes"})//, "_futureElements" }) TODO KSCM-372: Non-GWT translatable code
42      
43  public class LuCodeInfo extends HasAttributesAndMetaInfo implements LuCode, Serializable {
44  
45      private static final long serialVersionUID = 1L;
46      @XmlAttribute
47      private String id;
48      @XmlAttribute
49      private String typeKey;
50      @XmlElement
51      private String value;
52      @XmlElement
53      private RichTextInfo descr;
54  //    TODO KSCM-372: Non-GWT translatable code
55  //    @XmlAnyElement
56  //    private List<Element> _futureElements;
57  
58      public LuCodeInfo() {
59      }
60  
61      public LuCodeInfo(LuCode luCode) {
62          super(luCode);
63          this.id = luCode.getId();
64          this.typeKey = luCode.getTypeKey();
65          if (luCode.getDescr() != null) {
66              this.descr = new RichTextInfo(luCode.getDescr());
67          }
68          this.value = luCode.getValue();
69      }
70  
71      @Override
72      public String getValue() {
73          return value;
74      }
75  
76      public void setValue(String value) {
77          this.value = value;
78      }
79  
80      @Override
81      public RichTextInfo getDescr() {
82          return descr;
83      }
84  
85      public void setDescr(RichTextInfo descr) {
86          this.descr = descr;
87      }
88  
89      @Override
90      public String getId() {
91          return id;
92      }
93  
94      public void setId(String id) {
95          this.id = id;
96      }
97  
98      @Override
99      public String getTypeKey() {
100         return typeKey;
101     }
102 
103     public void setTypeKey(String typeKey) {
104         this.typeKey = typeKey;
105     }
106 
107     @Deprecated
108     public String getType() {
109         return typeKey;
110     }
111 
112     @Deprecated
113     public void setType(String typeKey) {
114         this.typeKey = typeKey;
115     }
116 
117 }