@Test public void itisTaxon() { assertThat( ExternalIdUtil.taxonomyProviderFor("https: is(TaxonomyProvider.ITIS) ); }
public static TaxonomyProvider taxonomyProviderFor(String externalId) { TaxonomyProvider provider = null; if (StringUtils.isNotBlank(externalId)) { for (TaxonomyProvider prefix : TaxonomyProvider.values()) { for (String idPrefix : prefix.getIdPrefixes()) { if (StringUtils.startsWith(externalId, idPrefix)) { provider = prefix; break; } } } } return provider; }
ExternalIdUtil { public static TaxonomyProvider taxonomyProviderFor(String externalId) { TaxonomyProvider provider = null; if (StringUtils.isNotBlank(externalId)) { for (TaxonomyProvider prefix : TaxonomyProvider.values()) { for (String idPrefix : prefix.getIdPrefixes()) { if (StringUtils.startsWith(externalId, idPrefix)) { provider = prefix; break; } } } } return provider; } }
ExternalIdUtil { public static TaxonomyProvider taxonomyProviderFor(String externalId) { TaxonomyProvider provider = null; if (StringUtils.isNotBlank(externalId)) { for (TaxonomyProvider prefix : TaxonomyProvider.values()) { for (String idPrefix : prefix.getIdPrefixes()) { if (StringUtils.startsWith(externalId, idPrefix)) { provider = prefix; break; } } } } return provider; }  }
ExternalIdUtil { public static TaxonomyProvider taxonomyProviderFor(String externalId) { TaxonomyProvider provider = null; if (StringUtils.isNotBlank(externalId)) { for (TaxonomyProvider prefix : TaxonomyProvider.values()) { for (String idPrefix : prefix.getIdPrefixes()) { if (StringUtils.startsWith(externalId, idPrefix)) { provider = prefix; break; } } } } return provider; }  static String urlForExternalId(String externalId); static boolean isIRMNG(String idPrefix); static String urlForIRMNG(String externalId, String idPrefix); static Map<String, String> getURLPrefixMap(); static Map<String, String> getURLSuffixMap(); static boolean isSupported(String externalId); static TaxonomyProvider taxonomyProviderFor(String externalId); static String getUrlFromExternalId(String jsonString); static String buildJsonUrl(String url); static String toCitation(String contributor, String description, String publicationYear); static String selectValue(Map<String, String> link, String[] candidateIdsInIncreasingPreference); static boolean hasProperty(Map<String, String> link, String propertyName); static String stripPrefix(TaxonomyProvider provider, String externalId); static String prefixForUrl(String url); static boolean isLikelyId(String idCandidate); static boolean isUnlikelyId(String idCandidate); }
ExternalIdUtil { public static TaxonomyProvider taxonomyProviderFor(String externalId) { TaxonomyProvider provider = null; if (StringUtils.isNotBlank(externalId)) { for (TaxonomyProvider prefix : TaxonomyProvider.values()) { for (String idPrefix : prefix.getIdPrefixes()) { if (StringUtils.startsWith(externalId, idPrefix)) { provider = prefix; break; } } } } return provider; }  static String urlForExternalId(String externalId); static boolean isIRMNG(String idPrefix); static String urlForIRMNG(String externalId, String idPrefix); static Map<String, String> getURLPrefixMap(); static Map<String, String> getURLSuffixMap(); static boolean isSupported(String externalId); static TaxonomyProvider taxonomyProviderFor(String externalId); static String getUrlFromExternalId(String jsonString); static String buildJsonUrl(String url); static String toCitation(String contributor, String description, String publicationYear); static String selectValue(Map<String, String> link, String[] candidateIdsInIncreasingPreference); static boolean hasProperty(Map<String, String> link, String propertyName); static String stripPrefix(TaxonomyProvider provider, String externalId); static String prefixForUrl(String url); static boolean isLikelyId(String idCandidate); static boolean isUnlikelyId(String idCandidate);  }