CIdentifier { @Nullable public static String createPercentEncoded (@Nullable final String sURL) { return sURL == null ? null : URLHelper.urlEncode (sURL); } private  CIdentifier(); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final IIdentifier aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final ParticipantIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final DocumentIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final ProcessIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.ParticipantIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.DocumentIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.ProcessIdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nonnull final com.helger.xsds.ccts.cct.schemamodule.IdentifierType aID); @Nonnull @Nonempty static String getURIEncoded(@Nullable final String sScheme, @Nullable final String sValue); @Nullable static String createPercentEncoded(@Nullable final String sURL); @Nullable static String createPercentDecoded(@Nullable final String sURL); @Nonnull static String getURIPercentEncoded(@Nonnull final IIdentifier aID); @Nonnull static String getURIPercentEncoded(@Nonnull final ParticipantIdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nonnull final DocumentIdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nonnull final ProcessIdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.ParticipantIdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.DocumentIdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nonnull final com.helger.xsds.bdxr.smp1.ProcessIdentifierType aID); @Nonnull @Nonempty static String getURIPercentEncoded(@Nonnull final com.helger.xsds.ccts.cct.schemamodule.IdentifierType aID); @Nonnull static String getURIPercentEncoded(@Nullable final String sScheme, @Nullable final String sValue); static final String DEFAULT_PROCESS_IDENTIFIER_NOPROCESS; static final String URL_SCHEME_VALUE_SEPARATOR; static final ClassPathResource XSD_PEPPOL_IDENTIFIERS; static final String NS_URI_PEPPOL_IDENTIFIERS; }
@Test public void testCreatePercentEncodedURL () { assertNull (CIdentifier.createPercentEncoded (null)); assertEquals ("", CIdentifier.createPercentEncoded ("")); assertEquals ("abc", CIdentifier.createPercentEncoded ("abc")); assertEquals ("a%25b", CIdentifier.createPercentEncoded ("a%b")); assertEquals ("a%25%25b", CIdentifier.createPercentEncoded ("a%%b")); assertEquals ("a%2Fb", CIdentifier.createPercentEncoded ("a/b")); }