Class XMLUpgrader


  • public class XMLUpgrader
    extends java.lang.Object
    Uses a XSLT transformation to upgrade from ZUGFeRD 1 to ZUGFeRD 2 (=Factur-X1 ˜= XRechnung) This is an external functionality of the software and not very complete, for internal operations (generation of ZF2) of course the ZF2PullProvider is used
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLUpgrader()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void applySchematronXsl​(java.io.InputStream xmlFile, java.io.OutputStream EN16931Outstream)  
      java.lang.String migrateFromV1ToV2​(java.lang.String xmlFilename)
      Takes a filename of a ZF1 XML file and returns the string of ZF2 XML
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLUpgrader

        public XMLUpgrader()
    • Method Detail

      • migrateFromV1ToV2

        public java.lang.String migrateFromV1ToV2​(java.lang.String xmlFilename)
                                           throws java.io.FileNotFoundException,
                                                  javax.xml.transform.TransformerException
        Takes a filename of a ZF1 XML file and returns the string of ZF2 XML
        Parameters:
        xmlFilename - the filename of the source
        Returns:
        String the updated XML
        Throws:
        java.io.FileNotFoundException - if the source could not be found
        javax.xml.transform.TransformerException - if the source could not be transformed
      • applySchematronXsl

        protected void applySchematronXsl​(java.io.InputStream xmlFile,
                                          java.io.OutputStream EN16931Outstream)
                                   throws javax.xml.transform.TransformerException
        Throws:
        javax.xml.transform.TransformerException