From 98c54e2c372e914b9d9cfbc9f63ae7972fbe1729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Sta=CC=88rk?= Date: Sun, 10 Jun 2018 10:25:35 +0200 Subject: [PATCH] updated javadoc --- .../ZUGFeRD/IZUGFeRDExportableContact.java | 11 ++--- .../ZUGFeRD/IZUGFeRDExportableItem.java | 4 +- .../ZUGFeRD/IZUGFeRDExportableProduct.java | 8 ++-- .../IZUGFeRDExportableTransaction.java | 42 ++++++++++--------- .../ZUGFeRD/ZUGFeRD2PullProvider.java | 2 +- .../ZUGFeRD/ZUGFeRDExporter.java | 2 +- .../ZUGFeRDTransactionModelConverter.java | 2 +- .../org/mustangproject/toecount/StatRun.java | 4 +- .../org/mustangproject/toecount/Toecount.java | 16 +++---- 9 files changed, 47 insertions(+), 44 deletions(-) diff --git a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java index 3e6b302c..f263be53 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableContact.java @@ -31,36 +31,37 @@ public interface IZUGFeRDExportableContact { /** * First and last name of the recipient - * @return + * @return First and last name of the recipient */ String getName(); /** * Postal code of the recipient - * @return + * @return Postal code of the recipient */ String getZIP(); /** * VAT ID (Umsatzsteueridentifikationsnummer) of the contact - * @return + * @return VAT ID (Umsatzsteueridentifikationsnummer) of the contact */ String getVATID(); /** * two-letter country code of the contact - * @return + * @return two-letter iso country code of the contact */ String getCountry(); /*** * Returns the city of the contact - * @return + * @return Returns the city of the recipient */ String getLocation(); /*** * Returns the street address (street+number) of the contact + * @return street address (street+number) of the contact */ String getStreet(); diff --git a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java index de446111..37b976c1 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableItem.java @@ -37,13 +37,13 @@ public interface IZUGFeRDExportableItem { /** * The price of one item excl. taxes - * @return + * @return The price of one item excl. taxes */ BigDecimal getPrice(); /*** * how many - * @return + * @return the quantity of the item */ BigDecimal getQuantity(); diff --git a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java index 0f95920c..9d4d71db 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableProduct.java @@ -54,25 +54,25 @@ public interface IZUGFeRDExportableProduct { TNE tonne (metric ton) WEE week - * @return + * @return a UN/ECE rec 20 unit code see https://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex2e.pdf */ String getUnit(); /** * Short name of the product - * @return + * @return Short name of the product */ String getName(); /** * long description of the product - * @return + * @return long description of the product */ String getDescription(); /** * VAT percent of the product (e.g. 19, or 5.1 if you like) - * @return + * @return VAT percent of the product */ BigDecimal getVATPercent(); diff --git a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java index f7ab8d5c..3077e610 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/IZUGFeRDExportableTransaction.java @@ -34,19 +34,20 @@ public interface IZUGFeRDExportableTransaction { /** * Number, typically invoice number of the invoice - * @return + * @return invoice number */ String getNumber(); /** * the date when the invoice was created - * @return + * @return when the invoice was created */ Date getIssueDate(); /** - * 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. * It is one of the few functions which may return null. + * e.g. * Lieferant GmbH Lieferantenstraße 20 @@ -54,13 +55,13 @@ public interface IZUGFeRDExportableTransaction { Deutschland Geschäftsführer: Hans Muster Handelsregisternummer: H A 123 - * @return + * @return null or full sender institution name, details, manager and tax registration */ String getOwnOrganisationFullPlaintextInfo(); /** * when the invoice is to be paid - * @return + * @return when the invoice is to be paid */ Date getDueDate(); @@ -72,91 +73,92 @@ public interface IZUGFeRDExportableTransaction { /*** * the recipient - * @return + * @return the recipient of the invoice */ IZUGFeRDExportableContact getRecipient(); /*** * BIC of the sender - * @return + * @return the BIC code of the recipient sender's bank */ String getOwnBIC(); /*** * Bank name of the sender - * @return + * @return the name of the sender's bank */ String getOwnBankName(); /** * IBAN of the sender - * @return + * @return the IBAN of the invoice sender's bank account */ String getOwnIBAN(); /** * Tax ID (not VAT ID) of the sender + * @return Tax ID (not VAT ID) of the sender */ String getOwnTaxID(); /** * VAT ID (Umsatzsteueridentifikationsnummer) of the sender - * @return + * @return VAT ID (Umsatzsteueridentifikationsnummer) of the sender */ String getOwnVATID(); /** * own name - * @return + * @return the sender's organisation name */ String getOwnOrganisationName(); /** * own street address - * @return + * @return sender street address */ String getOwnStreet(); /** * own street postal code - * @return + * @return sender postal code */ String getOwnZIP(); /** * own city - * @return + * @return the invoice sender's city */ String getOwnLocation(); /** * own two digit country code - * @return + * @return the invoice senders two character country iso code */ String getOwnCountry(); /** * get delivery date - * @return + * @return the day the goods have been delivered */ Date getDeliveryDate(); /** * get main invoice currency used on the invoice - * @return + * @return three character currency of this invoice */ String getCurrency(); /** * get payment information text. e.g. Bank transfer - * @return + * @return payment information text */ String getOwnPaymentInfoText(); /** * get payment term descriptional text * e.g. Bis zum 22.10.2015 ohne Abzug - * @return + * @return get payment terms */ String getPaymentTermDescription(); @@ -164,7 +166,7 @@ public interface IZUGFeRDExportableTransaction { * get reference document number * typically used for Invoice Corrections * Will be added as IncludedNote in comfort profile - * @return + * @return the ID of the document this document refers to */ String getReferenceNumber(); diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java index 131de4e0..18af22a6 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRD2PullProvider.java @@ -154,7 +154,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider { * 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) * 190 Eur - * @return + * @return which taxes have been used with which amounts in this invoice * */ private HashMap getVATPercentAmountMap() { diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java index 5a9dea9b..d2715023 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDExporter.java @@ -480,7 +480,7 @@ public class ZUGFeRDExporter implements Closeable { /**** * Returns the PDFBox PDF Document * - * @return PDDocument + * @return PDDocument the PDFBox PDF */ public PDDocument getDoc() { return doc; diff --git a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java index a892d746..b48f4f88 100644 --- a/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java +++ b/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDTransactionModelConverter.java @@ -884,7 +884,7 @@ class ZUGFeRDTransactionModelConverter { * 19% VAT (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT) * 190 Eur * - * @return HashMap + * @return HashMap which taxes have been used with which amounts * */ private HashMap getVATPercentAmountMap() { diff --git a/src/main/java/org/mustangproject/toecount/StatRun.java b/src/main/java/org/mustangproject/toecount/StatRun.java index eaa82683..f2f2c4e0 100755 --- a/src/main/java/org/mustangproject/toecount/StatRun.java +++ b/src/main/java/org/mustangproject/toecount/StatRun.java @@ -66,7 +66,7 @@ public class StatRun { /*** * returns final statistics - * @return + * @return english string with linefeeds detailling number of files, directories, number of pdfs and of zugferd files */ public String getSummaryLine() { @@ -77,7 +77,7 @@ public class StatRun { } /*** * show that something is happening - * @return String + * @return String, usually a dot */ public String getOutputLine() { return "."; diff --git a/src/main/java/org/mustangproject/toecount/Toecount.java b/src/main/java/org/mustangproject/toecount/Toecount.java index 861f918c..5d11d2e8 100755 --- a/src/main/java/org/mustangproject/toecount/Toecount.java +++ b/src/main/java/org/mustangproject/toecount/Toecount.java @@ -72,14 +72,14 @@ public class Toecount { } /*** - * Asks the user for a String (offering a defaultValue) conforming to a Regex + * Asks the user (repeatedly, if neccessary) on the command line for a String (offering a defaultValue) conforming to a Regex * pattern * - * @param prompt - * @param defaultValue - * @param pattern - * @return - * @throws Exception + * @param prompt the question to be asked to the user + * @param defaultValue the default return value if user hits enter + * @param pattern a regex of acceptable values + * @return the user answer conforming to pattern + * @throws Exception if pattern not compielable or IOexception on input */ protected static String getStringFromUser(String prompt, String defaultValue, String pattern) throws Exception { String input = ""; @@ -117,8 +117,8 @@ public class Toecount { /*** * Prompts the user for a input or output filename - * @param prompt - * @param defaultFilename + * @param the text the user is asked + * @param a default Filename * @param expectedExtension will warn if filename does not match expected file extension * @param ensureFileExists will warn if file does NOT exist (for input files) * @param ensureFileNotExists will warn if file DOES exist (for output files)