2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.strategy
.cache
;
12 import javax
.persistence
.Transient
;
14 import org
.apache
.commons
.lang
.StringUtils
;
16 import eu
.etaxonomy
.cdm
.common
.CdmUtils
;
22 * @author a.kohlbecker
25 * @created 11.12.2007 12:11:19
28 public class TaggedText
{
34 public static TaggedText
NewWhitespaceInstance(){
35 return new TaggedText(TagEnum
.separator
, " ");
38 public String
getText() {
41 public void setText(String text
) {
44 public TagEnum
getType() {
47 public void setType(TagEnum type
) {
54 public TaggedText(TagEnum type
, String text
) {
60 // *************************** DELEGATES ************************************/
63 public boolean isName() {
67 public boolean isRank() {
71 public boolean isAuthors() {
72 return type
.isAuthors();
75 public boolean isAppendedPhrase() {
76 return type
.isAppendedPhrase();
79 public boolean isReference() {
80 return type
.isReference();
83 public boolean isYear() {
87 public boolean isFullName() {
88 return type
.isFullName();
91 public boolean isNomStatus() {
92 return type
.isNomStatus();
95 public boolean isSeparator() {
96 return type
.isSeparator();
99 public boolean isHybridSign() {
100 return type
.isHybridSign();
104 // ********************** toString() ***********************************************/
107 public String
toString(){
108 String result
= CdmUtils
.concat(":", type
.toString(), text
);
109 if (StringUtils
.isBlank(result
)){
110 return super.toString();