src/main/java/org/jboss/util/xml/catalog/helpers/PublicId.java
public static String decodeURN(String urn) {
    String publicId = "";

    if (urn.startsWith("urn:publicid:")) {
      publicId = urn.substring(13);
    } else {
      return urn;
    }

    publicId = PublicId.stringReplace(publicId, "%2F", "/");
    publicId = PublicId.stringReplace(publicId, ":", "//");
    publicId = PublicId.stringReplace(publicId, "%3A", ":");
    publicId = PublicId.stringReplace(publicId, ";", "::");
    publicId = PublicId.stringReplace(publicId, "+", " ");
    publicId = PublicId.stringReplace(publicId, "%2B", "+");
    publicId = PublicId.stringReplace(publicId, "%23", "#");
    publicId = PublicId.stringReplace(publicId, "%3F", "?");
    publicId = PublicId.stringReplace(publicId, "%27", "'");
    publicId = PublicId.stringReplace(publicId, "%3B", ";");
    publicId = PublicId.stringReplace(publicId, "%25", "%");

    return publicId;
    }
public static String decodeURN(String urn) {
    String publicId = "";

    if (urn.startsWith("urn:publicid:")) {
      publicId = urn.substring(13);
    } else {
      return urn;
    }

    publicId = PublicId.stringReplace(publicId, "%2F", "/");
    publicId = PublicId.stringReplace(publicId, ":", "//");
    publicId = PublicId.stringReplace(publicId, "%3A", ":");
    publicId = PublicId.stringReplace(publicId, ";", "::");
    publicId = PublicId.stringReplace(publicId, "+", " ");
    publicId = PublicId.stringReplace(publicId, "%2B", "+");
    publicId = PublicId.stringReplace(publicId, "%23", "#");
    publicId = PublicId.stringReplace(publicId, "%3F", "?");
    publicId = PublicId.stringReplace(publicId, "%27", "'");
    publicId = PublicId.stringReplace(publicId, "%3B", ";");
    publicId = PublicId.stringReplace(publicId, "%25", "%");

    return publicId;
    }
public static String decodeURN ( String urn ) { String publicId = "" ; if ( urn . startsWith ( "urn:publicid:" ) ) { publicId = urn . substring ( 13 ) ; } else { return urn ; } publicId = PublicId . stringReplace ( publicId , "%2F" , "/" ) ; publicId = PublicId . stringReplace ( publicId , ":" , "//" ) ; publicId = PublicId . stringReplace ( publicId , "%3A" , ":" ) ; publicId = PublicId . stringReplace ( publicId , ";" , "::" ) ; publicId = PublicId . stringReplace ( publicId , "+" , " " ) ; publicId = PublicId . stringReplace ( publicId , "%2B" , "+" ) ; publicId = PublicId . stringReplace ( publicId , "%23" , "#" ) ; publicId = PublicId . stringReplace ( publicId , "%3F" , "?" ) ; publicId = PublicId . stringReplace ( publicId , "%27" , "'" ) ; publicId = PublicId . stringReplace ( publicId , "%3B" , ";" ) ; publicId = PublicId . stringReplace ( publicId , "%25" , "%" ) ; return publicId ; }
Decode a "publicid" URN into a public identifier.

<p>This method is declared static so that other classes
can use it directly.</p>

@param urn The unnormalized public identifier.

@return The normalized identifier.
Decode a publicid URN into a public identifier .