net.sf.sparql.benchmarking.loader
Class AbstractOperationMixLoader

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

public abstract class AbstractOperationMixLoader
extends Object
implements OperationMixLoader

Abstract implementation of an operation mix loader that parses the mix file as a while

Author:
rvesse

Constructor Summary
AbstractOperationMixLoader()
           
 
Method Summary
 OperationMix load(File file)
          Loads an operation mix from the given file
protected abstract  List<Operation> parseFile(File file)
          Parses a file to produce an operation mix
protected  File resolveFile(File file)
          Resolves a file to see if it a valid file that exists either on disk or in the class path
 
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
 

Constructor Detail

AbstractOperationMixLoader

public AbstractOperationMixLoader()
Method Detail

load

public OperationMix load(File file)
                  throws IOException
Description copied from interface: OperationMixLoader
Loads an operation mix from the given file

Specified by:
load in interface OperationMixLoader
Parameters:
file - File
Returns:
Operation mix
Throws:
IOException

resolveFile

protected File resolveFile(File file)
                    throws FileNotFoundException
Resolves a file to see if it a valid file that exists either on disk or in the class path

Parameters:
file - File to resolve
Returns:
Resolved file if possible
Throws:
FileNotFoundException - Thrown if the file cannot be resolved

parseFile

protected abstract List<Operation> parseFile(File file)
                                      throws FileNotFoundException,
                                             IOException
Parses a file to produce an operation mix

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


Copyright © 2014. All Rights Reserved.