Revision a784f00f
Added by Katja Luther about 14 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/NonViralName.java | ||
---|---|---|
42 | 42 |
import org.hibernate.search.annotations.Fields; |
43 | 43 |
import org.hibernate.search.annotations.Index; |
44 | 44 |
import org.hibernate.search.annotations.Indexed; |
45 |
import org.hibernate.search.annotations.IndexedEmbedded; |
|
45 | 46 |
import org.hibernate.validator.constraints.NotEmpty; |
46 | 47 |
import org.springframework.beans.factory.annotation.Configurable; |
47 | 48 |
|
... | ... | |
118 | 119 |
private static final Logger logger = Logger.getLogger(NonViralName.class); |
119 | 120 |
|
120 | 121 |
@XmlElement(name = "NameCache") |
121 |
@Fields({@Field(index = org.hibernate.search.annotations.Index.TOKENIZED), |
|
122 |
@Field(name = "nameCache_forSort", index = org.hibernate.search.annotations.Index.UN_TOKENIZED)
|
|
122 |
@Fields({@Field(name = "nameCache_tokenized",index = org.hibernate.search.annotations.Index.TOKENIZED),
|
|
123 |
@Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED) |
|
123 | 124 |
}) |
124 | 125 |
@Match(value=MatchMode.CACHE, cacheReplaceMode=ReplaceMode.DEFINED, |
125 | 126 |
cacheReplacedProperties={"genusOrUninomial", "infraGenericEpithet", "specificEpithet", "infraSpecificEpithet"} ) |
... | ... | |
172 | 173 |
@Target(TeamOrPersonBase.class) |
173 | 174 |
@Cascade(CascadeType.SAVE_UPDATE) |
174 | 175 |
@CacheUpdate("authorshipCache") |
176 |
@IndexedEmbedded |
|
175 | 177 |
private INomenclaturalAuthor combinationAuthorTeam; |
176 | 178 |
|
177 | 179 |
@XmlElement(name = "ExCombinationAuthorTeam", type = TeamOrPersonBase.class) |
... | ... | |
181 | 183 |
@Target(TeamOrPersonBase.class) |
182 | 184 |
@Cascade(CascadeType.SAVE_UPDATE) |
183 | 185 |
@CacheUpdate("authorshipCache") |
186 |
@IndexedEmbedded |
|
184 | 187 |
private INomenclaturalAuthor exCombinationAuthorTeam; |
185 | 188 |
|
186 | 189 |
@XmlElement(name = "BasionymAuthorTeam", type = TeamOrPersonBase.class) |
... | ... | |
190 | 193 |
@Target(TeamOrPersonBase.class) |
191 | 194 |
@Cascade(CascadeType.SAVE_UPDATE) |
192 | 195 |
@CacheUpdate("authorshipCache") |
196 |
@IndexedEmbedded |
|
193 | 197 |
private INomenclaturalAuthor basionymAuthorTeam; |
194 | 198 |
|
195 | 199 |
@XmlElement(name = "ExBasionymAuthorTeam", type = TeamOrPersonBase.class) |
... | ... | |
199 | 203 |
@Target(TeamOrPersonBase.class) |
200 | 204 |
@Cascade(CascadeType.SAVE_UPDATE) |
201 | 205 |
@CacheUpdate("authorshipCache") |
206 |
@IndexedEmbedded |
|
202 | 207 |
private INomenclaturalAuthor exBasionymAuthorTeam; |
203 | 208 |
|
204 | 209 |
@XmlElement(name = "AuthorshipCache") |
205 |
@Field(index=Index.TOKENIZED) |
|
210 |
@Fields({@Field(name = "authorshipCache_tokenized",index = org.hibernate.search.annotations.Index.TOKENIZED), |
|
211 |
@Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED) |
|
212 |
}) |
|
206 | 213 |
@Match(value=MatchMode.CACHE, cacheReplaceMode=ReplaceMode.DEFINED, |
207 | 214 |
cacheReplacedProperties={"combinationAuthorTeam", "basionymAuthorTeam", "exCombinationAuthorTeam", "exBasionymAuthorTeam"} ) |
208 | 215 |
@NullOrNotEmpty |
209 | 216 |
@Size(max = 255) |
217 |
@Pattern(regexp = "[A-Za-z0-9 \\u00E4\\u00EB\\u00EF\\u00F6\\u00FC\\-\\&\\,\\(\\)\\.]+", groups=Level2.class, message = "{eu.etaxonomy.cdm.model.name.NonViralName.allowedCharactersForAuthority.message}") |
|
210 | 218 |
private String authorshipCache; |
211 | 219 |
|
212 | 220 |
@XmlElement(name = "ProtectedAuthorshipCache") |
Also available in: Unified diff
merge cate-development2 branch with trunk