Package com.stardog.stark.query.io.text
Class TextBooleanQueryResultWriter
- java.lang.Object
-
- com.stardog.stark.query.io.text.TextBooleanQueryResultWriter
-
- All Implemented Interfaces:
BooleanQueryResultHandler,BooleanQueryResultWriter,QueryResultWriter<java.lang.Boolean>,QueryResultHandler<java.lang.Boolean>
public final class TextBooleanQueryResultWriter extends java.lang.Object implements BooleanQueryResultWriter
Writerimplementation for simple text-basedboolean results- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextBooleanQueryResultWriter.BQRWriterFactory
-
Constructor Summary
Constructors Constructor Description TextBooleanQueryResultWriter(java.io.OutputStream theOutput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()Signal that query processing has completedQueryResultFormatformat()Theformatthis writer will serialize output invoidhandle(java.lang.Boolean theResult)Handle a result to a queryvoidlinks(java.util.List<java.lang.String> theLinks)Handle the set of links from the resultvoidnamespace(java.lang.String thePrefix, java.lang.String theIRI)voidstart()Indicates that writing has begun.
-
-
-
Method Detail
-
format
@Nonnull public QueryResultFormat format()
Theformatthis writer will serialize output in- Specified by:
formatin interfaceQueryResultWriter<java.lang.Boolean>- Returns:
- the format
-
namespace
public void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI) throws ResultWritingFailed- Specified by:
namespacein interfaceQueryResultWriter<java.lang.Boolean>- Throws:
ResultWritingFailed
-
links
public void links(@Nonnull java.util.List<java.lang.String> theLinks)Handle the set of links from the result- Specified by:
linksin interfaceQueryResultHandler<java.lang.Boolean>- Specified by:
linksin interfaceQueryResultWriter<java.lang.Boolean>- Parameters:
theLinks- The links- See Also:
- "link"
-
handle
public void handle(@Nonnull java.lang.Boolean theResult)Handle a result to a query- Specified by:
handlein interfaceBooleanQueryResultHandler- Specified by:
handlein interfaceQueryResultHandler<java.lang.Boolean>- Specified by:
handlein interfaceQueryResultWriter<java.lang.Boolean>- Parameters:
theResult- the result
-
start
public void start()
Indicates that writing has begun.- Specified by:
startin interfaceQueryResultHandler<java.lang.Boolean>- Specified by:
startin interfaceQueryResultWriter<java.lang.Boolean>
-
end
public void end()
Signal that query processing has completed- Specified by:
endin interfaceQueryResultHandler<java.lang.Boolean>- Specified by:
endin interfaceQueryResultWriter<java.lang.Boolean>
-
-