Commit b7542fc2 authored by Hans-Ulrich Krieger (HUK)'s avatar Hans-Ulrich Krieger (HUK)
Browse files

minor changes in ForwardChainer and LGetLatestValues

parent dbd6d5fc
...@@ -1650,7 +1650,10 @@ public final class ForwardChainer { ...@@ -1650,7 +1650,10 @@ public final class ForwardChainer {
"/Users/krieger/Desktop/Java/HFC/hfc/src/resources/default.ns"); "/Users/krieger/Desktop/Java/HFC/hfc/src/resources/default.ns");
fc.uploadTuples("/Users/krieger/Desktop/Java/HFC/hfc/src/resources/ltworld.jena.nt"); fc.uploadTuples("/Users/krieger/Desktop/Java/HFC/hfc/src/resources/ltworld.jena.nt");
fc.computeClosure(); fc.computeClosure();
fc.computeClosure(); Query q = new Query(fc.tupleStore);
// different binder vars in aggregates
BindingTable bt = q.query("SELECT DISTINCT ?p WHERE ?s ?p ?o FILTER ?p != <rdf:type> AGGREGATE ?number = Count ?p & ?subject = Identity ?p");
System.out.println(bt);
fc.shutdown(); fc.shutdown();
/* /*
......
...@@ -33,10 +33,10 @@ import de.dfki.lt.hfc.types.XsdLong; ...@@ -33,10 +33,10 @@ import de.dfki.lt.hfc.types.XsdLong;
* <pal:labval33> <dom:bsl> "165.6"^^<xsd:mg_dL> "5577"^^<xsd:long> . * <pal:labval33> <dom:bsl> "165.6"^^<xsd:mg_dL> "5577"^^<xsd:long> .
* *
* example query from the PAL domain: * example query from the PAL domain:
* SELECT ?child ?prob ?val ?t * SELECT ?child ?prop ?val ?t
* WHERE ?child <rdf:type> <dom:Child> ?ts1 & * WHERE ?child <rdf:type> <dom:Child> ?ts1 &
* ?child <dom:hasLabValue> ?labvalue ?ts2 & * ?child <dom:hasLabValue> ?labvalue ?ts2 &
* ?labvalue ?prob ?val ? * ?labvalue ?prop ?val ?t
* AGGREGATE ?measurement ?result ?patient ?time = LGetLatestValues ?prop ?val ?child ?t ?t * AGGREGATE ?measurement ?result ?patient ?time = LGetLatestValues ?prop ?val ?child ?t ?t
* *
* what we would then like to see is * what we would then like to see is
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment