net.sf.sparql.benchmarking.operations.gsp
Class AbstractGSPOperation

java.lang.Object
  extended by net.sf.sparql.benchmarking.operations.AbstractOperation
      extended by net.sf.sparql.benchmarking.operations.gsp.AbstractGSPOperation
All Implemented Interfaces:
Operation
Direct Known Subclasses:
GSPDeleteOperation, GSPGetOperation, GSPHeadOperation, GSPPostOperation, GSPPutOperation

public abstract class AbstractGSPOperation
extends AbstractOperation

Abstract implementation of a SPARQL Graph Store Protocol operation

Author:
rvesse

Constructor Summary
AbstractGSPOperation(String name)
          Creates a new operation
AbstractGSPOperation(String name, String uri)
          Creates a new operation
 
Method Summary
<T extends Options>
boolean
canRun(Runner<T> runner, T options)
          Report whether the operation can run based on the available options
 OperationRun createErrorInformation(String message, int category, long runtime)
          Creates run information for an error
protected  String getGraphUri()
          Gets the URI of the graph being operated upon, null is considered to mean that the default graph is operated upon
 
Methods inherited from class net.sf.sparql.benchmarking.operations.AbstractOperation
getId, getName, getStats, setId
 
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.operations.Operation
createCallable, getContentString, getType
 

Constructor Detail

AbstractGSPOperation

public AbstractGSPOperation(String name)
Creates a new operation

Parameters:
name - Name

AbstractGSPOperation

public AbstractGSPOperation(String name,
                            String uri)
Creates a new operation

Parameters:
name - Name
uri - Graph URI
Method Detail

getGraphUri

protected String getGraphUri()
Gets the URI of the graph being operated upon, null is considered to mean that the default graph is operated upon

Returns:
Graph URI

canRun

public <T extends Options> boolean canRun(Runner<T> runner,
                                          T options)
Description copied from interface: Operation
Report whether the operation can run based on the available options

Parameters:
runner - Runner
options - Options
Returns:
True if the operation can run, false otherwise

createErrorInformation

public OperationRun createErrorInformation(String message,
                                           int category,
                                           long runtime)
Description copied from interface: Operation
Creates run information for an error

Parameters:
message - Error message
category - Error category
runtime - Runtime
Returns:
Error information


Copyright © 2014. All Rights Reserved.