Skip to content

Commit

Permalink
Bruker array i stedet for lister for å lage like klasser som de andre…
Browse files Browse the repository at this point in the history
… modulene i dette prosjektet

Co-authored-by: Steinar Sørli Hegna <[email protected]>
  • Loading branch information
pcmoen and steinshe committed Apr 17, 2024
1 parent 6c1470c commit bd0d3b7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nav-bsrv-sah-brevbestilling-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<phase>process-sources</phase>
<configuration>
<defaultOptions>
<bindingFiles>
<bindingFile>src/main/resources/bindings.xjb</bindingFile>
</bindingFiles>
<extraargs>
<!--change Boolean type getters to getXXX (to ensure status quo with starting point) -->
<extraarg>-xjc-Xbg</extraarg>
Expand All @@ -42,6 +45,9 @@
<phase>process-sources</phase>
<configuration>
<defaultOptions>
<bindingFiles>
<bindingFile>src/main/resources/bindings.xjb</bindingFile>
</bindingFiles>
<extraargs>
<!--change Boolean type getters to getXXX (to ensure status quo with starting point) -->
<extraarg>-xjc-Xbg</extraarg>
Expand Down
23 changes: 23 additions & 0 deletions nav-bsrv-sah-brevbestilling-legacy/src/main/resources/bindings.xjb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings version="2.1"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!-- "indexed": use Array instead of List -->

<jaxb:globalBindings collectionType="indexed" generateElementProperty="false">
<!-- use Calendar instead of XMLGregorianCalendar -->
<jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>

<jaxb:javaType name="java.util.Calendar" xmlType="xs:date"
parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
printMethod="javax.xml.bind.DatatypeConverter.printDate"/>

<jaxb:javaType name="java.util.Calendar" xmlType="xs:time"
parseMethod="javax.xml.bind.DatatypeConverter.parseTime"
printMethod="javax.xml.bind.DatatypeConverter.printTime"/>

</jaxb:globalBindings>
</jaxb:bindings>

0 comments on commit bd0d3b7

Please sign in to comment.