Project

General

Profile

« Previous | Next » 

Revision 181447cd

Added by Katja Luther over 1 year ago

ref #5655, #10083: fix cdmLight namerelationship handling

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java
1514 1514
            if (!state.getNameStore().containsKey(name2.getId())) {
1515 1515
                handleName(state, name2, null);
1516 1516
            }
1517

  
1517
            csvLine = new String[table.getSize()];
1518 1518
            csvLine[table.getIndex(CdmLightExportTable.NAME_REL_TYPE)] = type.getLabel();
1519 1519
            csvLine[table.getIndex(CdmLightExportTable.NAME1_FK)] = getId(state, name);
1520 1520
            csvLine[table.getIndex(CdmLightExportTable.NAME2_FK)] = getId(state, name2);
1521
            state.getProcessor().put(table, name, csvLine);
1521
            state.getProcessor().put(table, rel.getUuid().toString(), csvLine);
1522 1522
        }
1523 1523

  
1524 1524
        rels = name.getRelationsToThisName();
......
1929 1929
                            otherRelationships.add(rel);
1930 1930
                        }
1931 1931
                    }
1932
                    if (state.getConfig().isShowInverseNameRelationsInHomotypicGroup()) {
1933
			if (rel.getToName().equals(name)){
1934
                            // alle Homonyme und inverse blocking names
1935
//                               if (rel.getType().equals(NameRelationshipType.LATER_HOMONYM())
1936
//                                       || rel.getType().equals(NameRelationshipType.TREATED_AS_LATER_HOMONYM())
1937
//                                       || (rel.getType().equals(NameRelationshipType.BLOCKING_NAME_FOR()))
1938
//                                       || (rel.getType().equals(NameRelationshipType.UNSPECIFIC_NON()))
1939
//                                       || (rel.getType().equals(NameRelationshipType.AVOIDS_HOMONYM_OF()))
1940
//                                       ){
1941
//                                   nonNames.add(rel);
1942
//                               }else if (!rel.getType().isBasionymRelation()){
1943
                                   otherRelationships.add(rel);
1944
//                               }
1945
                           }
1946
                    }
1932 1947
                }
1933 1948

  
1934 1949
                String nonRelNames = "";
......
1976 1991
                            relNames += label + relatedName.getTitleCache();
1977 1992
                        }
1978 1993
                    }
1979
//                    else {
1980
//                        label = rel.getType().getInverseLabel() + " ";
1981
//                        relatedName = rel.getFromName();
1982
//                    }
1994
                    else {
1995
                        label = rel.getType().getInverseLabel() + " ";
1996
                        relatedName = rel.getFromName();
1997
                        if (state.getConfig().isAddHTML()){
1998
                            relNames += label + createNameWithItalics(relatedName.getTaggedName())+ " ";
1999
                        }else{
2000
                            relNames += label + relatedName.getTitleCache();
2001
                        }
2002
                    }
1983 2003
                }
1984 2004
                relNames.trim();
1985 2005
                if (otherRelationships.size() > 0){

Also available in: Unified diff