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 .