package se.cambio.cds.gdl.model;
import org.openehr.rm.datatypes.text.CodePhrase;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* ResourceDescriptionItem
*
* @author rong.chen
*/
public class ResourceDescriptionItem implements Serializable{
private static final long serialVersionUID = 1L;
private String id;
private CodePhrase language;
private String purpose;
private List<String> keywords;
private String use;
private String misuse;
private String copyright;
public ResourceDescriptionItem() {
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the language
*/
public CodePhrase getLanguage() {
return language;
}
/**
* @param language
* the language to set
*/
public void setLanguage(CodePhrase language) {
this.language = language;
}
/**
* @return the purpose
*/
public String getPurpose() {
return purpose;
}
/**
* @param purpose
* the purpose to set
*/
public void setPurpose(String purpose) {
this.purpose = purpose;
}
/**
* @return the keywords
*/
public List<String> getKeywords() {
if (keywords == null) {
keywords = new ArrayList<String>();
}
return keywords;
}
/**
* @param keywords
* the keywords to set
*/
public void setKeywords(List<String> keywords) {
this.keywords = keywords;
}
/**
* @return the use
*/
public String getUse() {
return use;
}
/**
* @param use
* the use to set
*/
public void setUse(String use) {
this.use = use;
}
/**
* @return the misuse
*/
public String getMisuse() {
return misuse;
}
/**
* @param misuse
* the misuse to set
*/
public void setMisuse(String misuse) {
this.misuse = misuse;
}
/**
* @return the copyright
*/
public String getCopyright() {
return copyright;
}
/**
* @param copyright
* the copyright to set
*/
public void setCopyright(String copyright) {
this.copyright = copyright;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((copyright == null) ? 0 : copyright.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result
+ ((keywords == null) ? 0 : keywords.hashCode());
result = prime * result
+ ((language == null) ? 0 : language.hashCode());
result = prime * result + ((misuse == null) ? 0 : misuse.hashCode());
result = prime * result + ((purpose == null) ? 0 : purpose.hashCode());
result = prime * result + ((use == null) ? 0 : use.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ResourceDescriptionItem other = (ResourceDescriptionItem) obj;
if (copyright == null) {
if (other.copyright != null)
return false;
} else if (!copyright.equals(other.copyright))
return false;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
if (keywords == null) {
if (other.keywords != null)
return false;
} else if (!keywords.equals(other.keywords))
return false;
if (language == null) {
if (other.language != null)
return false;
} else if (!language.equals(other.language))
return false;
if (misuse == null) {
if (other.misuse != null)
return false;
} else if (!misuse.equals(other.misuse))
return false;
if (purpose == null) {
if (other.purpose != null)
return false;
} else if (!purpose.equals(other.purpose))
return false;
if (use == null) {
if (other.use != null)
return false;
} else if (!use.equals(other.use))
return false;
return true;
}
}
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 2.0/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the 'License'); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an 'AS IS' basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
*
* The Initial Developers of the Original Code are Iago Corbal and Rong Chen.
* Portions created by the Initial Developer are Copyright (C) 2012-2013
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Software distributed under the License is distributed on an 'AS IS' basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* ***** END LICENSE BLOCK *****
*/