URIUtils { public static URI getNamespace(String shortform) { return getNamespace(getPrefixMappings(), shortform); }  synchronized static Map<String, String> getPrefixMappings(); synchronized static Map<String, String> loadPrefixMappings(); static String getShortform(URI uri); static String getShortform(URI uri, ShortformStrictness strictness); static String getShortform(URI uri, ShortformStrictness strictness, PrefixCreationMode prefixCreationMode); static String getShortform(final Map<String, String> prefixMappings, URI uri); static String getShortform(final Map<String, String> prefixMappings,
                                      URI uri,
                                      ShortformStrictness strictness,
                                      PrefixCreationMode prefixCreationMode); static URI getURI(String shortform); static URI getURI(final Map<String, String> prefixMappings, String shortform); static URI getNamespace(String shortform); static URI getNamespace(final Map<String, String> prefixMappings, String shortform); static String getFragment(String shortform); static URI extractNamespace(URI uri); static String extractFragment(URI uri); static boolean isNamespaceKnown(URI uri); static URI normalizeURI(String uriStr); static URI normalizeURI(URI uri); static URI incrementURI(ZoomaDAO dao, URI uri); static final PrefixCreationMode DEFAULT_PREFIX_CREATION_MODE; static final ShortformStrictness DEFAULT_SHORTFORM_STRICTNESS; static final URI SEARCH_NONE; }
@Test public void testGetNamespace() { URI result; result = URIUtils.extractNamespace(uri1); System.out.println("Namespace for <" + uri1 + "> is " + result); assertEquals(URI.create(namespace2), result); assertTrue(URIUtils.isNamespaceKnown(result)); result = URIUtils.extractNamespace(uri4); System.out.println("Namespace for <" + uri4 + "> is " + result); assertEquals(URI.create(namespace5), result); assertFalse(URIUtils.isNamespaceKnown(result)); }