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  
16  package org.kuali.student.r1.lum.lrc.dto;
17  
18  import java.io.Serializable;
19  import java.util.Date;
20  import java.util.HashMap;
21  import java.util.Map;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAttribute;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
28  
29  import org.kuali.student.r1.common.dto.HasAttributes;
30  import org.kuali.student.r1.common.dto.Idable;
31  import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
32  
33  /**
34   * Detailed information about a grade value.
35   *
36   * @Author KSContractMojo
37   * @Author lindholm
38   * @Since Tue Apr 21 13:47:44 PDT 2009
39   * @See <a href="https://test.kuali.org/confluence/display/KULSTU/gradeInfo+Structure">GradeInfo</>
40   *
41   */
42  @XmlAccessorType(XmlAccessType.FIELD)
43  public class GradeInfo implements Serializable, Idable, HasAttributes {
44  
45      private static final long serialVersionUID = 1L;
46  
47      @XmlElement
48      private String name;
49  
50      @XmlElement
51      private String value;
52  
53      @XmlElement
54      private String scaleKey;
55  
56      @XmlElement
57      private String rank;
58  
59      @XmlElement
60      private Date effectiveDate;
61  
62      @XmlElement
63      private Date expirationDate;
64  
65      @XmlElement
66      @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
67      private Map<String, String> attributes;
68  
69      @XmlAttribute
70      private String type;
71  
72      @XmlAttribute(name="key")
73      private String id;
74  
75      /**
76       * Name of the grade. This is likely related to the type, value and/or scale, but this is not required.
77       */
78      public String getName() {
79          return name;
80      }
81  
82      public void setName(String name) {
83          this.name = name;
84      }
85  
86      /**
87       * Value of the grade. Typically corresponds with the short coded form of the grade (ex. "A", "4.0", "97.0%", etc.)
88       */
89      public String getValue() {
90          return value;
91      }
92  
93      public void setValue(String value) {
94          this.value = value;
95      }
96  
97      /**
98       * Identifier of the scale for this grade value.
99       */
100     public String getScaleKey() {
101         return scaleKey;
102     }
103 
104     public void setScaleKey(String scaleKey) {
105         this.scaleKey = scaleKey;
106     }
107 
108     /**
109      * Rank of the grade value within the scale. Standards around uniqueness and meaning of value are described in the information about the scale.
110      */
111     public String getRank() {
112         return rank;
113     }
114 
115     public void setRank(String rank) {
116         this.rank = rank;
117     }
118 
119     /**
120      * Date and time that this grade value became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
121      */
122     public Date getEffectiveDate() {
123         return effectiveDate;
124     }
125 
126     public void setEffectiveDate(Date effectiveDate) {
127         this.effectiveDate = effectiveDate;
128     }
129 
130     /**
131      * Date and time that this grade value expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
132      */
133     public Date getExpirationDate() {
134         return expirationDate;
135     }
136 
137     public void setExpirationDate(Date expirationDate) {
138         this.expirationDate = expirationDate;
139     }
140 
141     /**
142      * List of key/value pairs, typically used for dynamic attributes.
143      */
144     public Map<String, String> getAttributes() {
145         if (attributes == null) {
146             attributes = new HashMap<String, String>();
147         }
148         return attributes;
149     }
150 
151     public void setAttributes(Map<String, String> attributes) {
152         this.attributes = attributes;
153     }
154 
155     /**
156      * Unique identifier for a grade type.
157      */
158     public String getType() {
159         return type;
160     }
161 
162     public void setType(String type) {
163         this.type = type;
164     }
165 
166     /**
167      * Unique identifier for a grade value.
168      */
169     public String getId() {
170         return id;
171     }
172 
173     public void setId(String id) {
174         this.id = id;
175     }
176 }