com.silverpeas.glossary
Class HighlightGlossaryTerms
java.lang.Object
com.silverpeas.glossary.HighlightGlossaryTerms
public class HighlightGlossaryTerms
- extends Object
- Author:
- David Derigent
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 |
HighlightGlossaryTerms
public HighlightGlossaryTerms()
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 operationclassName
- the css class name used to "mark" the highlighted term and format his
displayingaxisId
- The pdc axis identifier used to load the glossaryonlyFirst
- indicates if all the occurrence of a term must be highlight or only the firstlanguage
- 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.