/** * Utility method to allow setting parameters of the form * {namespaceuri}localName * which get mapped to an instance variable in the class * Hence a parameter of the form "{http://foo.bar}xyz" * will be replaced with the corresponding values * by the BasisLibrary's utility method mapQNametoJavaName * and thus get mapped to legal java variable names */ public static String mapQNameToJavaName (String base ) { return replace(base, ".-:/{}?#%*", new String[] { "$dot$", "$dash$" ,"$colon$", "$slash$", "","$colon$","$ques$","$hash$","$per$", "$aster$"}); }
/** * Replace a certain character in a string with a new substring. */ public static String replace(String base, char ch, String str) { return (base.indexOf(ch) < 0) ? base : replace(base, String.valueOf(ch), new String[] { str }); }
/** * Utility method to allow setting parameters of the form * {namespaceuri}localName * which get mapped to an instance variable in the class * Hence a parameter of the form "{http://foo.bar}xyz" * will be replaced with the corresponding values * by the BasisLibrary's utility method mapQNametoJavaName * and thus get mapped to legal java variable names */ public static String mapQNameToJavaName (String base ) { return replace(base, ".-:/{}?#%*", new String[] { "$dot$", "$dash$" ,"$colon$", "$slash$", "","$colon$","$ques$","$hash$","$per$", "$aster$"}); }
/** * Utility method to allow setting parameters of the form * {namespaceuri}localName * which get mapped to an instance variable in the class * Hence a parameter of the form "{http://foo.bar}xyz" * will be replaced with the corresponding values * by the BasisLibrary's utility method mapQNametoJavaName * and thus get mapped to legal java variable names */ public static String mapQNameToJavaName (String base ) { return replace(base, ".-:/{}?#%*", new String[] { "$dot$", "$dash$" ,"$colon$", "$slash$", "","$colon$","$ques$","$hash$","$per$", "$aster$"}); }
/** * Utility method to allow setting parameters of the form * {namespaceuri}localName * which get mapped to an instance variable in the class * Hence a parameter of the form "{http://foo.bar}xyz" * will be replaced with the corresponding values * by the BasisLibrary's utility method mapQNametoJavaName * and thus get mapped to legal java variable names */ public static String mapQNameToJavaName (String base ) { return replace(base, ".-:/{}?#%*", new String[] { "$dot$", "$dash$" ,"$colon$", "$slash$", "","$colon$","$ques$","$hash$","$per$", "$aster$"}); }
/** * Replace a certain character in a string with a new substring. */ public static String replace(String base, char ch, String str) { return (base.indexOf(ch) < 0) ? base : replace(base, String.valueOf(ch), new String[] { str }); }
/** * Replace a certain character in a string with a new substring. */ public static String replace(String base, char ch, String str) { return (base.indexOf(ch) < 0) ? base : replace(base, String.valueOf(ch), new String[] { str }); }
/** * Replace a certain character in a string with a new substring. */ public static String replace(String base, char ch, String str) { return (base.indexOf(ch) < 0) ? base : replace(base, String.valueOf(ch), new String[] { str }); }