Skip to content

Commit 405d6ce

Browse files
GH-5290 xlsx and ods query result format
Uses Apache POI for xlsx support, very basic formatting. Rather basic reverse engineered ODF Spreadsheet via LibreOffice converting the XLSX. Signed-off-by: Jerven Bolleman <jerven.bolleman@sib.swiss>
1 parent 2317182 commit 405d6ce

14 files changed

Lines changed: 1788 additions & 1 deletion

File tree

core/queryresultio/api/src/main/java/org/eclipse/rdf4j/query/resultio/TupleQueryResultFormat.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ public class TupleQueryResultFormat extends QueryResultFormat {
9898
Arrays.asList("text/x-tab-separated-values-star", "application/x-sparqlstar-results+tsv"),
9999
StandardCharsets.UTF_8, List.of("tsvs"), null, SUPPORTS_RDF_STAR);
100100

101+
public static final TupleQueryResultFormat XSLX = new TupleQueryResultFormat("SPARQL/XLSX",
102+
"application/vnd.ms-excel", "xlsx");
103+
104+
public static final TupleQueryResultFormat ODS = new TupleQueryResultFormat("SPARQL/ODS",
105+
"application/vnd.oasis.opendocument.spreadsheet", "ods");
106+
101107
/*-----------*
102108
* Variables *
103109
*-----------*/

core/queryresultio/ods/pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.eclipse.rdf4j</groupId>
6+
<artifactId>rdf4j-queryresultio</artifactId>
7+
<version>5.1.0-SNAPSHOT</version>
8+
</parent>
9+
<artifactId>rdf4j-queryresultio-sparqlods</artifactId>
10+
<name>RDF4J: Query result IO - ODS</name>
11+
<description>Query result parser and writer implementation for an non standardized SPARQL Query Results Open Document Format Spreadsheet.</description>
12+
<dependencies>
13+
<dependency>
14+
<groupId>${project.groupId}</groupId>
15+
<artifactId>rdf4j-queryresultio-api</artifactId>
16+
<version>${project.version}</version>
17+
</dependency>
18+
<dependency>
19+
<groupId>${project.groupId}</groupId>
20+
<artifactId>rdf4j-query</artifactId>
21+
<version>${project.version}</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>${project.groupId}</groupId>
25+
<artifactId>rdf4j-model</artifactId>
26+
<version>${project.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>${project.groupId}</groupId>
30+
<artifactId>rdf4j-common-xml</artifactId>
31+
<version>${project.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>${project.groupId}</groupId>
35+
<artifactId>rdf4j-queryresultio-testsuite</artifactId>
36+
<version>${project.version}</version>
37+
<scope>test</scope>
38+
</dependency>
39+
</dependencies>
40+
</project>

0 commit comments

Comments
 (0)