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.r2.lum.clu.dto;
17  
18  import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
19  import org.kuali.student.r2.lum.clu.infc.Accreditation;
20  //import org.w3c.dom.Element;
21  
22  import javax.xml.bind.annotation.XmlAccessType;
23  import javax.xml.bind.annotation.XmlAccessorType;
24  import javax.xml.bind.annotation.XmlAnyElement;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlType;
27  import java.io.Serializable;
28  import java.util.Date;
29  import java.util.List;
30  import java.util.Map;
31  
32  /**
33   * Accreditation information
34   *
35   * @Version 2.0
36   * @Author Sri komandur@uw.edu
37   */
38  @XmlAccessorType(XmlAccessType.FIELD)
39  @XmlType(name = "AccreditationInfo", propOrder = {"id", "orgId", "effectiveDate", "expirationDate", "attributes", "meta" , "_futureElements" }) 
40  public class AccreditationInfo extends HasAttributesAndMetaInfo implements Accreditation, Serializable {
41  
42      private static final long serialVersionUID = 1L;
43  
44      @XmlElement
45      private String id;
46      @XmlElement
47      private String orgId;
48      @XmlElement
49      private Date effectiveDate;
50      @XmlElement
51      private Date expirationDate;
52      @XmlAnyElement
53      private List<Object> _futureElements;  
54  
55      public AccreditationInfo() {
56      }
57  
58      public AccreditationInfo(Accreditation accreditation) {
59          super(accreditation);
60          if (null != accreditation) {
61              this.id = accreditation.getId();
62              this.orgId = accreditation.getOrgId();
63              this.effectiveDate = (null != accreditation.getEffectiveDate()) ? new Date(accreditation.getEffectiveDate().getTime()) : null;
64              this.expirationDate = (null != accreditation.getExpirationDate()) ? new Date(accreditation.getExpirationDate().getTime()) : null;
65          }
66      }
67  
68      @Override
69      public String getId() {
70          return id;
71      }
72  
73      public void setId(String id) {
74          this.id = id;
75      }
76  
77      @Override
78      public String getOrgId() {
79          return orgId;
80      }
81  
82      public void setOrgId(String orgId) {
83          this.orgId = orgId;
84      }
85  
86      @Override
87      public Date getEffectiveDate() {
88          return effectiveDate;
89      }
90  
91      public void setEffectiveDate(Date effectiveDate) {
92          this.effectiveDate = effectiveDate;
93      }
94  
95      @Override
96      public Date getExpirationDate() {
97          return expirationDate;
98      }
99  
100     public void setExpirationDate(Date expirationDate) {
101         this.expirationDate = expirationDate;
102     }
103 
104 }