OptaPlanner distribution 6.0.0.CR4-Pre1

org.optaplanner.examples.common.persistence
Class AbstractSolutionImporter

java.lang.Object
  extended by org.optaplanner.examples.common.app.LoggingMain
      extended by org.optaplanner.examples.common.persistence.AbstractSolutionImporter
Direct Known Subclasses:
AbstractTxtSolutionImporter, AbstractXmlSolutionImporter

public abstract class AbstractSolutionImporter
extends LoggingMain


Nested Class Summary
 class AbstractSolutionImporter.InputBuilder
           
 
Field Summary
protected static String DEFAULT_OUTPUT_FILE_SUFFIX
           
protected  File inputDir
           
protected  File outputDir
           
protected  SolutionDao solutionDao
           
 
Fields inherited from class org.optaplanner.examples.common.app.LoggingMain
logger
 
Constructor Summary
AbstractSolutionImporter(SolutionDao solutionDao)
           
 
Method Summary
 boolean acceptInputFile(File inputFile)
           
 boolean acceptInputFileDuringBulkConvert(File inputFile)
          Some files are too big to be serialized to XML or take too long.
protected  void convert(File inputFile, File outputFile)
           
 void convert(String inputFileName, String outputFileName)
           
 void convertAll()
           
static String getFlooredPossibleSolutionSize(BigInteger possibleSolutionSize)
           
protected  File getInputDir()
           
abstract  String getInputFileSuffix()
           
protected  File getOutputDir()
           
protected  String getOutputFileSuffix()
           
abstract  Solution readSolution(File inputFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OUTPUT_FILE_SUFFIX

protected static final String DEFAULT_OUTPUT_FILE_SUFFIX
See Also:
Constant Field Values

solutionDao

protected final SolutionDao solutionDao

inputDir

protected final File inputDir

outputDir

protected final File outputDir
Constructor Detail

AbstractSolutionImporter

public AbstractSolutionImporter(SolutionDao solutionDao)
Method Detail

getInputDir

protected File getInputDir()

getOutputDir

protected File getOutputDir()

getInputFileSuffix

public abstract String getInputFileSuffix()

getOutputFileSuffix

protected String getOutputFileSuffix()

convertAll

public void convertAll()

convert

public void convert(String inputFileName,
                    String outputFileName)

convert

protected void convert(File inputFile,
                       File outputFile)

acceptInputFile

public boolean acceptInputFile(File inputFile)

acceptInputFileDuringBulkConvert

public boolean acceptInputFileDuringBulkConvert(File inputFile)
Some files are too big to be serialized to XML or take too long.

Parameters:
inputFile - never null
Returns:
true if accepted

readSolution

public abstract Solution readSolution(File inputFile)

getFlooredPossibleSolutionSize

public static String getFlooredPossibleSolutionSize(BigInteger possibleSolutionSize)

OptaPlanner distribution 6.0.0.CR4-Pre1

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.