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
Writer
implementation 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 class
TextBooleanQueryResultWriter.BQRWriterFactory
-
Constructor Summary
Constructors Constructor Description TextBooleanQueryResultWriter(java.io.OutputStream theOutput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Signal that query processing has completedQueryResultFormat
format()
Theformat
this writer will serialize output invoid
handle(java.lang.Boolean theResult)
Handle a result to a queryvoid
links(java.util.List<java.lang.String> theLinks)
Handle the set of links from the resultvoid
namespace(java.lang.String thePrefix, java.lang.String theIRI)
void
start()
Indicates that writing has begun.
-
-
-
Method Detail
-
format
@Nonnull public QueryResultFormat format()
Theformat
this writer will serialize output in- Specified by:
format
in 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:
namespace
in 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:
links
in interfaceQueryResultHandler<java.lang.Boolean>
- Specified by:
links
in 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:
handle
in interfaceBooleanQueryResultHandler
- Specified by:
handle
in interfaceQueryResultHandler<java.lang.Boolean>
- Specified by:
handle
in interfaceQueryResultWriter<java.lang.Boolean>
- Parameters:
theResult
- the result
-
start
public void start()
Indicates that writing has begun.- Specified by:
start
in interfaceQueryResultHandler<java.lang.Boolean>
- Specified by:
start
in interfaceQueryResultWriter<java.lang.Boolean>
-
end
public void end()
Signal that query processing has completed- Specified by:
end
in interfaceQueryResultHandler<java.lang.Boolean>
- Specified by:
end
in interfaceQueryResultWriter<java.lang.Boolean>
-
-