Project

General

Profile

Revision 005dd7a3

ID005dd7a38b19d59f86d04691abdad4cd00951283
Parent 5d2a4b43
Child eed70a73

Added by Andreas Müller about 2 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/berlinModel/BerlinModelTransformer.java
29 29
import eu.etaxonomy.cdm.model.name.Rank;
30 30
import eu.etaxonomy.cdm.model.name.RankClass;
31 31
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus;
32
import eu.etaxonomy.cdm.model.reference.ISection;
33 32
import eu.etaxonomy.cdm.model.reference.Reference;
34 33
import eu.etaxonomy.cdm.model.reference.ReferenceType;
35 34
import eu.etaxonomy.cdm.model.taxon.Synonym;
......
821 820
        }else if (key.equalsIgnoreCase("2000-Habitat en El Salvador*")){ return uuidFeatureHabitatSalvador;
822 821

  
823 822

  
824

  
825

  
826

  
827

  
828

  
829 823
		}else{
830 824
			return null;
831 825
		}
......
1041 1035
		if (ref == null){
1042 1036
			return null;
1043 1037
		}
1044
		else if (ref.getType().equals(ReferenceType.Article)){		return REF_ARTICLE;}
1045
		else if (ref instanceof ISection){	return REF_PART_OF_OTHER_TITLE;}
1046
		else if (ref.getType().equals(ReferenceType.Book)){	return REF_BOOK;}
1047
		else if (ref.getType().equals(ReferenceType.Database)){	return REF_DATABASE;}
1048
//		else if (ref instanceof SectionBas){	return REF_INFORMAL;}
1049
//		else if (ref instanceof SectionBas){	return REF_NOT_APPLICABLE;}
1038
		else if (ref.getType().equals(ReferenceType.Article)){ return REF_ARTICLE;}
1039
		else if (ref.getType().equals(ReferenceType.Section)){ return REF_PART_OF_OTHER_TITLE;}
1040
		else if (ref.getType().equals(ReferenceType.Book)){	   return REF_BOOK;}
1041
		else if (ref.getType().equals(ReferenceType.Database)){return REF_DATABASE;}
1050 1042
		else if (ref.getType().equals(ReferenceType.WebPage)){	return REF_WEBSITE;}
1051 1043
		else if (ref.getType().equals(ReferenceType.CdDvd)){	return REF_CD;}
1052 1044
		else if (ref.getType().equals(ReferenceType.Journal)){	return REF_JOURNAL;}
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java
544 544
                            }else{
545 545
                                //field units are not supported
546 546
                                state.getResult().addError("The associated Specimen of taxon " + taxon.getUuid() + " is not an DerivedUnit. Could not be exported.");
547

  
548 547
                            }
549 548
                        }
550 549
                    }
......
1511 1510
                nomAuthorString += " " +split;
1512 1511
            }
1513 1512
        }
1514
        if (StringUtils.isBlank(nomAuthorString.trim())){
1513
        if (isBlank(nomAuthorString.trim())){
1515 1514
            if (teamMember.getTitleCache() != null) {
1516 1515
                String titleCacheString = teamMember.getTitleCache().replaceAll("\\.", "\\. ");
1517 1516
                splittedAuthorString = titleCacheString.split("\\s");
1517
            }else{
1518
                splittedAuthorString = new String[0];
1518 1519
            }
1519 1520

  
1520

  
1521 1521
            int index = 0;
1522 1522
            for (String split: splittedAuthorString){
1523 1523
                if ( index < splittedAuthorString.length-1 && (split.length()==1 || split.endsWith("."))){
......
1772 1772
    }
1773 1773

  
1774 1774
    /**
1775
     * @param state
1776
     * @param gathering
1777
     */
1778
    private void addCollectingAreas(CdmLightExportState state, GatheringEvent gathering) {
1779
        // TODO implement !!!
1780

  
1781
        if (!gathering.getCollectingAreas().isEmpty()){
1782
            state.getResult().addWarning("Collecting areas not yet implemented but gathering " +
1783
                    cdmBaseStr(gathering) + " has collecting areas.");
1784
        }
1785

  
1786
    }
1787

  
1788
    /**
1789 1775
     * @param gathering
1790 1776
     * @return
1791 1777
     */
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/tcsrdf/TcsRdfTaxonNameImport.java
190 190

  
191 191
			TaxonName nameBase = nomCode.getNewTaxonNameInstance(rank);
192 192

  
193
			Set<String> omitAttributes = null;
193
			//Set<String> omitAttributes = null;
194 194
			//makeStandardMapper(nameAbout, nameBase, omitAttributes, standardMappers);
195 195

  
196 196
			prop = nameAbout.getModel().getProperty(config.getTnNamespaceURIString()+"nameComplete");
......
204 204
				nomRef.setTitleCache(strPublishedIn, true);
205 205
				nameBase.setNomenclaturalReference(nomRef);
206 206
				try{
207
				prop =  nameAbout.getModel().getProperty(config.getTnNamespaceURIString()+"year");
208
				String strYear = nameAbout.getProperty(prop).getString();
209
				Integer year = null;
210
				if (strYear != null){
211
					try {
212
						year = Integer.valueOf(strYear);
213
						VerbatimTimePeriod timeP = VerbatimTimePeriod.NewVerbatimInstance(year);
214
						nomRef.setDatePublished(timeP);
215
					} catch (RuntimeException e) {
216
						logger.warn("year could not be parsed");
217
					}
218
				}
207
    				prop =  nameAbout.getModel().getProperty(config.getTnNamespaceURIString()+"year");
208
    				String strYear = nameAbout.getProperty(prop).getString();
209
    				Integer year = null;
210
    				if (strYear != null){
211
    					try {
212
    						year = Integer.valueOf(strYear);
213
    						VerbatimTimePeriod timeP = VerbatimTimePeriod.NewVerbatimInstance(year);
214
    						nomRef.setDatePublished(timeP);
215
    					} catch (RuntimeException e) {
216
    						logger.warn("year could not be parsed");
217
    					}
218
    				}
219 219
				}catch(NullPointerException e){
220 220
				}
221 221
				if (config.isPublishReferences()){
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/PresenceAbsenceTerm.java
572 572

  
573 573
	@Override
574 574
	protected void setDefaultTerms(TermVocabulary<PresenceAbsenceTerm> termVocabulary) {
575
		termMap = new HashMap<UUID, PresenceAbsenceTerm>();
575
		termMap = new HashMap<>();
576 576
		for (PresenceAbsenceTerm term : termVocabulary.getTerms()){
577 577
			termMap.put(term.getUuid(), term);
578 578
		}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)