com.silverpeas.glossary
Class HighlightGlossaryTerms

java.lang.Object
  extended by com.silverpeas.glossary.HighlightGlossaryTerms

public class HighlightGlossaryTerms
extends Object

Author:
David Derigent

Constructor Summary
HighlightGlossaryTerms()
           
 
Method Summary
 String searchReplace(String publicationContent, String className, String axisId, boolean onlyFirst, String language)
          Search all the term contained in the given glossary and highlight, one or all of the occurrences found in the given text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlightGlossaryTerms

public HighlightGlossaryTerms()
Method Detail

searchReplace

public String searchReplace(String publicationContent,
                            String className,
                            String axisId,
                            boolean onlyFirst,
                            String language)
Search all the term contained in the given glossary and highlight, one or all of the occurrences found in the given text. The regular expression used to retrieve the occurrence works only in HTML code, not in plain text. This code is designed to parse HTML code.

Parameters:
publicationContent - the publication text used to perform the highlight operation
className - the css class name used to "mark" the highlighted term and format his displaying
axisId - The pdc axis identifier used to load the glossary
onlyFirst - indicates if all the occurrence of a term must be highlight or only the first
language - indicates the language use to load information from glossary
Returns:
a String which contain given publication with highlight term.


Copyright © 2016 Silverpeas. All Rights Reserved.