public class EdaplosDocumentParser extends Object
| Constructor and Description |
|---|
EdaplosDocumentParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSpeciesToCroppingPlanEntry(List<org.dom4j.Element> speciesXmlList,
EdaplosPlotDto ePlotDto,
CroppingPlanEntryDto eEntry,
String eIssuerId)
Construct the croppingPlanSpeciesDto list and add it to the CroppingPlanEntry
eSoilOccupation and eEntry are modified
|
protected EffectiveCropCycleConnectionDto |
createConnectionDto(String issuerID,
String sourceId,
String targetId,
String croppingPlanEntryId) |
protected EffectiveCropCycleNodeDto |
createNodeDto(String soilOccupationIssuerId,
String croppingPlanEntryTopiaId,
int rank) |
protected TypeCulture |
getCycleTypeFromSpecies(CroppingPlanSpeciesDto eSpecies)
Return cycle type (perennial or seasonal (annuel, biannuel)) from one species
|
protected void |
getRightCroppingPlanEntry(CroppingPlanEntryDto entryDto,
List<CroppingPlanEntryDto> entryDtoList)
Get the croppingPlanEntry from domain if already existing (matching made with botanical code species, suplementary botanical code species, sowing period code and croppingPlanEntry type)
|
protected boolean |
isPlotExisting(EdaplosPlotDto plot) |
EdaplosParsingResult |
parse(org.dom4j.Document document) |
protected EdaplosParsingResult |
processEdaplosFileParsing(org.dom4j.Document document)
Process document
|
protected void |
processPlotImport(EdaplosDomainDto edaplosDomainDto,
List<org.dom4j.Element> plotList,
Domain domain,
Integer campaign)
Analyse les parcelles
Required fields for plot are:
- name
- waterFlowDistance
- bufferStrip
- maxSlope
- domain
a zone is required to set plot in
|
protected void |
processPlotSoilOccupation(EdaplosPlotDto edaplosPlotDto,
List<org.dom4j.Element> soilOccupationList,
Zone zone,
EdaplosDomainDto eDomainDto)
Analyse des occupations du sol
L'équivalent de l'occupation du sol dans Agrosyst est :
* * pour les espèces assolées : effectivecropcyclenode pour les cultures principales et effectivecropcycleconnection pour les intermédiaires
* * pour les espèces pérennes : effectiveperennialcropcycle
|
void |
setAuthorizationService(BusinessAuthorizationService authorizationService) |
void |
setDomainService(DomainService domainService) |
void |
setDomainTopiaDao(DomainTopiaDao domainTopiaDao) |
void |
setEffectiveCropCycleConnectionTopiaDao(EffectiveCropCycleConnectionTopiaDao effectiveCropCycleConnectionTopiaDao) |
void |
setEffectiveCropCycleNodeTopiaDao(EffectiveCropCycleNodeTopiaDao effectiveCropCycleNodeTopiaDao) |
void |
setEffectiveCropCycleService(EffectiveCropCycleService effectiveCropCycleService) |
void |
setEffectivePerennialCropCycleTopiaDao(EffectivePerennialCropCycleTopiaDao effectivePerennialCropCycleTopiaDao) |
void |
setEffectiveSeasonalCropCycleTopiaDao(EffectiveSeasonalCropCycleTopiaDao effectiveSeasonalCropCycleTopiaDao) |
void |
setLocationTopiaDao(RefLocationTopiaDao locationTopiaDao) |
void |
setPlotTopiaDao(PlotTopiaDao plotTopiaDao) |
void |
setRefCultureEdiGroupeCouvSolTopiaDao(RefCultureEdiGroupeCouvSolTopiaDao refCultureEdiGroupeCouvSolTopiaDao) |
void |
setRefEspeceTopiaDao(RefEspeceTopiaDao refEspeceTopiaDao) |
void |
setRefVarieteGevesTopiaDao(RefVarieteGevesTopiaDao refVarieteGevesTopiaDao) |
void |
setRefVarietePlantGrapeTopiaDao(RefVarietePlantGrapeTopiaDao refVarietePlantGrapeTopiaDao) |
void |
setZoneTopiaDao(ZoneTopiaDao zoneTopiaDao) |
protected static String ERROR_SIRET
protected static String ERROR_INVALID_CAMPAIGN
protected static String ERROR_INVALID_CAMPAIGN_FOR_PLOT
protected static String ERROR_INVALID_IDENTIFIER_FOR_PLOT
protected static String ERROR_NO_CAMPAIGN_FOR_DOMAIN
protected static String DOMAIN_CREATE
protected static String DOMAIN_FORBIDDEN
protected static String DOMAIN_UPDATE
protected static final String PLOT_NO_CAMPAIGN_DEFINED
protected static final String PLOT_OUT_OF_RANGE_CAMPAIGN
protected static final String PLOT_UNKNOWN
protected static final String PLOT_UNKNOWN_ISSUER
protected static final String PLOT_NO_INDENTIFICATION
protected static final String PLOT_INCORRECT_AREA_TYPE
protected static final String TO_MANY_PLOTS_FOUND
protected static final String PLOT_CREATED
protected static final String ERROR_SOIL_OCCUPATION_NO_ISSUERID
protected static final String ERROR_SOIL_OCCUPATION_NO_TYPE
protected static final String ERROR_SOIL_OCCUPATION_WRONG_TYPE
protected static final String ERROR_SOIL_OCCUPATION_WRONG_RANK_FORMAT
protected static final String ERROR_SOIL_OCCUPATION_RANK_BELOW_ZERO
protected static final String ERROR_SOIL_OCCUPATION_RANK_MUST_BE_ZERO
protected static final String ERROR_SOIL_OCCUPATION_NO_SPECIES
protected static final String ERROR_SOIL_OCCUPATION_CONNECTION_WITHOUT_NODE
protected static final String ERROR_SOIL_OCCUPATION_NO_NODE
protected static final String ERROR_SOIL_OCCUPATION_NO_TARGET
protected static final String ERROR_SOIL_OCCUPATION_NO_SOURCE
protected static final String ERROR_SOIL_OCCUPATION_WRONG_CROPPING_TYPE
protected static final String ERROR_SOIL_OCCUPATION_TOO_MANY_PROD_CYCLE
protected static final String ERROR_SPECIES_BOTANICALCODE_MISSING
protected static final String ERROR_NO_EXISTING_SPECIES
protected static final String ERROR_NO_PLANT_COVER
protected static final String ERROR_NO_VALID_SPECIES
protected static final String ERROR_GEVESCODE_NOT_A_NUMBER
protected static final String ERROR_GEVESCODE_MISSING
protected static final String ERROR_VARIETY_NAME_MISSING
protected static final String ERROR_VARIETY_MISSING
protected static final String ERROR_MORE_THAN_ONE_VARIETY
protected static final String ERROR_INTERVENTION_NO_GUID
protected static final String ERROR_INTERVENTION_NO_EDI_TYPE
protected static final String ERROR_INTERVENTION_NO_SUBORDINATE_TYPE
protected static final String ERROR_INTERVENTION_NOT_ONE_PERIOD
protected static final String ERROR_INTERVENTION_NO_STARTING_DATE
protected static final String ERROR_INTERVENTION_TO_MANY_REASONS
protected static String INFO_PLOT_EMPTY
protected static String INFO_NO_PLOT_SOIL_OCCUPATION
protected static final String VALID_TYPE_CODE
protected DomainTopiaDao domainTopiaDao
protected DomainService domainService
protected PlotTopiaDao plotTopiaDao
protected ZoneTopiaDao zoneTopiaDao
protected RefLocationTopiaDao locationTopiaDao
protected EffectiveCropCycleService effectiveCropCycleService
protected EffectiveSeasonalCropCycleTopiaDao effectiveSeasonalCropCycleTopiaDao
protected EffectiveCropCycleNodeTopiaDao effectiveCropCycleNodeTopiaDao
protected EffectiveCropCycleConnectionTopiaDao effectiveCropCycleConnectionTopiaDao
protected EffectivePerennialCropCycleTopiaDao effectivePerennialCropCycleTopiaDao
protected RefCultureEdiGroupeCouvSolTopiaDao refCultureEdiGroupeCouvSolTopiaDao
protected RefEspeceTopiaDao refEspeceTopiaDao
protected RefVarieteGevesTopiaDao refVarieteGevesTopiaDao
protected RefVarietePlantGrapeTopiaDao refVarietePlantGrapeTopiaDao
protected BusinessAuthorizationService authorizationService
protected EdaplosParsingResult edaplosParsingResult
public void setDomainTopiaDao(DomainTopiaDao domainTopiaDao)
public void setPlotTopiaDao(PlotTopiaDao plotTopiaDao)
public void setZoneTopiaDao(ZoneTopiaDao zoneTopiaDao)
public void setEffectiveSeasonalCropCycleTopiaDao(EffectiveSeasonalCropCycleTopiaDao effectiveSeasonalCropCycleTopiaDao)
public void setLocationTopiaDao(RefLocationTopiaDao locationTopiaDao)
public void setEffectiveCropCycleService(EffectiveCropCycleService effectiveCropCycleService)
public void setEffectiveCropCycleNodeTopiaDao(EffectiveCropCycleNodeTopiaDao effectiveCropCycleNodeTopiaDao)
public void setEffectiveCropCycleConnectionTopiaDao(EffectiveCropCycleConnectionTopiaDao effectiveCropCycleConnectionTopiaDao)
public void setEffectivePerennialCropCycleTopiaDao(EffectivePerennialCropCycleTopiaDao effectivePerennialCropCycleTopiaDao)
public void setRefCultureEdiGroupeCouvSolTopiaDao(RefCultureEdiGroupeCouvSolTopiaDao refCultureEdiGroupeCouvSolTopiaDao)
public void setRefEspeceTopiaDao(RefEspeceTopiaDao refEspeceTopiaDao)
public void setRefVarieteGevesTopiaDao(RefVarieteGevesTopiaDao refVarieteGevesTopiaDao)
public void setRefVarietePlantGrapeTopiaDao(RefVarietePlantGrapeTopiaDao refVarietePlantGrapeTopiaDao)
public void setAuthorizationService(BusinessAuthorizationService authorizationService)
public void setDomainService(DomainService domainService)
public EdaplosParsingResult parse(org.dom4j.Document document)
protected EdaplosParsingResult processEdaplosFileParsing(org.dom4j.Document document)
protected void processPlotImport(EdaplosDomainDto edaplosDomainDto, List<org.dom4j.Element> plotList, Domain domain, Integer campaign)
protected void processPlotSoilOccupation(EdaplosPlotDto edaplosPlotDto, List<org.dom4j.Element> soilOccupationList, Zone zone, EdaplosDomainDto eDomainDto)
protected void getRightCroppingPlanEntry(CroppingPlanEntryDto entryDto, List<CroppingPlanEntryDto> entryDtoList)
entryDto - : croppingPlanEntry we try to importentryDtoList - : list of domain's croppingPlanEntriesprotected void addSpeciesToCroppingPlanEntry(List<org.dom4j.Element> speciesXmlList, EdaplosPlotDto ePlotDto, CroppingPlanEntryDto eEntry, String eIssuerId)
protected TypeCulture getCycleTypeFromSpecies(CroppingPlanSpeciesDto eSpecies)
protected boolean isPlotExisting(EdaplosPlotDto plot)
protected EffectiveCropCycleNodeDto createNodeDto(String soilOccupationIssuerId, String croppingPlanEntryTopiaId, int rank)
protected EffectiveCropCycleConnectionDto createConnectionDto(String issuerID, String sourceId, String targetId, String croppingPlanEntryId)
Copyright © 2013–2015 Inra. All rights reserved.