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.MutableXMLDocument
generate(gov.nist.secauto.decima.core.document.handling.ResourceResolver<gov.nist.secauto.decima.xml.document.MutableXMLDocument> templateResolver)
Creates a resultingTemplate
by processing a set ofAction
transforms against a base template.List<Action>
getActions()
Retrieves the sequence of actions to be applied to the template.URL
getBaseTemplateURL()
Retrieve the URL for the base template that is used for the transformations.URL
getContextSystemId()
protected org.jdom2.output.XMLOutputter
getXMLOutputter()
-
-
-
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:
getContextSystemId
in interfaceTemplateProcessor
-
getBaseTemplateURL
public URL getBaseTemplateURL()
Description copied from interface:TemplateProcessor
Retrieve the URL for the base template that is used for the transformations.- Specified by:
getBaseTemplateURL
in interfaceTemplateProcessor
- Returns:
- a URL pointing to the template to use
-
getActions
public List<Action> getActions()
Description copied from interface:TemplateProcessor
Retrieves the sequence of actions to be applied to the template.- Specified by:
getActions
in 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.DocumentException
Description copied from interface:TemplateProcessor
Creates a resultingTemplate
by processing a set ofAction
transforms against a base template.- Specified by:
generate
in interfaceTemplateProcessor
- Parameters:
templateResolver
- the TemplateResolver to use to load the template- Returns:
- a new
Document
based on the provided template and transformations - Throws:
gov.nist.secauto.decima.core.document.DocumentException
- if a processing error occurs
-
-