001 /**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016 package org.kuali.student.lum.lo.dto;
017
018 import java.io.Serializable;
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023 import javax.xml.bind.annotation.XmlAccessType;
024 import javax.xml.bind.annotation.XmlAccessorType;
025 import javax.xml.bind.annotation.XmlAttribute;
026 import javax.xml.bind.annotation.XmlElement;
027 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028
029 import org.kuali.student.core.dto.MetaInfo;
030 import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
031
032 /**
033 *
034 *
035 * @Author KSContractMojo
036 * @Author jimt
037 * @Since Tue Dec 08 10:01:34 PST 2009
038 * @See <a href="https://test.kuali.org/confluence/display/KULSTU/loLoRelationInfo+Structure+v1.0-rc2">LoLoRelationInfo</>
039 *
040 */
041 @XmlAccessorType(XmlAccessType.FIELD)
042 public class LoLoRelationInfo implements Serializable {
043
044 private static final long serialVersionUID = 1L;
045
046 @XmlElement
047 private String loId;
048
049 @XmlElement
050 private String relatedLoId;
051
052 @XmlElement
053 private Date effectiveDate;
054
055 @XmlElement
056 private Date expirationDate;
057
058 @XmlElement
059 @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
060 private Map<String, String> attributes;
061
062 @XmlElement
063 private MetaInfo metaInfo;
064
065 @XmlAttribute
066 private String type;
067
068 @XmlAttribute
069 private String state;
070
071 @XmlAttribute
072 private String id;
073
074 /**
075 * Unique identifier for a learning objective record. This is the "From" or "Parent" in the relation.
076 */
077 public String getLoId() {
078 return loId;
079 }
080
081 public void setLoId(String loId) {
082 this.loId = loId;
083 }
084
085 /**
086 * Unique identifier for a learning objective record. This is the "To" or "Child" of the relation.
087 */
088 public String getRelatedLoId() {
089 return relatedLoId;
090 }
091
092 public void setRelatedLoId(String relatedLoId) {
093 this.relatedLoId = relatedLoId;
094 }
095
096 /**
097 * Date and time that this LO to LO relationship became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
098 */
099 public Date getEffectiveDate() {
100 return effectiveDate;
101 }
102
103 public void setEffectiveDate(Date effectiveDate) {
104 this.effectiveDate = effectiveDate;
105 }
106
107 /**
108 * Date and time that this LO to LO relationship expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
109 */
110 public Date getExpirationDate() {
111 return expirationDate;
112 }
113
114 public void setExpirationDate(Date expirationDate) {
115 this.expirationDate = expirationDate;
116 }
117
118 /**
119 * List of key/value pairs, typically used for dynamic attributes.
120 */
121 public Map<String, String> getAttributes() {
122 if (attributes == null) {
123 attributes = new HashMap<String, String>();
124 }
125 return attributes;
126 }
127
128 public void setAttributes(Map<String, String> attributes) {
129 this.attributes = attributes;
130 }
131
132 /**
133 * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
134 */
135 public MetaInfo getMetaInfo() {
136 return metaInfo;
137 }
138
139 public void setMetaInfo(MetaInfo metaInfo) {
140 this.metaInfo = metaInfo;
141 }
142
143 /**
144 * Unique identifier for the LO to LO relation type.
145 */
146 public String getType() {
147 return type;
148 }
149
150 public void setType(String type) {
151 this.type = type;
152 }
153
154 /**
155 * Identifier for the current status of a LO to LO relationship. The values for this field are constrained to those in the luLuRelationState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
156 */
157 public String getState() {
158 return state;
159 }
160
161 public void setState(String state) {
162 this.state = state;
163 }
164
165 /**
166 * Unique identifier for a LO to LO relationship. This is optional, due to the identifier being set at the time of creation. Once the relation has been created, this should be seen as required.
167 */
168 public String getId() {
169 return id;
170 }
171
172 public void setId(String id) {
173 this.id = id;
174 }
175 }