Skip to content

Commit 9b1d123

Browse files
committed
Merge branch 'master' into cesymm
Conflicts: biojava-structure-gui/src/main/java/org/biojava/nbio/structure/symmetry/gui/SymmetryDisplay.java biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java
2 parents 57015e9 + 9d1d5ed commit 9b1d123

File tree

78 files changed

+1809
-881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1809
-881
lines changed

biojava-aa-prop/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919

2020
<build>
2121
<plugins>
22+
<!-- Excluding demo package is required for avoiding namespace clashes (demo package is in all modules) for signing the jar. See issue #387 -->
2223
<plugin>
2324
<groupId>org.apache.maven.plugins</groupId>
24-
<artifactId>maven-compiler-plugin</artifactId>
25+
<artifactId>maven-jar-plugin</artifactId>
2526
<configuration>
2627
<excludes>
27-
<exclude>demo/**.java</exclude>
28+
<exclude>demo/**</exclude>
2829
</excludes>
2930
</configuration>
3031
</plugin>
32+
3133
<plugin>
3234
<groupId>org.apache.maven.plugins</groupId>
3335
<artifactId>maven-assembly-plugin</artifactId>

biojava-alignment/pom.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@
2323
</properties>
2424
<build>
2525
<plugins>
26-
<plugin>
27-
<groupId>org.apache.maven.plugins</groupId>
28-
<artifactId>maven-compiler-plugin</artifactId>
29-
<configuration>
30-
<source>${jdk.version}</source>
31-
<target>${jdk.version}</target>
26+
27+
<!-- Excluding demo package is required for avoiding namespace clashes (demo package is in all modules) for signing the jar. See issue #387 -->
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-jar-plugin</artifactId>
31+
<configuration>
3232
<excludes>
33-
<exclude>demo/**.java</exclude>
33+
<exclude>demo/**</exclude>
3434
</excludes>
35-
</configuration>
36-
</plugin>
35+
</configuration>
36+
</plugin>
37+
3738
</plugins>
3839
</build>
3940
<dependencies>

biojava-core/pom.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@
2424

2525
<build>
2626
<plugins>
27-
<plugin>
28-
<groupId>org.apache.maven.plugins</groupId>
29-
<artifactId>maven-compiler-plugin</artifactId>
30-
<configuration>
31-
<source>${jdk.version}</source>
32-
<target>${jdk.version}</target>
33-
<debug>true</debug>
34-
</configuration>
35-
</plugin>
27+
28+
<!-- Excluding demo package is required for avoiding namespace clashes (demo package is in all modules) for signing the jar. See issue #387 -->
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-jar-plugin</artifactId>
32+
<configuration>
33+
<excludes>
34+
<exclude>demo/**</exclude>
35+
</excludes>
36+
</configuration>
37+
</plugin>
38+
3639
</plugins>
3740
</build>
3841
<dependencies>

biojava-core/src/main/java/org/biojava/nbio/core/alignment/SimpleAlignedSequence.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.biojava.nbio.core.sequence.location.template.Point;
3333
import org.biojava.nbio.core.sequence.template.*;
3434

35+
import java.io.Serializable;
3536
import java.util.ArrayList;
3637
import java.util.Arrays;
3738
import java.util.Iterator;
@@ -43,9 +44,12 @@
4344
* @author Mark Chapman
4445
* @param <C> each element of the {@link Sequence} is a {@link Compound} of type C
4546
*/
46-
public class SimpleAlignedSequence<S extends Sequence<C>, C extends Compound> implements AlignedSequence<S, C> {
47+
public class SimpleAlignedSequence<S extends Sequence<C>, C extends Compound> implements Serializable, AlignedSequence<S, C> {
4748

48-
private static final String gap = "-";
49+
50+
private static final long serialVersionUID = 1L;
51+
52+
private static final String gap = "-";
4953

5054
// always stored
5155
private AlignedSequence<S, C> prev;

biojava-core/src/main/java/org/biojava/nbio/core/alignment/SimpleProfile.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.biojava.nbio.core.sequence.template.CompoundSet;
3939
import org.biojava.nbio.core.sequence.template.Sequence;
4040

41+
import java.io.Serializable;
4142
import java.util.*;
4243

4344

@@ -49,8 +50,11 @@
4950
* @param <S> each element of the alignment {@link Profile} is of type S
5051
* @param <C> each element of an {@link AlignedSequence} is a {@link Compound} of type C
5152
*/
52-
public class SimpleProfile<S extends Sequence<C>, C extends Compound> implements Profile<S, C> {
53+
public class SimpleProfile<S extends Sequence<C>, C extends Compound> implements Serializable, Profile<S, C> {
5354

55+
56+
private static final long serialVersionUID = 1L;
57+
5458
private List<AlignedSequence<S, C>> list;
5559
private List<S> originals;
5660
private int length;

biojava-core/src/main/java/org/biojava/nbio/core/alignment/SimpleProfilePair.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
public class SimpleProfilePair<S extends Sequence<C>, C extends Compound> extends SimpleProfile<S, C>
4444
implements ProfilePair<S, C> {
4545

46-
private Profile<S, C> query, target;
46+
47+
private static final long serialVersionUID = 1L;
48+
49+
private Profile<S, C> query, target;
4750

4851
/**
4952
* Creates a pair profile for the given profiles.

biojava-core/src/main/java/org/biojava/nbio/core/alignment/SimpleSequencePair.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
public class SimpleSequencePair<S extends Sequence<C>, C extends Compound> extends SimpleProfile<S, C>
4545
implements SequencePair<S, C> {
4646

47+
48+
private static final long serialVersionUID = 1L;
49+
4750
private int identicals = -1, similars = -1;
4851

4952
/**

biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/SimplePoint.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*/
2222
package org.biojava.nbio.core.sequence.location;
2323

24+
import java.io.Serializable;
25+
2426
import org.biojava.nbio.core.sequence.location.template.Point;
2527
import org.biojava.nbio.core.util.Equals;
2628
import org.biojava.nbio.core.util.Hashcoder;
@@ -30,9 +32,12 @@
3032
*
3133
* @author ayates
3234
*/
33-
public class SimplePoint implements Point {
35+
public class SimplePoint implements Serializable, Point {
3436

35-
private int position;
37+
38+
private static final long serialVersionUID = 1L;
39+
40+
private int position;
3641
private boolean unknown;
3742
private boolean uncertain;
3843

biojava-core/src/main/java/org/biojava/nbio/core/sequence/location/template/AbstractLocation.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.biojava.nbio.core.sequence.views.ReversedSequenceView;
3333
import org.biojava.nbio.core.util.Hashcoder;
3434

35+
import java.io.Serializable;
3536
import java.util.ArrayList;
3637
import java.util.Collections;
3738
import java.util.Iterator;
@@ -48,9 +49,11 @@
4849
* @author ayates
4950
* @author Paolo Pavan
5051
*/
51-
public abstract class AbstractLocation implements Location {
52+
public abstract class AbstractLocation implements Serializable, Location {
5253

53-
//TODO Need to have the Sequence lookup resolver here; see the next one as well
54+
private static final long serialVersionUID = 1L;
55+
56+
//TODO Need to have the Sequence lookup resolver here; see the next one as well
5457
//TODO Need a way of late binding of start/stop
5558

5659
private Point start;

biojava-core/src/main/java/org/biojava/nbio/core/util/InputStreamProvider.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ public InputStreamProvider() {
7878

7979
}
8080

81-
/** get an InputStream for this file
82-
*
81+
/**
82+
* Get an InputStream for given file path.
83+
* The caller is responsible for closing the stream or otherwise
84+
* a resource leak can occur.
8385
* @param pathToFile the path of the file.
8486
* @return an InputStream for the file located at the path.
8587
* @throws IOException
@@ -144,8 +146,10 @@ public InputStream getInputStream(URL u)
144146
}
145147

146148

147-
/** get an InputStream for the file
148-
*
149+
/**
150+
* Get an InputStream for the file.
151+
* The caller is responsible for closing the stream or otherwise
152+
* a resource leak can occur.
149153
* @param f a File
150154
* @return an InputStream for the file
151155
* @throws IOException
@@ -229,7 +233,8 @@ else if ( fileName.endsWith(".Z")) {
229233
}
230234

231235

232-
/** Wrapper for new FileInputStream. if System.property biojava.cache.files is set, will try to load files from memory cache.
236+
/**
237+
* Wrapper for new FileInputStream. if System.property biojava.cache.files is set, will try to load files from memory cache.
233238
*
234239
* @param f
235240
* @return

0 commit comments

Comments
 (0)