Comments inline:
> Hi
> I want to get the property value and then add add/sum 2 for each team with
> it.
> team1(win value +2) // value is 2 here
> team1(win value +2) // value is 4 here
>
> team.getPropertyValue(Win);
> //then next operation to get value and sum 2
>
> But the issue is I get error as I have not set the value first. 
Which "error" do you get? According to [1] it returns null if there
hasn't been a value set before.
Java allows for

if(something) {
// do something
}

[1]
https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/ontology/OntResource.html#getPropertyValue-org.apache.jena.rdf.model.Property-
> But if I
> set value before get the value, the property "win" always show that value
> and not after calculated value.
> Is there any way for this issue?
Using an Integer variable in Java that holds the value before if exists,
else 0 ... ?

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center


Reply via email to