Skip to content

Commit c1b870e

Browse files
committed
Merge branch '5.9.0'
2 parents b372cd9 + 85bb44c commit c1b870e

23 files changed

+283
-281
lines changed

src/main/java/org/jbei/ice/lib/entry/sequence/SequenceUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ static FeaturedDNASequence sequenceToDNASequence(Sequence sequence, List<Sequenc
136136
}
137137

138138
dnaFeature.setId(sequenceFeature.getId());
139-
dnaFeature.setType(sequenceFeature.getGenbankType());
139+
String type = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();
140+
dnaFeature.setType(type);
140141
String name = sequenceFeature.getFeature() != null ? sequenceFeature.getFeature().getName() : sequenceFeature.getName();
141142
dnaFeature.setName(name);
142143
dnaFeature.setStrand(sequenceFeature.getStrand());

src/main/java/org/jbei/ice/lib/entry/sequence/composers/formatters/GFF3Formatter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public void format(Sequence sequence, OutputStream outputStream) throws IOExcept
4141
Set<SequenceFeature> featureSet = sequence.getSequenceFeatures();
4242
if (featureSet != null) {
4343
for (SequenceFeature sequenceFeature : featureSet) {
44-
String featureLine = sequenceFeature.getName() + " ICE " + sequenceFeature.getGenbankType();
44+
String featureType = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();
45+
String featureLine = sequenceFeature.getName() + " ICE " + featureType;
4546

4647
// location
4748
for (AnnotationLocation location : sequenceFeature.getAnnotationLocations()) {

src/main/java/org/jbei/ice/lib/entry/sequence/composers/formatters/GenbankFormatter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jbei.ice.lib.entry.sequence.composers.formatters;
22

3+
import org.apache.commons.lang3.StringUtils;
34
import org.biojava.bio.seq.DNATools;
45
import org.biojava.bio.seq.Feature;
56
import org.biojava.bio.symbol.Location;
@@ -229,15 +230,13 @@ protected RichAnnotation getAnnotations(SequenceFeature sequenceFeature) {
229230
* @return Genbank Feature type.
230231
*/
231232
protected String getFeatureType(SequenceFeature sequenceFeature) {
232-
String featureType;
233+
String featureType = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();
233234

234-
if (sequenceFeature.getGenbankType() == null || sequenceFeature.getGenbankType().isEmpty()) {
235+
if (StringUtils.isEmpty(featureType)) {
235236
Logger.warn("SequenceFeature by id: " + sequenceFeature.getId()
236237
+ " has invalid genbank type.");
237238

238239
featureType = "misc_feature";
239-
} else {
240-
featureType = sequenceFeature.getGenbankType();
241240
}
242241

243242
return featureType;
@@ -301,4 +300,4 @@ private String normalizeFeatureValue(String value) {
301300

302301
return result;
303302
}
304-
}
303+
}

src/main/java/org/jbei/ice/services/rest/PartResource.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060
@Path("/parts")
6161
public class PartResource extends RestResource {
6262

63-
private EntryController controller = new EntryController();
64-
private Attachments attachments = new Attachments();
65-
private SampleService sampleService = new SampleService();
66-
private RemoteEntries remoteEntries = new RemoteEntries();
63+
private final EntryController controller = new EntryController();
64+
private final Attachments attachments = new Attachments();
65+
private final SampleService sampleService = new SampleService();
66+
private final RemoteEntries remoteEntries = new RemoteEntries();
6767

6868
/**
6969
* Retrieves a part using any of the unique identifiers. e.g. Part number, synthetic id, or

src/main/webapp/index.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8">
77
<title>ICE - Inventory of Composable Elements</title>
88

9-
<link rel="stylesheet" type="text/css" href="scripts/lib/open-vector-editor-10.2.4/main.css">
9+
<link rel="stylesheet" type="text/css" href="scripts/lib/open-vector-editor/main.css">
1010
<link href="css/font-awesome.min.css" rel="stylesheet">
1111
<link rel="stylesheet" href="scripts/lib/handsontable-7.1.0/pikaday.css">
1212
<link rel="stylesheet" media="screen" href="scripts/lib/handsontable-7.1.0/handsontable.full.min.css">
@@ -97,7 +97,7 @@
9797
</head>
9898

9999
<body>
100-
<script type="text/javascript" src="scripts/lib/open-vector-editor-10.2.4/open-vector-editor.min.js"></script>
100+
<script type="text/javascript" src="scripts/lib/open-vector-editor/open-vector-editor.min.js"></script>
101101

102102
<div id="container">
103103
<div id="body" ui-view></div>

src/main/webapp/scripts/lib/open-vector-editor-10.2.4/main.css

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/main/webapp/scripts/lib/open-vector-editor-10.2.4/open-vector-editor.min.js

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)