Class SPARQLResultsXLSXWriter
java.lang.Object
org.eclipse.rdf4j.query.resultio.sparqlxslx.SPARQLResultsXLSXWriter
- All Implemented Interfaces:
QueryResultHandler, QueryResultWriter, TupleQueryResultWriter, TupleQueryResultHandler
Render a SPARQL result set into an ooxml file.
- Author:
- Jerven Bolleman
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIndicates the end of the header.voidIndicates the end of a sequence of solutions.Gets the query result format that this writer uses.Collection<RioSetting<?>> Gets the query result format that this writer uses.Retrieves the current writer configuration as a single object.voidhandleBoolean(boolean value) Handles the specified boolean value.voidhandleLinks(List<String> linkUrls) Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.voidhandleNamespace(String prefix, String uri) Handles a namespace prefix declaration.voidhandleSolution(BindingSet bindingSet) Handles a solution.voidhandleStylesheet(String stylesheetUrl) Handles a stylesheet URL.voidsetWriterConfig(WriterConfig config) Sets all supplied writer configuration options.voidIndicates the start of the document.voidIndicates the start of the header.voidstartQueryResult(List<String> bindingNames) Indicates the start of a sequence of Solutions.
-
Constructor Details
-
SPARQLResultsXLSXWriter
-
-
Method Details
-
handleBoolean
Description copied from interface:QueryResultHandlerHandles the specified boolean value.- Specified by:
handleBooleanin interfaceQueryResultHandler- Parameters:
value- The boolean value to handle.- Throws:
QueryResultHandlerException- If there was an error during the handling of this value. This exception may be thrown if theQueryResultHandler.startQueryResult(List),QueryResultHandler.handleSolution(BindingSet)orQueryResultHandler.endQueryResult()methods were called before this method was called, and the handler cannot process both boolean and tuple results simultaneously.
-
handleLinks
Description copied from interface:QueryResultHandlerHandles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.NOTE: If the format does not support links, it must silently ignore a call to this method.
An accumulating handler should accumulate these links.
- Specified by:
handleLinksin interfaceQueryResultHandler- Parameters:
linkUrls- The URLs of the links to handle.- Throws:
QueryResultHandlerException- If there was an error handling the set of link URLs. This error is not thrown in cases where links are not supported.- See Also:
-
startQueryResult
Description copied from interface:QueryResultHandlerIndicates the start of a sequence of Solutions. The supplied bindingNames are an indication of the values that are in the Solutions. For example, a SPARQL query like select ?X ?Y where { ?X ?P ?Y } will have binding names X and Y.- Specified by:
startQueryResultin interfaceQueryResultHandler- Parameters:
bindingNames- An ordered set of binding names.- Throws:
TupleQueryResultHandlerException- If there was an error during the starting of the query result handler. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
endQueryResult
Description copied from interface:QueryResultHandlerIndicates the end of a sequence of solutions.- Specified by:
endQueryResultin interfaceQueryResultHandler- Throws:
TupleQueryResultHandlerException- If there was an error during the ending of the query result handler. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
handleSolution
Description copied from interface:QueryResultHandlerHandles a solution.- Specified by:
handleSolutionin interfaceQueryResultHandler- Parameters:
bindingSet- A single set of tuple results, with binding names bound to values. Each of the binding names in the solution must have previously been registered with theQueryResultHandler.startQueryResult(List)method.- Throws:
TupleQueryResultHandlerException- If there was an error during the handling of the query solution. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
getQueryResultFormat
Description copied from interface:QueryResultWriterGets the query result format that this writer uses.- Specified by:
getQueryResultFormatin interfaceQueryResultWriter
-
handleNamespace
Description copied from interface:QueryResultWriterHandles a namespace prefix declaration. If this is called, it should be called beforeQueryResultWriter.startDocument()to ensure that it has a document wide effect.NOTE: If the format does not support namespaces, it must silently ignore calls to this method.
- Specified by:
handleNamespacein interfaceQueryResultWriter- Parameters:
prefix- The prefix to use for the namespaceuri- The full URI that is to be represented by the prefix.- Throws:
QueryResultHandlerException
-
startDocument
Description copied from interface:QueryResultWriterIndicates the start of the document.- Specified by:
startDocumentin interfaceQueryResultWriter- Throws:
QueryResultHandlerException- If there was an error starting the writing of the results.
-
setWriterConfig
Description copied from interface:QueryResultWriterSets all supplied writer configuration options.- Specified by:
setWriterConfigin interfaceQueryResultWriter- Parameters:
config- a writer configuration object.
-
getWriterConfig
Description copied from interface:QueryResultWriterRetrieves the current writer configuration as a single object.- Specified by:
getWriterConfigin interfaceQueryResultWriter- Returns:
- a writer configuration object representing the current configuration of the writer.
-
getSupportedSettings
- Specified by:
getSupportedSettingsin interfaceQueryResultWriter- Returns:
- A collection of
RioSettings that are supported by thisQueryResultWriter.
-
getTupleQueryResultFormat
Description copied from interface:TupleQueryResultWriterGets the query result format that this writer uses.- Specified by:
getTupleQueryResultFormatin interfaceTupleQueryResultWriter
-
handleStylesheet
Description copied from interface:QueryResultWriterHandles a stylesheet URL. If this is called, it must be called afterQueryResultWriter.startDocument()and beforeQueryResultWriter.startHeader().NOTE: If the format does not support stylesheets, it must silently ignore calls to this method.
- Specified by:
handleStylesheetin interfaceQueryResultWriter- Parameters:
stylesheetUrl- The URL of the stylesheet to be used to style the results.- Throws:
QueryResultHandlerException- If there was an error handling the stylesheet. This error is not thrown in cases where stylesheets are not supported.
-
startHeader
Description copied from interface:QueryResultWriterIndicates the start of the header.- Specified by:
startHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException- If there was an error writing the start of the header.- See Also:
-
endHeader
Description copied from interface:QueryResultWriterIndicates the end of the header. This must be called afterQueryResultWriter.startHeader()and before any calls toQueryResultHandler.handleSolution(BindingSet).- Specified by:
endHeaderin interfaceQueryResultWriter- Throws:
QueryResultHandlerException- If there was an error writing the end of the header.
-