optimize imports
This commit is contained in:
@@ -26,18 +26,11 @@ package org.mustangproject.ZUGFeRD;
|
|||||||
* @version 1.2.0
|
* @version 1.2.0
|
||||||
* @author jstaerk
|
* @author jstaerk
|
||||||
* */
|
* */
|
||||||
|
|
||||||
import org.apache.xmpbox.XMPMetadata;
|
import org.apache.xmpbox.XMPMetadata;
|
||||||
import org.apache.xmpbox.XmpConstants;
|
import org.apache.xmpbox.XmpConstants;
|
||||||
import org.apache.xmpbox.schema.PDFAExtensionSchema;
|
import org.apache.xmpbox.schema.PDFAExtensionSchema;
|
||||||
import org.apache.xmpbox.type.ArrayProperty;
|
import org.apache.xmpbox.type.*;
|
||||||
import org.apache.xmpbox.type.Attribute;
|
|
||||||
import org.apache.xmpbox.type.Cardinality;
|
|
||||||
import org.apache.xmpbox.type.ChoiceType;
|
|
||||||
import org.apache.xmpbox.type.DefinedStructuredType;
|
|
||||||
import org.apache.xmpbox.type.PDFAPropertyType;
|
|
||||||
import org.apache.xmpbox.type.PDFASchemaType;
|
|
||||||
import org.apache.xmpbox.type.StructuredType;
|
|
||||||
import org.apache.xmpbox.type.TextType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additionally to adding a RDF namespace with a indication which file
|
* Additionally to adding a RDF namespace with a indication which file
|
||||||
|
|||||||
@@ -18,13 +18,14 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
||||||
|
import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper;
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext;
|
import javax.xml.bind.JAXBContext;
|
||||||
import javax.xml.bind.JAXBElement;
|
import javax.xml.bind.JAXBElement;
|
||||||
import javax.xml.bind.JAXBException;
|
import javax.xml.bind.JAXBException;
|
||||||
import javax.xml.bind.Marshaller;
|
import javax.xml.bind.Marshaller;
|
||||||
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
import java.io.ByteArrayOutputStream;
|
||||||
import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper;
|
|
||||||
|
|
||||||
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
||||||
|
|
||||||
|
|||||||
@@ -29,27 +29,11 @@ package org.mustangproject.ZUGFeRD;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.Closeable;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.util.GregorianCalendar;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import javax.xml.transform.TransformerException;
|
|
||||||
import org.apache.pdfbox.cos.COSArray;
|
import org.apache.pdfbox.cos.COSArray;
|
||||||
import org.apache.pdfbox.cos.COSBase;
|
import org.apache.pdfbox.cos.COSBase;
|
||||||
import org.apache.pdfbox.cos.COSDictionary;
|
import org.apache.pdfbox.cos.COSDictionary;
|
||||||
import org.apache.pdfbox.cos.COSName;
|
import org.apache.pdfbox.cos.COSName;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.*;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
|
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
|
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
|
|
||||||
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
|
|
||||||
import org.apache.pdfbox.pdmodel.common.PDMetadata;
|
import org.apache.pdfbox.pdmodel.common.PDMetadata;
|
||||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification;
|
import org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification;
|
||||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
|
import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
|
||||||
@@ -61,6 +45,12 @@ import org.apache.xmpbox.schema.XMPBasicSchema;
|
|||||||
import org.apache.xmpbox.type.BadFieldValueException;
|
import org.apache.xmpbox.type.BadFieldValueException;
|
||||||
import org.apache.xmpbox.xml.XmpSerializer;
|
import org.apache.xmpbox.xml.XmpSerializer;
|
||||||
|
|
||||||
|
import javax.xml.transform.TransformerException;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class ZUGFeRDExporter implements Closeable {
|
public class ZUGFeRDExporter implements Closeable {
|
||||||
|
|
||||||
public static final int DefaultZUGFeRDVersion = 1;
|
public static final int DefaultZUGFeRDVersion = 1;
|
||||||
|
|||||||
@@ -18,15 +18,6 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import javax.activation.DataSource;
|
|
||||||
import javax.activation.FileDataSource;
|
|
||||||
import org.apache.pdfbox.io.IOUtils;
|
import org.apache.pdfbox.io.IOUtils;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
import org.apache.pdfbox.preflight.PreflightDocument;
|
import org.apache.pdfbox.preflight.PreflightDocument;
|
||||||
@@ -34,6 +25,11 @@ import org.apache.pdfbox.preflight.exception.ValidationException;
|
|||||||
import org.apache.pdfbox.preflight.parser.PreflightParser;
|
import org.apache.pdfbox.preflight.parser.PreflightParser;
|
||||||
import org.apache.pdfbox.preflight.utils.ByteArrayDataSource;
|
import org.apache.pdfbox.preflight.utils.ByteArrayDataSource;
|
||||||
|
|
||||||
|
import javax.activation.DataSource;
|
||||||
|
import javax.activation.FileDataSource;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
||||||
protected boolean ignorePDFAErrors = false;
|
protected boolean ignorePDFAErrors = false;
|
||||||
protected ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
protected ZUGFeRDConformanceLevel zugferdConformanceLevel = ZUGFeRDConformanceLevel.EXTENDED;
|
||||||
|
|||||||
@@ -26,19 +26,6 @@ package org.mustangproject.ZUGFeRD;
|
|||||||
* @author jstaerk
|
* @author jstaerk
|
||||||
* */
|
* */
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
|
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
|
||||||
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
|
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
|
||||||
@@ -50,6 +37,15 @@ import org.w3c.dom.Node;
|
|||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
//root.setNamespace(Namespace.getNamespace("http://www.energystar.gov/manageBldgs/req"));
|
//root.setNamespace(Namespace.getNamespace("http://www.energystar.gov/manageBldgs/req"));
|
||||||
|
|
||||||
public class ZUGFeRDImporter {
|
public class ZUGFeRDImporter {
|
||||||
|
|||||||
@@ -18,23 +18,12 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import javax.xml.transform.*;
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import javax.xml.transform.Source;
|
|
||||||
import javax.xml.transform.Templates;
|
|
||||||
import javax.xml.transform.Transformer;
|
|
||||||
import javax.xml.transform.TransformerConfigurationException;
|
|
||||||
import javax.xml.transform.TransformerException;
|
|
||||||
import javax.xml.transform.TransformerFactory;
|
|
||||||
import javax.xml.transform.URIResolver;
|
|
||||||
import javax.xml.transform.stream.StreamResult;
|
import javax.xml.transform.stream.StreamResult;
|
||||||
import javax.xml.transform.stream.StreamSource;
|
import javax.xml.transform.stream.StreamSource;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class ZUGFeRDMigrator {
|
public class ZUGFeRDMigrator {
|
||||||
|
|
||||||
|
|||||||
@@ -18,63 +18,14 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import org.mustangproject.ZUGFeRD.model.*;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBElement;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.DecimalFormatSymbols;
|
import java.text.DecimalFormatSymbols;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import javax.xml.bind.JAXBElement;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.AmountType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CodeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CountryIDType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CreditorFinancialAccountType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CreditorFinancialInstitutionType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DateTimeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DateTimeTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentContextParameterType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentContextParameterTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.DocumentLineDocumentType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.ExchangedDocumentContextType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.ExchangedDocumentType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.IDType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.IndicatorType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.LogisticsServiceChargeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.NoteType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.NoteTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.ObjectFactory;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.PaymentMeansCodeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.PaymentMeansCodeTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.PercentType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.QuantityType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainEventType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainTradeAgreementType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainTradeDeliveryType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainTradeLineItemType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainTradeSettlementType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.SupplyChainTradeTransactionType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxCategoryCodeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxCategoryCodeTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxRegistrationType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxRegistrationTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxTypeCodeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TaxTypeCodeTypeConstants;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TextType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeAddressType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeAllowanceChargeType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradePartyType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradePaymentTermsType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradePriceType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeProductType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeSettlementMonetarySummationType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeSettlementPaymentMeansType;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeTaxType;
|
|
||||||
|
|
||||||
class ZUGFeRDTransactionModelConverter {
|
class ZUGFeRDTransactionModelConverter {
|
||||||
private static final SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd");
|
private static final SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
|
import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,12 @@ package org.mustangproject.toecount;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.FileVisitResult;
|
import java.nio.file.FileVisitResult;
|
||||||
import static java.nio.file.FileVisitResult.CONTINUE;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.SimpleFileVisitor;
|
import java.nio.file.SimpleFileVisitor;
|
||||||
import java.nio.file.attribute.BasicFileAttributes;
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
|
|
||||||
|
import static java.nio.file.FileVisitResult.CONTINUE;
|
||||||
|
|
||||||
public class FileTraverser extends SimpleFileVisitor<Path> {
|
public class FileTraverser extends SimpleFileVisitor<Path> {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,24 +25,18 @@ package org.mustangproject.toecount;
|
|||||||
|
|
||||||
import com.sanityinc.jargs.CmdLineParser;
|
import com.sanityinc.jargs.CmdLineParser;
|
||||||
import com.sanityinc.jargs.CmdLineParser.Option;
|
import com.sanityinc.jargs.CmdLineParser.Option;
|
||||||
|
import org.mustangproject.ZUGFeRD.*;
|
||||||
|
|
||||||
|
import javax.xml.transform.TransformerException;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.xml.transform.TransformerException;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDConformanceLevel;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDExporter;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA1Factory;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDExporterFromA3Factory;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDImporter;
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDMigrator;
|
|
||||||
|
|
||||||
public class Toecount {
|
public class Toecount {
|
||||||
// build with: /opt/local/bin/mvn clean compile assembly:single
|
// build with: /opt/local/bin/mvn clean compile assembly:single
|
||||||
|
|||||||
@@ -18,15 +18,16 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
import org.junit.FixMethodOrder;
|
import org.junit.FixMethodOrder;
|
||||||
import org.junit.runners.MethodSorters;
|
import org.junit.runners.MethodSorters;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class MustangReaderWriterCustomXMLTest extends TestCase {
|
public class MustangReaderWriterCustomXMLTest extends TestCase {
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
import org.junit.FixMethodOrder;
|
||||||
|
import org.junit.runners.MethodSorters;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -25,11 +31,6 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
import org.junit.FixMethodOrder;
|
|
||||||
import org.junit.runners.MethodSorters;
|
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExportableTransaction
|
public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExportableTransaction
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
import org.junit.FixMethodOrder;
|
||||||
|
import org.junit.runners.MethodSorters;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -27,11 +33,6 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
import org.junit.FixMethodOrder;
|
|
||||||
import org.junit.runners.MethodSorters;
|
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExportableTransaction {
|
public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExportableTransaction {
|
||||||
|
|||||||
@@ -16,13 +16,7 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStreamWriter;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|||||||
@@ -16,6 +16,13 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.junit.runners.Parameterized;
|
||||||
|
|
||||||
|
import javax.xml.transform.TransformerException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -24,12 +31,6 @@ import java.util.Collection;
|
|||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.xml.transform.TransformerException;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.junit.runners.Parameterized;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,12 +18,13 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBElement;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import javax.xml.bind.JAXBElement;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
|
||||||
|
|
||||||
public class ZUGFeRDTransactionModelConverterTest {
|
public class ZUGFeRDTransactionModelConverterTest {
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -18,17 +18,17 @@
|
|||||||
*********************************************************************** */
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import com.helger.commons.state.EValidity;
|
|
||||||
import com.helger.schematron.ISchematronResource;
|
import com.helger.schematron.ISchematronResource;
|
||||||
import com.helger.schematron.pure.SchematronResourcePure;
|
import com.helger.schematron.pure.SchematronResourcePure;
|
||||||
import javax.xml.bind.JAXBContext;
|
|
||||||
import javax.xml.bind.JAXBElement;
|
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
import org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBElement;
|
||||||
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
|
|
||||||
public class ZUGFeRDXMLAssert {
|
public class ZUGFeRDXMLAssert {
|
||||||
private static final ISchematronResource SCHEMATRON = loadSchematron();
|
private static final ISchematronResource SCHEMATRON = loadSchematron();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user