Revision e3b843e7
Added by Patricia Kelbert over 15 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/abcd206/AbcdIO.java | ||
---|---|---|
665 | 665 |
try{ |
666 | 666 |
names = config.getCdmAppController().getTaxonService().searchTaxaByName(scientificName, sec); |
667 | 667 |
taxon = (Taxon)names.get(0); |
668 |
}
|
|
668 |
} |
|
669 | 669 |
catch(Exception e){taxon=null;} |
670 | 670 |
} |
671 | 671 |
// taxonName = NonViralName.NewInstance(null); |
... | ... | |
699 | 699 |
taxonName = (ZoologicalName)nvnpi.parseFullName(scientificName,NomenclaturalCode.ICZN(),null); |
700 | 700 |
if (taxonName.hasProblem()) |
701 | 701 |
problem=true; |
702 |
}
|
|
702 |
} |
|
703 | 703 |
if (this.nomenclatureCode.toString().equals("Botanical")){ |
704 | 704 |
taxonName = (BotanicalName)nvnpi.parseFullName(scientificName,NomenclaturalCode.ICBN(),null); |
705 | 705 |
if (taxonName.hasProblem()) |
... | ... | |
715 | 715 |
problem=true;; |
716 | 716 |
} |
717 | 717 |
// if (this.nomenclatureCode.toString().equals("Viral")){ |
718 |
// ViralName taxonName = (ViralName)nvnpi.parseFullName(scientificName,NomenclaturalCode.ICVCN(), null);
|
|
719 |
// if (taxonName.hasProblem())
|
|
720 |
// System.out.println("pb ICVCN");
|
|
718 |
// ViralName taxonName = (ViralName)nvnpi.parseFullName(scientificName,NomenclaturalCode.ICVCN(), null); |
|
719 |
// if (taxonName.hasProblem()) |
|
720 |
// System.out.println("pb ICVCN"); |
|
721 | 721 |
// } |
722 | 722 |
//TODO: parsing of ViralNames? |
723 | 723 |
if(problem){ |
... | ... | |
725 | 725 |
taxonName.setTitleCache(scientificName); |
726 | 726 |
} |
727 | 727 |
return taxonName; |
728 |
|
|
728 |
|
|
729 | 729 |
} |
730 | 730 |
|
731 | 731 |
@SuppressWarnings("unchecked") |
... | ... | |
830 | 830 |
else return taxonName; |
831 | 831 |
} |
832 | 832 |
// if (this.nomenclatureCode.equals("Viral")){ |
833 |
// ViralName taxonName = ViralName.NewInstance(null);
|
|
834 |
// taxonName.setFullTitleCache(fullName, true);
|
|
835 |
// taxonName.setAcronym(getFromMap(atomisedMap,"Acronym"));
|
|
836 |
// if (taxonName.hasProblem())
|
|
837 |
// System.out.println("pb ICVCN");
|
|
838 |
// else return taxonName;
|
|
833 |
// ViralName taxonName = ViralName.NewInstance(null); |
|
834 |
// taxonName.setFullTitleCache(fullName, true); |
|
835 |
// taxonName.setAcronym(getFromMap(atomisedMap,"Acronym")); |
|
836 |
// if (taxonName.hasProblem()) |
|
837 |
// System.out.println("pb ICVCN"); |
|
838 |
// else return taxonName; |
|
839 | 839 |
// } |
840 | 840 |
//TODO ViralName |
841 | 841 |
NonViralName<?>taxonName = NonViralName.NewInstance(null); |
... | ... | |
881 | 881 |
try { |
882 | 882 |
// ReferenceBase sec = Database.NewInstance(); |
883 | 883 |
// sec.setTitleCache("XML DATA"); |
884 |
ReferenceBase sec = config.getSourceReference();
|
|
884 |
ReferenceBase sec = config.getTaxonReference();
|
|
885 | 885 |
|
886 | 886 |
/** |
887 | 887 |
* SPECIMEN OR OBSERVATION OR LIVING |
... | ... | |
967 | 967 |
imd = new ImageMetaData(); |
968 | 968 |
url = new URL(this.multimediaObjects.get(i)); |
969 | 969 |
imd = mmd.readImageMetaData(url, imd); |
970 |
representation = MediaRepresentation.NewInstance(); |
|
971 |
imf = ImageFile.NewInstance(this.multimediaObjects.get(i), null, imd); |
|
972 |
representation.addRepresentationPart(imf); |
|
973 |
media = Media.NewInstance(); |
|
974 |
media.addRepresentation(representation); |
|
975 |
fieldObservation.addMedia(media); |
|
970 |
if (imd != null){ |
|
971 |
System.out.println("image not null"); |
|
972 |
representation = MediaRepresentation.NewInstance(); |
|
973 |
imf = ImageFile.NewInstance(this.multimediaObjects.get(i), null, imd); |
|
974 |
representation.addRepresentationPart(imf); |
|
975 |
media = Media.NewInstance(); |
|
976 |
media.addRepresentation(representation); |
|
977 |
fieldObservation.addMedia(media); |
|
978 |
} |
|
976 | 979 |
} |
977 | 980 |
} |
978 | 981 |
} |
Also available in: Unified diff
ABCD import & SYNTHESYS