Coverage Report - org.kuali.student.r2.common.dto.LocaleInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
LocaleInfo
0%
0/21
0%
0/2
1.1
 
 1  
 /*
 2  
  * Copyright 2011 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 java.io.Serializable;
 20  
 import java.util.List;
 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.XmlAttribute;
 26  
 import javax.xml.bind.annotation.XmlElement;
 27  
 import javax.xml.bind.annotation.XmlType;
 28  
 
 29  
 import org.kuali.student.r2.common.infc.Locale;
 30  
 import org.w3c.dom.Element;
 31  
 
 32  
 
 33  
 /**
 34  
  * Information about Locale for Context.
 35  
  *
 36  
  * @author Sri komandur@uw.edu
 37  
  */
 38  
 
 39  
 @XmlAccessorType(XmlAccessType.FIELD)
 40  
 @XmlType(name = "LocaleInfo", propOrder = {
 41  
                 "localeLanguage", "localeVariant",
 42  
                 "localeRegion", "localeScript", 
 43  
                 "_futureElements"})
 44  
 
 45  
 public class LocaleInfo 
 46  
     implements Locale, Serializable {
 47  
 
 48  
     private static final long serialVersionUID = 1L;
 49  
 
 50  
     @XmlElement
 51  
     private String localeLanguage;
 52  
 
 53  
     @XmlElement
 54  
     private String localeVariant;
 55  
 
 56  
     @XmlElement
 57  
     private String localeRegion;
 58  
 
 59  
     @XmlElement
 60  
     private String localeScript;
 61  
 
 62  
     @XmlAnyElement
 63  
     private List<Element> _futureElements;
 64  
 
 65  
 
 66  
     /**
 67  
      * Constructs a new LocaleInfo.
 68  
      */
 69  0
     public LocaleInfo() {
 70  0
     }
 71  
 
 72  
     /**
 73  
      * Constructs a new LocaleInfo from another Locale.
 74  
      *
 75  
      * @param locale the locale to copy
 76  
      */
 77  0
     public LocaleInfo(Locale locale) {
 78  0
         if (null != locale) {
 79  0
             this.localeLanguage = locale.getLocaleLanguage();
 80  0
             this.localeVariant = locale.getLocaleVariant();
 81  0
             this.localeRegion = locale.getLocaleRegion();
 82  0
             this.localeScript = locale.getLocaleScript();
 83  
         }
 84  0
     }
 85  
 
 86  
     @Override
 87  
     public String getLocaleLanguage() {
 88  0
         return this.localeLanguage;
 89  
     }
 90  
 
 91  
     public void setLocaleLanguage(String localeLanguage) {
 92  0
         this.localeLanguage = localeLanguage;
 93  0
     }
 94  
 
 95  
     @Override
 96  
     public String getLocaleVariant() {
 97  0
         return this.localeVariant;
 98  
     }
 99  
 
 100  
     public void setLocaleVariant(String localeVariant) {
 101  0
         this.localeVariant = localeVariant;
 102  0
     }
 103  
 
 104  
     @Override
 105  
     public String getLocaleRegion() {
 106  0
         return this.localeRegion;
 107  
     }
 108  
 
 109  
     public void setLocaleRegion(String localeRegion) {
 110  0
         this.localeRegion = localeRegion;
 111  0
     }
 112  
 
 113  
     @Override
 114  
     public String getLocaleScript() {
 115  0
         return this.localeScript;
 116  
     }
 117  
 
 118  
     public void setLocaleScript(String localeScript) {
 119  0
         this.localeScript = localeScript;
 120  0
     }
 121  
 }