Package org.spdx.utility.compare
Class FilterTemplateOutputHandler
java.lang.Object
org.spdx.utility.compare.FilterTemplateOutputHandler
- All Implemented Interfaces:
ILicenseTemplateOutputHandler
public class FilterTemplateOutputHandler extends Object implements ILicenseTemplateOutputHandler
Filter the template output to create a list of strings filtering out optional and/or var text
- Author:
- Gary O'Neall
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilterTemplateOutputHandler.VarTextHandling -
Field Summary
Fields Modifier and Type Field Description static StringREGEX_ESCAPE -
Constructor Summary
Constructors Constructor Description FilterTemplateOutputHandler(boolean includeVarText)Deprecated.FilterTemplateOutputHandler(FilterTemplateOutputHandler.VarTextHandling varTextHandling) -
Method Summary
Modifier and Type Method Description voidbeginOptional(LicenseTemplateRule rule)Begin optional rule foundvoidcompleteParsing()Signals all text has been added and parsing can be completed.voidendOptional(LicenseTemplateRule rule)End optional rule foundList<String>getFilteredText()FilterTemplateOutputHandler.VarTextHandlinggetVarTextHandling()booleanisIncludeVarText()voidtext(String text)Text for processingvoidvariableRule(LicenseTemplateRule rule)Variable rule found within the template
-
Field Details
-
REGEX_ESCAPE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
FilterTemplateOutputHandler
Deprecated.- Parameters:
includeVarText- if true, include the default variable text
-
FilterTemplateOutputHandler
- Parameters:
varTextHandling- include original, exclude, or include the regex (enclosed with "~~~") for "var" text
-
-
Method Details
-
text
Description copied from interface:ILicenseTemplateOutputHandlerText for processing- Specified by:
textin interfaceILicenseTemplateOutputHandler
-
variableRule
Description copied from interface:ILicenseTemplateOutputHandlerVariable rule found within the template- Specified by:
variableRulein interfaceILicenseTemplateOutputHandler
-
beginOptional
Description copied from interface:ILicenseTemplateOutputHandlerBegin optional rule found- Specified by:
beginOptionalin interfaceILicenseTemplateOutputHandler
-
endOptional
Description copied from interface:ILicenseTemplateOutputHandlerEnd optional rule found- Specified by:
endOptionalin interfaceILicenseTemplateOutputHandler
-
completeParsing
public void completeParsing()Description copied from interface:ILicenseTemplateOutputHandlerSignals all text has been added and parsing can be completed.- Specified by:
completeParsingin interfaceILicenseTemplateOutputHandler
-
isIncludeVarText
public boolean isIncludeVarText()- Returns:
- the includeVarText
-
getVarTextHandling
- Returns:
- the varTextHandling
-
getFilteredText
- Returns:
- the filteredText
-