Revision 3dc3440e
Added by Andreas Müller over 12 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Annotation.java | ||
---|---|---|
24 | 24 |
import javax.xml.bind.annotation.XmlSchemaType; |
25 | 25 |
import javax.xml.bind.annotation.XmlType; |
26 | 26 |
|
27 |
import org.apache.commons.lang.StringUtils; |
|
27 | 28 |
import org.apache.log4j.Logger; |
28 | 29 |
import org.hibernate.annotations.Any; |
29 | 30 |
import org.hibernate.annotations.Cascade; |
... | ... | |
187 | 188 |
} |
188 | 189 |
} |
189 | 190 |
|
191 |
// ***************************** TO STRING *********************************** |
|
192 |
|
|
193 |
|
|
194 |
/* (non-Javadoc) |
|
195 |
* @see eu.etaxonomy.cdm.model.common.CdmBase#toString() |
|
196 |
*/ |
|
197 |
@Override |
|
198 |
public String toString() { |
|
199 |
if (StringUtils.isNotBlank(this.text)){ |
|
200 |
return "Ann.: " + this.text; |
|
201 |
}else{ |
|
202 |
return super.toString(); |
|
203 |
} |
|
204 |
} |
|
205 |
|
|
206 |
|
|
190 | 207 |
|
191 | 208 |
//****************** CLONE ************************************************/ |
192 | 209 |
|
... | ... | |
201 | 218 |
result.setLinkbackUrl(this.linkbackUrl); |
202 | 219 |
return result; |
203 | 220 |
} |
204 |
|
|
221 |
|
|
222 |
|
|
205 | 223 |
/** |
206 | 224 |
* Clones this annotation and sets the clone's annotated object to 'annotatedObject' |
207 | 225 |
* @see java.lang.Object#clone() |
Also available in: Unified diff
toString for Annotation and Extension