TurtleUtil { public static boolean isPN_PREFIX(String prefix) { if (prefix.length() == 0) { logger.debug("PN_PREFIX was not valid (empty)"); return false; } if (!isPN_CHARS_BASE(prefix.charAt(0))) { logger.debug("PN_PREFIX was not valid (start character invalid) i=0 nextchar={} prefix=", prefix.charAt(0), prefix); return false; } final int numberOfCodePoints = prefix.codePointCount(0, prefix.length()); for (int i = 1; i < numberOfCodePoints; i++) { final int codePoint = prefix.codePointAt(i); if (!isPN_CHARS(codePoint) || (codePoint == '.' && i < (numberOfCodePoints - 1))) { logger.debug( "PN_PREFIX was not valid (intermediate character invalid) i=" + i + " nextchar={} prefix={}", Character.toChars(codePoint), prefix); return false; } if (codePoint == '%' && (prefix.length() - i) < 2) { logger.debug("PN_PREFIX was not valid (percent encoding) i=" + i + " nextchar={} prefix={}", Character.toChars(codePoint), prefix); return false; } if (Character.isHighSurrogate((char) codePoint)) { i++; } } return true; }  static int findURISplitIndex(String uri); static boolean isWhitespace(int codePoint); static boolean isPN_CHARS_BASE(int codePoint); static boolean isPN_CHARS_U(int codePoint); static boolean isPN_CHARS(int codePoint); static boolean isPrefixStartChar(int codePoint); static boolean isBLANK_NODE_LABEL_StartChar(int codePoint); static boolean isBLANK_NODE_LABEL_Char(int codePoint); static boolean isBLANK_NODE_LABEL_EndChar(int codePoint); static boolean isNameStartChar(int codePoint); static boolean isNameChar(int codePoint); static boolean isNameEndChar(int codePoint); static boolean isLocalEscapedChar(int codePoint); static boolean isPrefixChar(int codePoint); static boolean isLanguageStartChar(int codePoint); static boolean isLanguageChar(int codePoint); static boolean isPN_PREFIX(String prefix); static boolean isPLX_START(String name); static boolean isPERCENT(String name); static boolean isPLX_INTERNAL(String name); static boolean isPN_LOCAL_ESC(String name); static boolean isPN_LOCAL(String name); static String encodeString(String s); static String encodeLongString(String s); @Deprecated static String encodeURIString(String s); static String decodeString(String s); static final char[] LOCAL_ESCAPED_CHARS; }
@Ignore("TODO: Implement me") @Test public final void testIsPN_PREFIX() { }