finished refactoring to ixmlprovider
This commit is contained in:
@@ -8,6 +8,8 @@ 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;
|
||||||
|
|
||||||
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
public class ZUGFeRD1PullProvider implements IXMLProvider {
|
||||||
|
|
||||||
|
|
||||||
@@ -58,8 +60,7 @@ public class ZUGFeRD1PullProvider implements IXMLProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getXML() {
|
public byte[] getXML() {
|
||||||
// TODO Auto-generated method stub
|
return zugferdData;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -106,14 +106,9 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getXML() {
|
public byte[] getXML() {
|
||||||
// TODO Auto-generated method stub
|
return zugferdData;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private BigDecimal getTotalGross() {
|
private BigDecimal getTotalGross() {
|
||||||
|
|
||||||
BigDecimal res=getTotal();
|
BigDecimal res=getTotal();
|
||||||
|
|||||||
@@ -53,14 +53,17 @@ public class ZUGFeRDExporter implements Closeable {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public ZUGFeRDExporter() {
|
public ZUGFeRDExporter() {
|
||||||
ZUGFeRD1PullProvider z1p =new ZUGFeRD1PullProvider();
|
init();
|
||||||
this.xmlProvider=z1p;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public ZUGFeRDExporter(PDDocument doc2) {
|
public ZUGFeRDExporter(PDDocument doc2) {
|
||||||
doc=doc2;
|
doc=doc2;
|
||||||
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
ZUGFeRD1PullProvider z1p =new ZUGFeRD1PullProvider();
|
||||||
|
this.xmlProvider=z1p;
|
||||||
|
}
|
||||||
// // MAIN CLASS
|
// // MAIN CLASS
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
private PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
//
|
||||||
|
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 generiert
|
||||||
|
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||||
|
// <20>nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
|
||||||
|
// Generiert: 2015.10.16 um 06:16:03 PM CEST
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
package org.mustangproject.ZUGFeRD.model;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Java-Klasse f<>r CrossIndustryDocumentType complex type.
|
||||||
|
*
|
||||||
|
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <complexType name="CrossIndustryDocumentType">
|
||||||
|
* <complexContent>
|
||||||
|
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||||
|
* <sequence>
|
||||||
|
* <element name="SpecifiedExchangedDocumentContext" type="{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12}ExchangedDocumentContextType"/>
|
||||||
|
* <element name="HeaderExchangedDocument" type="{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12}ExchangedDocumentType"/>
|
||||||
|
* <element name="SpecifiedSupplyChainTradeTransaction" type="{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:12}SupplyChainTradeTransactionType"/>
|
||||||
|
* </sequence>
|
||||||
|
* </restriction>
|
||||||
|
* </complexContent>
|
||||||
|
* </complexType>
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
@XmlRootElement(name="CrossIndustryDocumentType", namespace="urn:ferd:CrossIndustryDocument:invoice:1p0")
|
||||||
|
@XmlType(name = "CrossIndustryDocumentType", namespace = "urn:ferd:CrossIndustryDocument:invoice:1p0", propOrder = {
|
||||||
|
"specifiedExchangedDocumentContext",
|
||||||
|
"headerExchangedDocument",
|
||||||
|
"specifiedSupplyChainTradeTransaction"
|
||||||
|
})
|
||||||
|
public class CrossIndustryDocumentType {
|
||||||
|
|
||||||
|
@XmlElement(name = "SpecifiedExchangedDocumentContext", required = true)
|
||||||
|
protected ExchangedDocumentContextType specifiedExchangedDocumentContext;
|
||||||
|
@XmlElement(name = "HeaderExchangedDocument", required = true)
|
||||||
|
protected ExchangedDocumentType headerExchangedDocument;
|
||||||
|
@XmlElement(name = "SpecifiedSupplyChainTradeTransaction", required = true)
|
||||||
|
protected SupplyChainTradeTransactionType specifiedSupplyChainTradeTransaction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ruft den Wert der specifiedExchangedDocumentContext-Eigenschaft ab.
|
||||||
|
*
|
||||||
|
* @return ExchangedDocumentContextType
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ExchangedDocumentContextType getSpecifiedExchangedDocumentContext() {
|
||||||
|
return specifiedExchangedDocumentContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legt den Wert der specifiedExchangedDocumentContext-Eigenschaft fest.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link ExchangedDocumentContextType }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setSpecifiedExchangedDocumentContext(ExchangedDocumentContextType value) {
|
||||||
|
this.specifiedExchangedDocumentContext = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ruft den Wert der headerExchangedDocument-Eigenschaft ab.
|
||||||
|
*
|
||||||
|
* @return ExchangedDocumentType
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public ExchangedDocumentType getHeaderExchangedDocument() {
|
||||||
|
return headerExchangedDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legt den Wert der headerExchangedDocument-Eigenschaft fest.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link ExchangedDocumentType }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setHeaderExchangedDocument(ExchangedDocumentType value) {
|
||||||
|
this.headerExchangedDocument = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ruft den Wert der specifiedSupplyChainTradeTransaction-Eigenschaft ab.
|
||||||
|
*
|
||||||
|
* @return SupplyChainTradeTransactionType
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public SupplyChainTradeTransactionType getSpecifiedSupplyChainTradeTransaction() {
|
||||||
|
return specifiedSupplyChainTradeTransaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Legt den Wert der specifiedSupplyChainTradeTransaction-Eigenschaft fest.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* allowed object is
|
||||||
|
* {@link SupplyChainTradeTransactionType }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void setSpecifiedSupplyChainTradeTransaction(SupplyChainTradeTransactionType value) {
|
||||||
|
this.specifiedSupplyChainTradeTransaction = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user