// check for valid uri
private Set<String> findUris(Graph graph) {
        Set<String> result = new HashSet<>();
        for (Triple t : graph.iterate()) {
            try {
                String object = t.getObject().toString().replace("<", "").replace(">", "");
                // check for valid uri
                new URL(object).toURI();
                result.add(object);
            } catch (MalformedURLException e) {
                e.printStackTrace();
            } catch (URISyntaxException e) {
                e.printStackTrace();
            }
        }
        return result;
    }
try {
String object = t.getObject().toString().replace("<", "").replace(">", "");
// check for valid uri
new URL(object).toURI();
result.add(object);
private Set<String> findUris(Graph graph) {
Set<String> result = new HashSet<>();
for (Triple t : graph.iterate()) {
try {
String object = t.getObject().toString().replace("<", "").replace(">", "");
// check for valid uri
new URL(object).toURI();
result.add(object);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
return result;
}
private Set<String> findUris(Graph graph) {
Set<String> result = new HashSet<>();
for (Triple t : graph.iterate()) {
try {
String object = t.getObject().toString().replace("<", "").replace(">", "");
// check for valid uri
new URL(object).toURI();
result.add(object);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
return result;
}