Class DefaultTemplateProcessor
- java.lang.Object
-
- gov.nist.secauto.decima.xml.templating.document.post.template.DefaultTemplateProcessor
-
- All Implemented Interfaces:
TemplateProcessor
public class DefaultTemplateProcessor extends Object implements TemplateProcessor
-
-
Constructor Summary
Constructors Constructor Description DefaultTemplateProcessor(URL contextSystemId, URL baseTemplateURL, List<Action> actions)Construct a new XML template processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description gov.nist.secauto.decima.xml.document.MutableXMLDocumentgenerate(gov.nist.secauto.decima.core.document.handling.ResourceResolver<gov.nist.secauto.decima.xml.document.MutableXMLDocument> templateResolver)Creates a resultingTemplateby processing a set ofActiontransforms against a base template.List<Action>getActions()Retrieves the sequence of actions to be applied to the template.URLgetBaseTemplateURL()Retrieve the URL for the base template that is used for the transformations.URLgetContextSystemId()protected org.jdom2.output.XMLOutputtergetXMLOutputter()
-
-
-
Constructor Detail
-
DefaultTemplateProcessor
public DefaultTemplateProcessor(URL contextSystemId, URL baseTemplateURL, List<Action> actions)
Construct a new XML template processor.- Parameters:
contextSystemId- the system id for the document containing this templatebaseTemplateURL- the base template referenced within the current template to use as a starting point for tansformationactions- the actions to perform on the base template
-
-
Method Detail
-
getContextSystemId
public URL getContextSystemId()
- Specified by:
getContextSystemIdin interfaceTemplateProcessor
-
getBaseTemplateURL
public URL getBaseTemplateURL()
Description copied from interface:TemplateProcessorRetrieve the URL for the base template that is used for the transformations.- Specified by:
getBaseTemplateURLin interfaceTemplateProcessor- Returns:
- a URL pointing to the template to use
-
getActions
public List<Action> getActions()
Description copied from interface:TemplateProcessorRetrieves the sequence of actions to be applied to the template.- Specified by:
getActionsin interfaceTemplateProcessor- Returns:
- a list of actions
-
getXMLOutputter
protected org.jdom2.output.XMLOutputter getXMLOutputter()
-
generate
public gov.nist.secauto.decima.xml.document.MutableXMLDocument generate(gov.nist.secauto.decima.core.document.handling.ResourceResolver<gov.nist.secauto.decima.xml.document.MutableXMLDocument> templateResolver) throws gov.nist.secauto.decima.core.document.DocumentExceptionDescription copied from interface:TemplateProcessorCreates a resultingTemplateby processing a set ofActiontransforms against a base template.- Specified by:
generatein interfaceTemplateProcessor- Parameters:
templateResolver- the TemplateResolver to use to load the template- Returns:
- a new
Documentbased on the provided template and transformations - Throws:
gov.nist.secauto.decima.core.document.DocumentException- if a processing error occurs
-
-