Class SPARQLStarResultsXMLWriter
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.AbstractQueryResultWriter
-
- org.eclipse.rdf4j.query.resultio.sparqlxml.SPARQLResultsXMLWriter
-
- org.eclipse.rdf4j.query.resultio.sparqlxml.SPARQLStarResultsXMLWriter
-
- All Implemented Interfaces:
org.eclipse.rdf4j.common.io.CharSink,org.eclipse.rdf4j.common.io.Sink,QueryResultHandler,QueryResultWriter,TupleQueryResultWriter,TupleQueryResultHandler
@Experimental public class SPARQLStarResultsXMLWriter extends SPARQLResultsXMLWriter
ATupleQueryResultWriterthat writes tuple query results in the extended form SPARQL Query Results XML Format.- Author:
- Jeen Broekstra
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandocumentOpenprotected booleanheaderCompleteprotected booleanheaderOpenprotected booleantupleVariablesFoundprotected XMLWriterxmlWriterXMLWriter to write XML to.
-
Constructor Summary
Constructors Constructor Description SPARQLStarResultsXMLWriter(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsFileFormat(org.eclipse.rdf4j.common.lang.FileFormat format)protected voidendDocument()voidendHeader()voidendQueryResult()Collection<org.eclipse.rdf4j.rio.RioSetting<?>>getSupportedSettings()TupleQueryResultFormatgetTupleQueryResultFormat()WritergetWriter()voidhandleBoolean(boolean value)voidhandleLinks(List<String> linkUrls)voidhandleNamespace(String prefix, String uri)protected voidhandleSolutionImpl(BindingSet bindingSet)voidhandleStylesheet(String url)voidstartDocument()voidstartHeader()voidstartQueryResult(List<String> bindingNames)-
Methods inherited from class org.eclipse.rdf4j.query.resultio.sparqlxml.SPARQLResultsXMLWriter
getQueryResultFormat
-
Methods inherited from class org.eclipse.rdf4j.query.resultio.AbstractQueryResultWriter
getFileFormat, getWriterConfig, handleSolution, setWriterConfig, xsdStringToPlainLiteral
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.query.QueryResultHandler
endQueryResult, handleBoolean, handleLinks, handleSolution, startQueryResult
-
Methods inherited from interface org.eclipse.rdf4j.query.resultio.QueryResultWriter
endHeader, getSupportedSettings, getWriterConfig, handleNamespace, handleStylesheet, setWriterConfig, startDocument, startHeader
-
-
-
-
Field Detail
-
xmlWriter
protected XMLWriter xmlWriter
XMLWriter to write XML to.
-
documentOpen
protected boolean documentOpen
-
headerOpen
protected boolean headerOpen
-
headerComplete
protected boolean headerComplete
-
tupleVariablesFound
protected boolean tupleVariablesFound
-
-
Constructor Detail
-
SPARQLStarResultsXMLWriter
public SPARQLStarResultsXMLWriter(OutputStream out)
- Parameters:
out-
-
-
Method Detail
-
getTupleQueryResultFormat
public final TupleQueryResultFormat getTupleQueryResultFormat()
- Specified by:
getTupleQueryResultFormatin interfaceTupleQueryResultWriter- Overrides:
getTupleQueryResultFormatin classSPARQLResultsXMLWriter
-
acceptsFileFormat
public boolean acceptsFileFormat(org.eclipse.rdf4j.common.lang.FileFormat format)
-
getWriter
public Writer getWriter()
- Specified by:
getWriterin interfaceorg.eclipse.rdf4j.common.io.CharSink
-
endDocument
protected void endDocument() throws IOException- Throws:
IOException
-
handleBoolean
public void handleBoolean(boolean value) throws QueryResultHandlerException- Specified by:
handleBooleanin interfaceQueryResultHandler- Throws:
QueryResultHandlerException
-
startDocument
public void startDocument() throws QueryResultHandlerException- Specified by:
startDocumentin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
handleStylesheet
public void handleStylesheet(String url) throws QueryResultHandlerException
- Specified by:
handleStylesheetin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
startHeader
public void startHeader() throws QueryResultHandlerException- Specified by:
startHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
handleLinks
public void handleLinks(List<String> linkUrls) throws QueryResultHandlerException
- Specified by:
handleLinksin interfaceQueryResultHandler- Throws:
QueryResultHandlerException
-
endHeader
public void endHeader() throws QueryResultHandlerException- Specified by:
endHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
startQueryResult
public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
- Specified by:
startQueryResultin interfaceQueryResultHandler- Overrides:
startQueryResultin classAbstractQueryResultWriter- Throws:
TupleQueryResultHandlerException
-
endQueryResult
public void endQueryResult() throws TupleQueryResultHandlerException- Specified by:
endQueryResultin interfaceQueryResultHandler- Throws:
TupleQueryResultHandlerException
-
handleSolutionImpl
protected void handleSolutionImpl(BindingSet bindingSet) throws TupleQueryResultHandlerException
- Overrides:
handleSolutionImplin classAbstractQueryResultWriter- Throws:
TupleQueryResultHandlerException
-
getSupportedSettings
public final Collection<org.eclipse.rdf4j.rio.RioSetting<?>> getSupportedSettings()
- Specified by:
getSupportedSettingsin interfaceQueryResultWriter- Overrides:
getSupportedSettingsin classAbstractQueryResultWriter
-
handleNamespace
public void handleNamespace(String prefix, String uri) throws QueryResultHandlerException
- Specified by:
handleNamespacein interfaceQueryResultWriter- Throws:
QueryResultHandlerException
-
-