diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java index 457c2a3d..35390856 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementDebit.java @@ -28,13 +28,13 @@ public interface IZUGFeRDTradeSettlementDebit extends IZUGFeRDTradeSettlement { - String xml = " \n" //$NON-NLS-1$ - + " 59\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " "+XMLTools.encodeXML(getIBAN())+"\n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + String xml = " \n" + + " 59\n" + + " \n" + + " "+XMLTools.encodeXML(getIBAN())+"\n" + + " \n"; - xml = xml + " \n"; //$NON-NLS-1$ + xml = xml + " \n"; return xml; } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java index f4ecaf4d..54e1c480 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDTradeSettlementPayment.java @@ -83,22 +83,22 @@ public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement } default String getSettlementXML() { - String xml = " \n" //$NON-NLS-1$ - + " 42\n" //$NON-NLS-1$ - + " Überweisung\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(getOwnIBAN()) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + String xml = " \n" + + " 42\n" + + " Überweisung\n" + + " \n" + + " " + XMLTools.encodeXML(getOwnIBAN()) + "\n"; //$NON-NLS-2$ if (getOwnKto()!=null) { - xml+= " " + XMLTools.encodeXML(getOwnKto()) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + xml+= " " + XMLTools.encodeXML(getOwnKto()) + "\n"; //$NON-NLS-2$ } - xml+= " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(getOwnBIC()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - // + " "+trans.getOwnBankName()+"\n" //$NON-NLS-1$ + xml+= " \n" + + " \n" + + " " + XMLTools.encodeXML(getOwnBIC()) + "\n" //$NON-NLS-2$ + // + " "+trans.getOwnBankName()+"\n" // //$NON-NLS-2$ - + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + + " \n" + + " \n"; return xml; } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java index 8966ac70..86295745 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD1PullProvider.java @@ -229,7 +229,7 @@ public class ZUGFeRD1PullProvider implements IXMLProvider, IProfileProvider { if (trans.getDocumentCode()!=null) { typecode=trans.getDocumentCode(); } - String xml = "\n" + String xml = "\n" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ + String xml = " " + XMLTools.encodeXML(contact.getName()) + "\n" //$NON-NLS-2$ // + " \n" // + " xxx\n" // + " \n" - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(contact.getZIP()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(contact.getStreet()) //$NON-NLS-1$ - + "\n"; //$NON-NLS-1$ + + " \n" + + " " + XMLTools.encodeXML(contact.getZIP()) + + "\n" + + " " + XMLTools.encodeXML(contact.getStreet()) + + "\n"; if (trans.getRecipient().getAdditionalAddress() != null) { - xml += " " + XMLTools.encodeXML(contact.getAdditionalAddress()) //$NON-NLS-1$ - + "\n"; //$NON-NLS-1$ + xml += " " + XMLTools.encodeXML(contact.getAdditionalAddress()) + + "\n"; } - xml += " " + XMLTools.encodeXML(contact.getLocation()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(contact.getCountry()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + xml += " " + XMLTools.encodeXML(contact.getLocation()) + + "\n" + + " " + XMLTools.encodeXML(contact.getCountry()) + + "\n" + + " \n"; if (contact.getVATID() != null) { - xml += " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(contact.getVATID()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + xml += " \n" + + " " + XMLTools.encodeXML(contact.getVATID()) + + "\n" + + " \n"; } return xml; @@ -192,8 +192,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { boolean hasDueDate=false; String taxCategoryCode=""; - SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy"); //$NON-NLS-1$ - //$NON-NLS-1$ + SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy"); + String exemptionReason=""; if (trans.getPaymentTermDescription()!=null) { @@ -231,29 +231,29 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { if (trans.getDocumentCode()!=null) { typecode=trans.getDocumentCode(); } - String xml = "\n" //$NON-NLS-1$ + String xml = "\n" + "\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ + + " xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n" + + " \n" // + " // "+testBooleanStr+"\n" - // //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + getProfile() + "\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - // + " RECHNUNG\n" //$NON-NLS-1$ - // + " 380\n" //$NON-NLS-1$ - + " " + typecode + "\n" //$NON-NLS-1$ - + " " //$NON-NLS-1$ - + zugferdDateFormat.format(trans.getIssueDate()) + "\n" // date //$NON-NLS-1$ + // + + " \n" + + " " + getProfile() + "\n" + + " \n" + + " \n" + + " \n" + + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-2$ + // + " RECHNUNG\n" + // + " 380\n" + + " " + typecode + "\n" + + " " + + zugferdDateFormat.format(trans.getIssueDate()) + "\n" // date // format // was // 20130605 @@ -261,8 +261,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { + rebateAgreement + senderReg - + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + + " \n" + + " \n"; int lineID = 0; for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) { lineID++; @@ -272,11 +272,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { } LineCalc lc = new LineCalc(currentItem); - xml = xml + " \n" + //$NON-NLS-1$ - " \n" //$NON-NLS-1$ - + " " + lineID + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + xml = xml + " \n" + + " \n" + + " " + lineID + "\n" //$NON-NLS-2$ + + " \n" + + " \n"; // + " 4012345001235\n" if (currentItem.getProduct().getSellerAssignedID() != null) { xml = xml + " " @@ -286,63 +286,63 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { xml = xml + " " + XMLTools.encodeXML(currentItem.getProduct().getBuyerAssignedID()) + "\n"; } - xml = xml + " " + XMLTools.encodeXML(currentItem.getProduct().getName()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - + " " + XMLTools.encodeXML(currentItem.getProduct().getDescription()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ + xml = xml + " " + XMLTools.encodeXML(currentItem.getProduct().getName()) + "\n" //$NON-NLS-2$ + + " " + XMLTools.encodeXML(currentItem.getProduct().getDescription()) + + "\n" + + " \n" - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + priceFormat(lc.getPriceGross()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ //currencyID=\"EUR\" - + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" //$NON-NLS-1$ + + " \n" + + " \n" + + " " + priceFormat(lc.getPriceGross()) + + "\n" //currencyID=\"EUR\" + + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" // + " \n" // + " false\n" // + " 0.6667\n" // + " Rabatt\n" // + " \n" - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + priceFormat(currentItem.getPrice()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ // currencyID=\"EUR\" - + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ + + " \n" + + " \n" + + " " + priceFormat(currentItem.getPrice()) + + "\n" // currencyID=\"EUR\" + + " " + quantityFormat(currentItem.getBasisQuantity()) +"\n" + + " \n" + + " \n" - + " \n" //$NON-NLS-1$ - + " " //$NON-NLS-1$ //$NON-NLS-2$ - + quantityFormat(currentItem.getQuantity()) + "\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " VAT\n" //$NON-NLS-1$ + + " \n" + + " " //$NON-NLS-2$ + + quantityFormat(currentItem.getQuantity()) + "\n" + + " \n" + + " \n" + + " \n" + + " VAT\n" + exemptionReason - + " "+currentItem.getProduct().getTaxCategoryCode()+"\n" //$NON-NLS-1$ + + " "+currentItem.getProduct().getTaxCategoryCode()+"\n" - + " " //$NON-NLS-1$ - + vatFormat(currentItem.getProduct().getVATPercent()) + "\n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + currencyFormat(lc.getItemTotalNetAmount()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ // currencyID=\"EUR\" - + " \n"; //$NON-NLS-1$ + + " " + + vatFormat(currentItem.getProduct().getVATPercent()) + "\n" + + " \n" + + " \n" + + " " + currencyFormat(lc.getItemTotalNetAmount()) + + "\n" // currencyID=\"EUR\" + + " \n"; if (currentItem.getAdditionalReferencedDocumentID()!=null) { - xml=xml + " "+currentItem.getAdditionalReferencedDocumentID()+"130\n"; //$NON-NLS-1$ + xml=xml + " "+currentItem.getAdditionalReferencedDocumentID()+"130\n"; } - xml=xml + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + xml=xml + " \n" + + " \n"; } - xml = xml + " \n"; //$NON-NLS-1$ + xml = xml + " \n"; if (trans.getReferenceNumber() != null) { xml = xml + " " + XMLTools.encodeXML(trans.getReferenceNumber()) + "\n"; } - xml = xml + " \n"; //$NON-NLS-1$ + xml = xml + " \n"; if (trans.getOwnForeignOrganisationID()!=null) { xml = xml + " " + XMLTools.encodeXML(trans.getOwnForeignOrganisationID()) + "\n"; } @@ -351,7 +351,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { xml = xml + " " + XMLTools.encodeXML(trans.getOwnContact().getGlobalID()) + "\n"; } - xml = xml + " " + XMLTools.encodeXML(trans.getOwnOrganisationName()) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + xml = xml + " " + XMLTools.encodeXML(trans.getOwnOrganisationName()) + "\n"; //$NON-NLS-2$ if ((trans.getOwnVATID()!=null)&&(trans.getOwnOrganisationName()!=null)) { @@ -385,27 +385,27 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { + XMLTools.encodeXML(trans.getOwnStreet()) + "\n" + " " + XMLTools.encodeXML(trans.getOwnLocation()) + "\n" + " " + XMLTools.encodeXML(trans.getOwnCountry()) + "\n" + " \n" - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(trans.getOwnTaxID()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " " + XMLTools.encodeXML(trans.getOwnVATID()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - + " \n" //$NON-NLS-1$ - + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + + " \n" + + " " + XMLTools.encodeXML(trans.getOwnTaxID()) + "\n" //$NON-NLS-2$ + + " \n" + + " \n" + + " " + XMLTools.encodeXML(trans.getOwnVATID()) + "\n" //$NON-NLS-2$ + + " \n" + + " \n" + + " \n"; // + " GE2020211\n" // + " 4000001987658\n" xml+=getContactAsXML(trans.getRecipient()); - xml += " \n"; //$NON-NLS-1$ + xml += " \n"; if (trans.getBuyerOrderReferencedDocumentID()!=null) { - xml = xml + " \n" //$NON-NLS-1$ - + " " //$NON-NLS-1$ - + XMLTools.encodeXML(trans.getBuyerOrderReferencedDocumentID()) + "\n" //$NON-NLS-1$ + xml = xml + " \n" + + " " + + XMLTools.encodeXML(trans.getBuyerOrderReferencedDocumentID()) + "\n" + " \n"; } - xml = xml + " \n" //$NON-NLS-1$ + xml = xml + " \n" + " \n" ; if (this.trans.getDeliveryAddress()!=null) { xml += ""+ @@ -431,8 +431,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { * " \n" */ + " \n" + " \n" //$NON-NLS-2$ - + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ - + " " + trans.getCurrency() + "\n"; //$NON-NLS-1$ + + " " + XMLTools.encodeXML(trans.getNumber()) + "\n" //$NON-NLS-2$ + + " " + trans.getCurrency() + "\n"; if (trans.getTradeSettlementPayment()!=null) { for (IZUGFeRDTradeSettlementPayment payment : trans.getTradeSettlementPayment()) { @@ -457,21 +457,21 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) { VATAmount amount = VATPercentAmountMap.get(currentTaxPercent); if (amount != null) { - xml += " \n" //$NON-NLS-1$ - + " " + currencyFormat(amount.getCalculated()) //$NON-NLS-1$ - + "\n" //$NON-NLS-1$ //currencyID=\"EUR\" - + " VAT\n" //$NON-NLS-1$ + xml += " \n" + + " " + currencyFormat(amount.getCalculated()) + + "\n" //currencyID=\"EUR\" + + " VAT\n" + exemptionReason + " " + currencyFormat(amount.getBasis()) + "\n" // currencyID=\"EUR\" - + " "+taxCategoryCode+"\n" //$NON-NLS-1$ - + " " + vatFormat(currentTaxPercent) //$NON-NLS-1$ + + " "+taxCategoryCode+"\n" + + " " + vatFormat(currentTaxPercent) + "\n" + " \n"; //$NON-NLS-2$ } } if (trans.getPaymentTerms() == null) { - xml = xml + " \n" //$NON-NLS-1$ + xml = xml + " \n" + " " + paymentTermsDescription + "\n"; if (trans.getTradeSettlement() != null) { @@ -485,36 +485,36 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { if (hasDueDate && (trans.getDueDate()!=null)) { xml = xml + " " // $NON-NLS-2$ + zugferdDateFormat.format(trans.getDueDate()) - + "\n";// 20130704 //$NON-NLS-1$ + + "\n";// 20130704 } - xml = xml + " \n"; //$NON-NLS-1$ + xml = xml + " \n"; } else { xml = xml + buildPaymentTermsXml(); } - xml = xml + " \n" //$NON-NLS-1$ - + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ + xml = xml + " \n" + + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-2$ // currencyID=\"EUR\" - + " 0.00\n" //$NON-NLS-1$ currencyID=\"EUR\" - + " 0.00\n" //$NON-NLS-1$ // + + " 0.00\n" currencyID=\"EUR\" + + " 0.00\n" // // currencyID=\"EUR\" // + " 5.80\n" // + " 14.73\n" - + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ + + " " + currencyFormat(getTotal()) + "\n" //$NON-NLS-2$ // // // currencyID=\"EUR\" - + " " //$NON-NLS-1$ - + currencyFormat(getTotalGross().subtract(getTotal())) + "\n" //$NON-NLS-1$ - + " " + currencyFormat(getTotalGross()) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ + + " " + + currencyFormat(getTotalGross().subtract(getTotal())) + "\n" + + " " + currencyFormat(getTotalGross()) + "\n" //$NON-NLS-2$ // // // currencyID=\"EUR\" + " " + currencyFormat(getTotalPrepaid()) + "\n" - + " " + currencyFormat(getTotalGross().subtract(getTotalPrepaid())) + "\n" //$NON-NLS-1$ //$NON-NLS-2$ + + " " + currencyFormat(getTotalGross().subtract(getTotalPrepaid())) + "\n" //$NON-NLS-2$ // // // currencyID=\"EUR\" - + " \n" //$NON-NLS-1$ - + " \n"; //$NON-NLS-1$ + + " \n" + + " \n"; // + " \n" // + " \n" // + " \n" @@ -524,8 +524,8 @@ public class ZUGFeRD2PullProvider implements IXMLProvider, IProfileProvider { // + " \n" // + " \n"; - xml = xml + " \n" //$NON-NLS-1$ - + ""; //$NON-NLS-1$ + xml = xml + " \n" + + ""; byte[] zugferdRaw; try { diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java index c450edb0..3c5c2067 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java @@ -215,7 +215,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte } if ((!fileAttached) && (attachZUGFeRDHeaders)) { throw new IOException( - "File must be attached (usually with PDFattachZugferdFile) before perfoming this operation"); + "File must be attached (usually with setTransaction) before perfoming this operation"); } doc.save(ZUGFeRDfilename); if (!disableAutoClose) { @@ -242,7 +242,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte } if ((!fileAttached) && (attachZUGFeRDHeaders)) { throw new IOException( - "File must be attached (usually with PDFattachZugferdFile) before perfoming this operation"); + "File must be attached (usually with setTransaction) before perfoming this operation"); } doc.save(output); if (!disableAutoClose) { @@ -469,7 +469,7 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte pdf.setProducer(fullProducer); if (ensurePDFisUpgraded) { try { - pdfaid.setConformance(conformanceLevel.getLetter());// $NON-NLS-1$ //$NON-NLS-1$ + pdfaid.setConformance(conformanceLevel.getLetter());// $NON-NLS-1$ } catch (BadFieldValueException ex) { // This should be impossible, because it would occur only if an illegal // conformance level is supplied, diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java index 7d5750b1..0d308ba4 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java @@ -137,7 +137,7 @@ public class ZUGFeRDImporter { /** * filenames for invoice data (ZUGFeRD v1 and v2, Factur-X) */ - if ((filename.equals("ZUGFeRD-invoice.xml") || (filename.equals("zugferd-invoice.xml")) || filename.equals("factur-x.xml")) || filename.equals("xrechnung.xml")) { //$NON-NLS-1$ + if ((filename.equals("ZUGFeRD-invoice.xml") || (filename.equals("zugferd-invoice.xml")) || filename.equals("factur-x.xml")) || filename.equals("xrechnung.xml")) { containsMeta = true; PDEmbeddedFile embeddedFile = fileSpec.getEmbeddedFile(); @@ -688,7 +688,7 @@ public class ZUGFeRDImporter { // SpecifiedExchangedDocumentContext is in the schema, so a relatively good // indication if zugferd is present - better than just invoice String meta = getMeta(); - return (meta != null) && (meta.length() > 0) && ((meta.contains("SpecifiedExchangedDocumentContext") //$NON-NLS-1$ + return (meta != null) && (meta.length() > 0) && ((meta.contains("SpecifiedExchangedDocumentContext") /* ZF1 */ || meta.contains("ExchangedDocumentContext") /* ZF2 */)); } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java index eb75f9dd..ac2d4bb9 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDVisualizer.java @@ -32,12 +32,12 @@ import java.util.logging.Logger; public class ZUGFeRDVisualizer { static final ClassLoader CLASS_LOADER = ZUGFeRDVisualizer.class.getClassLoader(); - private static final String RESOURCE_PATH = ""; //$NON-NLS-1$ + private static final String RESOURCE_PATH = ""; private static final Logger LOG = Logger.getLogger(ZUGFeRDVisualizer.class.getName()); // private static File createTempFileResult(final Transformer transformer, final // StreamSource toTransform, // final String suffix) throws TransformerException, IOException { - // File result = File.createTempFile("ZUV_", suffix); //$NON-NLS-1$ + // File result = File.createTempFile("ZUV_", suffix); // result.deleteOnExit(); // // try (FileOutputStream fos = new FileOutputStream(result)) { diff --git a/validator/src/main/java/org/mustangproject/validator/SchematronPipeline.java b/validator/src/main/java/org/mustangproject/validator/SchematronPipeline.java index e752600f..25357634 100644 --- a/validator/src/main/java/org/mustangproject/validator/SchematronPipeline.java +++ b/validator/src/main/java/org/mustangproject/validator/SchematronPipeline.java @@ -20,11 +20,11 @@ import javax.xml.transform.stream.StreamSource; public class SchematronPipeline { static final ClassLoader cl = SchematronPipeline.class.getClassLoader(); private static final TransformerFactory factory = getTransformerFactory(); - private static final String xslExt = ".xsl"; //$NON-NLS-1$ - private static final String resourcePath = "iso-schematron-xslt2/"; //$NON-NLS-1$ - private static final String isoDsdlXsl = resourcePath + "iso_dsdl_include" + xslExt; //$NON-NLS-1$ - private static final String isoExpXsl = resourcePath + "iso_abstract_expand" + xslExt; //$NON-NLS-1$ - private static final String isoSvrlXsl = resourcePath + "iso_svrl_for_xslt2" + xslExt; //$NON-NLS-1$ + private static final String xslExt = ".xsl"; + private static final String resourcePath = "iso-schematron-xslt2/"; + private static final String isoDsdlXsl = resourcePath + "iso_dsdl_include" + xslExt; + private static final String isoExpXsl = resourcePath + "iso_abstract_expand" + xslExt; + private static final String isoSvrlXsl = resourcePath + "iso_svrl_for_xslt2" + xslExt; private static final Templates cachedIsoDsdXsl = createCachedTransform(isoDsdlXsl); private static final Templates cachedExpXsl = createCachedTransform(isoExpXsl); private static final Templates cachedIsoSvrlXsl = createCachedTransform(isoSvrlXsl); @@ -39,16 +39,16 @@ public class SchematronPipeline { try { return factory.newTemplates(new StreamSource(cl.getResourceAsStream(transName))); } catch (TransformerConfigurationException excep) { - throw new IllegalStateException("Policy Schematron transformer XSL " + transName + " not found.", excep); //$NON-NLS-1$ //$NON-NLS-2$ + throw new IllegalStateException("Policy Schematron transformer XSL " + transName + " not found.", excep); //$NON-NLS-2$ } } public static void processSchematron(InputStream schematronSource, OutputStream xslDest) throws TransformerException, IOException { File isoDsdResult = createTempFileResult(cachedIsoDsdXsl.newTransformer(), new StreamSource(schematronSource), - "IsoDsd"); //$NON-NLS-1$ + "IsoDsd"); File isoExpResult = createTempFileResult(cachedExpXsl.newTransformer(), new StreamSource(isoDsdResult), - "ExpXsl"); //$NON-NLS-1$ + "ExpXsl"); cachedIsoSvrlXsl.newTransformer().transform(new StreamSource(isoExpResult), new StreamResult(xslDest)); isoDsdResult.delete(); isoExpResult.delete(); @@ -56,7 +56,7 @@ public class SchematronPipeline { private static File createTempFileResult(final Transformer transformer, final StreamSource toTransform, final String suffix) throws TransformerException, IOException { - File result = File.createTempFile("ZUV_", suffix); //$NON-NLS-1$ + File result = File.createTempFile("ZUV_", suffix); result.deleteOnExit(); try (FileOutputStream fos = new FileOutputStream(result)) { diff --git a/validator/src/main/java/org/mustangproject/validator/ZUGFeRDValidator.java b/validator/src/main/java/org/mustangproject/validator/ZUGFeRDValidator.java index 61d6a354..69cef429 100644 --- a/validator/src/main/java/org/mustangproject/validator/ZUGFeRDValidator.java +++ b/validator/src/main/java/org/mustangproject/validator/ZUGFeRDValidator.java @@ -78,7 +78,7 @@ public class ZUGFeRDValidator { boolean xmlValidity; context.clear(); StringBuffer finalStringResult = new StringBuffer(); - SimpleDateFormat isoDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //$NON-NLS-1$ + SimpleDateFormat isoDF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); startTime = Calendar.getInstance().getTimeInMillis(); try {