Coverage Report - org.kuali.student.r2.common.dto.RichTextInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
RichTextInfo
0%
0/18
0%
0/2
1.125
 
 1  
 /*
 2  
  * Copyright 2010 The Kuali Foundation 
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the
 5  
  * "License"); you may not use this file except in compliance with the
 6  
  * License. You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.osedu.org/licenses/ECL-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 13  
  * implied. See the License for the specific language governing
 14  
  * permissions and limitations under the License.
 15  
  */
 16  
 
 17  
 package org.kuali.student.r2.common.dto;
 18  
 
 19  
 import org.kuali.student.r2.common.infc.RichText;
 20  
 import org.w3c.dom.Element;
 21  
 
 22  
 import javax.xml.bind.annotation.*;
 23  
 import java.io.Serializable;
 24  
 import java.util.List;
 25  
 
 26  
 @XmlAccessorType(XmlAccessType.FIELD)
 27  
 @XmlType(name = "RichTextInfo", propOrder = {
 28  
         "plain", "formatted", "_futureElements"})
 29  
 
 30  
 public class RichTextInfo
 31  
         implements RichText, Serializable {
 32  
 
 33  
     private static final long serialVersionUID = 1L;
 34  
 
 35  
     @XmlElement
 36  
     private String plain;
 37  
 
 38  
     @XmlElement
 39  
     private String formatted;
 40  
 
 41  
     @XmlAnyElement
 42  
     private List<Element> _futureElements;
 43  
 
 44  
 
 45  
     /**
 46  
      * Constructs a new RichTextInfo.
 47  
      */
 48  0
     public RichTextInfo() {
 49  0
     }
 50  
 
 51  
     /**
 52  
      * Constructs a new RichTextInfo from another RichText.
 53  
      *
 54  
      * @param richText the RichText to copy
 55  
      */
 56  0
     public RichTextInfo(RichText richText) {
 57  0
         if (null != richText) {
 58  0
             this.plain = richText.getPlain();
 59  0
             this.formatted = richText.getFormatted();
 60  
         }
 61  0
     }
 62  
 
 63  
     /**
 64  
      * Constructs a new RichTextInfo from a plain and a formatted string
 65  
      *
 66  
      * @param plain     The Plain text representation
 67  
      * @param formatted The Formatted text representation
 68  
      */
 69  0
     public RichTextInfo(String plain, String formatted) {
 70  0
         this.plain = plain;
 71  0
         this.formatted = formatted;
 72  0
     }
 73  
 
 74  
     @Override
 75  
     public String getPlain() {
 76  0
         return plain;
 77  
     }
 78  
 
 79  
     public void setPlain(String plain) {
 80  0
         this.plain = plain;
 81  0
     }
 82  
 
 83  
     @Override
 84  
     public String getFormatted() {
 85  0
         return formatted;
 86  
     }
 87  
 
 88  
     public void setFormatted(String formatted) {
 89  0
         this.formatted = formatted;
 90  0
     }
 91  
 
 92  
     @Override
 93  
     public String toString() {
 94  0
         return "RichTextInfo[plain=" + plain + ", formatted=" + formatted + "]";
 95  
     }
 96  
 }