19package denoptim.programs.graphlisthandler;
22import java.lang.reflect.Field;
23import java.util.ArrayList;
25import denoptim.exception.DENOPTIMException;
26import denoptim.files.FileFormat;
27import denoptim.files.FileUtils;
28import denoptim.graph.DGraph;
29import denoptim.io.DenoptimIO;
30import denoptim.programs.RunTimeParameters;
51 new ArrayList<DGraph>();
57 new ArrayList<DGraph>();
102 switch (key.toUpperCase())
107 case "INPUTGRAPHS-A=":
110 case "INPUTGRAPHS-B=":
113 case "OUTPUTGRAPHS=":
116 case "OUTPUTGRAPHSFORMAT=":
129 msg =
"Unable to understand value " + key +
"'" + value +
"'";
134 msg =
"Keyword " + key +
" is not a known GraphListHandler-"
135 +
"related keyword. Check input files.";
150 StringBuilder sb =
new StringBuilder(1024);
152 for (Field f : this.getClass().getDeclaredFields())
156 sb.append(f.getName()).append(
" = ").append(
157 f.get(
this)).append(
NL);
162 +
" parameters. Cause: " + t);
168 sb.append(otherCollector.getPrintedList());
170 return sb.toString();
185 msg =
"Directory " +
workDir +
" not found. Please specify an "
186 +
"existing directory.";
192 msg =
"Input file with graphs to edit not define. Check you input.";
198 msg =
"File with input graphs not found. Check " +
inGraphsFileA;
204 msg =
"File with input graphs not found. Check " +
inGraphsFileB;
247 throw new Error(
"Cannot read in graphs from " +
inGraphsFileA +
" or "
static boolean checkExists(String fileName)
Utility methods for input/output.
static ArrayList< DGraph > readDENOPTIMGraphsFromFile(File inFile)
Reads a list of <DGraphs from file.
Collection of parameters controlling the behavior of the software.
Map< ParametersType, RunTimeParameters > otherParameters
Collection of other parameters by type.
String paramTypeName()
Returns a string defining the type the parameters collected here.
void checkOtherParameters()
Checks any of the parameter collections contained in this instance.
String workDir
Working directory.
final String NL
New line character.
void processOtherParameters()
Processes any of the parameter collections contained in this instance.
int verbosity
Verbosity level for logger.
Parameters controlling execution of GraphEditor.
ArrayList< DGraph > inGraphsB
Input graphs: second list.
String outGraphsFile
File with output graphs.
FileFormat outGraphsFormat
String inGraphsFileA
File with input graphs.
void processParameters()
Processes all parameters and initialize related objects.
void interpretKeyword(String key, String value)
Processes a keyword/value pair and assign the related parameters.
String getPrintedList()
Returns the list of parameters in a string with newline characters as delimiters.
void checkParameters()
Evaluate consistency of input parameters.
GraphListsHandlerParameters()
Constructor.
FileFormat getOutFormat()
ArrayList< DGraph > inGraphsA
Input graphs: first list.
Identifier of the type of parameters.
GLH_PARAMS
Parameters controlling the stand-alone management of list of graphs.