/** * Internal constructor, used to generated a partial binding of a schema * to a rule reasoner instance. */ protected RDFSRuleReasoner(FBRuleInfGraph schemaGraph, ReasonerFactory factory) { super(schemaGraph.getRules(), factory); this.schemaGraph = schemaGraph; }
/** * Internal constructor, used to generated a partial binding of a schema * to a rule reasoner instance. */ protected RDFSRuleReasoner(FBRuleInfGraph schemaGraph, ReasonerFactory factory) { super(schemaGraph.getRules(), factory); this.schemaGraph = schemaGraph; }
Graph schemaArg = schemaGraph == null ? getPreload() : schemaGraph; InfGraph graph = null; List<Rule> ruleSet = ((FBRuleInfGraph)schemaArg).getRules(); FBRuleInfGraph fbgraph = new RDFSRuleInfGraph(this, ruleSet, schemaArg); graph = fbgraph;
Graph schemaArg = schemaGraph == null ? getPreload() : schemaGraph; InfGraph graph = null; List<Rule> ruleSet = ((FBRuleInfGraph)schemaArg).getRules(); FBRuleInfGraph fbgraph = new RDFSRuleInfGraph(this, ruleSet, schemaArg); graph = fbgraph;
/** * Attach the reasoner to a set of RDF data to process. * The reasoner may already have been bound to specific rules or ontology * axioms (encoded in RDF) through earlier bindRuleset calls. * * @param data the RDF data to be processed, some reasoners may restrict * the range of RDF which is legal here (e.g. syntactic restrictions in OWL). * @return an inference graph through which the data+reasoner can be queried. * @throws ReasonerException if the data is ill-formed according to the * constraints imposed by this reasoner. */ @Override public InfGraph bind(Graph data) throws ReasonerException { checkArgGraph(data); FBRuleInfGraph graph = null; InfGraph schemaArg = schemaGraph == null ? getPreload() : (FBRuleInfGraph)schemaGraph; List<Rule> baseRules = ((FBRuleInfGraph)schemaArg).getRules(); graph = new FBRuleInfGraph(this, baseRules, schemaArg); graph.addPreprocessingHook(new OWLRuleTranslationHook()); graph.setDerivationLogging(recordDerivations); graph.setTraceOn(traceOn); graph.rebind(data); graph.setDatatypeRangeValidation(true); return graph; }
/** * Attach the reasoner to a set of RDF data to process. * The reasoner may already have been bound to specific rules or ontology * axioms (encoded in RDF) through earlier bindRuleset calls. * * @param data the RDF data to be processed, some reasoners may restrict * the range of RDF which is legal here (e.g. syntactic restrictions in OWL). * @return an inference graph through which the data+reasoner can be queried. * @throws ReasonerException if the data is ill-formed according to the * constraints imposed by this reasoner. */ @Override public InfGraph bind(Graph data) throws ReasonerException { checkArgGraph(data); FBRuleInfGraph graph = null; InfGraph schemaArg = schemaGraph == null ? getPreload() : (FBRuleInfGraph)schemaGraph; List<Rule> baseRules = ((FBRuleInfGraph)schemaArg).getRules(); graph = new FBRuleInfGraph(this, baseRules, schemaArg); graph.addPreprocessingHook(new OWLRuleTranslationHook()); graph.setDerivationLogging(recordDerivations); graph.setTraceOn(traceOn); graph.rebind(data); graph.setDatatypeRangeValidation(true); return graph; }
((LPBackwardRuleInfGraph)graph).setTraceOn(traceOn); } else { List<Rule> ruleSet = ((FBRuleInfGraph)schemaArg).getRules(); FBRuleInfGraph fbgraph = new FBRuleInfGraph(this, ruleSet, schemaArg); graph = fbgraph;
((LPBackwardRuleInfGraph)graph).setTraceOn(traceOn); } else { List<Rule> ruleSet = ((FBRuleInfGraph)schemaArg).getRules(); FBRuleInfGraph fbgraph = new FBRuleInfGraph(this, ruleSet, schemaArg); graph = fbgraph;