/** * Search the combination of data and deductions graphs for the given triple pattern. * This may different from the normal find operation in the base of hybrid reasoners * where we are side-stepping the backward deduction step. */ @Override public ExtendedIterator<Triple> findDataMatches(Node subject, Node predicate, Node object) { return dataFind.find(new TriplePattern(subject, predicate, object)); }
/** * Create a continuation object which is a cascade of four * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try * @param third the third Graph/Finder to try * @param fourth the third Graph/Finder to try */ public static Finder cascade(Finder first, Finder second, Finder third, Finder fourth) { return new Cascade(first, cascade(second, cascade(third, fourth))); }
/** * Returns an iterator over Triples. * This implementation assumes that the underlying findWithContinuation * will have also consulted the raw data. */ @Override protected ExtendedIterator<Triple> graphBaseFind(Node subject, Node property, Node object) { return findWithContinuation(new TriplePattern(subject, property, object), fdata); }
@Override public Reasoner create( Resource configuration ) { return rf.create( configuration ).bindSchema( schema ); }
/** * Return the schema graph, if any, bound into this inference graph. */ @Override public Graph getSchemaGraph() { if (tbox == null) return null; if (tbox instanceof FGraph) { return ((FGraph)tbox).getGraph(); } else { throw new ReasonerException("Transitive reasoner got into an illegal state"); } }
/** * Test the consistency of the bound data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); return new StandardValidityReport(); }
/** * Create a continuation object which is a cascade of two * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try */ public static Finder cascade(Finder first, Finder second) { if (first == null || (first instanceof FGraph && ((FGraph)first).getGraph() == null)) return second; if (second == null || (second instanceof FGraph && ((FGraph)second).getGraph() == null)) return first; return new Cascade(first, second); }
/** * Add a new error report * @param error true if the report is an error, false if it is just a warning * @param type a string giving a reasoner-dependent classification for the report * @param description a textual description of the problem */ public void add(boolean error, String type, String description) { add(error, type, description, null); }
/** Answer the InfCapabilities of this InfGraph. */ @Override public Capabilities getCapabilities() { if (capabilities == null) { return getReasoner().getGraphCapabilities(); } else { return capabilities; } }
/** * Printable string */ @Override public String toString() { return simplePrintString(subject) + " @" + simplePrintString(predicate) + " " + simplePrintString(object); }
/** * Search the combination of data and deductions graphs for the given triple pattern. * This may different from the normal find operation in the base of hybrid reasoners * where we are side-stepping the backward deduction step. */ @Override public ExtendedIterator<Triple> findDataMatches(Node subject, Node predicate, Node object) { return dataFind.find(new TriplePattern(subject, predicate, object)); }
@Override public Reasoner create( Resource configuration ) { return rf.create( configuration ).bindSchema( schema ); }
/** * Return the schema graph, if any, bound into this inference graph. */ @Override public Graph getSchemaGraph() { if (tbox == null) return null; if (tbox instanceof FGraph) { return ((FGraph)tbox).getGraph(); } else { throw new ReasonerException("Transitive reasoner got into an illegal state"); } }
/** * Returns an iterator over Triples. * This implementation assumes that the underlying findWithContinuation * will have also consulted the raw data. */ @Override protected ExtendedIterator<Triple> graphBaseFind(Node subject, Node property, Node object) { return findWithContinuation(new TriplePattern(subject, property, object), fdata); }
/** * Test the consistency of the bound data. This normally tests * the validity of the bound instance data against the bound * schema data. * @return a ValidityReport structure */ @Override public ValidityReport validate() { checkOpen(); return new StandardValidityReport(); }
/** * Create a continuation object which is a cascade of two * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try */ public static Finder cascade(Finder first, Finder second) { if (first == null || (first instanceof FGraph && ((FGraph)first).getGraph() == null)) return second; if (second == null || (second instanceof FGraph && ((FGraph)second).getGraph() == null)) return first; return new Cascade(first, second); }
/** * Create a continuation object which is a cascade of three * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try * @param third the third Graph/Finder to try */ public static Finder cascade(Finder first, Finder second, Finder third) { return new Cascade(first, cascade(second, third)); }
/** Answer the InfCapabilities of this InfGraph. */ @Override public Capabilities getCapabilities() { if (capabilities == null) { return getReasoner().getGraphCapabilities(); } else { return capabilities; } }
/** * Create a continuation object which is a cascade of four * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try * @param third the third Graph/Finder to try * @param fourth the third Graph/Finder to try */ public static Finder cascade(Finder first, Finder second, Finder third, Finder fourth) { return new Cascade(first, cascade(second, cascade(third, fourth))); }
/** * Create a continuation object which is a cascade of three * continuation objects. * @param first the first Graph/Finder to try * @param second the second Graph/Finder to try * @param third the third Graph/Finder to try */ public static Finder cascade(Finder first, Finder second, Finder third) { return new Cascade(first, cascade(second, third)); }