public RecordIterator getTriples(int subj, int pred, int obj, int context, boolean readTransaction) throws IOException { if (readTransaction) { // Don't read removed statements return getTriples(subj, pred, obj, context, 0, TripleStore.REMOVED_FLAG); } else { // Don't read added statements return getTriples(subj, pred, obj, context, 0, TripleStore.ADDED_FLAG); } }
public RecordIterator getTriples(int subj, int pred, int obj, int context) throws IOException { // Return all triples except those that were added but not yet committed return getTriples(subj, pred, obj, context, 0, ADDED_FLAG); }
public RecordIterator getTriples(int subj, int pred, int obj, int context) throws IOException { // Return all triples except those that were added but not yet committed return getTriples(subj, pred, obj, context, 0, ADDED_FLAG); }
public RecordIterator getTriples(int subj, int pred, int obj, int context, boolean readTransaction) throws IOException { if (readTransaction) { // Don't read removed statements return getTriples(subj, pred, obj, context, 0, TripleStore.REMOVED_FLAG); } else { // Don't read added statements return getTriples(subj, pred, obj, context, 0, TripleStore.ADDED_FLAG); } }
public int removeTriples(int subj, int pred, int obj, int context) throws IOException { RecordIterator iter = getTriples(subj, pred, obj, context, 0, 0); return removeTriples(iter); }
public int removeTriples(int subj, int pred, int obj, int context) throws IOException { RecordIterator iter = getTriples(subj, pred, obj, context, 0, 0); return removeTriples(iter); }
/** * @param subj * The subject for the pattern, or <tt>-1</tt> for a wildcard. * @param pred * The predicate for the pattern, or <tt>-1</tt> for a wildcard. * @param obj * The object for the pattern, or <tt>-1</tt> for a wildcard. * @param context * The context for the pattern, or <tt>-1</tt> for a wildcard. * @param explicit * Flag indicating whether explicit or inferred statements should be removed; <tt>true</tt> removes * explicit statements that match the pattern, <tt>false</tt> removes inferred statements that * match the pattern. * @return The number of triples that were removed. * @throws IOException */ public int removeTriples(int subj, int pred, int obj, int context, boolean explicit) throws IOException { byte flags = explicit ? EXPLICIT_FLAG : 0; RecordIterator iter = getTriples(subj, pred, obj, context, flags, EXPLICIT_FLAG); return removeTriples(iter); }
/** * @param subj * The subject for the pattern, or <tt>-1</tt> for a wildcard. * @param pred * The predicate for the pattern, or <tt>-1</tt> for a wildcard. * @param obj * The object for the pattern, or <tt>-1</tt> for a wildcard. * @param context * The context for the pattern, or <tt>-1</tt> for a wildcard. * @param explicit * Flag indicating whether explicit or inferred statements should be removed; <tt>true</tt> removes * explicit statements that match the pattern, <tt>false</tt> removes inferred statements that * match the pattern. * @return The number of triples that were removed. * @throws IOException */ public int removeTriples(int subj, int pred, int obj, int context, boolean explicit) throws IOException { byte flags = explicit ? EXPLICIT_FLAG : 0; RecordIterator iter = getTriples(subj, pred, obj, context, flags, EXPLICIT_FLAG); return removeTriples(iter); }
public RecordIterator getTriples(int subj, int pred, int obj, int context, boolean explicit, boolean readTransaction) throws IOException { int flags = 0; int flagsMask = 0; if (readTransaction) { flagsMask |= TripleStore.REMOVED_FLAG; // 'explicit' is handled through an ExplicitStatementFilter } else { flagsMask |= TripleStore.ADDED_FLAG; if (explicit) { flags |= TripleStore.EXPLICIT_FLAG; flagsMask |= TripleStore.EXPLICIT_FLAG; } } RecordIterator btreeIter = getTriples(subj, pred, obj, context, flags, flagsMask); if (readTransaction && explicit) { // Filter implicit statements from the result btreeIter = new ExplicitStatementFilter(btreeIter); } else if (!explicit) { // Filter out explicit statements from the result btreeIter = new ImplicitStatementFilter(btreeIter); } return btreeIter; }
public RecordIterator getTriples(int subj, int pred, int obj, int context, boolean explicit, boolean readTransaction) throws IOException { int flags = 0; int flagsMask = 0; if (readTransaction) { flagsMask |= TripleStore.REMOVED_FLAG; // 'explicit' is handled through an ExplicitStatementFilter } else { flagsMask |= TripleStore.ADDED_FLAG; if (explicit) { flags |= TripleStore.EXPLICIT_FLAG; flagsMask |= TripleStore.EXPLICIT_FLAG; } } RecordIterator btreeIter = getTriples(subj, pred, obj, context, flags, flagsMask); if (readTransaction && explicit) { // Filter implicit statements from the result btreeIter = new ExplicitStatementFilter(btreeIter); } else if (!explicit) { // Filter out explicit statements from the result btreeIter = new ImplicitStatementFilter(btreeIter); } return btreeIter; }
RecordIterator btreeIter = tripleStore.getTriples(subjID, predID, objID, contextID, explicit, false);
RecordIterator btreeIter = tripleStore.getTriples(subjID, predID, objID, contextID, explicit, false);