public synchronized boolean clear(Value... contexts) { try { if (contains(null, null, null, contexts)) { con.clear(cast(contexts)); size = -1; return true; } } catch (RepositoryException e) { throw new ModelException(e); } return false; }
public synchronized boolean remove(Value subj, Value pred, Value obj, Value... contexts) { try { if (contains(subj, pred, obj, contexts)) { size = -1; con.remove((Resource) subj, (URI) pred, obj, cast(contexts)); return true; } } catch (RepositoryException e) { throw new ModelException(e); } return false; }
public boolean contains(Value subj, Value pred, Value obj, Value... contexts) { try { if (!isResourceURI(subj, pred) || !isEmptyOrResourcePresent(contexts)) return false; return con.hasStatement((Resource) subj, (URI) pred, obj, false, cast(contexts)); } catch (RepositoryException e) { throw new ModelException(e); } }