From 3a01efbdeda9640bc09fe77d6bd8afd9da233bee Mon Sep 17 00:00:00 2001 From: Alexander Berndt Date: Tue, 19 May 2020 08:31:21 +0200 Subject: [PATCH] Added ISO-Date Getter function Added Wrapper method for protected extractString method, for easy extension of ZUGFeRDImporter.java --- .../ZUGFeRD/ZUGFeRDImporter.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java b/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java index 7d6eb52e9..d35bdc3db 100644 --- a/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java +++ b/libraryBasic/src/main/java/org/mustangproject/ZUGFeRD/ZUGFeRDImporter.java @@ -234,6 +234,25 @@ protected String extractString(String xpathStr) { } + /** + * Wrapper for protected method + * @return the extracted String for the specific path in the document + */ + public String wExtractString(String xpathStr) { + return extractString(xpathStr); + } + + + /** + * @return an ISO XXX coded datetime string + */ + public String getISOdate(String xpathString) { + String date = extractString(xpathString); + //do some conversion magic here + return date; + } + + /** * @return the reference (purpose) the sender specified for this invoice */