org.openrdf.query.resultio
Class TupleQueryResultParserBase

java.lang.Object
  extended by org.openrdf.query.resultio.TupleQueryResultParserBase
All Implemented Interfaces:
TupleQueryResultParser
Direct Known Subclasses:
BinaryQueryResultParser, SPARQLResultsXMLParser

public abstract class TupleQueryResultParserBase
extends java.lang.Object
implements TupleQueryResultParser

Base class for TupleQueryResultParsers offering common functionality for query result parsers.


Field Summary
protected  TupleQueryResultHandler handler
          The TupleQueryResultHandler that will handle the parsed query results.
protected  ValueFactory valueFactory
          The ValueFactory to use for creating RDF model objects.
 
Constructor Summary
TupleQueryResultParserBase()
          Creates a new parser base that, by default, will use an instance of ValueFactoryImpl to create Value objects.
TupleQueryResultParserBase(ValueFactory valueFactory)
          Creates a new parser base that will use the supplied ValueFactory to create Value objects.
 
Method Summary
 void setTupleQueryResultHandler(TupleQueryResultHandler handler)
          Sets the TupleQueryResultHandler that will handle the parsed query result data.
 void setValueFactory(ValueFactory valueFactory)
          Sets the ValueFactory that the parser will use to create Value objects for the parsed query result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.query.resultio.TupleQueryResultParser
getTupleQueryResultFormat, parse
 

Field Detail

valueFactory

protected ValueFactory valueFactory
The ValueFactory to use for creating RDF model objects.


handler

protected TupleQueryResultHandler handler
The TupleQueryResultHandler that will handle the parsed query results.

Constructor Detail

TupleQueryResultParserBase

public TupleQueryResultParserBase()
Creates a new parser base that, by default, will use an instance of ValueFactoryImpl to create Value objects.


TupleQueryResultParserBase

public TupleQueryResultParserBase(ValueFactory valueFactory)
Creates a new parser base that will use the supplied ValueFactory to create Value objects.

Method Detail

setValueFactory

public void setValueFactory(ValueFactory valueFactory)
Description copied from interface: TupleQueryResultParser
Sets the ValueFactory that the parser will use to create Value objects for the parsed query result.

Specified by:
setValueFactory in interface TupleQueryResultParser
Parameters:
valueFactory - The value factory that the parser should use.

setTupleQueryResultHandler

public void setTupleQueryResultHandler(TupleQueryResultHandler handler)
Description copied from interface: TupleQueryResultParser
Sets the TupleQueryResultHandler that will handle the parsed query result data.

Specified by:
setTupleQueryResultHandler in interface TupleQueryResultParser


Copyright © 2001-2010 Aduna. All Rights Reserved.