Skip to content

Commit 738d347

Browse files
committed
Make other structure classes serializable
1 parent 2d99f57 commit 738d347

24 files changed

+37
-44
lines changed

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

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

26-
import java.io.Serializable;
2726
import java.util.List;
2827

2928
import javax.vecmath.Point3d;
@@ -42,7 +41,7 @@
4241
* @since 1.4
4342
*
4443
*/
45-
public interface Atom extends Cloneable, PDBRecord, Serializable {
44+
public interface Atom extends Cloneable, PDBRecord {
4645

4746
/**
4847
* Set atom name, e.g. "CA".

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @since 1.4
3939
* @version %I% %G%
4040
*/
41-
public class AtomImpl implements Atom, PDBRecord {
41+
public class AtomImpl implements Atom {
4242

4343
private static final long serialVersionUID = -2258364127420562883L;
4444

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.biojava.nbio.structure;
22

3-
import java.io.Serializable;
4-
53
/**
64
*
75
* The type of entity (polymer, non-polymer, water, macrolide)
@@ -19,7 +17,7 @@
1917
* @author Jose Duarte
2018
*
2119
*/
22-
public enum EntityType implements Serializable {
20+
public enum EntityType {
2321

2422
/**
2523
* Polymeric entities: poly-peptides and nucleotide chains

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @author Jules Jacobsen
3030
* @since 1.7
3131
*/
32-
public class JournalArticle implements Serializable{
32+
public class JournalArticle implements Serializable {
3333

3434
private static final long serialVersionUID = 5062668226159515468L;
3535
private List<Author> authorList = new ArrayList<Author>();

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.biojava.nbio.structure;
22

3+
import java.io.Serializable;
34
import java.util.ArrayList;
45
import java.util.List;
56

@@ -14,8 +15,10 @@
1415
* @author Andreas Prlic
1516
* @since 5.0
1617
*/
17-
public class Model {
18+
public class Model implements Serializable {
1819

20+
private static final long serialVersionUID = 5320613424668781882L;
21+
1922
private static final Logger logger = LoggerFactory.getLogger(Model.class);
2023

2124
private List<Chain> polyChains;

0 commit comments

Comments
 (0)