Here you can find the source of sanitizeBlankNodeName(String filename)
Parameter | Description |
---|---|
filename | a parameter |
private static String sanitizeBlankNodeName(String filename)
//package com.java2s; //License from project: Apache License public class Main { /**/*ww w .j a v a2 s. c o m*/ * Blank node names should start with a letter and have only * letters/numbers. TODO: Is there a case where we have two files that share * all letters/numbers in the same order? * * @param filename * @return */ private static String sanitizeBlankNodeName(String filename) { StringBuffer ret = new StringBuffer(filename.length()); if (!filename.isEmpty()) { char charAt0 = filename.charAt(0); if (Character.isLetter(charAt0)) ret.append(charAt0); } for (int i = 1; i < filename.length(); i++) { char ch = filename.charAt(i); if (Character.isLetterOrDigit(ch)) { ret.append(ch); } } return ret.toString(); } }