Package org.spdx.compare
Class FilterTemplateOutputHandler
java.lang.Object
org.spdx.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
-
Constructor Summary
Constructors Constructor Description FilterTemplateOutputHandler(boolean includVarText) -
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()booleanisIncludeVarText()voidtext(String text)Text for processingvoidvariableRule(LicenseTemplateRule rule)Variable rule found within the template
-
Constructor Details
-
FilterTemplateOutputHandler
public FilterTemplateOutputHandler(boolean includVarText)- Parameters:
includVarText- if true, include the default variable text; if false remove the variable 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
Description copied from interface:ILicenseTemplateOutputHandlerSignals all text has been added and parsing can be completed.- Specified by:
completeParsingin interfaceILicenseTemplateOutputHandler- Throws:
LicenseParserException
-
isIncludeVarText
public boolean isIncludeVarText()- Returns:
- the includeVarText
-
getFilteredText
- Returns:
- the filteredText
-