Class DefaultTemplateProcessor

    • 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 template
        baseTemplateURL - the base template referenced within the current template to use as a starting point for tansformation
        actions - the actions to perform on the base template
    • Method Detail

      • 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 interface TemplateProcessor
        Returns:
        a URL pointing to the template to use
      • 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 resulting Template by processing a set of Action transforms against a base template.
        Specified by:
        generate in interface TemplateProcessor
        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