/** * Table names must be lowercase ASCII strings. between 1 and 255 characters in length. Whitespace, ISO control * characters and certain punctuation characters that aren't generally allowed in file names or in elasticsearch * index names are excluded (elasticsearch appears to allow: !$%&()+-.:;=@[]^_`{}~). Table names may not begin * with a single underscore to allow URL space for extensions such as "/_table/...". */ public static boolean isLegalTableName(String table) { return com.bazaarvoice.emodb.common.api.Names.isLegalTableName(table); }
public static boolean isLegalTableName(String table) { return com.bazaarvoice.emodb.common.api.Names.isLegalTableName(table); }
public static boolean isLegalTableName(String table) { return com.bazaarvoice.emodb.common.api.Names.isLegalTableName(table); }
/** * Parses a string in the format "<table>/<id>". This is the inverse of {@link #toString()}. */ public static Coordinate parse(String string) { checkNotNull(string, "string"); int delim = string.indexOf('/'); checkArgument(delim != -1, "Invalid coordinate format."); String table = string.substring(0, delim); String id = string.substring(delim + 1); checkArgument(com.bazaarvoice.emodb.common.api.Names.isLegalTableName(table), "Invalid coordinate format: invalid table name"); checkArgument(!id.isEmpty(), "Invalid coordinate format: missing identifier"); return new Coordinate(table, id); }