updated javadoc
This commit is contained in:
@@ -22,8 +22,8 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
||||
* identify the IBAN. Of course you will specify your own IBAN in full length but
|
||||
* if you deduct from a customer's account you may e.g. leave out the first or last
|
||||
* digits so that nobody spying on the invoice gets to know the complete number
|
||||
* @param IBAN
|
||||
* @return
|
||||
* @param IBAN the "IBAN ID", i.e. the IBAN or parts of it
|
||||
* @return fluent setter
|
||||
*/
|
||||
public BankDetails setIBAN(String IBAN) {
|
||||
this.IBAN = IBAN;
|
||||
|
||||
@@ -15,9 +15,9 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
/***
|
||||
* default constructor.
|
||||
* Name, phone and email of sender contact person are e.g. required by XRechnung
|
||||
* @param name
|
||||
* @param phone
|
||||
* @param email
|
||||
* @param name full name of the contact
|
||||
* @param phone full phone number
|
||||
* @param email email address of the contact
|
||||
*/
|
||||
public Contact(String name, String phone, String email) {
|
||||
this.name = name;
|
||||
@@ -27,13 +27,13 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* complete specification of a named contact with a different address
|
||||
* @param name
|
||||
* @param phone
|
||||
* @param email
|
||||
* @param street
|
||||
* @param zip
|
||||
* @param location
|
||||
* @param country
|
||||
* @param name full name
|
||||
* @param phone full phone number
|
||||
* @param email full email
|
||||
* @param street street+number
|
||||
* @param zip postcode
|
||||
* @param location city
|
||||
* @param country two-letter iso code
|
||||
*/
|
||||
public Contact(String name, String phone, String email, String street, String zip, String location, String country) {
|
||||
this.name = name;
|
||||
@@ -53,8 +53,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/**
|
||||
* the first and last name of the contact
|
||||
* @param name
|
||||
* @return
|
||||
* @param name first and last name
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setName(String name) {
|
||||
this.name = name;
|
||||
@@ -68,8 +68,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* complete phone number of the contact
|
||||
* @param phone
|
||||
* @return
|
||||
* @param phone the complete phone number
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
@@ -83,8 +83,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* (optional) complete fax number
|
||||
* @param fax
|
||||
* @return
|
||||
* @param fax complete fax number of the contact
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setFax(String fax) {
|
||||
this.fax = fax;
|
||||
@@ -97,8 +97,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* personal email address of the contact person
|
||||
* @param email
|
||||
* @return
|
||||
* @param email the email address of the contact
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setEMail(String email) {
|
||||
this.email = email;
|
||||
@@ -111,8 +111,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* the postcode, if the address is different to the organisation
|
||||
* @param zip
|
||||
* @return
|
||||
* @param zip the postcode of the contact
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setZIP(String zip) {
|
||||
this.zip = zip;
|
||||
@@ -126,8 +126,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/**
|
||||
* street and number, if the address is different to the organisation
|
||||
* @param street
|
||||
* @return
|
||||
* @param street street and number of the contact
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setStreet(String street) {
|
||||
this.street = street;
|
||||
@@ -141,8 +141,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* city of the contact person, if different from organisation
|
||||
* @param location
|
||||
* @return
|
||||
* @param location city
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setLocation(String location) {
|
||||
this.location = location;
|
||||
@@ -156,8 +156,8 @@ public class Contact implements IZUGFeRDExportableContact {
|
||||
|
||||
/***
|
||||
* two-letter ISO country code of the contact, if different from organisation
|
||||
* @param country
|
||||
* @return
|
||||
* @param country two-letter iso code
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Contact setCountry(String country) {
|
||||
this.country = country;
|
||||
|
||||
@@ -191,8 +191,8 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* usually the order number or in case of a correction the original invoice number
|
||||
* @param buyerOrderReferencedDocumentID
|
||||
* @return
|
||||
* @param buyerOrderReferencedDocumentID string with number
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setBuyerOrderReferencedDocumentID(String buyerOrderReferencedDocumentID) {
|
||||
this.buyerOrderReferencedDocumentID = buyerOrderReferencedDocumentID;
|
||||
@@ -205,9 +205,9 @@ public class Invoice implements IExportableTransaction {
|
||||
}
|
||||
|
||||
/***
|
||||
* when the order (or whatever reference in BuyerOrderReferencedDocumentID) was issued
|
||||
* @param buyerOrderReferencedDocumentIssueDateTime
|
||||
* @return
|
||||
* when the order (or whatever reference in BuyerOrderReferencedDocumentID) was issued (@todo switch to date?)
|
||||
* @param buyerOrderReferencedDocumentIssueDateTime IssueDateTime in format CCYY-MM-DDTHH:MM:SS
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setBuyerOrderReferencedDocumentIssueDateTime(String buyerOrderReferencedDocumentIssueDateTime) {
|
||||
this.buyerOrderReferencedDocumentIssueDateTime = buyerOrderReferencedDocumentIssueDateTime;
|
||||
@@ -374,8 +374,10 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* sets a named sender contact
|
||||
* @param ownContact
|
||||
* @return
|
||||
* @deprecated use setSender
|
||||
* @see Contact
|
||||
* @param ownContact the sender contact
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setOwnContact(Contact ownContact) {
|
||||
this.sender.setContact(ownContact);
|
||||
@@ -389,8 +391,8 @@ public class Invoice implements IExportableTransaction {
|
||||
/**
|
||||
* required.
|
||||
* sets the invoice receiving institution = invoicee
|
||||
* @param recipient
|
||||
* @return
|
||||
* @param recipient the invoicee organisation
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setRecipient(TradeParty recipient) {
|
||||
this.recipient = recipient;
|
||||
@@ -400,8 +402,8 @@ public class Invoice implements IExportableTransaction {
|
||||
/**
|
||||
* required.
|
||||
* sets the invoicing institution = invoicer
|
||||
* @param sender
|
||||
* @return
|
||||
* @param sender the invoicer
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setSender(TradeParty sender) {
|
||||
this.sender = sender;
|
||||
@@ -468,8 +470,8 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* if the delivery address is not the recipient address, it can be specified here
|
||||
* @param deliveryAddress
|
||||
* @return
|
||||
* @param deliveryAddress the goods receiving organisation
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setDeliveryAddress(TradeParty deliveryAddress) {
|
||||
this.deliveryAddress = deliveryAddress;
|
||||
@@ -484,8 +486,9 @@ public class Invoice implements IExportableTransaction {
|
||||
/**
|
||||
* required
|
||||
* adds invoice "lines" :-)
|
||||
* @param item
|
||||
* @return
|
||||
* @see Item
|
||||
* @param item the invoice line
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice addItem(IZUGFeRDExportableItem item) {
|
||||
ZFItems.add(item);
|
||||
@@ -510,8 +513,9 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* adds a document level addition to the price
|
||||
* @param izac
|
||||
* @return
|
||||
* @see Charge
|
||||
* @param izac the charge to be applied
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice addCharge(IZUGFeRDAllowanceCharge izac) {
|
||||
Charges.add(izac);
|
||||
@@ -520,8 +524,9 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* adds a document level rebate
|
||||
* @param izac
|
||||
* @return
|
||||
* @see Allowance
|
||||
* @param izac the allowance to be applied
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice addAllowance(IZUGFeRDAllowanceCharge izac) {
|
||||
Allowances.add(izac);
|
||||
@@ -530,8 +535,8 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* adds the ID of a contract referenced in the invoice
|
||||
* @param s
|
||||
* @return
|
||||
* @param s the contract number
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setContractReferencedDocument(String s) {
|
||||
contractReferencedDocument = s;
|
||||
@@ -543,8 +548,8 @@ public class Invoice implements IExportableTransaction {
|
||||
* sets a document level delivery period,
|
||||
* which is optional additional to the mandatory deliverydate
|
||||
* and which will become a BillingSpecifiedPeriod-Element
|
||||
* @param start
|
||||
* @param end
|
||||
* @param start the date of first delivery
|
||||
* @param end the date of last delivery
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice setDetailedDeliveryPeriod(Date start, Date end) {
|
||||
@@ -568,7 +573,7 @@ public class Invoice implements IExportableTransaction {
|
||||
|
||||
/***
|
||||
* adds a free text paragraph, which will become a includedNote element
|
||||
* @param text
|
||||
* @param text freeform UTF8 plain text
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Invoice addNote(String text) {
|
||||
|
||||
@@ -35,8 +35,8 @@ public class Item implements IZUGFeRDExportableItem {
|
||||
|
||||
/**
|
||||
* should only be set by calculator classes or maybe when reading from XML
|
||||
* @param lineTotalAmount
|
||||
* @return
|
||||
* @param lineTotalAmount price*quantity of this line
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Item setLineTotalAmount(BigDecimal lineTotalAmount) {
|
||||
this.lineTotalAmount = lineTotalAmount;
|
||||
@@ -50,7 +50,8 @@ public class Item implements IZUGFeRDExportableItem {
|
||||
|
||||
/***
|
||||
* the list price without VAT (sic!), refer to EN16931-1 for definition
|
||||
* @return
|
||||
* @param grossPrice the list price without VAT
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Item setGrossPrice(BigDecimal grossPrice) {
|
||||
this.grossPrice = grossPrice;
|
||||
@@ -146,8 +147,8 @@ public class Item implements IZUGFeRDExportableItem {
|
||||
|
||||
/***
|
||||
* adds item level freetext fields (includednote)
|
||||
* @param text
|
||||
* @return
|
||||
* @param text UTF8 plain text
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Item addNote(String text) {
|
||||
if (notes==null) {
|
||||
|
||||
@@ -13,10 +13,10 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/***
|
||||
* default constructor
|
||||
* @param name
|
||||
* @param description
|
||||
* @param name product short name
|
||||
* @param description product long name
|
||||
* @param unit a two/three letter UN/ECE rec 20 unit code, e.g. "C62" for piece
|
||||
* @param VATPercent
|
||||
* @param VATPercent product vat rate
|
||||
*/
|
||||
public Product(String name, String description, String unit, BigDecimal VATPercent) {
|
||||
this.unit = unit;
|
||||
@@ -32,8 +32,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/***
|
||||
* how the seller identifies this type of product
|
||||
* @param sellerAssignedID
|
||||
* @return
|
||||
* @param sellerAssignedID a unique String
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setSellerAssignedID(String sellerAssignedID) {
|
||||
this.sellerAssignedID = sellerAssignedID;
|
||||
@@ -46,8 +46,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/***
|
||||
* if the buyer provided an ID how he refers to this product
|
||||
* @param buyerAssignedID
|
||||
* @return
|
||||
* @param buyerAssignedID a string the buyer provided
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setBuyerAssignedID(String buyerAssignedID) {
|
||||
this.buyerAssignedID = buyerAssignedID;
|
||||
@@ -61,8 +61,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/***
|
||||
* sets a UN/ECE rec 20 or 21 code which unit the product ships in, e.g. C62=piece
|
||||
* @param unit
|
||||
* @return
|
||||
* @param unit 2-3 letter UN/ECE rec 20 or 21
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
@@ -76,8 +76,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/**
|
||||
* name of the product
|
||||
* @param name
|
||||
* @return
|
||||
* @param name short name
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setName(String name) {
|
||||
this.name = name;
|
||||
@@ -91,8 +91,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/**
|
||||
* description of the product (required)
|
||||
* @param description
|
||||
* @return
|
||||
* @param description long name
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setDescription(String description) {
|
||||
this.description = description;
|
||||
@@ -106,8 +106,8 @@ public class Product implements IZUGFeRDExportableProduct {
|
||||
|
||||
/****
|
||||
* VAT rate of the product
|
||||
* @param VATPercent
|
||||
* @return
|
||||
* @param VATPercent vat rate of the product
|
||||
* @return fluent setter
|
||||
*/
|
||||
public Product setVATPercent(BigDecimal VATPercent) {
|
||||
this.VATPercent = VATPercent;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* XML parsing constructor
|
||||
* @param nodes
|
||||
* @param nodes the nodelist returned e.g. from xpath
|
||||
*/
|
||||
public TradeParty(NodeList nodes) {
|
||||
/**
|
||||
@@ -109,8 +109,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/**
|
||||
* if it's a customer, this can e.g. be the customer ID
|
||||
* @param ID
|
||||
* @return
|
||||
* @param ID customer/seller number
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setID(String ID) {
|
||||
this.ID = ID;
|
||||
@@ -119,8 +119,9 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* (optional) a named contact person
|
||||
* @param c
|
||||
* @return
|
||||
* @see Contact
|
||||
* @param c the named contact person
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setContact(Contact c) {
|
||||
this.contact = c;
|
||||
@@ -129,8 +130,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* required (for senders, if payment is not debit): the BIC and IBAN
|
||||
* @param s
|
||||
* @return
|
||||
* @param s bank credentials
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty addBankDetails(BankDetails s) {
|
||||
bankDetails.add(s);
|
||||
@@ -143,8 +144,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* a general tax ID
|
||||
* @param taxID
|
||||
* @return
|
||||
* @param taxID tax number of the organisation
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty addTaxID(String taxID) {
|
||||
this.taxID = taxID;
|
||||
@@ -153,8 +154,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* the USt-ID
|
||||
* @param vatID
|
||||
* @return
|
||||
* @param vatID Ust-ID
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty addVATID(String vatID) {
|
||||
this.vatID = vatID;
|
||||
@@ -178,7 +179,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* required, usually done in the constructor: the complete name of the organisation
|
||||
* @return
|
||||
* @param name complete legal name
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setName(String name) {
|
||||
this.name = name;
|
||||
@@ -192,8 +194,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* usually set in the constructor, required for recipients in german invoices: postcode
|
||||
* @param zip
|
||||
* @return
|
||||
* @param zip postcode
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setZIP(String zip) {
|
||||
this.zip = zip;
|
||||
@@ -207,8 +209,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* usually set in constructor, required in germany, street and house number
|
||||
* @param street
|
||||
* @return
|
||||
* @param street street name and number
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setStreet(String street) {
|
||||
this.street = street;
|
||||
@@ -222,8 +224,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* usually set in constructor, usually required in germany, the city of the organisation
|
||||
* @param location
|
||||
* @return
|
||||
* @param location city
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setLocation(String location) {
|
||||
this.location = location;
|
||||
@@ -237,8 +239,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
|
||||
/***
|
||||
* two-letter ISO code of the country
|
||||
* @param country
|
||||
* @return
|
||||
* @param country two-letter-code
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setCountry(String country) {
|
||||
this.country = country;
|
||||
@@ -275,8 +277,8 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
||||
/***
|
||||
* additional parts of the address, e.g. which floor.
|
||||
* Street address will become "lineOne", this will become "lineTwo"
|
||||
* @param additionalAddress
|
||||
* @return
|
||||
* @param additionalAddress additional address description
|
||||
* @return fluent setter
|
||||
*/
|
||||
public TradeParty setAdditionalAddress(String additionalAddress) {
|
||||
this.additionalAddress = additionalAddress;
|
||||
|
||||
@@ -122,7 +122,7 @@ public class XMLTools extends XMLWriter {
|
||||
|
||||
/***
|
||||
* removes utf8 byte order marks from byte arrays, in case one is there
|
||||
* @param zugferdRaw
|
||||
* @param zugferdRaw the CII XML
|
||||
* @return the byte array without bom
|
||||
*/
|
||||
public static byte[] removeBOM(byte[] zugferdRaw) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Profiles {
|
||||
{"BASIC", new Profile("BASIC", "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic")},
|
||||
{"EN16931", new Profile("EN16931", "urn:cen.eu:en16931:2017")},
|
||||
{"EXTENDED", new Profile("EXTENDED", "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended")},
|
||||
{"XRECHNUNG", new Profile("XRECHNUNG", "XRECHNUNG")}
|
||||
{"XRECHNUNG", new Profile("XRECHNUNG", "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0")}
|
||||
|
||||
}).collect(Collectors.toMap(data -> (String) data[0], data -> (Profile) data[1]));
|
||||
static Map<String, Profile> zf1Map = Stream.of(new Object[][]{
|
||||
|
||||
@@ -27,11 +27,11 @@ public class XMLUpgrader {
|
||||
|
||||
/***
|
||||
* Takes a filename of a ZF1 XML file and returns the string of ZF2 XML
|
||||
* @param xmlFilename
|
||||
* @param xmlFilename the filename of the source
|
||||
* @return String the updated XML
|
||||
* @throws FileNotFoundException
|
||||
* @throws TransformerException
|
||||
* @throws UnsupportedEncodingException
|
||||
* @throws FileNotFoundException if the source could not be found
|
||||
* @throws TransformerException if the source could not be transformed
|
||||
* @throws UnsupportedEncodingException if the source was not utf8
|
||||
*/
|
||||
public String migrateFromV1ToV2(String xmlFilename) throws FileNotFoundException, TransformerException, UnsupportedEncodingException {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user