Project

General

Profile

« Previous | Next » 

Revision 9dc896c9

Added by Andreas Müller almost 7 years ago

fix #6368 rename table and class TaxonNameBase

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/dto/NameCatalogueController.java
52 52
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
53 53
import eu.etaxonomy.cdm.model.common.Language;
54 54
import eu.etaxonomy.cdm.model.name.INonViralName;
55
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
55
import eu.etaxonomy.cdm.model.name.TaxonName;
56 56
import eu.etaxonomy.cdm.model.reference.Reference;
57 57
import eu.etaxonomy.cdm.model.taxon.Classification;
58 58
import eu.etaxonomy.cdm.model.taxon.Synonym;
......
86 86
@Controller
87 87
@Api("name_catalogue")
88 88
@RequestMapping(value = { "/name_catalogue" })
89
public class NameCatalogueController extends AbstractController<TaxonNameBase, INameService> implements ResourceLoaderAware {
89
public class NameCatalogueController extends AbstractController<TaxonName, INameService> implements ResourceLoaderAware {
90 90

  
91 91
    private ResourceLoader resourceLoader;
92 92

  
......
296 296
     * @param request Http servlet request.
297 297
     * @param response Http servlet response.
298 298
     * @return a list of {@link NameSearch} objects each corresponding to a
299
     *         single query. These are built from {@link TaxonNameBase}
299
     *         single query. These are built from {@link TaxonName}
300 300
     *         entities which are in turn initialized using
301 301
     *         the {@link #NAME_SEARCH_INIT_STRATEGY}
302 302
     * @throws IOException
......
330 330
     * @param request Http servlet request.
331 331
     * @param response Http servlet response.
332 332
     * @return a List of {@link NameSearch} objects each corresponding to a
333
     *         single query. These are built from {@link TaxonNameBase} entities
333
     *         single query. These are built from {@link TaxonName} entities
334 334
     *         which are in turn initialized using the {@link #NAME_SEARCH_INIT_STRATEGY}
335 335
     * @throws IOException
336 336
     */
......
493 493
     * @param request Http servlet request.
494 494
     * @param response Http servlet response.
495 495
     * @return a List of {@link NameSearch} objects each corresponding to a
496
     *         single query. These are built from {@link TaxonNameBase} entities
496
     *         single query. These are built from {@link TaxonName} entities
497 497
     *         which are in turn initialized using the {@link #NAME_SEARCH_INIT_STRATEGY}
498 498
     * @throws IOException
499 499
     */
......
663 663
     * @param request Http servlet request.
664 664
     * @param response Http servlet response.
665 665
     * @return a List of {@link NameInformation} objects each corresponding to a
666
     *         single name uuid. These are built from {@link TaxonNameBase} entities
666
     *         single name uuid. These are built from {@link TaxonName} entities
667 667
     *         which are in turn initialized using the {@link #NAME_INFORMATION_INIT_STRATEGY}
668 668
     * @throws IOException
669 669
     */
......
677 677
            logger.info("doGetNameInformation()" + request.getRequestURI() + " for name uuid \""
678 678
                    + nameUuid + "\"");
679 679
            // find name by uuid
680
            TaxonNameBase<?,?> nvn = service.load(UUID.fromString(nameUuid),NAME_INFORMATION_INIT_STRATEGY);
680
            TaxonName nvn = service.load(UUID.fromString(nameUuid),NAME_INFORMATION_INIT_STRATEGY);
681 681

  
682 682
            // if search is successful then get related information, else return error
683 683
            if (nvn != null) {
......
860 860
                    for (Synonym syn : syns) {
861 861
                        String uuid = syn.getUuid().toString();
862 862
                        String title = syn.getTitleCache();
863
                        TaxonNameBase<?,?> synnvn = syn.getName();
863
                        TaxonName synnvn = syn.getName();
864 864
                        String name = synnvn.getTitleCache();
865 865
                        String rank = (synnvn.getRank() == null)? "" : synnvn.getRank().getTitleCache();
866 866
                        String status = SYNONYM_STATUS;
......
897 897
                    Set<TaxonRelationship> trFromSet = taxon.getRelationsFromThisTaxon();
898 898
                    for (TaxonRelationship tr : trFromSet) {
899 899
                        String titleTo = tr.getToTaxon().getTitleCache();
900
                        TaxonNameBase tonvn = tr.getToTaxon().getName();
900
                        TaxonName tonvn = tr.getToTaxon().getName();
901 901
                        String name = tonvn.getTitleCache();
902 902
                        String rank = tonvn.getRank().getTitleCache();
903 903
                        String uuid = tr.getToTaxon().getUuid().toString();
......
934 934
                    Set<TaxonRelationship> trToSet = taxon.getRelationsToThisTaxon();
935 935
                    for (TaxonRelationship tr : trToSet) {
936 936
                        String titleFrom = tr.getFromTaxon().getTitleCache();
937
                        TaxonNameBase fromnvn = tr.getFromTaxon().getName();
937
                        TaxonName fromnvn = tr.getFromTaxon().getName();
938 938
                        String name = fromnvn.getTitleCache();
939 939
                        String rank = fromnvn.getRank().getTitleCache();
940 940
                        String uuid = tr.getFromTaxon().getUuid().toString();
......
968 968
                    }
969 969
                } else if (tb instanceof Synonym) {
970 970
                    Synonym synonym = (Synonym) tb;
971
                    TaxonNameBase nvn = synonym.getName();
971
                    TaxonName nvn = synonym.getName();
972 972
                 // update taxon information object with synonym related data
973 973
                    DateTime dt = synonym.getUpdated();
974 974
                    String modified = fmt.print(dt);
......
997 997
                        String title = accTaxon.getTitleCache();
998 998
                        logger.info("taxon title cache : " + accTaxon.getTitleCache());
999 999

  
1000
                        TaxonNameBase<?,?> accnvn = accTaxon.getName();
1000
                        TaxonName accnvn = accTaxon.getName();
1001 1001
                        String name = accnvn.getTitleCache();
1002 1002
                        String rank = accnvn.getRank().getTitleCache();
1003 1003
                        String status = ACCEPTED_NAME_STATUS;
......
1090 1090
     * @param request Http servlet request.
1091 1091
     * @param response Http servlet response.
1092 1092
     * @return a List of {@link NameSearch} objects each corresponding to a
1093
     *         single query. These are built from {@link TaxonNameBase} entities
1093
     *         single query. These are built from {@link TaxonName} entities
1094 1094
     *         which are in turn initialized using the {@link #NAME_SEARCH_INIT_STRATEGY}
1095 1095
     * @throws IOException
1096 1096
     */
......
1120 1120
     * @param request Http servlet request.
1121 1121
     * @param response Http servlet response.
1122 1122
     * @return a List of {@link NameSearch} objects each corresponding to a
1123
     *         single query. These are built from {@link TaxonNameBase} entities
1123
     *         single query. These are built from {@link TaxonName} entities
1124 1124
     *         which are in turn initialized using the {@link #NAME_SEARCH_INIT_STRATEGY}
1125 1125
     * @throws IOException
1126 1126
     */
......
1147 1147
            //String queryWOWildcards = getQueryWithoutWildCards(query);
1148 1148
            //MatchMode mm = getMatchModeFromQuery(query);
1149 1149
            logger.info("doGetAcceptedNameSearch()" + request.getRequestURI() + " for query \"" + query);
1150
            List<TaxonNameBase> nameList = new ArrayList<>();
1150
            List<TaxonName> nameList = new ArrayList<>();
1151 1151

  
1152 1152
            // if "name" search then find by name cache
1153 1153
            if (searchType.equals(NAME_SEARCH)) {

Also available in: Unified diff