org.drools.planner.examples.common.persistence
Class AbstractTxtSolutionImporter.TxtInputBuilder

java.lang.Object
  extended by org.drools.planner.examples.common.persistence.AbstractTxtSolutionImporter.TxtInputBuilder
Direct Known Subclasses:
CurriculumCourseSolutionImporter.CurriculumCourseInputBuilder, ExaminationSolutionImporter.ExaminationInputBuilder, Manners2009SolutionImporter.Manners2009InputBuilder, PatientAdmissionScheduleSolutionImporter.PatientAdmissionScheduleInputBuilder, TrainDesignSolutionImporter.TrainDesignInputBuilder, TravelingTournamentSolutionImporter.TravelingTournamentInputBuilder, TspSolutionImporter.TravelingSalesmanTourInputBuilder
Enclosing class:
AbstractTxtSolutionImporter

public abstract class AbstractTxtSolutionImporter.TxtInputBuilder
extends Object


Field Summary
protected  BufferedReader bufferedReader
           
 
Constructor Summary
AbstractTxtSolutionImporter.TxtInputBuilder()
           
 
Method Summary
 void readConstantLine(String constantValue)
           
 void readEmptyLine()
           
 int readIntegerValue()
           
 int readIntegerValue(String prefix)
           
 int readIntegerValue(String prefix, String suffix)
           
abstract  Solution readSolution()
           
 String readStringValue()
           
 String readStringValue(String prefix)
           
 String readStringValue(String prefix, String suffix)
           
 void readUntilConstantLine(String constantValue)
           
 String removePrefixSuffixFromLine(String line, String prefix, String suffix)
           
 void setBufferedReader(BufferedReader bufferedReader)
           
 String[] splitBy(String line, String tokenRegex, String tokenName, Integer numberOfTokens, boolean trim, boolean removeQuotes)
           
 String[] splitByPipelineAndTrim(String line, int numberOfTokens)
           
 String[] splitBySemicolonSeparatedValue(String line, int numberOfTokens)
           
 String[] splitBySpace(String line)
           
 String[] splitBySpace(String line, Integer numberOfTokens)
           
 String[] splitBySpacesOrTabs(String line)
           
 String[] splitBySpacesOrTabs(String line, Integer numberOfTokens)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bufferedReader

protected BufferedReader bufferedReader
Constructor Detail

AbstractTxtSolutionImporter.TxtInputBuilder

public AbstractTxtSolutionImporter.TxtInputBuilder()
Method Detail

setBufferedReader

public void setBufferedReader(BufferedReader bufferedReader)

readSolution

public abstract Solution readSolution()
                               throws IOException
Throws:
IOException

readEmptyLine

public void readEmptyLine()
                   throws IOException
Throws:
IOException

readConstantLine

public void readConstantLine(String constantValue)
                      throws IOException
Throws:
IOException

readUntilConstantLine

public void readUntilConstantLine(String constantValue)
                           throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue()
                     throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue(String prefix)
                     throws IOException
Throws:
IOException

readIntegerValue

public int readIntegerValue(String prefix,
                            String suffix)
                     throws IOException
Throws:
IOException

readStringValue

public String readStringValue()
                       throws IOException
Throws:
IOException

readStringValue

public String readStringValue(String prefix)
                       throws IOException
Throws:
IOException

readStringValue

public String readStringValue(String prefix,
                              String suffix)
                       throws IOException
Throws:
IOException

removePrefixSuffixFromLine

public String removePrefixSuffixFromLine(String line,
                                         String prefix,
                                         String suffix)

splitBySpace

public String[] splitBySpace(String line)

splitBySpace

public String[] splitBySpace(String line,
                             Integer numberOfTokens)

splitBySpacesOrTabs

public String[] splitBySpacesOrTabs(String line)

splitBySpacesOrTabs

public String[] splitBySpacesOrTabs(String line,
                                    Integer numberOfTokens)

splitByPipelineAndTrim

public String[] splitByPipelineAndTrim(String line,
                                       int numberOfTokens)

splitBySemicolonSeparatedValue

public String[] splitBySemicolonSeparatedValue(String line,
                                               int numberOfTokens)

splitBy

public String[] splitBy(String line,
                        String tokenRegex,
                        String tokenName,
                        Integer numberOfTokens,
                        boolean trim,
                        boolean removeQuotes)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.