/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a>
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS, <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Initial code contributed and copyrighted by<br>
* frentix GmbH, http://www.frentix.com
* <p>
*/
package org.olat.restapi.support.vo;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* Description:<br>
* A mapper class for the <code>CatalogEntry</code>
*
* <P>
* Initial Date: 5 may 2010 <br>
* @author srosse, stephane.rosse@frentix.com
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "catalogEntryVO")
public class CatalogEntryVO {
private Long key;
private String name;
private String description;
private String externalURL;
private Integer type;
private Long repositoryEntryKey;
private Long parentKey;
@XmlElement(name="link",nillable=true)
private List<LinkVO> link = new ArrayList<LinkVO>();
public CatalogEntryVO() {
//make JAXB happy
}
public Long getKey() {
return key;
}
public void setKey(Long key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getExternalURL() {
return externalURL;
}
public void setExternalURL(String externalURL) {
this.externalURL = externalURL;
}
public Long getRepositoryEntryKey() {
return repositoryEntryKey;
}
public void setRepositoryEntryKey(Long repositoryEntryKey) {
this.repositoryEntryKey = repositoryEntryKey;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Long getParentKey() {
return parentKey;
}
public void setParentKey(Long parentKey) {
this.parentKey = parentKey;
}
public List<LinkVO> getLink() {
return link;
}
public void setLink(List<LinkVO> link) {
this.link = link;
}
@Override
public String toString() {
return "catalogEntryVO[key=" + key + ":name=" + name + "]";
}
@Override
public boolean equals(Object obj) {
if(this == obj) {
return true;
}
if(obj instanceof CatalogEntryVO) {
CatalogEntryVO vo = (CatalogEntryVO)obj;
return key != null && key.equals(vo.key);
}
return false;
}
}