corrected javadoc, corrected settings (don't expect javadoc for generated sources)
This commit is contained in:
12
pom.xml
12
pom.xml
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject.ZUGFeRD</groupId>
|
<groupId>org.mustangproject.ZUGFeRD</groupId>
|
||||||
<artifactId>mustang</artifactId>
|
<artifactId>mustang</artifactId>
|
||||||
<version>1.5.3-SNAPSHOT</version>
|
<version>1.5.2-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>Mustang</name>
|
<name>Mustang</name>
|
||||||
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
|
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
|
||||||
@@ -133,6 +133,16 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- /toecount -->
|
<!-- /toecount -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<configuration>
|
||||||
|
|
||||||
|
<excludePackageNames>org.mustangproject.ZUGFeRD.model.*</excludePackageNames>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>2.8.2</version>
|
<version>2.8.2</version>
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public class ZUGFeRDImporter {
|
|||||||
/**
|
/**
|
||||||
* Extracts a ZUGFeRD invoice from a PDF document represented by a file name.
|
* Extracts a ZUGFeRD invoice from a PDF document represented by a file name.
|
||||||
* Errors are just logged to STDOUT.
|
* Errors are just logged to STDOUT.
|
||||||
|
* @param pdfFilename the filename of the pdf
|
||||||
*/
|
*/
|
||||||
public void extract(String pdfFilename) {
|
public void extract(String pdfFilename) {
|
||||||
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(pdfFilename))) {
|
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(pdfFilename))) {
|
||||||
@@ -91,6 +92,8 @@ public class ZUGFeRDImporter {
|
|||||||
/**
|
/**
|
||||||
* Extracts a ZUGFeRD invoice from a PDF document represented by an input
|
* Extracts a ZUGFeRD invoice from a PDF document represented by an input
|
||||||
* stream. Errors are reported via exception handling.
|
* stream. Errors are reported via exception handling.
|
||||||
|
*
|
||||||
|
* @param pdfStream a inputstream of a pdf file
|
||||||
*/
|
*/
|
||||||
public void extractLowLevel(InputStream pdfStream) throws IOException {
|
public void extractLowLevel(InputStream pdfStream) throws IOException {
|
||||||
PDEmbeddedFilesNameTreeNode etn;
|
PDEmbeddedFilesNameTreeNode etn;
|
||||||
@@ -131,6 +134,9 @@ public class ZUGFeRDImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* needs to be called to be able to call the getters
|
||||||
|
*/
|
||||||
public void parse() {
|
public void parse() {
|
||||||
DocumentBuilderFactory factory = null;
|
DocumentBuilderFactory factory = null;
|
||||||
DocumentBuilder builder = null;
|
DocumentBuilder builder = null;
|
||||||
@@ -305,10 +311,18 @@ public class ZUGFeRDImporter {
|
|||||||
parsed = true;
|
parsed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return if export found parseable ZUGFeRD data
|
||||||
|
*/
|
||||||
public boolean containsMeta() {
|
public boolean containsMeta() {
|
||||||
return containsMeta;
|
return containsMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the reference (purpose) the sender specified for this invoice
|
||||||
|
*/
|
||||||
public String getForeignReference() {
|
public String getForeignReference() {
|
||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -319,7 +333,11 @@ public class ZUGFeRDImporter {
|
|||||||
private void setForeignReference(String foreignReference) {
|
private void setForeignReference(String foreignReference) {
|
||||||
this.foreignReference = foreignReference;
|
this.foreignReference = foreignReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the sender's bank's BIC code
|
||||||
|
*/
|
||||||
public String getBIC() {
|
public String getBIC() {
|
||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -339,6 +357,10 @@ public class ZUGFeRDImporter {
|
|||||||
this.bankName = bankname;
|
this.bankName = bankname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the sender's IBAN
|
||||||
|
*/
|
||||||
public String getIBAN() {
|
public String getIBAN() {
|
||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -346,6 +368,10 @@ public class ZUGFeRDImporter {
|
|||||||
return IBAN;
|
return IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the sender's bank name
|
||||||
|
*/
|
||||||
public String getBankName() {
|
public String getBankName() {
|
||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -353,10 +379,15 @@ public class ZUGFeRDImporter {
|
|||||||
return bankName;
|
return bankName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setIBAN(String IBAN) {
|
private void setIBAN(String IBAN) {
|
||||||
this.IBAN = IBAN;
|
this.IBAN = IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the name of the owner of the sender's bank account
|
||||||
|
*/
|
||||||
public String getHolder() {
|
public String getHolder() {
|
||||||
if (rawXML == null) {
|
if (rawXML == null) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -368,6 +399,10 @@ public class ZUGFeRDImporter {
|
|||||||
this.holder = holder;
|
this.holder = holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return the total payable amount
|
||||||
|
*/
|
||||||
public String getAmount() {
|
public String getAmount() {
|
||||||
if (rawXML == null) {
|
if (rawXML == null) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -375,6 +410,10 @@ public class ZUGFeRDImporter {
|
|||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return when the payment is due
|
||||||
|
*/
|
||||||
public String getDueDate() {
|
public String getDueDate() {
|
||||||
if (rawXML == null) {
|
if (rawXML == null) {
|
||||||
throw new RuntimeException("use parse() before requesting a value");
|
throw new RuntimeException("use parse() before requesting a value");
|
||||||
@@ -386,10 +425,18 @@ public class ZUGFeRDImporter {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param meta raw XML to be set
|
||||||
|
*/
|
||||||
public void setMeta(String meta) {
|
public void setMeta(String meta) {
|
||||||
this.rawXML = meta.getBytes();
|
this.rawXML = meta.getBytes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return raw XML of the invoice
|
||||||
|
*/
|
||||||
public String getMeta() {
|
public String getMeta() {
|
||||||
if (rawXML == null) {
|
if (rawXML == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -408,6 +455,7 @@ public class ZUGFeRDImporter {
|
|||||||
/**
|
/**
|
||||||
* will return true if the metadata (just extract-ed or set with setMeta)
|
* will return true if the metadata (just extract-ed or set with setMeta)
|
||||||
* contains ZUGFeRD XML
|
* contains ZUGFeRD XML
|
||||||
|
* @return true if the invoice contains ZUGFeRD XML
|
||||||
*/
|
*/
|
||||||
public boolean canParse() {
|
public boolean canParse() {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user