The rules have some syntax problems:

"( ?x  http://www.semanticweb.org#GPA  ?score +   )"

as mentioned earlier in the thread then

"greaterThan(?score, userscore) "

but userscore is a java variable.

Also

inf.listResourcesWithProperty(RDF.type,
"GoodStudent")

uses a string not a URI so if not going to find anything.

        Andy

On 21/09/16 09:21, Lorenz B. wrote:
Are you sure that this code compiles?

Property prop= model.getProperty(ns,"GPA");

ns is a String in your code, the method expects a Resource object is
first argument. You totally use the wrong method here, as it returns a
Statement.

Model::createProperty(String nameSpace, String localName)

would be the method to call, or even better as you use an OntModel

OntModel::getDatatypeProperty( String uri )


Reply via email to