Project

General

Profile

Revision 68eaf974

ID68eaf974a31ac74fc7595cf6d14cb5b1312b1558
Parent 8e364e53
Child b3523463

Added by Katja Luther over 1 year ago

ref #8175: name facts in a separate table

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java
395 395
    private void handleSimpleFacts(CdmLightExportState state, CdmBase cdmBase,
396 396
            List<DescriptionElementBase> simpleFacts) {
397 397
        try {
398
            CdmLightExportTable table = CdmLightExportTable.SIMPLE_FACT;
398
            CdmLightExportTable table;
399
            if (cdmBase instanceof TaxonName){
400
                table = CdmLightExportTable.NAME_FACT;
401
            }else{
402
                table = CdmLightExportTable.SIMPLE_FACT;
403
            }
399 404
            CdmLightExportTable tableMedia = CdmLightExportTable.MEDIA;
400 405
            for (DescriptionElementBase element: simpleFacts){
401 406
                if (element.getModifyingText().isEmpty() && !element.getMedia().isEmpty()){
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightExportTable.java
32 32
    COMMON_NAME_FACT("CommonNameFact", commonNameFactsColumns()),
33 33
    FACT_SOURCES("FactSources", factSourcesColumns()),
34 34
    IDENTIFIER("Identifier", identifierColumns()),
35
    MEDIA("Media", mediaColumns())
35
    MEDIA("Media", mediaColumns()),
36
    NAME_FACT("NameFact", nameFactColumns())
36 37
    ;
37 38

  
38 39
    //Taxon/Synonym
......
214 215

  
215 216

  
216 217

  
217
    /**
218
     * @return
219
     */
220
    private static String[] identifierColumns() {
218

  
219
    final static String[] nameFactColumns() {
220
        return new String[]{FACT_ID, NAME_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
221
    }
222

  
223

  
224
    final static String[] identifierColumns() {
221 225

  
222 226
        return new String[]{ NAME_FK, IDENTIFIER_IDS, IDENTIFIER_TYPE};
223 227
    }
224
    /**
225
     * @return
226
     */
227
    private static String[] mediaColumns() {
228

  
229
    final static String[] mediaColumns() {
228 230
        return new String[]{ FACT_ID, TAXON_FK, NAME_FK, MEDIA_URI};
229 231
    }
230 232

  
......
246 248

  
247 249
    }
248 250
    final static String[] simpleFactsColumns() {
249
        return new String[]{FACT_ID, TAXON_FK, NAME_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
251
        return new String[]{FACT_ID, TAXON_FK, FACT_TEXT, LANGUAGE, MEDIA_URI, FACT_CATEGORY};
250 252

  
251 253
    }
252 254
   final static String[] nomenclaturalAuthorColumns() {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)