statement.getSubject(),
statement.getPredicate(),
statement.getObject(),
statement.getContext());
} catch (SailException e) {
throw new RippleException(e);
}
}
};
final Sink<Statement> subtractStatementSink = new Sink<Statement>() {
public void put(final Statement statement) throws RippleException {
try {
sailConnection.removeStatements(
statement.getSubject(),
statement.getPredicate(),
statement.getObject(),
statement.getContext());
} catch (SailException e) {
throw new RippleException(e);
}
}
};
final Sink<Namespace> addNamespaceSink = new Sink<Namespace>() {
public void put(final Namespace namespace) throws RippleException {
try {
sailConnection.setNamespace(namespace.getPrefix(), namespace.getName());
} catch (SailException e) {
throw new RippleException(e);
}
}
};
final Sink<Namespace> subtractNamespaceSink = new Sink<Namespace>() {
public void put(final Namespace namespace) throws RippleException {
String name = null;
try {
name = sailConnection.getNamespace(namespace.getPrefix());
if (null != name && name.equals(namespace.getName())) {
sailConnection.removeNamespace(namespace.getPrefix());
}
} catch (SailException e) {
throw new RippleException(e);
}
}
};
final Sink<String> addCommentSink = new NullSink<String>();