Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 9a6741ccf6d4 |
children | 37a0f4f7c54f |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Sun Apr 28 15:14:30 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java Sun Apr 28 15:23:01 2013 +0200 @@ -45,7 +45,7 @@ import org.dive4elements.artifacts.common.utils.FileTools; -import org.dive4elements.river.artifacts.FLYSArtifact; +import org.dive4elements.river.artifacts.D4EArtifact; import org.dive4elements.river.artifacts.access.RangeAccess; @@ -154,8 +154,8 @@ protected void copyShapeDir(Artifact orig, Artifact owner) { - File origDir = getDirectory((FLYSArtifact) orig); - File thisDir = getDirectory((FLYSArtifact) owner); + File origDir = getDirectory((D4EArtifact) orig); + File thisDir = getDirectory((D4EArtifact) owner); FileTools.copyDirectory(origDir, thisDir); } @@ -167,7 +167,7 @@ Object context, CallMeta callMeta ) { - FLYSArtifact flys = (FLYSArtifact) owner; + D4EArtifact flys = (D4EArtifact) owner; List<Facet> facets = flys.getFacets(); if (facets == null || facets.isEmpty()) { logger.warn("No facets for '" + OUTPUT_NAME + "' given!"); @@ -200,7 +200,7 @@ @Override public Object computeAdvance( - FLYSArtifact artifact, + D4EArtifact artifact, String hash, CallContext context, List<Facet> facets, @@ -274,7 +274,7 @@ * * @return the directory for WSPLEN data. */ - protected File getDirectory(FLYSArtifact artifact) { + protected File getDirectory(D4EArtifact artifact) { String shapePath = RiverUtils.getXPathString( RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); @@ -289,7 +289,7 @@ * Removes the directory and all its content where the required data and the * results of WSPLGEN are stored. Should be called in endOfLife(). */ - protected void removeDirectory(FLYSArtifact artifact) { + protected void removeDirectory(D4EArtifact artifact) { String shapePath = RiverUtils.getXPathString( RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR); @@ -312,7 +312,7 @@ public void endOfLife(Artifact artifact, Object callContext) { logger.info("FloodMapState.endOfLife: " + artifact.identifier()); - FLYSArtifact flys = (FLYSArtifact) artifact; + D4EArtifact flys = (D4EArtifact) artifact; Scheduler scheduler = Scheduler.getInstance(); scheduler.cancelJob(flys.identifier()); @@ -320,7 +320,7 @@ protected WSPLGENJob prepareWSPLGENJob( - FLYSArtifact artifact, + D4EArtifact artifact, FacetCreator facetCreator, File artifactDir, CallContext context, @@ -377,7 +377,7 @@ private void setAdditionalHWS( - FLYSArtifact artifact, + D4EArtifact artifact, FacetCreator facetCreator, File dir, WSPLGENJob job) { @@ -402,7 +402,7 @@ private void setOfficialHWS( - FLYSArtifact artifact, + D4EArtifact artifact, FacetCreator facetCreator, File artifactDir, WSPLGENJob job) { @@ -441,7 +441,7 @@ private void createMapfile( - FLYSArtifact artifact, + D4EArtifact artifact, File artifactDir, String name, String hwsShapefile, @@ -476,12 +476,12 @@ } - protected void setOut(FLYSArtifact artifact, WSPLGENJob job) { + protected void setOut(D4EArtifact artifact, WSPLGENJob job) { job.setOut(WSPLGEN_DEFAULT_OUTPUT); } - protected void setRange(FLYSArtifact artifact, WSPLGENJob job) { + protected void setRange(D4EArtifact artifact, WSPLGENJob job) { RangeAccess rangeAccess = new RangeAccess(artifact, null); double[] range = rangeAccess.getKmRange(); @@ -490,7 +490,7 @@ } - protected void setDelta(FLYSArtifact artifact, WSPLGENJob job) { + protected void setDelta(D4EArtifact artifact, WSPLGENJob job) { String from = artifact.getDataAsString("diff_from"); String to = artifact.getDataAsString("diff_to"); String diff = artifact.getDataAsString("diff_diff"); @@ -515,7 +515,7 @@ } - protected void setGel(FLYSArtifact artifact, WSPLGENJob job) { + protected void setGel(D4EArtifact artifact, WSPLGENJob job) { String gel = artifact.getDataAsString("scenario"); logger.debug("Selected gel = '" + gel + "'"); @@ -535,7 +535,7 @@ } - protected void setDist(FLYSArtifact artifact, WSPLGENJob job) { + protected void setDist(D4EArtifact artifact, WSPLGENJob job) { String dist = artifact.getDataAsString("profile_distance"); try { @@ -548,7 +548,7 @@ protected void setLine( - FLYSArtifact artifact, + D4EArtifact artifact, FacetCreator facetCreator, File dir, WSPLGENJob job @@ -643,7 +643,7 @@ protected void setUserShape( - FLYSArtifact artifact, + D4EArtifact artifact, FacetCreator facetCreator, File dir, WSPLGENJob job @@ -764,7 +764,7 @@ } - protected void setAxis(FLYSArtifact artifact, File dir, WSPLGENJob job) { + protected void setAxis(D4EArtifact artifact, File dir, WSPLGENJob job) { String river = artifact.getDataAsString("river"); String srid = RiverUtils.getRiverDGMSrid(river); String srs = "EPSG:" + srid; @@ -810,7 +810,7 @@ } - protected void setPro(FLYSArtifact artifact, File dir, WSPLGENJob job) { + protected void setPro(D4EArtifact artifact, File dir, WSPLGENJob job) { String river = artifact.getDataAsString("river"); String srid = RiverUtils.getRiverDGMSrid(river); String srs = "EPSG:" + srid; @@ -854,7 +854,7 @@ protected void setDgm( - FLYSArtifact artifact, + D4EArtifact artifact, WSPLGENJob job, CallContext context ) { @@ -886,7 +886,7 @@ } - protected void setArea(FLYSArtifact artifact, File dir, WSPLGENJob job) { + protected void setArea(D4EArtifact artifact, File dir, WSPLGENJob job) { String useFloodplain = artifact.getDataAsString("use_floodplain"); if (!Boolean.valueOf(useFloodplain)) { logger.debug("WSPLGEN will not use floodplain."); @@ -921,12 +921,12 @@ } - protected void setOutFile(FLYSArtifact artifact, WSPLGENJob job) { + protected void setOutFile(D4EArtifact artifact, WSPLGENJob job) { job.setOutFile(WSPLGEN_OUTPUT_FILE); } - protected WQKms getWQKms(FLYSArtifact flys, CallContext cc) { + protected WQKms getWQKms(D4EArtifact flys, CallContext cc) { String wspString = flys.getDataAsString(WSP_ARTIFACT); if (wspString == null) { logger.debug("getWQKms(): wspString == null"); @@ -941,7 +941,7 @@ } catch (NumberFormatException nfe) { /* do nothing */ } - FLYSArtifact src = otherArtifact != null + D4EArtifact src = otherArtifact != null ? RiverUtils.getArtifact(otherArtifact, cc) : flys; @@ -963,7 +963,7 @@ protected void setWsp( - FLYSArtifact artifact, + D4EArtifact artifact, CallContext context, File dir, WSPLGENJob job)