Java Path to URL getURLPathFromURN(String urn)

Here you can find the source of getURLPathFromURN(String urn)

Description

get URL Path From URN

License

Open Source License

Declaration

public static String getURLPathFromURN(String urn) throws URISyntaxException 

Method Source Code

//package com.java2s;
/*/*from   www .j a  va  2 s. c  o m*/
 * ====================================================================
 *
 * This code is subject to the freebxml License, Version 1.1
 *
 * Copyright (c) 2001 - 2003 freebxml.org.  All rights reserved.
 *
 * $Header: /cvsroot/ebxmlrr/omar/src/java/org/freebxml/omar/common/Utility.java,v 1.40 2007/05/18 18:58:59 psterk Exp $
 * ====================================================================
 */

import java.net.URI;
import java.net.URISyntaxException;

public class Main {
    public static String getURLPathFromURN(String urn) throws URISyntaxException {
        String path = null;

        URI uri = new java.net.URI(urn);
        path = urn.replaceAll("[:]", "/");
        return path;
    }
}

Related

  1. getURLPath(URL repositoryURL)
  2. getURLPath(URL url)
  3. getUrlPath(URL url)
  4. getUrlPath(URL url)
  5. getURLPathFromURI(String uri)
  6. getURLs(List paths)
  7. getURLs(String thePaths[])
  8. getUrlsFromClassPath(String path)
  9. getWebDocInfoStr(String urlPath)