Skip to content

Commit

Permalink
Merge branch 'hotfix-1.1.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Apr 30, 2024
2 parents aadd54a + 88e992f commit 4538868
Show file tree
Hide file tree
Showing 56 changed files with 1,117 additions and 1,438 deletions.
72 changes: 23 additions & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<name>baseCode</name>
<groupId>baseCode</groupId>
<artifactId>baseCode</artifactId>
<version>1.1.21</version>
<version>1.1.22</version>
<inceptionYear>2003</inceptionYear>
<description>
<![CDATA[Data structures, math and statistics tools, and utilities that are often needed across projects.]]>
</description>
<url>https://github.com/pavlidisLab/basecode</url>
<url>https://github.com/PavlidisLab/baseCode</url>
<organization>
<name>UBC Michael Smith Laboratories</name>
<url>http://www.msl.ubc.ca/</url>
<name>Pavlidis Lab</name>
<url>https://pavlab.msl.ubc.ca/</url>
</organization>
<packaging>jar</packaging>
<issueManagement>
Expand All @@ -27,7 +27,7 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -81,7 +81,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.15.1</version>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -144,45 +144,7 @@
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>2.7.4</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Be careful with versions of lucene -->
<!-- jena-text uses lucene 4.x.. Not ready for this. -->
<!-- <dependency> <groupId>org.apache.jena</groupId> <artifactId>jena-text</artifactId> <version>1.0.0-SNAPSHOT</version>
</dependency> -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-larq</artifactId>
<version>1.0.0-incubating</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<artifactId>icu4j</artifactId>
<groupId>com.ibm.icu</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>2.9.4</version> <!-- latest release is 2.10.1, but not compatible with larq? -->
<version>2.13.0</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
Expand Down Expand Up @@ -264,16 +226,28 @@
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.23.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.21.1</version>
<version>2.23.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.21.1</version>
<version>2.23.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -341,7 +315,7 @@
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.16.0</version>
<version>1.21.0</version>
<configuration>
<!-- Do not push to remote -->
<pushRemote>false</pushRemote>
Expand Down Expand Up @@ -444,7 +418,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.2</version>
<reportSets>
<reportSet>
<reports>
Expand Down
5 changes: 4 additions & 1 deletion src/ontology.properties → src/basecode.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ url.fmaOntology=http://purl.obolibrary.org/obo/fma.owl

ontology.index.dir=
ontology.cache.dir=
ncbo.api.key=
ncbo.api.key=

rserve.start.command=
rlibpath=

This file was deleted.

29 changes: 3 additions & 26 deletions src/ubic/basecode/ontology/jena/AbstractOntologyResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,25 @@
import ubic.basecode.ontology.model.OntologyResource;

import javax.annotation.Nullable;
import java.util.Comparator;
import java.util.Objects;

import static java.util.Comparator.*;

/**
* @author pavlidis
*/
abstract class AbstractOntologyResource implements OntologyResource {

protected static final Logger log = LoggerFactory.getLogger( AbstractOntologyResource.class );

private static final Comparator<OntologyResource> comparator = Comparator
.comparing( OntologyResource::getScore, nullsLast( reverseOrder() ) )
.thenComparing( OntologyResource::getUri, nullsLast( naturalOrder() ) );

private final OntResource res;
@Nullable
private final Double score;

private String _label;
private boolean _isLabelNull = false;

protected AbstractOntologyResource( OntResource resource ) {
this.res = resource;
this.score = null;
}
private String _label;
private boolean _isLabelNull = false;

public AbstractOntologyResource( OntResource resource, double score ) {
protected AbstractOntologyResource( OntResource resource ) {
this.res = resource;
this.score = score;
}

@Override
Expand Down Expand Up @@ -97,17 +85,6 @@ public boolean isObsolete() {
return res.hasLiteral( OWL2.deprecated, true );
}

@Override
@Nullable
public Double getScore() {
return score;
}

@Override
public int compareTo( OntologyResource other ) {
return Objects.compare( this, other, comparator );
}

@Override
public boolean equals( Object obj ) {
if ( this == obj ) return true;
Expand Down
Loading

0 comments on commit 4538868

Please # to comment.