ddbae661 by Nathan Lighthart

Update jcf version

- Update to latest version of jcf
- Fix ages from changes to jcf
1 parent 210f783d
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -48,14 +48,14 @@ endorsed.classpath=
excludes=
file.reference.cpptasks-1.0b6-od.jar=lib/3.5/cpptasks-1.0b6-od.jar
file.reference.groovy-all-2.3.9.jar=lib/3.5/groovy-all-2.3.9.jar
file.reference.jcf-0.6.1.jar=lib/jcf-0.6.1.jar
file.reference.jcf-0.7.0.jar=lib/jcf-0.7.0.jar
file.reference.oms-all.jar=lib/3.5/oms-all.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.oms-all.jar}:\
${file.reference.cpptasks-1.0b6-od.jar}:\
${file.reference.jcf-0.6.1.jar}
${file.reference.jcf-0.7.0.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
......@@ -77,7 +77,7 @@ javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.reference.jcf-0.6.1.jar=lib/jcf-0.6.1-javadoc.jar
javadoc.reference.jcf-0.7.0.jar=lib/jcf-0.7.0-javadoc.jar
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
......@@ -99,6 +99,6 @@ run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=windows-1252
source.reference.jcf-0.6.1.jar=lib/jcf-0.6.1-sources.jar
source.reference.jcf-0.7.0.jar=lib/jcf-0.7.0-sources.jar
src.dir=src
test.src.dir=test
......
......@@ -18,14 +18,15 @@ import erosion.MusleAdapter;
import geoprocessing.CalcLatLongAdapter;
import gov.usda.jcf.core.Context;
import gov.usda.jcf.core.Program;
import gov.usda.jcf.core.ProgramLayout;
import gov.usda.jcf.core.contexts.AlterableContext;
import gov.usda.jcf.core.contexts.CombinedContext;
import gov.usda.jcf.core.contexts.FieldContext;
import gov.usda.jcf.core.contexts.MapContext;
import gov.usda.jcf.core.statements.AdapterStatement;
import gov.usda.jcf.core.statements.StatementBlock;
import gov.usda.jcf.io.xml.XMLLayoutReader;
import gov.usda.jcf.util.Contexts;
import gov.usda.jcf.util.ProgramReader;
import groundwater.GroundwaterNAdapter;
import groundwater.ProcessGroundwaterAdapter;
import interception.ProcessInterceptionAdapter;
......@@ -57,7 +58,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.ParserConfigurationException;
import management.CropExistenceAdapter;
import management.Fertilizer;
import management.HRURotation;
......@@ -68,7 +68,6 @@ import management.ProcessFertilizationAdapter;
import management.Tillage;
import nitrogen.InitSoilWaterLayerNAdapter;
import nitrogen.SoilWaterLayerNAdapter;
import org.xml.sax.SAXException;
import parallel.ContextTask;
import parallel.EntityExecxutors;
import potet.EvapoTransAdapter;
......@@ -700,12 +699,14 @@ public class AgESModel {
if (parameters.surfaceProgramFilePath == null) {
return createDefaultSurfaceProgram();
}
ProgramReader reader = new ProgramReader(parameters.surfaceProgramFilePath);
XMLLayoutReader reader = new XMLLayoutReader(parameters.surfaceProgramFilePath);
ProgramLayout pl;
try {
return reader.read();
} catch (IOException | ParserConfigurationException | SAXException ex) {
pl = (ProgramLayout) reader.read(XMLLayoutReader.LayoutType.PROGRAM);
} catch (IOException ex) {
throw new IOException("Failed to read surface program", ex);
}
return pl.createProgram();
}
private Program createDefaultSurfaceProgram() {
......@@ -733,12 +734,14 @@ public class AgESModel {
if (parameters.subSurfaceProgramFilePath == null) {
return createDefaultSubSurfaceProgram();
}
ProgramReader reader = new ProgramReader(parameters.subSurfaceProgramFilePath);
XMLLayoutReader reader = new XMLLayoutReader(parameters.subSurfaceProgramFilePath);
ProgramLayout pl;
try {
return reader.read();
} catch (IOException | ParserConfigurationException | SAXException ex) {
pl = (ProgramLayout) reader.read(XMLLayoutReader.LayoutType.PROGRAM);
} catch (IOException ex) {
throw new IOException("Failed to read subsurface program", ex);
}
return pl.createProgram();
}
private Program createDefaultSubSurfaceProgram() {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!