@Test public void isValidTest() { WikidataValidator validator = new WikidataValidator(); assertTrue(validator.isValid("https: assertTrue(validator.isValid("https: assertTrue(validator.isValid("https: assertTrue(validator.isValid("http: assertTrue(validator.isValid("http: assertTrue(validator.isValid("http: assertTrue(validator.isValid("wikidata.org/wiki/Property:P569")); assertTrue(validator.isValid("www.wikidata.org/wiki/Lexeme:L1")); assertTrue(validator.isValid("www.wikidata.org/entity/ID")); assertFalse(validator.isValid(null)); assertFalse(validator.isValid("")); assertFalse(validator.isValid("http.wikidata.org/entity/ID")); assertFalse(validator.isValid("ftp: assertFalse(validator.isValid("http: assertFalse(validator.isValid("https: assertFalse(validator.isValid("https: assertFalse(validator.isValid("https: assertFalse(validator.isValid("http: assertFalse(validator.isValid("https: assertFalse(validator.isValid("awdawdawd")); }
@Override public boolean isValid(String value) { if (Strings.isNullOrEmpty(value)) { return false; } Matcher matcher = WIKIDATA_PATTERN.matcher(value); return matcher.matches(); }
WikidataValidator implements IdentifierSchemeValidator { @Override public boolean isValid(String value) { if (Strings.isNullOrEmpty(value)) { return false; } Matcher matcher = WIKIDATA_PATTERN.matcher(value); return matcher.matches(); } }
WikidataValidator implements IdentifierSchemeValidator { @Override public boolean isValid(String value) { if (Strings.isNullOrEmpty(value)) { return false; } Matcher matcher = WIKIDATA_PATTERN.matcher(value); return matcher.matches(); }  }
WikidataValidator implements IdentifierSchemeValidator { @Override public boolean isValid(String value) { if (Strings.isNullOrEmpty(value)) { return false; } Matcher matcher = WIKIDATA_PATTERN.matcher(value); return matcher.matches(); }  @Override boolean isValid(String value); @Override String normalize(String value); }
WikidataValidator implements IdentifierSchemeValidator { @Override public boolean isValid(String value) { if (Strings.isNullOrEmpty(value)) { return false; } Matcher matcher = WIKIDATA_PATTERN.matcher(value); return matcher.matches(); }  @Override boolean isValid(String value); @Override String normalize(String value);  }