Skip to content

Commit

Permalink
working on ZUGFeRD#343
Browse files Browse the repository at this point in the history
  • Loading branch information
jstaerk committed Dec 22, 2023
1 parent 93aaf74 commit c6173dd
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 229 deletions.
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
2.10.0
-
- also accept pdf/a3 from inputstream
- closes #354 factur-x 1 from commandline
- support XR 3.0.1 (#343),
- i.e. processid
- set email in tradeparty class
- empty description remove

2.9.0
=======
Expand Down
9 changes: 0 additions & 9 deletions doc/development_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ mvnw clean package -P generateXSLTFromSchematron
`package -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001 -Xnoagent -Djava.compiler=NONE"`
can be used as debug configuration goal in Eclipse. In that case you can set breakpoints in tests.

## Validate

The former ZUGFeRD VeraPDF [ZUV](https://github.com/ZUGFeRD/ZUV/) validator
is now part of Mustangproject.
The JUnit tests of the validator component will also run through a couple of
test files of the library component.




## Deployment

Expand Down
28 changes: 26 additions & 2 deletions library/src/main/java/org/mustangproject/TradeParty.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
protected Contact contact = null;
protected LegalOrganisation legalOrg = null;
protected SchemedID globalId=null;
protected SchemedID uriUniversalCommunicationId=null;
protected SchemedID uriUniversalCommunicationId=null; //e.g. the email address of the organization

/**
* Default constructor.
Expand Down Expand Up @@ -411,7 +411,31 @@ public String getUriUniversalCommunicationIDScheme() {

}



/***
* sets the email of the organization (not the one of the contact person)
* @return fluent setter
*/
public TradeParty setEmail(String eMail) {
SchemedID theSchemedID=new SchemedID("EM", eMail);
addUriUniversalCommunicationID(theSchemedID);
return this;
}

/***
* gets the email of the organization (not the one of the contact person)
* will return null if not set or if the provided UriUniversalCommunicationID
* is not a email address
*
* @return String the email, or null
*/
public String getEmail() {
if (uriUniversalCommunicationId.getScheme().equals("EM")) {
return uriUniversalCommunicationId.getID();
}
return null;
}


/**
* if it's a customer, this can e.g. be the customer ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3")} // up next: urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
{"XRECHNUNG", new Profile("XRECHNUNG", "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0")} // up next: urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0

}).collect(Collectors.toMap(data -> (String) data[0], data -> (Profile) data[1]));
static Map<String, Profile> zf1Map = Stream.of(new Object[][]{
Expand Down
Loading

0 comments on commit c6173dd

Please sign in to comment.