| 1075 | } |
| 1076 | |
| 1077 | private static boolean isValidIRI(IRI iri) { |
| 1078 | String str = iri.stringValue(); |
| 1079 | if (str.startsWith("https://") || str.startsWith("http://") || str.startsWith("ftp://")) { |
| 1080 | return str.contains(".") && !str.contains(" ") && str.length() > 10; |
| 1081 | } |
| 1082 | |
| 1083 | if (str.startsWith("mailto:")) { |
| 1084 | return str.contains("@") && str.contains(".") && !str.contains(" ") && str.length() > 13; |
| 1085 | } |
| 1086 | |
| 1087 | if (str.startsWith("tel:")) { |
| 1088 | return str.length() > 5; |
| 1089 | } |
| 1090 | return false; |
| 1091 | } |
| 1092 | |
| 1093 | /** |
| 1094 | * Check if syntax of URLs / mailto IRI are valid, remove the statement if this isn't the case |