Package org.nuxeo.ecm.core.utils
Class StringsExtractor
- java.lang.Object
-
- org.nuxeo.ecm.core.utils.StringsExtractor
-
public class StringsExtractor extends Object
Finds the strings in a document (string properties).This class is not thread-safe.
- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
document
protected Set<String>
excludedPaths
protected Set<String>
includedPaths
protected List<String>
strings
-
Constructor Summary
Constructors Constructor Description StringsExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
findStrings(DocumentModel document, Set<String> includedPaths, Set<String> excludedPaths)
Finds strings from the document for a given set of included and excluded paths.protected void
findStrings(Property property, String path)
protected boolean
isInterestingPath(String path)
-
-
-
Method Detail
-
findStrings
public List<String> findStrings(DocumentModel document, Set<String> includedPaths, Set<String> excludedPaths)
Finds strings from the document for a given set of included and excluded paths.Paths must be specified with a schema prefix in all cases (normalized).
- Parameters:
document
- the documentincludedPaths
- the paths to include, ornull
for all pathsexcludedPaths
- the paths to exclude, ornull
for none- Returns:
- a list of strings (each string is never
null
)
-
isInterestingPath
protected boolean isInterestingPath(String path)
-
-