Coverage Report - org.kuali.student.r2.lum.program.dto.ProgramRequirementInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
ProgramRequirementInfo
0%
0/40
0%
0/10
1.312
 
 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.program.dto;
 12  
 
 13  
 import java.io.Serializable;
 14  
 import java.util.ArrayList;
 15  
 import java.util.List;
 16  
 
 17  
 import javax.xml.bind.annotation.XmlAccessType;
 18  
 import javax.xml.bind.annotation.XmlAccessorType;
 19  
 import javax.xml.bind.annotation.XmlAnyElement;
 20  
 import javax.xml.bind.annotation.XmlElement;
 21  
 import javax.xml.bind.annotation.XmlType;
 22  
 
 23  
 import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
 24  
 import org.kuali.student.r2.common.dto.RichTextInfo;
 25  
 import org.kuali.student.r2.core.statement.dto.StatementTreeViewInfo;
 26  
 import org.kuali.student.r2.lum.course.dto.LoDisplayInfo;
 27  
 import org.kuali.student.r2.lum.program.infc.ProgramRequirement;
 28  
 import org.w3c.dom.Element;
 29  
 
 30  
 /**
 31  
  * Detailed information about a program requirement
 32  
  * 
 33  
  * @author Kuali Student Team (sambitpa@kuali.org)
 34  
  */
 35  0
 @XmlType(name = "ProgramRequirementInfo", propOrder = {"id",
 36  
     "typeKey",
 37  
     "stateKey",
 38  
     "descr",
 39  
     "shortTitle",
 40  
     "longTitle",
 41  
     "learningObjectives",
 42  
     "statement",
 43  
     "minCredits",
 44  
     "maxCredits",
 45  
     "meta",
 46  
     "attributes",
 47  
     "_futureElements"})
 48  
 @XmlAccessorType(XmlAccessType.FIELD)
 49  
 public class ProgramRequirementInfo extends IdNamelessEntityInfo implements ProgramRequirement, Serializable {
 50  
 
 51  
     private static final long serialVersionUID = 1L;
 52  
     @XmlElement
 53  
     private RichTextInfo descr;
 54  
     @XmlElement
 55  
     private String shortTitle;
 56  
     @XmlElement
 57  
     private String longTitle;
 58  
     @XmlElement
 59  
     private List<LoDisplayInfo> learningObjectives;
 60  
     @XmlElement
 61  
     private StatementTreeViewInfo statement;
 62  
     @XmlElement
 63  
     private Integer minCredits;
 64  
     @XmlElement
 65  
     private Integer maxCredits;
 66  
     @XmlAnyElement
 67  
     private List<Element> _futureElements;
 68  
 
 69  0
     public ProgramRequirementInfo() {
 70  0
     }
 71  
 
 72  
     public ProgramRequirementInfo(ProgramRequirement programRequirement) {
 73  0
         super(programRequirement);
 74  0
         if (programRequirement != null) {
 75  0
             if (programRequirement.getDescr() != null) {
 76  0
                 this.descr = new RichTextInfo (programRequirement.getDescr());
 77  
             }
 78  0
             this.shortTitle = programRequirement.getShortTitle();
 79  0
             this.longTitle = programRequirement.getLongTitle();
 80  0
             this.statement = programRequirement.getStatement();
 81  0
             this.minCredits = programRequirement.getMinCredits();
 82  0
             this.maxCredits = programRequirement.getMaxCredits();
 83  0
             List<LoDisplayInfo> los = new ArrayList<LoDisplayInfo>();
 84  0
             if (programRequirement.getLearningObjectives() != null) {
 85  0
                 for (LoDisplayInfo loDisplay : programRequirement.getLearningObjectives()) {
 86  0
                     los.add(new LoDisplayInfo(loDisplay));
 87  
                 }
 88  
             }
 89  
         }
 90  0
     }
 91  
 
 92  
     @Override
 93  
     public RichTextInfo getDescr() {
 94  0
         return descr;
 95  
     }
 96  
 
 97  
     public void setDescr(RichTextInfo descr) {
 98  0
         this.descr = descr;
 99  0
     }
 100  
 
 101  
     @Override
 102  
     public String getShortTitle() {
 103  0
         return shortTitle;
 104  
     }
 105  
 
 106  
     public void setShortTitle(String shortTitle) {
 107  0
         this.shortTitle = shortTitle;
 108  0
     }
 109  
 
 110  
     @Override
 111  
     public String getLongTitle() {
 112  0
         return longTitle;
 113  
     }
 114  
 
 115  
     public void setLongTitle(String longTitle) {
 116  0
         this.longTitle = longTitle;
 117  0
     }
 118  
 
 119  
     @Override
 120  
     public List<LoDisplayInfo> getLearningObjectives() {
 121  0
         if (null == learningObjectives) {
 122  0
             learningObjectives = new ArrayList<LoDisplayInfo>(0);
 123  
         }
 124  0
         return learningObjectives;
 125  
     }
 126  
 
 127  
     public void setLearningObjectives(List<LoDisplayInfo> learningObjectives) {
 128  0
         this.learningObjectives = learningObjectives;
 129  0
     }
 130  
 
 131  
     @Override
 132  
     public StatementTreeViewInfo getStatement() {
 133  0
         return statement;
 134  
     }
 135  
 
 136  
     public void setStatement(StatementTreeViewInfo statement) {
 137  0
         this.statement = statement;
 138  0
     }
 139  
 
 140  
     @Override
 141  
     public Integer getMinCredits() {
 142  0
         return minCredits;
 143  
     }
 144  
 
 145  
     public void setMinCredits(Integer minCredits) {
 146  0
         this.minCredits = minCredits;
 147  0
     }
 148  
 
 149  
     @Override
 150  
     public Integer getMaxCredits() {
 151  0
         return maxCredits;
 152  
     }
 153  
 
 154  
     public void setMaxCredits(Integer maxCredits) {
 155  0
         this.maxCredits = maxCredits;
 156  0
     }
 157  
 }