From: Ali A. K. <aka...@us...> - 2006-12-17 22:40:51
|
Update of /cvsroot/gbif/portal-webservices/src/main/java/org/gbif/portal/ws/util In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24567/src/main/java/org/gbif/portal/ws/util Modified Files: GbifMappingFactoryImpl.java Log Message: Developed integrated testing for TaxonomyAction and implemented some functionality for getting root taxon concepts. Passed 3 unit / integration tests Index: GbifMappingFactoryImpl.java =================================================================== RCS file: /cvsroot/gbif/portal-webservices/src/main/java/org/gbif/portal/ws/util/GbifMappingFactoryImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GbifMappingFactoryImpl.java 17 Dec 2006 15:48:12 -0000 1.1 --- GbifMappingFactoryImpl.java 17 Dec 2006 22:40:46 -0000 1.2 *************** *** 30,34 **** --- 30,37 ---- import org.gbif.portal.ws.response.occurrence.BriefOccurrenceRecordsDocument; import org.gbif.portal.ws.response.occurrence.OccurrenceRecordDocument; + import org.gbif.portal.ws.response.taxonomy.BriefTaxonConcept; + import org.gbif.portal.ws.response.taxonomy.BriefTaxonConcepts; import org.gbif.portal.ws.response.taxonomy.BriefTaxonConceptsDocument; + import org.gbif.portal.ws.response.taxonomy.BriefTaxonConceptsList; import org.gbif.portal.ws.wfs.response.occurrence.OccurrenceRecordType; import org.tdwg.schemas.tcs.x1.DataSetDocument; *************** *** 112,117 **** public BriefTaxonConceptsDocument fromBriefTaxonConceptListDTOToBriefTaxonConceptsDocument( List<BriefTaxonConceptDTO> list) { ! // TODO Auto-generated method stub ! return null; } --- 115,131 ---- public BriefTaxonConceptsDocument fromBriefTaxonConceptListDTOToBriefTaxonConceptsDocument( List<BriefTaxonConceptDTO> list) { ! BriefTaxonConceptsDocument doc = BriefTaxonConceptsDocument.Factory.newInstance(); ! BriefTaxonConcepts records = doc.addNewBriefTaxonConcepts(); ! BriefTaxonConceptsList recList = records.addNewBriefTaxonConceptsList(); ! for (BriefTaxonConceptDTO dto : list) { ! BriefTaxonConcept record = recList.addNewBriefTaxonConcept(); ! record.setKey(dto.getKey()); ! record.setScientificName(dto.getScientificName()); ! record.setRank(dto.getRank()); ! record.setParentConceptKey(dto.getParentConceptKey()); ! } ! // This is always false in the new model, may need review as change of respecive XSD ! records.setHasMore(false); ! return doc; } *************** *** 162,165 **** --- 176,182 ---- OccurrenceRecordType occRec = fromBriefOccurrenceRecordDTO(dto); + featureMember.setRemoteSchema(WFSAction.HOST_URL + + "?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=" + + WFSAction.FEATURE_TYPE); featureMember.setFeature(occRec); return doc; |