blob: e5e2e2a5ad49cadc4409dfc926867d4227b75342 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
package org.semanticweb.simpleETL;
import org.openrdf.model.Statement;
import org.openrdf.rio.RDFHandler;
import org.openrdf.rio.RDFHandlerException;
import org.openrdf.rio.RDFWriter;
public class RDFHandlerWriter implements RDFHandler {
protected RDFWriter m_writer;
protected boolean m_started;
public RDFHandlerWriter(RDFWriter writer){
m_writer = writer;
m_started = false;
}
@Override
public void endRDF() throws RDFHandlerException {
// Do not end
}
@Override
public void handleComment(String arg0) throws RDFHandlerException {
m_writer.handleComment(arg0);
}
@Override
public void handleNamespace(String arg0, String arg1) throws RDFHandlerException {
m_writer.handleNamespace(arg0, arg1);
}
@Override
public void handleStatement(Statement arg0) throws RDFHandlerException {
m_writer.handleStatement(arg0);
}
@Override
public void startRDF() throws RDFHandlerException {
if(!m_started) {
m_started = true;
m_writer.startRDF();
}
}
}
|