Skip to content

Commit 8a4ffa8

Browse files
luke czaplaluke czapla
authored andcommitted
Serialization support for BasePairParameters class
1 parent 7f27f94 commit 8a4ffa8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/BasePairParameters.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import javax.vecmath.Point3d;
1111
import java.io.ByteArrayInputStream;
1212
import java.io.IOException;
13+
import java.io.Serializable;
1314
import java.util.*;
1415

1516
import org.slf4j.Logger;
@@ -34,8 +35,9 @@
3435
* @since 5.0.0-snapshot
3536
*
3637
*/
37-
public class BasePairParameters {
38+
public class BasePairParameters implements Serializable {
3839

40+
private static final long serialVersionUID = 6214502385L;
3941
private static Logger log = LoggerFactory.getLogger(BasePairParameters.class);
4042

4143
// See URL http://ndbserver.rutgers.edu/ndbmodule/archives/reports/tsukuba/Table1.html
@@ -114,7 +116,7 @@ public class BasePairParameters {
114116
ringMap.put(3, Arrays.asList("C6", "C2", "N3", "C4", "C5", "N1"));
115117
}
116118

117-
protected Structure structure;
119+
protected transient Structure structure;
118120
protected boolean canonical = true;
119121
protected boolean useRNA = false;
120122
protected boolean nonredundant = false;

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/MismatchedBasePairParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.biojava.nbio.structure.contact.Pair;
88

99
import javax.vecmath.Matrix4d;
10+
import java.io.Serializable;
1011
import java.util.ArrayList;
1112
import java.util.List;
1213

@@ -18,7 +19,7 @@
1819
* @since 5.0.0-snapshot
1920
*
2021
*/
21-
public class MismatchedBasePairParameters extends BasePairParameters {
22+
public class MismatchedBasePairParameters extends BasePairParameters implements Serializable {
2223

2324
// These are the criteria used to select proper base pairs.
2425
protected static double MaxStagger = 2.0, MaxShear = 5.0, MaxStretch = 5.0,

biojava-structure/src/main/java/org/biojava/nbio/structure/basepairs/TertiaryBasePairParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.biojava.nbio.structure.contact.Pair;
88

99
import javax.vecmath.Matrix4d;
10+
import java.io.Serializable;
1011
import java.util.ArrayList;
1112
import java.util.List;
1213

@@ -19,7 +20,7 @@
1920
* @since 5.0.0-snapshot
2021
*
2122
*/
22-
public class TertiaryBasePairParameters extends BasePairParameters {
23+
public class TertiaryBasePairParameters extends BasePairParameters implements Serializable {
2324

2425
// These are the criteria used to select proper base pairs.
2526
protected static double MaxStagger = 2.0, MaxPropeller = 60.0;

0 commit comments

Comments
 (0)