View Javadoc

1   /*
2    * Copyright 2009 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 1.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    * http://www.opensource.org/licenses/ecl1.php Unless required by applicable law
6    * or agreed to in writing, software distributed under the License is
7    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8    * KIND, either express or implied. See the License for the specific language
9    * governing permissions and limitations under the License.
10   */
11  package org.kuali.student.r2.lum.course.dto;
12  
13  import java.io.Serializable;
14  import java.util.List;
15  
16  import javax.xml.bind.annotation.XmlAccessType;
17  import javax.xml.bind.annotation.XmlAccessorType;
18  import javax.xml.bind.annotation.XmlAnyElement;
19  import javax.xml.bind.annotation.XmlElement;
20  import javax.xml.bind.annotation.XmlType;
21  
22  import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
23  import org.kuali.student.r2.lum.course.infc.CourseVariation;
24  //import org.w3c.dom.Element;
25  
26  @XmlType(name = "CourseVariationInfo", propOrder = {"id", "typeKey", "stateKey", "variationTitle", "subjectArea", "courseNumberSuffix", "variationCode", "meta", "attributes" , "_futureElements" }) 
27  @XmlAccessorType(XmlAccessType.FIELD)
28  public class CourseVariationInfo extends IdNamelessEntityInfo implements CourseVariation, Serializable {
29  
30      private static final long serialVersionUID = 1L;
31  
32      @XmlElement
33      private String variationTitle;
34  
35      @XmlElement
36      private String subjectArea;
37  
38      @XmlElement
39      private String courseNumberSuffix;
40  
41      @XmlElement
42      private String variationCode;
43      
44      @XmlAnyElement
45      private List<Object> _futureElements;  
46  
47      public CourseVariationInfo() {
48  
49      }
50  
51      public CourseVariationInfo(CourseVariation courseVariation) {
52          super(courseVariation);
53  
54          if (courseVariation != null) {
55              this.variationTitle = courseVariation.getVariationTitle();
56              this.subjectArea = courseVariation.getSubjectArea();
57              this.courseNumberSuffix = courseVariation.getCourseNumberSuffix();
58              this.variationCode = courseVariation.getVariationCode();
59  
60          }
61      }
62  
63      /**
64       * Full name of the variation, commonly used on catalogues
65       */
66      @Override
67      public String getVariationTitle() {
68          return variationTitle;
69      }
70  
71      public void setVariationTitle(String variationTitle) {
72          this.variationTitle = variationTitle;
73      }
74  
75      /**
76       * 
77       */
78      @Override
79      public String getSubjectArea() {
80          return subjectArea;
81      }
82  
83      public void setSubjectArea(String subjectArea) {
84          this.subjectArea = subjectArea;
85      }
86  
87      /**
88       * The "extra" portion of the code, which usually corresponds with the most
89       * detailed part of the number.
90       */
91      @Override
92      public String getCourseNumberSuffix() {
93          return courseNumberSuffix;
94      }
95  
96      public void setCourseNumberSuffix(String courseNumberSuffix) {
97          this.courseNumberSuffix = courseNumberSuffix;
98      }
99  
100     /**
101      * A number that indicates the sequence or order of variation in cases where
102      * several different variations have the same offical Identifier
103      */
104     @Override
105     public String getVariationCode() {
106         return variationCode;
107     }
108 
109     public void setVariationCode(String variationCode) {
110         this.variationCode = variationCode;
111     }
112 
113 }