Methods Summary |
---|
public static void | TRACE1()
System.out.println("TRACE1");
|
public static void | TRACE2()
System.out.println("TRACE2");
|
public static void | TRACE3()
System.out.println("TRACE3");
|
public static java.lang.String | baseName(java.lang.String name)Search for both slashes in order to support URLs and
files.
int index = name.lastIndexOf('\\");
if (index < 0) {
index = name.lastIndexOf('/");
}
if (index >= 0)
return name.substring(index + 1);
else {
int lastColonIndex = name.lastIndexOf(':");
if (lastColonIndex > 0)
return name.substring(lastColonIndex + 1);
else
return name;
}
|
public static java.lang.String | escape(java.lang.String input)Replace occurances of '.', '-', '/' and ':'
return replace(input, ".-/:",
new String[] { "$dot$", "$dash$", "$slash$", "$colon$" });
|
public static com.sun.org.apache.bcel.internal.generic.Type | getJCRefType(java.lang.String signature)
return Type.getType(signature);
|
public static java.lang.String | getLocalName(java.lang.String qname)
final int index = qname.lastIndexOf(":");
return (index > 0) ? qname.substring(index + 1) : qname;
|
public static java.lang.String | getPrefix(java.lang.String qname)
final int index = qname.lastIndexOf(":");
return (index > 0) ? qname.substring(0, index) :
Constants.EMPTYSTRING;
|
public static java.lang.String | internalName(java.lang.String cname)
return cname.replace('.", filesep);
|
public static boolean | isLiteral(java.lang.String str)Checks if the string is a literal (i.e. not an AVT) or not.
final int length = str.length();
for (int i = 0; i < length - 1; i++) {
if (str.charAt(i) == '{" && str.charAt(i + 1) != '{") {
return false;
}
}
return true;
|
public static boolean | isValidQNames(java.lang.String str)Checks if the string is valid list of qnames
if ((str != null) && (!str.equals(Constants.EMPTYSTRING))) {
final StringTokenizer tokens = new StringTokenizer(str);
while (tokens.hasMoreTokens()) {
if (!XMLChar.isValidQName(tokens.nextToken())) {
return false;
}
}
}
return true;
|
public static java.lang.String | noExtName(java.lang.String name)
String temp = System.getProperty("file.separator", "/");
filesep = temp.charAt(0);
final int index = name.lastIndexOf('.");
return name.substring(0, index >= 0 ? index : name.length());
|
public static java.lang.String | pathName(java.lang.String name)Search for both slashes in order to support URLs and
files.
int index = name.lastIndexOf('/");
if (index < 0) {
index = name.lastIndexOf('\\");
}
return name.substring(0, index + 1);
|
public static void | println(java.lang.String s)
System.out.println(s);
|
public static void | println(char ch)
System.out.println(ch);
|
public static java.lang.String | replace(java.lang.String base, char ch, java.lang.String str)Replace a certain character in a string with a new substring.
return (base.indexOf(ch) < 0) ? base :
replace(base, String.valueOf(ch), new String[] { str });
|
public static java.lang.String | replace(java.lang.String base, java.lang.String delim, java.lang.String[] str)
final int len = base.length();
final StringBuffer result = new StringBuffer();
for (int i = 0; i < len; i++) {
final char ch = base.charAt(i);
final int k = delim.indexOf(ch);
if (k >= 0) {
result.append(str[k]);
}
else {
result.append(ch);
}
}
return result.toString();
|
public static java.lang.String | toJavaName(java.lang.String name)Replace all illegal Java chars by '_'.
if (name.length() > 0) {
final StringBuffer result = new StringBuffer();
char ch = name.charAt(0);
result.append(Character.isJavaIdentifierStart(ch) ? ch : '_");
final int n = name.length();
for (int i = 1; i < n; i++) {
ch = name.charAt(i);
result.append(Character.isJavaIdentifierPart(ch) ? ch : '_");
}
return result.toString();
}
return name;
|