Skip to content

Commit

Permalink
revert jakarta migration due to AA failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadshadab committed Apr 24, 2024
1 parent a8324b8 commit 789da77
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 55 deletions.
34 changes: 14 additions & 20 deletions xml-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
<uniparc-xsd-pojo-package>org.uniprot.core.xml.jaxb.uniparc</uniparc-xsd-pojo-package>
<unirule-xsd-pojo-package>org.uniprot.core.xml.jaxb.unirule</unirule-xsd-pojo-package>
<feature-xsd-pojo-package>org.uniprot.core.xml.jaxb.feature</feature-xsd-pojo-package>
<jakarta-xml-bind.version>4.0.0</jakarta-xml-bind.version>
<jvnet.hisrc.jaxb>2.1.1</jvnet.hisrc.jaxb>
<jakarta-activation.version>2.0.1</jakarta-activation.version>
</properties>

<dependencies>
Expand All @@ -43,21 +40,19 @@
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta-xml-bind.version}</version>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>${jvnet.jaxb2.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jakarta-xml-bind.version}</version>
<scope>runtime</scope>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>${jvnet.jaxb2.version}</version>
</dependency>

<dependency>
<groupId>org.patrodyne.jvnet</groupId>
<artifactId>hisrc-basicjaxb-plugins</artifactId>
<version>${jvnet.hisrc.jaxb}</version>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version><!--$NO-MVN-MAN-VER$ -->
</dependency>

<dependency>
Expand All @@ -66,9 +61,9 @@
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>${jakarta-activation.version}</version>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
Expand Down Expand Up @@ -126,11 +121,10 @@
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>4.0.0</version>
<version>3.3.0</version>
<configuration>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:4.0.0</extension>
<extension>org.patrodyne.jvnet:hisrc-basicjaxb-plugins:2.1.1</extension>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.2.1</extension>
</extensions>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import java.util.function.Function;
import java.util.zip.GZIPInputStream;

import javax.xml.bind.JAXBException;
import javax.xml.stream.XMLStreamException;

import jakarta.xml.bind.JAXBException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.stream.XMLStreamException;

public class XmlChainIterator<T, R> implements Iterator<R> {
private static final Logger logger = LoggerFactory.getLogger(XmlChainIterator.class);
private final Iterator<InputStream> inputStreamIterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import java.util.NoSuchElementException;
import java.util.function.Function;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.Unmarshaller;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;

import jakarta.xml.bind.JAXBException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.Marshaller;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;

import org.glassfish.jaxb.core.marshaller.DataWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.uniprot.core.flatfile.parser.impl.EntryBufferedReader2;
Expand All @@ -29,6 +28,7 @@
import org.uniprot.core.xml.jaxb.uniprot.Entry;

import com.codahale.metrics.Timer;
import com.sun.xml.bind.marshaller.DataWriter;

public class UniProtFFToXmlBuilder implements XmlBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(UniProtFFToXmlBuilder.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.Marshaller;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;

import org.uniprot.core.xml.XmlWriter;
import org.uniprot.core.xml.XmlWriterException;
Expand Down
24 changes: 12 additions & 12 deletions xml-parser/src/main/resources/xsd/uniprot.episode
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bindings version="3.0" xmlns="https://jakarta.ee/xml/ns/jaxb">
<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb">
<!--
This file was generated by the Eclipse Implementation of JAXB, v4.0.3
See https://eclipse-ee4j.github.io/jaxb-ri
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2
See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
Any modifications to this file will be lost upon recompilation of the source schema.
Generated on: 2024.02.06 at 01:05:02 PM GMT
Generated on: 2020.04.04 at 07:45:45 PM BST
-->
<bindings scd="x-schema::tns" xmlns:tns="http://uniprot.org/uniprot">
<schemaBindings map="false">
Expand Down Expand Up @@ -107,12 +108,6 @@ Generated on: 2024.02.06 at 01:05:02 PM GMT
<bindings scd="~tns:positionType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.PositionType"/>
</bindings>
<bindings scd="~tns:ligandType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.LigandType"/>
</bindings>
<bindings scd="~tns:ligandPartType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.LigandPartType"/>
</bindings>
<bindings scd="~tns:moleculeType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.MoleculeType"/>
</bindings>
Expand All @@ -125,6 +120,11 @@ Generated on: 2024.02.06 at 01:05:02 PM GMT
<bindings scd="~tns:evidencedStringType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.EvidencedStringType"/>
</bindings>
<bindings scd="~tns:ligandType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.LigandType"/>
</bindings>
<bindings scd="~tns:ligandPartType">
<class ref="org.uniprot.core.xml.jaxb.uniprot.LigandPartType"/>
</bindings>
</bindings>
</bindings>

</bindings>
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.uniprot.core.xml.uniparc;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.Marshaller;

import javax.xml.namespace.QName;
import java.io.StringWriter;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
import javax.xml.namespace.QName;

/**
* @author jluo
Expand All @@ -16,8 +15,7 @@ class UniParcXmlTestHelper {
private static final String TARGET_PACKAGE = "org.uniprot.core.xml.jaxb.uniparc";

@SuppressWarnings("unchecked")
static <T> String
toXmlString(T obj, Class<T> clazz, String element) {
static <T> String toXmlString(T obj, Class<T> clazz, String element) {
try {
StringWriter stringWriter = new StringWriter();
JAXBContext jc = JAXBContext.newInstance(TARGET_PACKAGE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.uniprot.core.xml.uniprot;

import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.Marshaller;

import java.io.StringWriter;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
import javax.xml.namespace.QName;

public class UniProtXmlTestHelper {
Expand Down

0 comments on commit 789da77

Please sign in to comment.