Coverage Report - org.kuali.student.r2.core.document.dto.DocumentInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentInfo
0%
0/21
0%
0/8
1.4
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 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 implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.student.r2.core.document.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 19  
 import org.kuali.student.r2.core.document.infc.Document;
 20  
 import org.w3c.dom.Element;
 21  
 
 22  
 import javax.xml.bind.annotation.*;
 23  
 import java.io.Serializable;
 24  
 import java.util.Date;
 25  
 import java.util.List;
 26  
 
 27  
 
 28  
 /**
 29  
  * Refer to interface javadoc
 30  
  *
 31  
  * @version 2.0
 32  
  * @Author tom
 33  
  * @Author Sri komandur@uw.edu
 34  
  *
 35  
  */
 36  
 @XmlAccessorType(XmlAccessType.FIELD)
 37  
 @XmlType(name = "DocumentInfo", propOrder = { "id", "typeKey", "stateKey",
 38  
         "name", "descr", "fileName", "documentBinary", "effectiveDate", "expirationDate",
 39  
         "meta", "attributes", "_futureElements" })
 40  
 public class DocumentInfo extends IdEntityInfo implements Document, Serializable {
 41  
 
 42  
     private static final long serialVersionUID = 1L;
 43  
 
 44  
     @XmlElement
 45  
     private String fileName;
 46  
 
 47  
     @XmlElement
 48  
     private DocumentBinaryInfo documentBinary;
 49  
 
 50  
     @XmlElement
 51  
     private Date effectiveDate;
 52  
 
 53  
     @XmlElement
 54  
     private Date expirationDate;
 55  
 
 56  
     @XmlAnyElement
 57  
     private List<Element> _futureElements;
 58  
 
 59  
     @Override
 60  
     public String getFileName() {
 61  0
         return fileName;
 62  
     }
 63  
 
 64  
     public void setFileName(String fileName) {
 65  0
         this.fileName = fileName;
 66  0
     }
 67  
 
 68  0
     public DocumentInfo() {
 69  0
     }
 70  
 
 71  
     public DocumentInfo(Document document) {
 72  0
         super(document);
 73  0
         if (null != document) {
 74  0
             this.fileName = document.getFileName();
 75  0
             this.documentBinary = (null != document.getDocumentBinary()) ? new DocumentBinaryInfo(document.getDocumentBinary()) : null;
 76  0
             this.effectiveDate = (null != document.getEffectiveDate()) ? new Date(document.getEffectiveDate().getTime()) : null;
 77  0
             this.expirationDate = (null != document.getExpirationDate()) ? new Date(document.getExpirationDate().getTime()) : null;
 78  
         }
 79  0
     }
 80  
 
 81  
     @Override
 82  
     public DocumentBinaryInfo getDocumentBinary() {
 83  0
         return documentBinary;
 84  
     }
 85  
 
 86  
     public void setDocumentBinary(DocumentBinaryInfo documentBinary) {
 87  0
         this.documentBinary = documentBinary;
 88  0
     }
 89  
 
 90  
     @Override
 91  
     public Date getEffectiveDate() {
 92  0
         return effectiveDate;
 93  
     }
 94  
 
 95  
     public void setEffectiveDate(Date effectiveDate) {
 96  0
         this.effectiveDate = effectiveDate;
 97  0
     }
 98  
 
 99  
     @Override
 100  
     public Date getExpirationDate() {
 101  0
         return expirationDate;
 102  
     }
 103  
 
 104  
     public void setExpirationDate(Date expirationDate) {
 105  0
         this.expirationDate = expirationDate;
 106  0
     }
 107  
 
 108  
 }