Let's say that I have defined these variables
RDFNode bd= soln.get(SparqlConstants.BD) ;
RDFNode alias = soln.get(SparqlConstants.ALIAS) ;
RDFNode thumbnail = soln.get(SparqlConstants.THUMBNAIL) ;
RDFNode battingSide = soln.get(SparqlConstants.BATTING_SIDE) ;
And then for each one of them, I have to set in a value in a setter method like this
if (bd!= null)
player.setBirthDate(bd.asNode().getIndexingValue().toString());
Is there a way to have a generic method, that I pass the value and the method to call so generically this could be done in Java?