final boolean override = Ripple.getConfiguration().getBoolean(
Ripple.PREFER_NEWEST_NAMESPACE_DEFINITIONS);
final boolean allowDuplicateNamespaces = Ripple.getConfiguration().getBoolean(
Ripple.ALLOW_DUPLICATE_NAMESPACES);
addSink = new RDFSink() {
private Sink<Statement> stSink = new Sink<Statement>() {
public void put(final Statement st) throws RippleException {
//System.out.println( "st = " + st );
Resource subj = st.getSubject();
URI pred = st.getPredicate();
Value obj = st.getObject();
synchronized (lexicon) {
if (subj instanceof URI) {
lexicon.addURI((URI) subj);
}
lexicon.addURI(pred);
if (obj instanceof URI) {
lexicon.addURI((URI) obj);
}
}
}
};
private Sink<Namespace> nsSink = new Sink<Namespace>() {
public void put(final Namespace ns) throws RippleException {
// TODO: delete me
}
};
private Sink<String> cmtSink = new Sink<String>() {
public void put(final String comment) throws RippleException {
}
};
public Sink<Statement> statementSink() {
return stSink;
}
public Sink<Namespace> namespaceSink() {
return nsSink;
}
public Sink<String> commentSink() {
return cmtSink;
}
};
// TODO
subSink = new RDFSink() {
private Sink<Statement> stSink = new Sink<Statement>() {
public void put(final Statement st) throws RippleException {
}
};