Package org.spdx.licenseTemplate
Class TextTemplateOutputHandler
- java.lang.Object
-
- org.spdx.licenseTemplate.TextTemplateOutputHandler
-
- All Implemented Interfaces:
ILicenseTemplateOutputHandler
public class TextTemplateOutputHandler extends Object implements ILicenseTemplateOutputHandler
License template output handler for generating a text version of a license from a license templateUsed when parsing a license template.
- Author:
- Gary O'Neall
-
-
Constructor Summary
Constructors Constructor Description TextTemplateOutputHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginOptional(LicenseTemplateRule rule)
Begin optional rule foundvoid
completeParsing()
Signals all text has been added and parsing can be completed.void
endOptional(LicenseTemplateRule rule)
End optional rule foundString
getText()
void
text(String text)
Text for processingvoid
variableRule(LicenseTemplateRule rule)
Variable rule found within the template
-
-
-
Method Detail
-
text
public void text(String text)
Description copied from interface:ILicenseTemplateOutputHandler
Text for processing- Specified by:
text
in interfaceILicenseTemplateOutputHandler
- Parameters:
text
- text to be processed
-
variableRule
public void variableRule(LicenseTemplateRule rule)
Description copied from interface:ILicenseTemplateOutputHandler
Variable rule found within the template- Specified by:
variableRule
in interfaceILicenseTemplateOutputHandler
- Parameters:
rule
- license template rule
-
beginOptional
public void beginOptional(LicenseTemplateRule rule)
Description copied from interface:ILicenseTemplateOutputHandler
Begin optional rule found- Specified by:
beginOptional
in interfaceILicenseTemplateOutputHandler
- Parameters:
rule
- optional rule
-
endOptional
public void endOptional(LicenseTemplateRule rule)
Description copied from interface:ILicenseTemplateOutputHandler
End optional rule found- Specified by:
endOptional
in interfaceILicenseTemplateOutputHandler
- Parameters:
rule
- end optional rule
-
getText
public String getText()
-
completeParsing
public void completeParsing()
Description copied from interface:ILicenseTemplateOutputHandler
Signals all text has been added and parsing can be completed.- Specified by:
completeParsing
in interfaceILicenseTemplateOutputHandler
-
-