diff --git a/library/src/main/java/org/mustangproject/Invoice.java b/library/src/main/java/org/mustangproject/Invoice.java index da43eaeb..14393783 100644 --- a/library/src/main/java/org/mustangproject/Invoice.java +++ b/library/src/main/java/org/mustangproject/Invoice.java @@ -842,6 +842,7 @@ public String getVATDueDateTypeCode() { /** * Decide when the VAT should be collected. * @param vatDueDateTypeCode use EventTimeCodeTypeConstants + * @return fluent setter */ public Invoice setVATDueDateTypeCode(String vatDueDateTypeCode) { this.vatDueDateTypeCode = vatDueDateTypeCode; diff --git a/library/src/main/java/org/mustangproject/ReferencedDocument.java b/library/src/main/java/org/mustangproject/ReferencedDocument.java index 02dcaf80..423c1bc5 100644 --- a/library/src/main/java/org/mustangproject/ReferencedDocument.java +++ b/library/src/main/java/org/mustangproject/ReferencedDocument.java @@ -22,7 +22,7 @@ public ReferencedDocument(String issuerAssignedID, String referenceTypeCode) { /*** * sets an ID assigned by the sender - * @param issuerAssignedID + * @param issuerAssignedID the ID as a string :-) */ public void setIssuerAssignedID(String issuerAssignedID) { this.issuerAssignedID = issuerAssignedID; @@ -30,7 +30,7 @@ public void setIssuerAssignedID(String issuerAssignedID) { /** * which type is the document? e.g. "916" for additional invoice related - * @param typeCode + * @param typeCode as String, e.g. 916 */ public void setTypeCode(String typeCode) { this.typeCode = typeCode; @@ -38,7 +38,7 @@ public void setTypeCode(String typeCode) { /** * type of the reference of this line, a UNTDID 1153 code - * @param referenceTypeCode + * @param referenceTypeCode three uppercase character reference type code as string */ public void setReferenceTypeCode(String referenceTypeCode) { this.referenceTypeCode = referenceTypeCode; diff --git a/library/src/main/java/org/mustangproject/SubjectCode.java b/library/src/main/java/org/mustangproject/SubjectCode.java index 99208128..c58070fd 100644 --- a/library/src/main/java/org/mustangproject/SubjectCode.java +++ b/library/src/main/java/org/mustangproject/SubjectCode.java @@ -1,7 +1,7 @@ package org.mustangproject; /** - * EN16931-ID: BT-21 - the qualification of the free text on the invoice from BT-22
+ * EN16931-ID: BT-21 - the qualification of the free text on the invoice from BT-22 * In the first step only the recommended codes are implemented. */ public enum SubjectCode { diff --git a/library/src/main/java/org/mustangproject/TradeParty.java b/library/src/main/java/org/mustangproject/TradeParty.java index c9164c1b..9a6d3f8d 100644 --- a/library/src/main/java/org/mustangproject/TradeParty.java +++ b/library/src/main/java/org/mustangproject/TradeParty.java @@ -659,7 +659,7 @@ public TradeParty setAdditionalAddress(String additionalAddress1, String additio * e.g. which floor (if LineTwo has already been used e.g. for which building) * This could sometimes be BT-165? * - * @param additionalAddress2 + * @param additionalAddress2 e.g. which floor, as String * @return fluent setter */ public TradeParty setAdditionalAddressExtension(String additionalAddress2) { diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/IExportableTransaction.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IExportableTransaction.java index bd778d78..6d7d7f89 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/IExportableTransaction.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/IExportableTransaction.java @@ -1,21 +1,23 @@ -/** ********************************************************************** - * +/** + * ********************************************************************* + *

* 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; /** @@ -38,7 +40,7 @@ /*** * the interface of an transaction, e.g. an invoice, you want to create xml * (potentially to be added to a PDF) for - * + * * @see org.mustangproject.Invoice */ public interface IExportableTransaction { @@ -82,13 +84,12 @@ default Date getIssueDate() { /** * this should be the full sender institution name, details, manager and tax * registration. It is one of the few functions which may return null. e.g. - *

+ * * Lieferant GmbH Lieferantenstraße 20 80333 München Deutschland * Geschäftsführer: Hans Muster Handelsregisternummer: H A 123 - *

* - * It is written as an includedNode with subjectCode {@link org.mustangproject.SubjectCode#REG}. See also - * {@link #getNotesWithSubjectCode()} + * It is written as an includedNode with subjectCode {@link org.mustangproject.SubjectCode#REG}. See also + * {@link #getNotesWithSubjectCode()} * @return null or full sender institution name, details, manager and tax * registration */ @@ -150,7 +151,7 @@ default IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() { /** * the creditors payment informations - * + * * @deprecated use getTradeSettlement * @return an array of IZUGFeRDTradeSettlementPayment */ @@ -441,7 +442,7 @@ default BigDecimal getTotalPrepaidAmount() { /*** * delivery address, i.e. ram:ShipToTradeParty (only supported for zf2) - * + * * @return the IZUGFeRDExportableTradeParty delivery address */ @@ -452,7 +453,7 @@ default IZUGFeRDExportableTradeParty getDeliveryAddress() { /*** * specifies the document level delivery period, will be included in a * BillingSpecifiedPeriod element - * + * * @return the beginning of the delivery period */ default Date getDetailedDeliveryPeriodFrom() { @@ -462,7 +463,7 @@ default Date getDetailedDeliveryPeriodFrom() { /*** * specifies the document level delivery period, will be included in a * BillingSpecifiedPeriod element - * + * * @return the end of the delivery period */ default Date getDetailedDeliveryPeriodTo() { @@ -486,7 +487,7 @@ default String getDespatchAdviceReferencedDocumentID() { /*** * additional text description - * + * * @return an array of strings of document wide "includedNotes" (descriptive * text values) */ @@ -494,13 +495,16 @@ default String[] getNotes() { return null; } - /** - * A grouping of business terms to indicate accounting-relevant free texts including a qualification of these.

- * The information are written to the same xml nodes like {@link #getNotes()} but with explicit subjectCode. - */ - default List getNotesWithSubjectCode(){ - return null; - } + /** + * A grouping of business terms to indicate accounting-relevant free texts including a qualification of these. + * + * The information are written to the same xml nodes like {@link #getNotes()} but with explicit subjectCode. + * @return list of the notes + */ + default List getNotesWithSubjectCode() { + return null; + } + default String getSpecifiedProcuringProjectName() { return null; } diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTradeParty.java b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTradeParty.java index b9bf67d4..16ce44f1 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTradeParty.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTradeParty.java @@ -1,21 +1,23 @@ -/** ********************************************************************** - * +/** + * ********************************************************************* + *

* 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; import org.mustangproject.TradeParty; @@ -50,13 +52,14 @@ default String getGlobalID() { } - /*** + /*** * gets the official representation * @return the interface with the attributes of the legal organisation */ - default IZUGFeRDLegalOrganisation getLegalOrganisation() { + default IZUGFeRDLegalOrganisation getLegalOrganisation() { return null; } + /** * customer global identification scheme * @@ -69,15 +72,17 @@ default String getGlobalIDScheme() { /** * URIUniversalCommunication scheme (see EAS code list of the ZUGFeRD documentation) - * + * I believe EM for Email + * @return String with code */ default String getUriUniversalCommunicationIDScheme() { return null; } + /** * The URIID of URIUniversalCommunicationID - * It is used by some countries, i.e. Luxembourg - * + * It is used by some countries, i.e. Luxembourg + * @return the URI as string */ default String getUriUniversalCommunicationID() { return null; @@ -94,6 +99,7 @@ default IZUGFeRDExportableContact getContact() { * @return First and last name of the recipient */ String getName(); + /** * Postal code of the recipient * diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java index f6a0bbc4..bc687aa7 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromA3.java @@ -645,6 +645,8 @@ public IExporter prepare() throws IOException { /** * Reads the XMPMetadata from the PDDocument, if it exists. * Otherwise creates XMPMetadata. + * @return the finished XMPMetadata object + * @throws IOException when e.g. XmpParsingException */ protected XMPMetadata getXmpMetadata() throws IOException @@ -670,6 +672,7 @@ protected byte[] serializeXmpMetadata(XMPMetadata xmpMetadata) throws Transforme /** * Sets the producer if the overwrite flag is set or the producer is not already set. * Sets the PDFVersion to 1.4 if the field is empty. + * @param xmp the metadata as XML */ protected void writeAdobePDFSchema(XMPMetadata xmp) { AdobePDFSchema pdf = getAdobePDFSchema(xmp); diff --git a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromPDFA.java b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromPDFA.java index 37ab4167..c866ae65 100644 --- a/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromPDFA.java +++ b/library/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporterFromPDFA.java @@ -105,8 +105,8 @@ private int getPDFAVersion(byte[] byteArrayInputStream) throws IOException { /*** * Load from filename * @param pdfFilename binary of a PDF/A1 compliant document - * @return - * @throws IOException + * @return the A1 or A3 exporter + * @throws IOException e.g. on read error */ public IZUGFeRDExporter load(String pdfFilename) throws IOException { determineAndSetExporter(getPDFAVersion(filenameToByteArray(pdfFilename)));