-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to verify with Jarkarta, remove unused javax dependencies
- Loading branch information
1 parent
883e51a
commit ad824e0
Showing
7 changed files
with
72 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/main/java/dk/lmst/ctr/schemas/api/adapters/DateTimeAdapter.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/dk/lmst/ctr/schemas/api/adapters/LongAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/dk/lmst/ctr/schemas/api/adapters/ZonedDateTimeAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package dk.fmkonline.jaxb.adapters; | ||
|
||
import java.time.ZonedDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
import jakarta.xml.bind.annotation.adapters.XmlAdapter; | ||
|
||
/** | ||
* A jaxb adapter that only accepts dateTimes with a timezone | ||
*/ | ||
public class ZonedDateTimeAdapter extends XmlAdapter<String, ZonedDateTime> { | ||
|
||
public ZonedDateTime unmarshal(String zonedDateTimeString) throws Exception { | ||
if (zonedDateTimeString == null) { | ||
return null; | ||
} | ||
return ZonedDateTime.parse(zonedDateTimeString); | ||
} | ||
|
||
public String marshal(ZonedDateTime zonedDateTime) throws Exception { | ||
if (zonedDateTime == null) { | ||
return null; | ||
} | ||
return zonedDateTime.format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" | ||
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1"> | ||
<jaxb:bindings xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" | ||
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" jaxb:extensionBindingPrefixes="xjc" jaxb:version="3.0"> | ||
|
||
<jaxb:globalBindings> | ||
<xjc:simple /> | ||
<jaxb:serializable /> | ||
<jaxb:globalBindings generateValueClass="true"> | ||
<xjc:simple/> | ||
<jaxb:serializable/> | ||
|
||
<xjc:javaType name="java.lang.Long" xmlType="xs:long" adapter="dk.lmst.ctr.schemas.api.adapters.LongAdapter" /> | ||
<xjc:javaType name="java.lang.Long" xmlType="xs:long" adapter="dk.lmst.ctr.schemas.api.adapters.LongAdapter"/> | ||
|
||
<xjc:javaType name="org.joda.time.LocalDate" xmlType="xs:date" adapter="dk.lmst.ctr.schemas.api.adapters.LocalDateAdapter" /> | ||
<xjc:javaType name="java.time.LocalDate" xmlType="xs:date" | ||
adapter="dk.lmst.ctr.schemas.api.adapters.LocalDateAdapter"/> | ||
|
||
<xjc:javaType name="org.joda.time.DateTime" xmlType="xs:dateTime" adapter="dk.lmst.ctr.schemas.api.adapters.DateTimeAdapter" /> | ||
<xjc:javaType name="java.time.ZonedDateTime" xmlType="xs:dateTime" | ||
adapter="dk.lmst.ctr.schemas.api.adapters.ZonedDateTimeAdapter"/> | ||
|
||
</jaxb:globalBindings> | ||
<jaxb:bindings schemaLocation="../../../target/api/ctr-schemas/src/schemas/medcom/dgws/2006/04/medcom.xsd"> | ||
<jaxb:schemaBindings> | ||
<jaxb:package name="dk.fmkonline.dgws.server.medcom" /> | ||
<jaxb:package name="dk.fmkonline.dgws.server.medcom"/> | ||
</jaxb:schemaBindings> | ||
</jaxb:bindings> | ||
</jaxb:bindings> |