Project

General

Profile

Revision a4433228

IDa4433228e652585e15a80133170c9a440e578d09
Parent 4a908fc6
Child 90b7ce27

Added by Katja Luther almost 3 years ago

add attr. onlyPublishedTaxa to exportConfigurator and CdmLightExport

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java
208 208
            state.getResult().setState(ExportResultState.INCOMPLETE_WITH_ERROR);
209 209
        }else{
210 210
            Taxon taxon = taxonNode.getTaxon();
211
            if (state.getConfig().isOnlyPublishedTaxa() && !taxon.isPublish()){
212
                return;
213
            }
214

  
211 215
             try{
212 216
                TaxonName name = taxon.getName();
213 217
                handleName(state, name);
......
681 685
     */
682 686
    private void handleSynonym(CdmLightExportState state, Synonym syn) {
683 687
       try {
684

  
688
           if (!syn.isPublish() && state.getConfig().isOnlyPublishedTaxa()){
689
               return;
690
           }
685 691
           TaxonName name = syn.getName();
686 692
           handleName(state, name);
687 693

  
......
698 704
           }else {
699 705
        	   csvLine[table.getIndex(CdmLightExportTable.IS_PRO_PARTE)] = "0";
700 706
           }
701
  
707

  
702 708
           state.getProcessor().put(table, syn, csvLine);
703 709
        } catch (Exception e) {
704 710
            state.getResult().addException(e, "An unexpected error occurred when handling synonym " +
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ExportConfiguratorBase.java
35 35
	private ICdmDataSource source;
36 36
	private DEST destination;
37 37
	protected IDatabase sourceReference;
38
	protected Class<ICdmIO>[] ioClassList;
38
	protected boolean onlyPublishedTaxa;
39

  
40
    protected Class<ICdmIO>[] ioClassList;
39 41

  
40 42
	 private TaxonNodeFilter taxonNodeFilter = new TaxonNodeFilter();
41 43

  
......
138 140
	    this.target = target;
139 141
	}
140 142

  
143

  
144
    public boolean isOnlyPublishedTaxa() {
145
        return onlyPublishedTaxa;
146
    }
147

  
148

  
149
    public void setOnlyPublishedTaxa(boolean onlyPublishedTaxa) {
150
        this.onlyPublishedTaxa = onlyPublishedTaxa;
151
    }
152

  
141 153
	/**
142 154
	 * Returns a new instance of <code>CdmApplicationController</code> created by the values of this configuration.
143 155
	 * @return

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)