Adding AL2 copyright header to Java and XML files with Jochen's copyright
This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public final class Version {
|
public final class Version {
|
||||||
|
|||||||
@@ -1,9 +1,27 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public class CustomXMLProvider implements IXMLProvider {
|
public class CustomXMLProvider implements IXMLProvider {
|
||||||
|
|
||||||
protected byte[] zugferdData;
|
protected byte[] zugferdData;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getXML() {
|
public byte[] getXML() {
|
||||||
return zugferdData;
|
return zugferdData;
|
||||||
@@ -14,20 +32,20 @@ public class CustomXMLProvider implements IXMLProvider {
|
|||||||
if (!zf.contains("<rsm:CrossIndustry")) {
|
if (!zf.contains("<rsm:CrossIndustry")) {
|
||||||
throw new RuntimeException("ZUGFeRD XML does not contain <rsm:CrossIndustry and can thus not be valid");
|
throw new RuntimeException("ZUGFeRD XML does not contain <rsm:CrossIndustry and can thus not be valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
zugferdData=newData;
|
zugferdData=newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTest() {
|
public void setTest() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,26 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import org.apache.xmpbox.XMPMetadata;
|
|
||||||
|
|
||||||
public interface IExporterFactory {
|
public interface IExporterFactory {
|
||||||
public ZUGFeRDExporter load(String pdfFilename) throws IOException;
|
public ZUGFeRDExporter load(String pdfFilename) throws IOException;
|
||||||
/**
|
/**
|
||||||
@@ -21,15 +37,15 @@ public interface IExporterFactory {
|
|||||||
*
|
*
|
||||||
* @param pdfSource
|
* @param pdfSource
|
||||||
* source to read a PDF/A1 compliant document from
|
* source to read a PDF/A1 compliant document from
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public ZUGFeRDExporter load(InputStream pdfSource) throws IOException;
|
public ZUGFeRDExporter load(InputStream pdfSource) throws IOException;
|
||||||
|
|
||||||
public IExporterFactory setCreator(String creator);
|
public IExporterFactory setCreator(String creator);
|
||||||
public IExporterFactory setConformanceLevel(PDFAConformanceLevel newLevel);
|
public IExporterFactory setConformanceLevel(PDFAConformanceLevel newLevel);
|
||||||
public IExporterFactory setProducer(String producer) ;
|
public IExporterFactory setProducer(String producer) ;
|
||||||
public IExporterFactory setZUGFeRDVersion(int version);
|
public IExporterFactory setZUGFeRDVersion(int version);
|
||||||
public IExporterFactory ignorePDFAErrors();
|
public IExporterFactory ignorePDFAErrors();
|
||||||
public IExporterFactory setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel zugferdConformanceLevel);
|
public IExporterFactory setZUGFeRDConformanceLevel(ZUGFeRDConformanceLevel zugferdConformanceLevel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public interface IXMLProvider {
|
public interface IXMLProvider {
|
||||||
@@ -6,5 +24,5 @@ public interface IXMLProvider {
|
|||||||
public void setTest();
|
public void setTest();
|
||||||
|
|
||||||
public void generateXML(IZUGFeRDExportableTransaction trans);
|
public void generateXML(IZUGFeRDExportableTransaction trans);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
/**
|
/**
|
||||||
* Mustangproject's ZUGFeRD implementation
|
* Mustangproject's ZUGFeRD implementation
|
||||||
@@ -23,7 +41,7 @@ public interface IZUGFeRDExportableContact {
|
|||||||
*/
|
*/
|
||||||
String getZIP();
|
String getZIP();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VAT ID (Umsatzsteueridentifikationsnummer) of the contact
|
* VAT ID (Umsatzsteueridentifikationsnummer) of the contact
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -36,13 +54,13 @@ public interface IZUGFeRDExportableContact {
|
|||||||
String getCountry();
|
String getCountry();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Returns the city of the contact
|
* Returns the city of the contact
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getLocation();
|
String getLocation();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Returns the street address (street+number) of the contact
|
* Returns the street address (street+number) of the contact
|
||||||
*/
|
*/
|
||||||
String getStreet();
|
String getStreet();
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
/**
|
/**
|
||||||
* Mustangproject's ZUGFeRD implementation
|
* Mustangproject's ZUGFeRD implementation
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
/**
|
/**
|
||||||
* Mustangproject's ZUGFeRD implementation
|
* Mustangproject's ZUGFeRD implementation
|
||||||
@@ -14,7 +32,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
public interface IZUGFeRDExportableTransaction {
|
public interface IZUGFeRDExportableTransaction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number, typically invoice number of the invoice
|
* Number, typically invoice number of the invoice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +47,7 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
/**
|
/**
|
||||||
* this should be the full sender institution name, details, manager and tax registration like.
|
* this should be the full sender institution name, details, manager and tax registration like.
|
||||||
* It is one of the few functions which may return null.
|
* It is one of the few functions which may return null.
|
||||||
*
|
*
|
||||||
Lieferant GmbH
|
Lieferant GmbH
|
||||||
Lieferantenstraße 20
|
Lieferantenstraße 20
|
||||||
80333 München
|
80333 München
|
||||||
@@ -45,10 +63,10 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Date getDueDate();
|
Date getDueDate();
|
||||||
|
|
||||||
IZUGFeRDAllowanceCharge[] getZFAllowances();
|
IZUGFeRDAllowanceCharge[] getZFAllowances();
|
||||||
IZUGFeRDAllowanceCharge[] getZFCharges();
|
IZUGFeRDAllowanceCharge[] getZFCharges();
|
||||||
IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges();
|
IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges();
|
||||||
|
|
||||||
IZUGFeRDExportableItem[] getZFItems();
|
IZUGFeRDExportableItem[] getZFItems();
|
||||||
|
|
||||||
@@ -104,7 +122,7 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getOwnZIP();
|
String getOwnZIP();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* own city
|
* own city
|
||||||
* @return
|
* @return
|
||||||
@@ -116,38 +134,38 @@ public interface IZUGFeRDExportableTransaction {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getOwnCountry();
|
String getOwnCountry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get delivery date
|
* get delivery date
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Date getDeliveryDate();
|
Date getDeliveryDate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get main invoice currency used on the invoice
|
* get main invoice currency used on the invoice
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getCurrency();
|
String getCurrency();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get payment information text. e.g. Bank transfer
|
* get payment information text. e.g. Bank transfer
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getOwnPaymentInfoText();
|
String getOwnPaymentInfoText();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get payment term descriptional text
|
* get payment term descriptional text
|
||||||
* e.g. Bis zum 22.10.2015 ohne Abzug
|
* e.g. Bis zum 22.10.2015 ohne Abzug
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getPaymentTermDescription();
|
String getPaymentTermDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get reference document number
|
* get reference document number
|
||||||
* typically used for Invoice Corrections
|
* typically used for Invoice Corrections
|
||||||
* Will be added as IncludedNote in comfort profile
|
* Will be added as IncludedNote in comfort profile
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getReferenceNumber();
|
String getReferenceNumber();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public enum PDFAConformanceLevel {
|
public enum PDFAConformanceLevel {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,13 +59,13 @@ public class XMPSchemaPDFAExtensions extends PDFAExtensionSchema {
|
|||||||
public final String prefix_pdfaProperty = "pdfaProperty";
|
public final String prefix_pdfaProperty = "pdfaProperty";
|
||||||
public String namespace = null;
|
public String namespace = null;
|
||||||
public String prefix = null;
|
public String prefix = null;
|
||||||
|
|
||||||
|
|
||||||
protected void setZUGFeRDVersion(int ver) {
|
protected void setZUGFeRDVersion(int ver) {
|
||||||
namespace=ZUGFeRDExporter.getNamespaceForVersion(ver);
|
namespace=ZUGFeRDExporter.getNamespaceForVersion(ver);
|
||||||
prefix=ZUGFeRDExporter.getPrefixForVersion(ver);
|
prefix=ZUGFeRDExporter.getPrefixForVersion(ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private DefinedStructuredType addProperty(ArrayProperty parent, String name, String type, String category,
|
private DefinedStructuredType addProperty(ArrayProperty parent, String name, String type, String category,
|
||||||
String description) {
|
String description) {
|
||||||
@@ -81,7 +99,7 @@ public class XMPSchemaPDFAExtensions extends PDFAExtensionSchema {
|
|||||||
setZUGFeRDVersion(ZFVersion);
|
setZUGFeRDVersion(ZFVersion);
|
||||||
attachExtensions(metadata, true);
|
attachExtensions(metadata, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public XMPSchemaPDFAExtensions(XMPMetadata metadata, int ZFVersion, boolean withZF) {
|
public XMPSchemaPDFAExtensions(XMPMetadata metadata, int ZFVersion, boolean withZF) {
|
||||||
super(metadata);
|
super(metadata);
|
||||||
setZUGFeRDVersion(ZFVersion);
|
setZUGFeRDVersion(ZFVersion);
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
/**
|
/**
|
||||||
* Mustangproject's ZUGFeRD implementation
|
* Mustangproject's ZUGFeRD implementation
|
||||||
|
|||||||
@@ -1,25 +1,40 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
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 org.mustangproject.ZUGFeRD.model.CrossIndustryDocumentType;
|
||||||
import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper;
|
import org.mustangproject.ZUGFeRD.model.ZFNamespacePrefixMapper;
|
||||||
|
|
||||||
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
||||||
|
|
||||||
|
|
||||||
protected byte[] zugferdData;
|
protected byte[] zugferdData;
|
||||||
private Marshaller marshaller;
|
private Marshaller marshaller;
|
||||||
|
|
||||||
private boolean isTest;
|
private boolean isTest;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enables the flag to indicate a test invoice in the XML structure
|
* enables the flag to indicate a test invoice in the XML structure
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@@ -15,7 +33,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
private BigDecimal totalGross;
|
private BigDecimal totalGross;
|
||||||
private BigDecimal itemTotalNetAmount;
|
private BigDecimal itemTotalNetAmount;
|
||||||
private BigDecimal itemTotalVATAmount;
|
private BigDecimal itemTotalVATAmount;
|
||||||
|
|
||||||
public LineCalc(IZUGFeRDExportableItem currentItem) {
|
public LineCalc(IZUGFeRDExportableItem currentItem) {
|
||||||
this.currentItem=currentItem;
|
this.currentItem=currentItem;
|
||||||
BigDecimal multiplicator=currentItem.getProduct().getVATPercent().divide(new BigDecimal(100)).add(new BigDecimal(1));
|
BigDecimal multiplicator=currentItem.getProduct().getVATPercent().divide(new BigDecimal(100)).add(new BigDecimal(1));
|
||||||
@@ -50,7 +68,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
public void setTest() {
|
public void setTest() {
|
||||||
isTest = true;
|
isTest = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String nDigitFormat(BigDecimal value, int scale) {
|
private String nDigitFormat(BigDecimal value, int scale) {
|
||||||
/*
|
/*
|
||||||
* I needed 123,45, locale independent.I tried
|
* I needed 123,45, locale independent.I tried
|
||||||
@@ -81,12 +99,12 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
value=value.setScale( scale, BigDecimal.ROUND_HALF_UP ); // first, round so that e.g. 1.189999999999999946709294817992486059665679931640625 becomes 1.19
|
value=value.setScale( scale, BigDecimal.ROUND_HALF_UP ); // first, round so that e.g. 1.189999999999999946709294817992486059665679931640625 becomes 1.19
|
||||||
char[] repeat = new char[scale];
|
char[] repeat = new char[scale];
|
||||||
Arrays.fill(repeat, '0');
|
Arrays.fill(repeat, '0');
|
||||||
|
|
||||||
DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols();
|
DecimalFormatSymbols otherSymbols = new DecimalFormatSymbols();
|
||||||
otherSymbols.setDecimalSeparator('.');
|
otherSymbols.setDecimalSeparator('.');
|
||||||
DecimalFormat dec = new DecimalFormat("0."+new String(repeat), otherSymbols);
|
DecimalFormat dec = new DecimalFormat("0."+new String(repeat), otherSymbols);
|
||||||
return dec.format(value);
|
return dec.format(value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String vatFormat(BigDecimal value) {
|
private String vatFormat(BigDecimal value) {
|
||||||
@@ -110,15 +128,15 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private BigDecimal getTotalGross() {
|
private BigDecimal getTotalGross() {
|
||||||
|
|
||||||
BigDecimal res=getTotal();
|
BigDecimal res=getTotal();
|
||||||
HashMap<BigDecimal, VATAmount> VATPercentAmountMap=getVATPercentAmountMap();
|
HashMap<BigDecimal, VATAmount> VATPercentAmountMap=getVATPercentAmountMap();
|
||||||
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
||||||
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
||||||
res=res.add(amount.getCalculated());
|
res=res.add(amount.getCalculated());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,13 +153,13 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
* which taxes have been used with which amounts in this transaction,
|
* which taxes have been used with which amounts in this transaction,
|
||||||
* empty for no taxes, or e.g. 19=>190 and 7=>14 if 1000 Eur were applicable
|
* empty for no taxes, or e.g. 19=>190 and 7=>14 if 1000 Eur were applicable
|
||||||
* to 19% VAT (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT)
|
* to 19% VAT (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT)
|
||||||
* 190 Eur
|
* 190 Eur
|
||||||
* @return
|
* @return
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private HashMap<BigDecimal, VATAmount> getVATPercentAmountMap() {
|
private HashMap<BigDecimal, VATAmount> getVATPercentAmountMap() {
|
||||||
HashMap<BigDecimal, VATAmount> hm=new HashMap<BigDecimal, VATAmount> ();
|
HashMap<BigDecimal, VATAmount> hm=new HashMap<BigDecimal, VATAmount> ();
|
||||||
|
|
||||||
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
||||||
BigDecimal percent=currentItem.getProduct().getVATPercent();
|
BigDecimal percent=currentItem.getProduct().getVATPercent();
|
||||||
LineCalc lc=new LineCalc(currentItem);
|
LineCalc lc=new LineCalc(currentItem);
|
||||||
@@ -151,14 +169,14 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
hm.put(percent, itemVATAmount);
|
hm.put(percent, itemVATAmount);
|
||||||
} else {
|
} else {
|
||||||
hm.put(percent, current.add(itemVATAmount));
|
hm.put(percent, current.add(itemVATAmount));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return hm;
|
return hm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
public void generateXML(IZUGFeRDExportableTransaction trans) {
|
||||||
|
|
||||||
@@ -168,7 +186,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
String testBooleanStr="false";
|
String testBooleanStr="false";
|
||||||
if (isTest) {
|
if (isTest) {
|
||||||
testBooleanStr="true";
|
testBooleanStr="true";
|
||||||
|
|
||||||
}
|
}
|
||||||
String senderReg="";
|
String senderReg="";
|
||||||
if (trans.getOwnOrganisationFullPlaintextInfo()!=null) {
|
if (trans.getOwnOrganisationFullPlaintextInfo()!=null) {
|
||||||
@@ -179,11 +197,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
+ " </ram:Content>\n"
|
+ " </ram:Content>\n"
|
||||||
+ "<ram:SubjectCode>REG</ram:SubjectCode>\n"
|
+ "<ram:SubjectCode>REG</ram:SubjectCode>\n"
|
||||||
+ "</ram:IncludedCINote>\n";
|
+ "</ram:IncludedCINote>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String xml= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
|
String xml= "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
|
||||||
|
|
||||||
+ "<rsm:CrossIndustryInvoice xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\""
|
+ "<rsm:CrossIndustryInvoice xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\""
|
||||||
@@ -334,7 +352,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n"; //$NON-NLS-1$
|
+ " </ram:SpecifiedTradeSettlementPaymentMeans>\n"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HashMap<BigDecimal, VATAmount> VATPercentAmountMap=getVATPercentAmountMap();
|
HashMap<BigDecimal, VATAmount> VATPercentAmountMap=getVATPercentAmountMap();
|
||||||
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
for (BigDecimal currentTaxPercent : VATPercentAmountMap.keySet()) {
|
||||||
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
VATAmount amount = VATPercentAmountMap.get(currentTaxPercent);
|
||||||
@@ -414,7 +432,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
|
|
||||||
xml=xml + " </rsm:SupplyChainTradeTransaction>\n" //$NON-NLS-1$
|
xml=xml + " </rsm:SupplyChainTradeTransaction>\n" //$NON-NLS-1$
|
||||||
+ "</rsm:CrossIndustryInvoice>"; //$NON-NLS-1$
|
+ "</rsm:CrossIndustryInvoice>"; //$NON-NLS-1$
|
||||||
|
|
||||||
byte[] zugferdRaw;
|
byte[] zugferdRaw;
|
||||||
try {
|
try {
|
||||||
zugferdRaw = xml.getBytes("UTF-8");
|
zugferdRaw = xml.getBytes("UTF-8");
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public enum ZUGFeRDConformanceLevel {
|
public enum ZUGFeRDConformanceLevel {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public class ZUGFeRDExportException extends RuntimeException {
|
public class ZUGFeRDExportException extends RuntimeException {
|
||||||
|
|||||||
@@ -1,3 +1,22 @@
|
|||||||
|
|
||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -10,6 +29,18 @@ 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;
|
||||||
@@ -30,19 +61,6 @@ 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.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;
|
|
||||||
|
|
||||||
public class ZUGFeRDExporter implements Closeable {
|
public class ZUGFeRDExporter implements Closeable {
|
||||||
|
|
||||||
public static final int DefaultZUGFeRDVersion = 1;
|
public static final int DefaultZUGFeRDVersion = 1;
|
||||||
@@ -424,7 +442,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
*
|
*
|
||||||
* @param zUGFeRDConformanceLevel
|
* @param zUGFeRDConformanceLevel
|
||||||
* the new conformance level
|
* the new conformance level
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link ZUGFeRDExporterFromA1Factory} instead
|
* @deprecated Use {@link ZUGFeRDExporterFromA1Factory} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@@ -579,7 +597,7 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
public void setPDFA3(boolean ensurePDFisUpgraded) {
|
public void setPDFA3(boolean ensurePDFisUpgraded) {
|
||||||
this.ensurePDFisUpgraded = ensurePDFisUpgraded;
|
this.ensurePDFisUpgraded = ensurePDFisUpgraded;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAttachZUGFeRDHeaders(boolean attachZUGFeRDHeaders) {
|
public void setAttachZUGFeRDHeaders(boolean attachZUGFeRDHeaders) {
|
||||||
this.attachZUGFeRDHeaders=attachZUGFeRDHeaders;
|
this.attachZUGFeRDHeaders=attachZUGFeRDHeaders;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,28 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
|
||||||
public class ZUGFeRDExporterFromA1Factory extends ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
public class ZUGFeRDExporterFromA1Factory extends ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
||||||
public ZUGFeRDExporterFromA1Factory() {
|
public ZUGFeRDExporterFromA1Factory() {
|
||||||
ensurePDFisUpgraded=true;
|
ensurePDFisUpgraded=true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
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 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;
|
||||||
@@ -7,22 +32,13 @@ 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.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
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;
|
||||||
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||||
protected String producer = "mustangproject";
|
protected String producer = "mustangproject";
|
||||||
protected String creator = "mustangproject";
|
protected String creator = "mustangproject";
|
||||||
|
|
||||||
protected int ZFVersion=ZUGFeRDExporter.DefaultZUGFeRDVersion;
|
protected int ZFVersion=ZUGFeRDExporter.DefaultZUGFeRDVersion;
|
||||||
protected boolean ensurePDFisUpgraded=false;
|
protected boolean ensurePDFisUpgraded=false;
|
||||||
private boolean attachZUGFeRDHeaders=true;
|
private boolean attachZUGFeRDHeaders=true;
|
||||||
@@ -34,7 +50,7 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
* filename of an PDF/A1 compliant document
|
* filename of an PDF/A1 compliant document
|
||||||
*/
|
*/
|
||||||
public ZUGFeRDExporter load(String pdfFilename) throws IOException {
|
public ZUGFeRDExporter load(String pdfFilename) throws IOException {
|
||||||
|
|
||||||
ensurePDFIsValidPDFA(new FileDataSource(pdfFilename));
|
ensurePDFIsValidPDFA(new FileDataSource(pdfFilename));
|
||||||
ZUGFeRDExporter zugFeRDExporter;
|
ZUGFeRDExporter zugFeRDExporter;
|
||||||
PDDocument doc = PDDocument.load(new File(pdfFilename));
|
PDDocument doc = PDDocument.load(new File(pdfFilename));
|
||||||
@@ -45,12 +61,12 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
zugFeRDExporter.setProducer(producer);
|
zugFeRDExporter.setProducer(producer);
|
||||||
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
||||||
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
||||||
|
|
||||||
return zugFeRDExporter;
|
return zugFeRDExporter;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
|
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
|
||||||
@@ -70,10 +86,10 @@ public class ZUGFeRDExporterFromA3Factory implements IExporterFactory {
|
|||||||
zugFeRDExporter.setProducer(producer);
|
zugFeRDExporter.setProducer(producer);
|
||||||
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
zugFeRDExporter.setAttachZUGFeRDHeaders(attachZUGFeRDHeaders);
|
||||||
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
zugFeRDExporter.setPDFA3(ensurePDFisUpgraded);
|
||||||
|
|
||||||
return zugFeRDExporter;
|
return zugFeRDExporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ZUGFeRDExporterFromA3Factory () {
|
public ZUGFeRDExporterFromA3Factory () {
|
||||||
|
|
||||||
ensurePDFisUpgraded=false;
|
ensurePDFisUpgraded=false;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
/**
|
/**
|
||||||
* Mustangproject's ZUGFeRD implementation
|
* Mustangproject's ZUGFeRD implementation
|
||||||
@@ -14,11 +32,9 @@ import java.io.FileInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
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;
|
||||||
@@ -35,7 +51,7 @@ public class ZUGFeRDImporter {
|
|||||||
/*
|
/*
|
||||||
* call extract(importFilename). containsMeta() will return if ZUGFeRD data has
|
* call extract(importFilename). containsMeta() will return if ZUGFeRD data has
|
||||||
* been found, afterwards you can call getBIC(), getIBAN() etc.
|
* been found, afterwards you can call getBIC(), getIBAN() etc.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @var if metadata has been found */
|
/** @var if metadata has been found */
|
||||||
@@ -64,7 +80,7 @@ public class ZUGFeRDImporter {
|
|||||||
bis.close();
|
bis.close();
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
ioe.printStackTrace();
|
ioe.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,25 +169,25 @@ public class ZUGFeRDImporter {
|
|||||||
/*
|
/*
|
||||||
* ndList = document .getElementsByTagName("GermanBankleitzahlID");
|
* ndList = document .getElementsByTagName("GermanBankleitzahlID");
|
||||||
* //$NON-NLS-1$
|
* //$NON-NLS-1$
|
||||||
*
|
*
|
||||||
* for (int bookingIndex = 0; bookingIndex < ndList .getLength();
|
* for (int bookingIndex = 0; bookingIndex < ndList .getLength();
|
||||||
* bookingIndex++) { Node booking = ndList.item(bookingIndex); // if there is a
|
* bookingIndex++) { Node booking = ndList.item(bookingIndex); // if there is a
|
||||||
* attribute in the tag number:value setBIC(booking.getTextContent());
|
* attribute in the tag number:value setBIC(booking.getTextContent());
|
||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* ndList = document.getElementsByTagName("ProprietaryID"); //$NON-NLS-1$
|
* ndList = document.getElementsByTagName("ProprietaryID"); //$NON-NLS-1$
|
||||||
*
|
*
|
||||||
* for (int bookingIndex = 0; bookingIndex < ndList .getLength();
|
* for (int bookingIndex = 0; bookingIndex < ndList .getLength();
|
||||||
* bookingIndex++) { Node booking = ndList.item(bookingIndex); // if there is a
|
* bookingIndex++) { Node booking = ndList.item(bookingIndex); // if there is a
|
||||||
* attribute in the tag number:value setIBAN(booking.getTextContent());
|
* attribute in the tag number:value setIBAN(booking.getTextContent());
|
||||||
*
|
*
|
||||||
* } <ram:PayeePartyCreditorFinancialAccount> <ram:IBANID>DE1234</ram:IBANID>
|
* } <ram:PayeePartyCreditorFinancialAccount> <ram:IBANID>DE1234</ram:IBANID>
|
||||||
* </ram:PayeePartyCreditorFinancialAccount>
|
* </ram:PayeePartyCreditorFinancialAccount>
|
||||||
* <ram:PayeeSpecifiedCreditorFinancialInstitution>
|
* <ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
* <ram:BICID>DE5656565</ram:BICID> <ram:Name>Commerzbank</ram:Name>
|
* <ram:BICID>DE5656565</ram:BICID> <ram:Name>Commerzbank</ram:Name>
|
||||||
* </ram:PayeeSpecifiedCreditorFinancialInstitution>
|
* </ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ndList = document.getElementsByTagNameNS("*", "PayeePartyCreditorFinancialAccount"); //$NON-NLS-1$
|
ndList = document.getElementsByTagNameNS("*", "PayeePartyCreditorFinancialAccount"); //$NON-NLS-1$
|
||||||
|
|||||||
@@ -1,5 +1,33 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.DecimalFormatSymbols;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
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.AmountType;
|
||||||
import org.mustangproject.ZUGFeRD.model.CodeType;
|
import org.mustangproject.ZUGFeRD.model.CodeType;
|
||||||
import org.mustangproject.ZUGFeRD.model.CountryIDType;
|
import org.mustangproject.ZUGFeRD.model.CountryIDType;
|
||||||
@@ -48,17 +76,6 @@ import org.mustangproject.ZUGFeRD.model.TradeSettlementMonetarySummationType;
|
|||||||
import org.mustangproject.ZUGFeRD.model.TradeSettlementPaymentMeansType;
|
import org.mustangproject.ZUGFeRD.model.TradeSettlementPaymentMeansType;
|
||||||
import org.mustangproject.ZUGFeRD.model.TradeTaxType;
|
import org.mustangproject.ZUGFeRD.model.TradeTaxType;
|
||||||
|
|
||||||
import javax.xml.bind.JAXBElement;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.text.DecimalFormatSymbols;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
class ZUGFeRDTransactionModelConverter {
|
class ZUGFeRDTransactionModelConverter {
|
||||||
private static final SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd");
|
private static final SimpleDateFormat zugferdDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
private static final ObjectFactory xmlFactory = new ObjectFactory();
|
private static final ObjectFactory xmlFactory = new ObjectFactory();
|
||||||
@@ -827,12 +844,12 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
* DecimalFormatSymbols(); symbols.setDecimalSeparator(',');
|
* DecimalFormatSymbols(); symbols.setDecimalSeparator(',');
|
||||||
* symbols.setGroupingSeparator(' ');
|
* symbols.setGroupingSeparator(' ');
|
||||||
* df.setDecimalFormatSymbols(symbols);
|
* df.setDecimalFormatSymbols(symbols);
|
||||||
*
|
*
|
||||||
* but that would not switch off grouping. Although I liked very much
|
* but that would not switch off grouping. Although I liked very much
|
||||||
* the (incomplete) "BNF diagram" in
|
* the (incomplete) "BNF diagram" in
|
||||||
* http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
|
* http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
|
||||||
* in the end I decided to calculate myself and take eur+sparator+cents
|
* in the end I decided to calculate myself and take eur+sparator+cents
|
||||||
*
|
*
|
||||||
* This function will cut off, i.e. floor() subcent values Tests:
|
* This function will cut off, i.e. floor() subcent values Tests:
|
||||||
* System.err.println(utils.currencyFormat(new BigDecimal(0),
|
* System.err.println(utils.currencyFormat(new BigDecimal(0),
|
||||||
* ".")+"\n"+utils.currencyFormat(new BigDecimal("-1.10"),
|
* ".")+"\n"+utils.currencyFormat(new BigDecimal("-1.10"),
|
||||||
@@ -841,7 +858,7 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
* ",")+"\n"+utils.currencyFormat(new BigDecimal("20000123.3489"),
|
* ",")+"\n"+utils.currencyFormat(new BigDecimal("20000123.3489"),
|
||||||
* ",")+"\n"+utils.currencyFormat(new BigDecimal("20000123.3419"),
|
* ",")+"\n"+utils.currencyFormat(new BigDecimal("20000123.3419"),
|
||||||
* ",")+"\n"+utils.currencyFormat(new BigDecimal("12"), ","));
|
* ",")+"\n"+utils.currencyFormat(new BigDecimal("12"), ","));
|
||||||
*
|
*
|
||||||
* results 0.00 -1,10 -1,10 -1,01 20000123,34 20000123,34 12,00
|
* results 0.00 -1,10 -1,10 -1,01 20000123,34 20000123,34 12,00
|
||||||
*/
|
*/
|
||||||
value = value.setScale(scale, BigDecimal.ROUND_HALF_UP); // first, round
|
value = value.setScale(scale, BigDecimal.ROUND_HALF_UP); // first, round
|
||||||
@@ -944,7 +961,7 @@ class ZUGFeRDTransactionModelConverter {
|
|||||||
|
|
||||||
return hm;
|
return hm;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZUGFeRDTransactionModelConverter withTest(boolean isTest) {
|
ZUGFeRDTransactionModelConverter withTest(boolean isTest) {
|
||||||
this.isTest = isTest;
|
this.isTest = isTest;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class DateTimeTypeConstants {
|
public class DateTimeTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class DocumentCodeTypeConstants {
|
public class DocumentCodeTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class DocumentContextParameterTypeConstants {
|
public class DocumentContextParameterTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class NoteTypeConstants {
|
public class NoteTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class PaymentMeansCodeTypeConstants {
|
public class PaymentMeansCodeTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class QuantityTypeConstants {
|
public class QuantityTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class TaxCategoryCodeTypeConstants {
|
public class TaxCategoryCodeTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class TaxRegistrationTypeConstants {
|
public class TaxRegistrationTypeConstants {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
public class TaxTypeCodeTypeConstants {
|
public class TaxTypeCodeTypeConstants {
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD.model;
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
|
import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.sun.xml.bind.marshaller.NamespacePrefixMapper;
|
|
||||||
|
|
||||||
public class ZFNamespacePrefixMapper extends NamespacePrefixMapper {
|
public class ZFNamespacePrefixMapper extends NamespacePrefixMapper {
|
||||||
|
|
||||||
private Map<String, String> namespaceMap = new HashMap<>();
|
private Map<String, String> namespaceMap = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create mappings.
|
* Create mappings.
|
||||||
*/
|
*/
|
||||||
@@ -18,7 +35,7 @@ public class ZFNamespacePrefixMapper extends NamespacePrefixMapper {
|
|||||||
namespaceMap.put("urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15", "udt");
|
namespaceMap.put("urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15", "udt");
|
||||||
namespaceMap.put("urn:ferd:CrossIndustryDocument:invoice:1p0", "rsm");
|
namespaceMap.put("urn:ferd:CrossIndustryDocument:invoice:1p0", "rsm");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* Returning null when not found based on spec.
|
* Returning null when not found based on spec.
|
||||||
* @see com.sun.xml.bind.marshaller.NamespacePrefixMapper#getPreferredPrefix(java.lang.String, java.lang.String, boolean)
|
* @see com.sun.xml.bind.marshaller.NamespacePrefixMapper#getPreferredPrefix(java.lang.String, java.lang.String, boolean)
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.toecount;
|
package org.mustangproject.toecount;
|
||||||
|
|
||||||
import org.mustangproject.ZUGFeRD.ZUGFeRDImporter;
|
import org.mustangproject.ZUGFeRD.ZUGFeRDImporter;
|
||||||
@@ -6,7 +24,7 @@ public class FileChecker {
|
|||||||
String filename;
|
String filename;
|
||||||
StatRun thisRun;
|
StatRun thisRun;
|
||||||
boolean isPDF=false;
|
boolean isPDF=false;
|
||||||
|
|
||||||
public FileChecker(String filename, StatRun statistics) {
|
public FileChecker(String filename, StatRun statistics) {
|
||||||
this.filename=filename;
|
this.filename=filename;
|
||||||
thisRun=statistics;
|
thisRun=statistics;
|
||||||
@@ -21,12 +39,12 @@ public class FileChecker {
|
|||||||
thisRun.incPDFCount();
|
thisRun.incPDFCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
thisRun.incPDFCount();
|
thisRun.incPDFCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkForZUGFeRD() {
|
public boolean checkForZUGFeRD() {
|
||||||
if ((!isPDF)&&(!thisRun.shallIgnoreFileExt())) {
|
if ((!isPDF)&&(!thisRun.shallIgnoreFileExt())) {
|
||||||
return false;
|
return false;
|
||||||
@@ -48,22 +66,22 @@ public class FileChecker {
|
|||||||
at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extract(ZUGFeRDImporter.java:64)
|
at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extract(ZUGFeRDImporter.java:64)
|
||||||
at toecount.FileChecker.checkForZUGFeRD(FileChecker.java:33)
|
at toecount.FileChecker.checkForZUGFeRD(FileChecker.java:33)
|
||||||
at toecount.Toecount.main(Toecount.java:111)
|
at toecount.Toecount.main(Toecount.java:111)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
// Ignore nevertheless, most likely we're batch processing
|
// Ignore nevertheless, most likely we're batch processing
|
||||||
return false;
|
return false;
|
||||||
} catch (Exception e2) {
|
} catch (Exception e2) {
|
||||||
/**
|
/**
|
||||||
* probably thrown up from
|
* probably thrown up from
|
||||||
AM org.apache.pdfbox.pdfparser.PDFParser parse, most likely
|
AM org.apache.pdfbox.pdfparser.PDFParser parse, most likely
|
||||||
INFORMATION: Document is encrypted
|
INFORMATION: Document is encrypted
|
||||||
but also other internal PDF errors possible like
|
but also other internal PDF errors possible like
|
||||||
..Okt 23, 2015 11:17:53 AM org.apache.pdfbox.pdfparser.XrefTrailerResolver setStartxref
|
..Okt 23, 2015 11:17:53 AM org.apache.pdfbox.pdfparser.XrefTrailerResolver setStartxref
|
||||||
*/
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPDF() {
|
public boolean isPDF() {
|
||||||
return isPDF;
|
return isPDF;
|
||||||
}
|
}
|
||||||
@@ -71,5 +89,5 @@ public class FileChecker {
|
|||||||
public String getOutputLine() {
|
public String getOutputLine() {
|
||||||
return thisRun.getOutputLine();
|
return thisRun.getOutputLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,26 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.toecount;
|
package org.mustangproject.toecount;
|
||||||
|
|
||||||
import static java.nio.file.FileVisitResult.CONTINUE;
|
|
||||||
|
|
||||||
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;
|
||||||
@@ -29,7 +46,7 @@ public class FileTraverser extends SimpleFileVisitor<Path> {
|
|||||||
fc.checkForZUGFeRD();
|
fc.checkForZUGFeRD();
|
||||||
System.out.print(fc.getOutputLine());
|
System.out.print(fc.getOutputLine());
|
||||||
|
|
||||||
}
|
}
|
||||||
return CONTINUE;
|
return CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.toecount;
|
package org.mustangproject.toecount;
|
||||||
|
|
||||||
public class StatRun {
|
public class StatRun {
|
||||||
@@ -10,7 +28,7 @@ public class StatRun {
|
|||||||
public void ignoreFileExtension() {
|
public void ignoreFileExtension() {
|
||||||
checkFileExt=false;
|
checkFileExt=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shallIgnoreFileExt() {
|
public boolean shallIgnoreFileExt() {
|
||||||
return !checkFileExt;
|
return !checkFileExt;
|
||||||
}
|
}
|
||||||
@@ -51,11 +69,11 @@ public class StatRun {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getSummaryLine() {
|
public String getSummaryLine() {
|
||||||
|
|
||||||
return "\r\n===================================================================\r\n"+String.format(
|
return "\r\n===================================================================\r\n"+String.format(
|
||||||
"Files:\t%d\tDirs:\t%d\tPDF:\t%d\tZUGFeRD:\t%d\r\n",
|
"Files:\t%d\tDirs:\t%d\tPDF:\t%d\tZUGFeRD:\t%d\r\n",
|
||||||
getFileCount(), getDirCount(), getPDFCount(), getZUGFeRDCount());
|
getFileCount(), getDirCount(), getPDFCount(), getZUGFeRDCount());
|
||||||
|
|
||||||
}
|
}
|
||||||
/***
|
/***
|
||||||
* show that something is happening
|
* show that something is happening
|
||||||
@@ -65,5 +83,5 @@ public class StatRun {
|
|||||||
return ".";
|
return ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.toecount;
|
package org.mustangproject.toecount;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
Copyright 2018 Jochen Staerk
|
||||||
|
|
||||||
|
Use is subject to license terms.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
use this file except in compliance with the License. You may obtain a copy
|
||||||
|
of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
<xsl:stylesheet version="1.0"
|
<xsl:stylesheet version="1.0"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
public class IZUGFeRDExportableContactImpl implements IZUGFeRDExportableContact {
|
public class IZUGFeRDExportableContactImpl implements IZUGFeRDExportableContact {
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|||||||
@@ -1,13 +1,29 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
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;
|
||||||
|
|
||||||
@@ -184,7 +200,7 @@ public class MustangReaderWriterCustomXMLTest extends TestCase {
|
|||||||
+ "</ram:SpecifiedTradeProduct>\n" + "</ram:IncludedSupplyChainTradeLineItem>\n"
|
+ "</ram:SpecifiedTradeProduct>\n" + "</ram:IncludedSupplyChainTradeLineItem>\n"
|
||||||
+ "</rsm:SpecifiedSupplyChainTradeTransaction>\n" + "</rsm:CrossIndustryDocument>";
|
+ "</rsm:SpecifiedSupplyChainTradeTransaction>\n" + "</rsm:CrossIndustryDocument>";
|
||||||
zea1.setZUGFeRDXMLData(ownZUGFeRDXML.getBytes("UTF-8"));
|
zea1.setZUGFeRDXMLData(ownZUGFeRDXML.getBytes("UTF-8"));
|
||||||
|
|
||||||
ByteArrayOutputStream baos=new ByteArrayOutputStream();
|
ByteArrayOutputStream baos=new ByteArrayOutputStream();
|
||||||
zea1.disableAutoClose(true);
|
zea1.disableAutoClose(true);
|
||||||
zea1.export(TARGET_PDF);
|
zea1.export(TARGET_PDF);
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -7,11 +25,9 @@ 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.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;
|
||||||
|
|
||||||
@@ -403,7 +419,7 @@ public class MustangReaderWriterEdgeTest extends TestCase implements IZUGFeRDExp
|
|||||||
|
|
||||||
try(InputStream SOURCE_PDF =
|
try(InputStream SOURCE_PDF =
|
||||||
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||||
|
|
||||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory()
|
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA3Factory()
|
||||||
.setProducer("My Application")
|
.setProducer("My Application")
|
||||||
.setCreator(System.getProperty("user.name"))
|
.setCreator(System.getProperty("user.name"))
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
@@ -8,13 +26,11 @@ 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 org.junit.FixMethodOrder;
|
|
||||||
import org.junit.runners.MethodSorters;
|
|
||||||
|
|
||||||
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.runners.MethodSorters;
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExportableTransaction {
|
public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExportableTransaction {
|
||||||
@@ -367,7 +383,7 @@ public class MustangReaderWriterTest extends TestCase implements IZUGFeRDExporta
|
|||||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf");
|
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20171118_506blanko.pdf");
|
||||||
|
|
||||||
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).load(SOURCE_PDF)) {
|
ZUGFeRDExporter ze = new ZUGFeRDExporterFromA1Factory().setZUGFeRDVersion(2).load(SOURCE_PDF)) {
|
||||||
|
|
||||||
ze.PDFattachZugferdFile(this);
|
ze.PDFattachZugferdFile(this);
|
||||||
ze.disableAutoClose(true);
|
ze.disableAutoClose(true);
|
||||||
ze.export(TARGET_PDF);
|
ze.export(TARGET_PDF);
|
||||||
|
|||||||
@@ -1,12 +1,29 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
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
|
||||||
@@ -39,15 +56,15 @@ public class ZUGFeRDTransactionModelConverterTest {
|
|||||||
.setQuantity(BigDecimal.ONE)
|
.setQuantity(BigDecimal.ONE)
|
||||||
.setPrice(BigDecimal.TEN)
|
.setPrice(BigDecimal.TEN)
|
||||||
);
|
);
|
||||||
|
|
||||||
// execution
|
// execution
|
||||||
final JAXBElement<CrossIndustryDocumentType> actual =
|
final JAXBElement<CrossIndustryDocumentType> actual =
|
||||||
new ZUGFeRDTransactionModelConverter(transaction).convertToModel();
|
new ZUGFeRDTransactionModelConverter(transaction).convertToModel();
|
||||||
|
|
||||||
// evaluation
|
// evaluation
|
||||||
ZUGFeRDXMLAssert.assertValidZugferd(actual);
|
ZUGFeRDXMLAssert.assertValidZugferd(actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Date createDate(int year, int month, int day) {
|
private static Date createDate(int year, int month, int day) {
|
||||||
final GregorianCalendar calendar = new GregorianCalendar();
|
final GregorianCalendar calendar = new GregorianCalendar();
|
||||||
calendar.set(year, month-1, day);
|
calendar.set(year, month-1, day);
|
||||||
|
|||||||
@@ -1,16 +1,33 @@
|
|||||||
|
/** **********************************************************************
|
||||||
|
*
|
||||||
|
* Copyright 2018 Jochen Staerk
|
||||||
|
*
|
||||||
|
* Use is subject to license terms.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy
|
||||||
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
*********************************************************************** */
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jochen Staerk
|
||||||
|
|
||||||
|
Use is subject to license terms.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
use this file except in compliance with the License. You may obtain a copy
|
||||||
|
of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
||||||
<rsm:SpecifiedExchangedDocumentContext>
|
<rsm:SpecifiedExchangedDocumentContext>
|
||||||
<ram:TestIndicator>
|
<ram:TestIndicator>
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jochen Staerk
|
||||||
|
|
||||||
|
Use is subject to license terms.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
use this file except in compliance with the License. You may obtain a copy
|
||||||
|
of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
<rsm:CrossIndustryDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:15" xmlns:rsm="urn:ferd:CrossIndustryDocument:invoice:1p0">
|
||||||
<rsm:SpecifiedExchangedDocumentContext>
|
<rsm:SpecifiedExchangedDocumentContext>
|
||||||
<ram:TestIndicator>
|
<ram:TestIndicator>
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Jochen Staerk
|
||||||
|
|
||||||
|
Use is subject to license terms.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
use this file except in compliance with the License. You may obtain a copy
|
||||||
|
of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
xmlns:qdt="urn:un:unece:uncefact:data:Standard:QualifiedDataType:100"
|
||||||
|
|||||||
Reference in New Issue
Block a user