aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java
diff options
context:
space:
mode:
authorFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-10 18:17:06 +0100
committerFederico Igne <federico.igne@cs.ox.ac.uk>2022-05-11 12:34:47 +0100
commit17bd9beaf7f358a44e5bf36a5855fe6727d506dc (patch)
tree47e9310a0cff869d9ec017dcb2c81876407782c8 /src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java
parent8651164cd632a5db310b457ce32d4fbc97bdc41c (diff)
downloadACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.tar.gz
ACQuA-17bd9beaf7f358a44e5bf36a5855fe6727d506dc.zip
[pagoda] Move project to Scala
This commit includes a few changes: - The repository still uses Maven to manage dependency but it is now a Scala project. - The code has been ported from OWLAPI 3.4.10 to 5.1.20 - A proof of concept program using both RSAComb and PAGOdA has been added.
Diffstat (limited to 'src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java')
-rw-r--r--src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java b/src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java
new file mode 100644
index 0000000..e5e2e2a
--- /dev/null
+++ b/src/main/java/org/semanticweb/simpleETL/RDFHandlerWriter.java
@@ -0,0 +1,45 @@
1package org.semanticweb.simpleETL;
2import org.openrdf.model.Statement;
3import org.openrdf.rio.RDFHandler;
4import org.openrdf.rio.RDFHandlerException;
5import org.openrdf.rio.RDFWriter;
6
7
8public class RDFHandlerWriter implements RDFHandler {
9 protected RDFWriter m_writer;
10 protected boolean m_started;
11
12 public RDFHandlerWriter(RDFWriter writer){
13 m_writer = writer;
14 m_started = false;
15 }
16
17 @Override
18 public void endRDF() throws RDFHandlerException {
19 // Do not end
20 }
21
22 @Override
23 public void handleComment(String arg0) throws RDFHandlerException {
24 m_writer.handleComment(arg0);
25
26 }
27
28 @Override
29 public void handleNamespace(String arg0, String arg1) throws RDFHandlerException {
30 m_writer.handleNamespace(arg0, arg1);
31 }
32
33 @Override
34 public void handleStatement(Statement arg0) throws RDFHandlerException {
35 m_writer.handleStatement(arg0);
36 }
37
38 @Override
39 public void startRDF() throws RDFHandlerException {
40 if(!m_started) {
41 m_started = true;
42 m_writer.startRDF();
43 }
44 }
45}