use of org.openrdf.model.impl.StatementImpl in project blueprints by tinkerpop.
the class SailEdge method removeProperty.
public <T> T removeProperty(final String key) {
if (key.equals(SailTokens.NAMED_GRAPH)) {
try {
Resource ng = this.rawEdge.getContext();
SailHelper.removeStatement(this.rawEdge, this.graph.getSailConnection().get());
this.rawEdge = new StatementImpl(this.rawEdge.getSubject(), this.rawEdge.getPredicate(), this.rawEdge.getObject());
SailHelper.addStatement(this.rawEdge, this.graph.getSailConnection().get());
return (T) ng;
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
} else {
throw new IllegalArgumentException(NAMED_GRAPH_PROPERTY);
}
}
Aggregations