\r
\r
@Override\r
- public Callable<?> resolve(final String id, final Class targetType) throws SAXException {\r
- return new Callable() {\r
+ public Callable<Object> resolve(final String id, final Class targetType) throws SAXException {\r
+ return new Callable<Object>() {\r
@Override\r
public Object call() throws Exception {\r
logger.info("Resolving " + id + " for class " + targetType);\r
*\r
*/\r
\r
- AgentBase agent = agentService.find(uuid);\r
+ AgentBase<?> agent = agentService.find(uuid);\r
if(agent != null) {\r
return agent;\r
}\r
- DefinedTermBase term = termService.find(uuid);\r
+ DefinedTermBase<?> term = termService.find(uuid);\r
if(term != null) {\r
return term;\r
}\r
}\r
\r
private Object resolveObject(UUID uuid, Class targetType, IService service) throws SAXException {\r
- Object object = service.find(uuid);\r
- if(object == null) {\r
- throw new SAXException(targetType.getSimpleName() + " with " + uuid + " not found");\r
- }\r
- return object;\r
+ Object object = service.find(uuid);\r
+ if(object == null) {\r
+ throw new SAXException(targetType.getSimpleName() + " with " + uuid + " not found");\r
+ }\r
+ return object;\r
}\r
}\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
-\r
package eu.etaxonomy.cdm.model.agent;\r
\r
/**\r
public interface INomenclaturalAuthor {\r
\r
/**\r
- * @see {@link TeamOrPersonBase#getNomenclaturalTitleCache()}\r
- *\r
+ * @see TeamOrPersonBase#getNomenclaturalTitleCache()\r
*/\r
public String getNomenclaturalTitleCache();\r
\r
-\r
/**\r
* @see {@link #getNomenclaturalTitleCache()}\r
* @deprecated to be replaced by {@link #getNomenclaturalTitleCache()}\r
*/\r
- @Deprecated\r
+ @Deprecated\r
public void setNomenclaturalTitle(String nomenclaturalTitle);\r
\r
/**\r
* fixes the missing setter method that corresponds to {@link #getNomenclaturalTitleCache()} see #9729\r
*\r
- * @see {@link TeamOrPersonBase#getNomenclaturalTitleCache()}\r
+ * @see TeamOrPersonBase#getNomenclaturalTitleCache()\r
*/\r
public void setNomenclaturalTitleCache(String nomenclaturalTitle);\r
\r
public String getNomenclaturalTitle() {
return nomenclaturalTitle;
}
+ /**
+ * Sets the nomenclatural title.
+ */
@Override
public void setNomenclaturalTitle(String nomenclaturalTitle) {
this.nomenclaturalTitle = isBlank(nomenclaturalTitle) ? null : nomenclaturalTitle;
/**
* Returns the initials of this person as used in bibliographic
- * references. Usually these are the first letters of each givenname
- * followed by "." per givenname. For East Asian names it may
+ * references. Usually these are the first letters of each given name
+ * followed by "." per given name. For East Asian names it may
* be the first 2 letters. Also dashes are kept.
* @return the initials
*/
* Removes one person from the list of members of <i>this</i> team.
*
* @param person the person who should be deleted from <i>this</i> team
- * @see #getTeamMembers()
+ * @see #getTeamMembers()
*/
public void removeTeamMember(Person person){
boolean wasMember = getTeamMembers().remove(person);
* Assigns a {@link TeamOrPersonBase#nomenclaturalTitle nomenclatural identification} string to <i>this</i> team
* and a protection flag status to this string.
*
- * @see {@link #getNomenclaturalTitleCache()}
+ * @see #getNomenclaturalTitleCache()
*/
public void setNomenclaturalTitleCache(String nomenclaturalTitleCache, boolean protectedNomenclaturalTitleCache) {
firePropertyChange("nomenclaturalTitleCache", this.nomenclaturalTitleCache, nomenclaturalTitleCache);
@Deprecated
@Override
public void setTitleCache(String titleCache){
- //TODO shouldn't we call setTitleCache(String, boolean),but is this conformant with Java Bean Specification?
+ //TODO shouldn't we call setTitleCache(String, boolean), but is this conformant with JavaBean specification?
this.titleCache = getTruncatedCache(titleCache);
}
*/\r
package eu.etaxonomy.cdm.strategy.cache.agent;\r
\r
-\r
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;\r
\r
public String getFamilyTitle(T agent);\r
\r
public String getCollectorTitleCache(T agent);\r
-\r
-\r
-\r
-}\r
+}
\ No newline at end of file
/**
* @author a.mueller
* @since 25.05.2016
- *
*/
public class TitleWithoutYearAndAuthorHelper {
private static final Logger logger = Logger.getLogger(TitleWithoutYearAndAuthorHelper.class);
}else{
return parsedTeam(authorString);
}
-
}
/**
import org.junit.Test;\r
\r
import eu.etaxonomy.cdm.common.UTF8;\r
-import eu.etaxonomy.cdm.model.agent.INomenclaturalAuthor;\r
import eu.etaxonomy.cdm.model.agent.Person;\r
import eu.etaxonomy.cdm.model.agent.Team;\r
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;\r
assertEquals("Abies", nameBasionymAuthor.getGenusOrUninomial());\r
assertEquals("alba", nameBasionymAuthor.getSpecificEpithet());\r
assertEquals("D'M\u00FCller", nameBasionymAuthor.getCombinationAuthorship().getNomenclaturalTitleCache());\r
- INomenclaturalAuthor basionymTeam = nameBasionymAuthor.getBasionymAuthorship();\r
+ TeamOrPersonBase<?> basionymTeam = nameBasionymAuthor.getBasionymAuthorship();\r
assertEquals("Ciardelli", basionymTeam.getNomenclaturalTitleCache());\r
\r
INonViralName nameBasionymExAuthor = parser.parseFullName(strNameAbiesBasionymExAuthor1Unicode, null, Rank.SPECIES());\r
assertEquals("alba", nameBasionymExAuthor.getSpecificEpithet());\r
assertEquals("D'M\u00FCller", nameBasionymExAuthor.getExCombinationAuthorship().getNomenclaturalTitleCache());\r
assertEquals("de Greuther", nameBasionymExAuthor.getCombinationAuthorship().getNomenclaturalTitleCache());\r
- INomenclaturalAuthor basionymTeam2 = nameBasionymExAuthor.getExBasionymAuthorship();\r
+ TeamOrPersonBase<?> basionymTeam2 = nameBasionymExAuthor.getExBasionymAuthorship();\r
assertEquals("Ciardelli", basionymTeam2.getNomenclaturalTitleCache());\r
- INomenclaturalAuthor exBasionymTeam2 = nameBasionymExAuthor.getBasionymAuthorship();\r
+ TeamOrPersonBase<?> exBasionymTeam2 = nameBasionymExAuthor.getBasionymAuthorship();\r
assertEquals("D\u00F6ring", exBasionymTeam2.getNomenclaturalTitleCache());\r
\r
IBotanicalName nameBasionymExAuthor2 = (IBotanicalName)parser.parseFullName("Washingtonia filifera (Linden ex Andre) H.Wendl. ex de Bary", null, Rank.SPECIES());\r
assertEquals("filifera", nameBasionymExAuthor2.getSpecificEpithet());\r
assertEquals("H.Wendl.", nameBasionymExAuthor2.getExCombinationAuthorship().getNomenclaturalTitleCache());\r
assertEquals("de Bary", nameBasionymExAuthor2.getCombinationAuthorship().getNomenclaturalTitleCache());\r
- INomenclaturalAuthor basionymTeam3 = nameBasionymExAuthor2.getBasionymAuthorship();\r
+ TeamOrPersonBase<?> basionymTeam3 = nameBasionymExAuthor2.getBasionymAuthorship();\r
assertEquals("Andre", basionymTeam3.getNomenclaturalTitleCache());\r
- INomenclaturalAuthor exBasionymTeam3 = nameBasionymExAuthor2.getExBasionymAuthorship();\r
+ TeamOrPersonBase<?> exBasionymTeam3 = nameBasionymExAuthor2.getExBasionymAuthorship();\r
assertEquals("Linden", exBasionymTeam3.getNomenclaturalTitleCache());\r
String title = nameBasionymExAuthor2.getTitleCache();\r
assertEquals("Washingtonia filifera (Linden ex Andre) H.Wendl. ex de Bary", title);\r