Package com.logicaldoc.util
Class TagUtil
- java.lang.Object
- 
- com.logicaldoc.util.TagUtil
 
- 
 public class TagUtil extends Object Utility class for tags handling- Since:
- 4.5
- Author:
- Marco Meschieri - LogicalDOC
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intMAX_FIELD_LENGTH
 - 
Constructor SummaryConstructors Constructor Description TagUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>extractTags(String tenantName, String words)Detects words in the passed string and creates a list of tags.static StringnormalizeTags(String tenantName, String words)Normalizes the passed string extracting all tags and producing anither string containing all tags separated by a comma.
 
- 
- 
- 
Field Detail- 
MAX_FIELD_LENGTHpublic static final int MAX_FIELD_LENGTH - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
extractTagspublic static Set<String> extractTags(String tenantName, String words) Detects words in the passed string and creates a list of tags.
 Atention: Recognized tags are words of min. MIN_CHARS chars and max MAX_CHARS characters.- Parameters:
- tenantName- name of the tenant
- words- a string of words (tags are separated by ,);
- Returns:
- the collection of tags
 
 - 
normalizeTagspublic static String normalizeTags(String tenantName, String words) Normalizes the passed string extracting all tags and producing anither string containing all tags separated by a comma.Atention: The returned string is not more long than MAX_FIELD_LENGTH characters. - Parameters:
- tenantName- Name of the tenant
- words- The string to be normalized
- Returns:
- a string in the form "tag1,tag2,tag3"
 
 
- 
 
-