net.sf.sparql.benchmarking.loader
Class AbstractLineBasedMixLoader

java.lang.Object
  extended by net.sf.sparql.benchmarking.loader.AbstractOperationMixLoader
      extended by net.sf.sparql.benchmarking.loader.AbstractLineBasedMixLoader
All Implemented Interfaces:
OperationMixLoader
Direct Known Subclasses:
ClassicQueryMixLoader, TsvMixLoader

public abstract class AbstractLineBasedMixLoader
extends AbstractOperationMixLoader
implements OperationMixLoader

Abstract implementation of operation mix loader that uses a line based input format. The parsing of individual lines is left to derived implementations.

Author:
rvesse

Constructor Summary
AbstractLineBasedMixLoader()
           
 
Method Summary
protected  List<Operation> parseFile(File file)
          Parses a file to produce an operation mix
protected abstract  Operation parseLine(File baseDir, String line)
          Parses a line into an operation
 
Methods inherited from class net.sf.sparql.benchmarking.loader.AbstractOperationMixLoader
load, resolveFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.sparql.benchmarking.loader.OperationMixLoader
getPreferredExtension, load
 

Constructor Detail

AbstractLineBasedMixLoader

public AbstractLineBasedMixLoader()
Method Detail

parseFile

protected List<Operation> parseFile(File file)
                             throws FileNotFoundException,
                                    IOException
Description copied from class: AbstractOperationMixLoader
Parses a file to produce an operation mix

Specified by:
parseFile in class AbstractOperationMixLoader
Parameters:
file - File
Returns:
Operation Mix
Throws:
FileNotFoundException - Thrown if the mix file cannot be found
IOException - Thrown if there is a problem accessing the mix file or parsing its contents

parseLine

protected abstract Operation parseLine(File baseDir,
                                       String line)
                                throws IOException
Parses a line into an operation

Parameters:
baseDir - Base directory for resolving relative paths against where necessary
line - Line to parse
Returns:
Operation
Throws:
IOException - Thrown if the line does not represent a valid operation


Copyright © 2014. All Rights Reserved.