Skip to content

Commit ee3a2d4

Browse files
authored
Merge pull request #676 from biojava/serialize
Serialize all the Structure objects
2 parents 8934e94 + 498a36f commit ee3a2d4

31 files changed

Lines changed: 115 additions & 57 deletions

biojava-structure/src/main/java/org/biojava/nbio/structure/AminoAcidImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
*/
2424
package org.biojava.nbio.structure;
2525

26-
import java.io.Serializable;
27-
2826
/**
2927
* AminoAcid inherits most from Hetatom. Adds a few AminoAcid
3028
* specific methods.
@@ -34,7 +32,7 @@
3432
* @version %I% %G%
3533
*
3634
*/
37-
public class AminoAcidImpl extends HetatomImpl implements AminoAcid, Serializable {
35+
public class AminoAcidImpl extends HetatomImpl implements AminoAcid {
3836

3937
private static final long serialVersionUID = -6018854413829044230L;
4038

biojava-structure/src/main/java/org/biojava/nbio/structure/AtomImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import org.biojava.nbio.structure.io.FileConvert;
2727

28-
import java.io.Serializable;
2928
import java.util.ArrayList;
3029
import java.util.List;
3130

@@ -39,7 +38,7 @@
3938
* @since 1.4
4039
* @version %I% %G%
4140
*/
42-
public class AtomImpl implements Atom, Serializable, PDBRecord {
41+
public class AtomImpl implements Atom {
4342

4443
private static final long serialVersionUID = -2258364127420562883L;
4544

biojava-structure/src/main/java/org/biojava/nbio/structure/Bond.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020
*/
2121
package org.biojava.nbio.structure;
2222

23+
import java.io.Serializable;
24+
2325
/**
2426
* A simple bond -- it stores information about two atoms as well as information
2527
* about its bond order.
2628
*
2729
* @author Jules Jacobsen <jacobsen@ebi.ac.uk>
2830
* @author Ulysse Carion
2931
*/
30-
public interface Bond {
32+
public interface Bond extends Serializable {
3133

3234
/**
3335
* Gets atom 'A' of this bond. There is no meaning to which atom is 'A' and

biojava-structure/src/main/java/org/biojava/nbio/structure/BondImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
*/
2121
package org.biojava.nbio.structure;
2222

23-
import java.io.Serializable;
2423
import java.util.ArrayList;
2524
import java.util.List;
2625

@@ -31,7 +30,7 @@
3130
* @author Jules Jacobsen <jacobsen@ebi.ac.uk>
3231
* @author Ulysse Carion
3332
*/
34-
public class BondImpl implements Serializable, Bond {
33+
public class BondImpl implements Bond {
3534

3635
private static final long serialVersionUID = 8836120946858134380L;
3736
private Atom atomA;

biojava-structure/src/main/java/org/biojava/nbio/structure/Chain.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.biojava.nbio.structure.io.FileParsingParameters;
2828
import org.biojava.nbio.structure.io.mmcif.model.ChemComp;
2929

30+
import java.io.Serializable;
3031
import java.util.List;
3132

3233
/**
@@ -48,7 +49,7 @@
4849
* @version %I% %G%
4950
* @since 1.4
5051
*/
51-
public interface Chain {
52+
public interface Chain extends Serializable {
5253

5354
/** returns an identical copy of this Chain.
5455
* @return an identical copy of this Chain

biojava-structure/src/main/java/org/biojava/nbio/structure/ChainImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.slf4j.Logger;
3636
import org.slf4j.LoggerFactory;
3737

38-
import java.io.Serializable;
3938
import java.util.*;
4039

4140

@@ -47,7 +46,7 @@
4746
* @author Jules Jacobsen
4847
* @since 1.4
4948
*/
50-
public class ChainImpl implements Chain, Serializable {
49+
public class ChainImpl implements Chain {
5150

5251
private final static Logger logger = LoggerFactory.getLogger(ChainImpl.class);
5352

@@ -712,7 +711,7 @@ public boolean isWaterOnly() {
712711
public boolean isPureNonPolymer() {
713712
for (Group g : getAtomGroups()) {
714713

715-
ChemComp cc = g.getChemComp();
714+
//ChemComp cc = g.getChemComp();
716715

717716
if ( g.isPolymeric() &&
718717
!g.isHetAtomInFile() ) {

biojava-structure/src/main/java/org/biojava/nbio/structure/DBRef.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.slf4j.Logger;
2626
import org.slf4j.LoggerFactory;
2727

28-
import java.io.Serializable;
2928
import java.lang.reflect.Method;
3029
import java.util.Formatter;
3130
import java.util.Locale;
@@ -38,7 +37,7 @@
3837
* @since 4:56:14 PM
3938
* @version %I% %G%
4039
*/
41-
public class DBRef implements PDBRecord, Serializable{
40+
public class DBRef implements PDBRecord {
4241

4342
private final static Logger logger = LoggerFactory.getLogger(DBRef.class);
4443

biojava-structure/src/main/java/org/biojava/nbio/structure/Element.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323
package org.biojava.nbio.structure;
2424

25-
import java.io.Serializable;
2625
import java.util.HashMap;
2726
import java.util.Map;
2827

@@ -40,7 +39,7 @@
4039
*
4140
*/
4241

43-
public enum Element implements Serializable {
42+
public enum Element {
4443

4544
// most frequently used elements first
4645
H(1, 1, 39, 1.10f, 0.32f, 1, 1, 1, 1, 1, 1.008f, 0, 1, new int[] {1}, 2.20f, ElementType.OTHER_NONMETAL),

biojava-structure/src/main/java/org/biojava/nbio/structure/ElementType.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
package org.biojava.nbio.structure;
2525

26-
import java.io.Serializable;
27-
2826
/**
2927
* ElementType is an enumeration of the types of elements found in the periodic table.
3028
* Each element type is further classified into Metal, Metalloid, and Non-Metal.
@@ -36,7 +34,7 @@
3634
* @since 3.0
3735
*/
3836

39-
public enum ElementType implements Serializable {
37+
public enum ElementType {
4038

4139
METALLOID(false),
4240
OTHER_NONMETAL(false),

biojava-structure/src/main/java/org/biojava/nbio/structure/EntityInfo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* Created on 22.01.2007
2121
*
2222
*/
23-
24-
2523
package org.biojava.nbio.structure;
2624

2725

0 commit comments

Comments
 (0)