@Test public void testConvertSpecialCharacters() { String input = "http: String output = annotationUtils.convertSpecialCharacters(input); LOG.info(input); LOG.info(output); assertEquals(output, "(\"http: input = "trt:ttttt"; output = annotationUtils.convertSpecialCharacters(input); LOG.info(input); LOG.info(output); assertEquals(output, "trt\\:ttttt"); input = "http: output = annotationUtils.convertSpecialCharacters(input); LOG.info(input); LOG.info(output); assertEquals(output, "(\"http: input = "https: output = annotationUtils.convertSpecialCharacters(input); LOG.info(input); LOG.info(output); }
public String convertSpecialCharacters(String input) { String returnInput = input; if (null != input && input.contains(":")) { List<String> inputList = getListFromSpaceSeparatedTerms(input); for (String replacement : inputList) { if (replacement.contains(":")) { String start = replacement.toLowerCase().substring(0, replacement.indexOf(":")); String tidyQuery; if (ArrayUtils.contains(SCHEMES, start)) { tidyQuery = "(\"" + replacement + "\")"; } else { tidyQuery = replacement.replaceAll(":", "\\\\:"); } returnInput = returnInput.replace(replacement, tidyQuery); } } } else { return input; } return returnInput; }
AnnotationUtils extends CommonUtils { public String convertSpecialCharacters(String input) { String returnInput = input; if (null != input && input.contains(":")) { List<String> inputList = getListFromSpaceSeparatedTerms(input); for (String replacement : inputList) { if (replacement.contains(":")) { String start = replacement.toLowerCase().substring(0, replacement.indexOf(":")); String tidyQuery; if (ArrayUtils.contains(SCHEMES, start)) { tidyQuery = "(\"" + replacement + "\")"; } else { tidyQuery = replacement.replaceAll(":", "\\\\:"); } returnInput = returnInput.replace(replacement, tidyQuery); } } } else { return input; } return returnInput; } }
AnnotationUtils extends CommonUtils { public String convertSpecialCharacters(String input) { String returnInput = input; if (null != input && input.contains(":")) { List<String> inputList = getListFromSpaceSeparatedTerms(input); for (String replacement : inputList) { if (replacement.contains(":")) { String start = replacement.toLowerCase().substring(0, replacement.indexOf(":")); String tidyQuery; if (ArrayUtils.contains(SCHEMES, start)) { tidyQuery = "(\"" + replacement + "\")"; } else { tidyQuery = replacement.replaceAll(":", "\\\\:"); } returnInput = returnInput.replace(replacement, tidyQuery); } } } else { return input; } return returnInput; }  }
AnnotationUtils extends CommonUtils { public String convertSpecialCharacters(String input) { String returnInput = input; if (null != input && input.contains(":")) { List<String> inputList = getListFromSpaceSeparatedTerms(input); for (String replacement : inputList) { if (replacement.contains(":")) { String start = replacement.toLowerCase().substring(0, replacement.indexOf(":")); String tidyQuery; if (ArrayUtils.contains(SCHEMES, start)) { tidyQuery = "(\"" + replacement + "\")"; } else { tidyQuery = replacement.replaceAll(":", "\\\\:"); } returnInput = returnInput.replace(replacement, tidyQuery); } } } else { return input; } return returnInput; }  Map<String, Object> createAnnotationPage(String query, List<W3CAnnotation> annoList, boolean isW3c,
	    PageParameters pageParams, int totalHits, boolean isMixedSearch); Map<String, Object> createAutocompleteList(List<SuggestOption> options, boolean isW3c, String queryString,
	    String motivation, String date, String user); List<W3CAnnotation> getW3CAnnotations(String[] annotationArray); String convertSpecialCharacters(String input); int[] getPageParams(Map<String, Object> root, boolean isW3c); }
AnnotationUtils extends CommonUtils { public String convertSpecialCharacters(String input) { String returnInput = input; if (null != input && input.contains(":")) { List<String> inputList = getListFromSpaceSeparatedTerms(input); for (String replacement : inputList) { if (replacement.contains(":")) { String start = replacement.toLowerCase().substring(0, replacement.indexOf(":")); String tidyQuery; if (ArrayUtils.contains(SCHEMES, start)) { tidyQuery = "(\"" + replacement + "\")"; } else { tidyQuery = replacement.replaceAll(":", "\\\\:"); } returnInput = returnInput.replace(replacement, tidyQuery); } } } else { return input; } return returnInput; }  Map<String, Object> createAnnotationPage(String query, List<W3CAnnotation> annoList, boolean isW3c,
	    PageParameters pageParams, int totalHits, boolean isMixedSearch); Map<String, Object> createAutocompleteList(List<SuggestOption> options, boolean isW3c, String queryString,
	    String motivation, String date, String user); List<W3CAnnotation> getW3CAnnotations(String[] annotationArray); String convertSpecialCharacters(String input); int[] getPageParams(Map<String, Object> root, boolean isW3c); static final String SERVICE_NAME; }