public class NameUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
labelPattern |
static Pattern |
prefixSyntax |
Constructor and Description |
---|
NameUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isLegalShortname(String l)
Answer true iff
proposed matches the permitted
syntax of short names (which amount to the intersection of Javascript
names, to make native JSON handling convenient, and XML element names,
to make legal XML). |
static String |
localName(String uri) |
static String |
nameSpace(String uri) |
static int |
prefixEndsAt(String proposed)
Answer N if
proposed starts with a legal simple prefix
name and then _, where N is the index of the first character past the
_, or -1 if it does not so start. |
public static Pattern labelPattern
public static final Pattern prefixSyntax
public static boolean isLegalShortname(String l)
proposed
matches the permitted
syntax of short names (which amount to the intersection of Javascript
names, to make native JSON handling convenient, and XML element names,
to make legal XML).public static int prefixEndsAt(String proposed)
proposed
starts with a legal simple prefix
name and then _, where N is the index of the first character past the
_, or -1 if it does not so start.Copyright © 2014. All Rights Reserved.