|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.topbraid.spin.inference.SPINInferences
public class SPINInferences
A service to execute inference rules based on the spin:rule property.
| Constructor Summary | |
|---|---|
SPINInferences()
|
|
| Method Summary | |
|---|---|
static boolean |
isRuleProperty(Property property)
Checks if a given property is a SPIN rule property. |
static int |
run(Model queryModel,
Model newTriples,
java.util.Map<Resource,java.util.List<QueryWrapper>> class2Query,
java.util.Map<QueryWrapper,java.util.Map<java.lang.String,RDFNode>> templateBindings,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
Property rulePredicate,
SPINRuleComparator comparator,
ProgressMonitor monitor)
Iterates over a provided collection of SPIN rules and adds all constructed triples to a given Model (newTriples) until no further changes have been made within one iteration. |
static int |
run(Model queryModel,
Model newTriples,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
ProgressMonitor monitor)
See the other run method for help - this is using spin:rule as rulePredicate. |
static int |
run(Model queryModel,
Property rulePredicate,
Model newTriples,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
ProgressMonitor monitor)
Iterates over all SPIN rules in a (query) Model and adds all constructed triples to a given Model (newTriples) until no further changes have been made within one iteration. |
static boolean |
runQueryOnInstance(Query arq,
Model queryModel,
Model newTriples,
Resource instance,
boolean checkContains,
java.util.Map<java.lang.String,RDFNode> initialBindings)
Runs a given Jena Query on a given instance and adds the inferred triples to a given Model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SPINInferences()
| Method Detail |
|---|
public static boolean isRuleProperty(Property property)
property - the property to check
public static int run(Model queryModel,
Model newTriples,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
ProgressMonitor monitor)
queryModel - the Model to querynewTriples - the Model to add the new triples toexplanations - an optional object to write explanations tostatistics - optional list to add statistics about which queries were slowsinglePass - true to just do a single pass (don't iterate)monitor - an optional ProgressMonitor
run(Model, Property, Model, SPINExplanations, List, boolean, ProgressMonitor)
public static int run(Model queryModel,
Property rulePredicate,
Model newTriples,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
ProgressMonitor monitor)
queryModel - the Model to queryrulePredicate - the rule predicate (spin:rule or a sub-property thereof)newTriples - the Model to add the new triples toexplanations - an optional object to write explanations tostatistics - optional list to add statistics about which queries were slowsinglePass - true to just do a single pass (don't iterate)monitor - an optional ProgressMonitor
public static int run(Model queryModel,
Model newTriples,
java.util.Map<Resource,java.util.List<QueryWrapper>> class2Query,
java.util.Map<QueryWrapper,java.util.Map<java.lang.String,RDFNode>> templateBindings,
SPINExplanations explanations,
java.util.List<SPINStatistics> statistics,
boolean singlePass,
Property rulePredicate,
SPINRuleComparator comparator,
ProgressMonitor monitor)
queryModel - the Model to querynewTriples - the Model to add the new triples toclass2Query - the map of queries to run (see SPINQueryFinder)templateBindings - initial template bindings (see SPINQueryFinder)explanations - an optional object to write explanations tostatistics - optional list to add statistics about which queries were slowsinglePass - true to just do a single pass (don't iterate)rulePredicate - the predicate used (e.g. spin:rule)comparator - optional comparator to determine the order of rule executionmonitor - an optional ProgressMonitor
public static boolean runQueryOnInstance(Query arq,
Model queryModel,
Model newTriples,
Resource instance,
boolean checkContains,
java.util.Map<java.lang.String,RDFNode> initialBindings)
arq - the CONSTRUCT query to executequeryModel - the query ModelnewTriples - the Model to write the triples toinstance - the instance to run the inferences oncheckContains - true to only call add if a Triple wasn't there yetinitialBindings - the initial bindings for arq or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||