View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.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.rice.kim.api.jaxb;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.List;
21  import java.util.Map;
22  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlType;
27  
28  import org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter;
29  
30  /**
31   * An XML element that can have zero or more StringMapEntry elements. This is similar
32   * to the StringMapEntryList, except this element's children are <qualification> elements.
33   * 
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   */
36  @XmlAccessorType(XmlAccessType.FIELD)
37  @XmlType(name="QualificationListType", propOrder={"qualifications"})
38  public class QualificationList implements Serializable {
39      
40      private static final long serialVersionUID = 1L;
41      
42      @XmlElement(name="qualification")
43      private List<MapStringStringAdapter.StringMapEntry> qualifications;
44      
45      public QualificationList () {
46          qualifications = new ArrayList<MapStringStringAdapter.StringMapEntry>();
47      }
48      
49      public QualificationList(Map<String, String> map) {
50          this();
51          for (Map.Entry<String,String> tempEntry : map.entrySet()) {
52              qualifications.add(new MapStringStringAdapter.StringMapEntry(tempEntry));
53          }
54      }
55  
56      /**
57       * @return the qualifications
58       */
59      public List<MapStringStringAdapter.StringMapEntry> getQualifications() {
60          return this.qualifications;
61      }
62  
63      /**
64       * @param qualifications the qualifications to set
65       */
66      public void setQualifications(List<MapStringStringAdapter.StringMapEntry> qualifications) {
67          this.qualifications = qualifications;
68      }
69  
70      
71  }