test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/query/SimpleExcerptProviderTest.java
test_class.identifier: SimpleExcerptProviderTest
test_case.body: @Test
      public void simpleTest() throws Exception {
          assertEquals("<div><span><strong>fox</strong> is jumping</span></div>",
                  highlight(sb("fox is jumping"), of("fox")));
          assertEquals("<div><span>fox is <strong>jumping</strong></span></div>",
                  highlight(sb("fox is jumping"), of("jump*")));
  
      }
test_case.class_method_signature: SimpleExcerptProviderTest.simpleTest()
test_case.full_signature: @Test public void simpleTest()
test_case.identifier: simpleTest
test_case.invocations: assertEquals highlight sb of assertEquals highlight sb of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void simpleTest()
focal_class.declarator: REP_EXCERPT_FN = "rep:excerpt(.)"
focal_class.modifier: static final
focal_class.original_string: static final String REP_EXCERPT_FN = "rep:excerpt(.)";
focal_class.type: String
focal_class.var_name: REP_EXCERPT_FN
focal_class.declarator: EXCERPT_END = "</span></div>"
focal_class.modifier: static final
focal_class.original_string: static final String EXCERPT_END = "</span></div>";
focal_class.type: String
focal_class.var_name: EXCERPT_END
focal_class.declarator: EXCERPT_BEGIN = "<div><span>"
focal_class.modifier: static final
focal_class.original_string: static final String EXCERPT_BEGIN = "<div><span>";
focal_class.type: String
focal_class.var_name: EXCERPT_BEGIN
focal_class.declarator: CASE_SENSITIVE_HIGHLIGHT = Boolean.getBoolean("oak.query.caseSensitiveHighlight")
focal_class.modifier: private static final
focal_class.original_string: private static final boolean CASE_SENSITIVE_HIGHLIGHT = Boolean.getBoolean("oak.query.caseSensitiveHighlight");
focal_class.type: boolean
focal_class.var_name: CASE_SENSITIVE_HIGHLIGHT
focal_class.declarator: maxFragmentSize = 150
focal_class.modifier: private static
focal_class.original_string: private static int maxFragmentSize = 150;
focal_class.type: int
focal_class.var_name: maxFragmentSize
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/query/SimpleExcerptProvider.java
focal_class.identifier: SimpleExcerptProvider
focal_class.class_method_signature: SimpleExcerptProvider.SimpleExcerptProvider()
focal_class.full_signature: private  SimpleExcerptProvider()
focal_class.identifier: SimpleExcerptProvider
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SimpleExcerptProvider()
focal_class.class_method_signature: SimpleExcerptProvider.getExcerpt(String path, String columnName,
                               Query query, boolean highlight)
focal_class.full_signature: static String getExcerpt(String path, String columnName,
                               Query query, boolean highlight)
focal_class.identifier: getExcerpt
focal_class.modifiers: static
focal_class.parameters: (String path, String columnName,
                               Query query, boolean highlight)
focal_class.return: String
focal_class.signature: String getExcerpt(String path, String columnName,
                               Query query, boolean highlight)
focal_class.class_method_signature: SimpleExcerptProvider.extractExcerptProperty(String column)
focal_class.full_signature: private static String extractExcerptProperty(String column)
focal_class.identifier: extractExcerptProperty
focal_class.modifiers: private static
focal_class.parameters: (String column)
focal_class.return: String
focal_class.signature: String extractExcerptProperty(String column)
focal_class.class_method_signature: SimpleExcerptProvider.extractFulltext(Query q)
focal_class.full_signature: private static Set<String> extractFulltext(Query q)
focal_class.identifier: extractFulltext
focal_class.modifiers: private static
focal_class.parameters: (Query q)
focal_class.return: Set<String>
focal_class.signature: Set<String> extractFulltext(Query q)
focal_class.class_method_signature: SimpleExcerptProvider.extractFulltext(ConstraintImpl c)
focal_class.full_signature: private static Set<String> extractFulltext(ConstraintImpl c)
focal_class.identifier: extractFulltext
focal_class.modifiers: private static
focal_class.parameters: (ConstraintImpl c)
focal_class.return: Set<String>
focal_class.signature: Set<String> extractFulltext(ConstraintImpl c)
focal_class.class_method_signature: SimpleExcerptProvider.tokenize(Set<String> in)
focal_class.full_signature: private static Set<String> tokenize(Set<String> in)
focal_class.identifier: tokenize
focal_class.modifiers: private static
focal_class.parameters: (Set<String> in)
focal_class.return: Set<String>
focal_class.signature: Set<String> tokenize(Set<String> in)
focal_class.class_method_signature: SimpleExcerptProvider.tokenize(String in)
focal_class.full_signature: private static Set<String> tokenize(String in)
focal_class.identifier: tokenize
focal_class.modifiers: private static
focal_class.parameters: (String in)
focal_class.return: Set<String>
focal_class.signature: Set<String> tokenize(String in)
focal_class.class_method_signature: SimpleExcerptProvider.noHighlight(StringBuilder text)
focal_class.full_signature: private static String noHighlight(StringBuilder text)
focal_class.identifier: noHighlight
focal_class.modifiers: private static
focal_class.parameters: (StringBuilder text)
focal_class.return: String
focal_class.signature: String noHighlight(StringBuilder text)
focal_class.class_method_signature: SimpleExcerptProvider.highlight(StringBuilder text, Set<String> searchToken)
focal_class.full_signature: static String highlight(StringBuilder text, Set<String> searchToken)
focal_class.identifier: highlight
focal_class.modifiers: static
focal_class.parameters: (StringBuilder text, Set<String> searchToken)
focal_class.return: String
focal_class.signature: String highlight(StringBuilder text, Set<String> searchToken)
focal_class.class_method_signature: SimpleExcerptProvider.highlight(String text, BitSet highlightBits, String token)
focal_class.full_signature: private static void highlight(String text, BitSet highlightBits, String token)
focal_class.identifier: highlight
focal_class.modifiers: private static
focal_class.parameters: (String text, BitSet highlightBits, String token)
focal_class.return: void
focal_class.signature: void highlight(String text, BitSet highlightBits, String token)
focal_class.class_method_signature: SimpleExcerptProvider.indexOfSearchText(String text, String searchStr, int fromIndex)
focal_class.full_signature: private static int indexOfSearchText(String text, String searchStr, int fromIndex)
focal_class.identifier: indexOfSearchText
focal_class.modifiers: private static
focal_class.parameters: (String text, String searchStr, int fromIndex)
focal_class.return: int
focal_class.signature: int indexOfSearchText(String text, String searchStr, int fromIndex)
focal_class.class_method_signature: SimpleExcerptProvider.indexOfIgnoreCase(String str, String searchStr, int startPos)
focal_class.full_signature: public static int indexOfIgnoreCase(String str, String searchStr, int startPos)
focal_class.identifier: indexOfIgnoreCase
focal_class.modifiers: public static
focal_class.parameters: (String str, String searchStr, int startPos)
focal_class.return: int
focal_class.signature: int indexOfIgnoreCase(String str, String searchStr, int startPos)
focal_class.class_method_signature: SimpleExcerptProvider.isDelimeter(int codePoint)
focal_class.full_signature: static boolean isDelimeter(int codePoint)
focal_class.identifier: isDelimeter
focal_class.modifiers: static
focal_class.parameters: (int codePoint)
focal_class.return: boolean
focal_class.signature: boolean isDelimeter(int codePoint)
focal_class.class_method_signature: SimpleExcerptProvider.getExcerpt(PropertyValue value)
focal_class.full_signature: static PropertyValue getExcerpt(PropertyValue value)
focal_class.identifier: getExcerpt
focal_class.modifiers: static
focal_class.parameters: (PropertyValue value)
focal_class.return: PropertyValue
focal_class.signature: PropertyValue getExcerpt(PropertyValue value)
focal_method.body: static String highlight(StringBuilder text, Set<String> searchToken) {
          Set<String> tokens = tokenize(searchToken);
          String escaped = encodeIllegalXMLCharacters(text.toString());
          BitSet highlight = new BitSet();
          for (String token : tokens) {
              highlight(escaped, highlight, token);
          }
          StringBuilder excerpt = new StringBuilder(EXCERPT_BEGIN);
          boolean strong = false;
          for (int i = 0; i < escaped.length(); i++) {
              if (highlight.get(i) && !strong) {
                  strong = true;
                  excerpt.append("<strong>");
              } else if (!highlight.get(i) && strong) {
                  strong = false;
                  excerpt.append("</strong>");
              }
              excerpt.append(escaped.charAt(i));
          }
          if (strong) {
              excerpt.append("</strong>");
          }
          excerpt.append(EXCERPT_END);
          return excerpt.toString();
      }
focal_method.class_method_signature: SimpleExcerptProvider.highlight(StringBuilder text, Set<String> searchToken)
focal_method.full_signature: static String highlight(StringBuilder text, Set<String> searchToken)
focal_method.identifier: highlight
focal_method.invocations: tokenize encodeIllegalXMLCharacters toString highlight length get append get append append charAt append append toString
focal_method.modifiers: static
focal_method.parameters: (StringBuilder text, Set<String> searchToken)
focal_method.return: String
focal_method.signature: String highlight(StringBuilder text, Set<String> searchToken)