This program returns all the synonyms for a given input. But this code is for java 1.8. How to convert this code for Java 1.6.
model.listIndividuals().forEachRemaining(ind -> {
if(((Resource)ind).getLocalName().toString().equalsIgnoreCase(input)){
System.out.println("Synonyms of " + ((Resource)ind).getLocalName().toString() + " are:");
ind.listPropertyValues(isSynonymOf).forEachRemaining(val -> {
System.out.println(" * " + ((Resource) val).getLocalName().toString());
});
}
});