git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git]
/
src
/
jalview
/
datamodel
/
xdb
/
embl
/
EmblFeatureLocations.java
diff --git
a/src/jalview/datamodel/xdb/embl/EmblFeatureLocations.java
b/src/jalview/datamodel/xdb/embl/EmblFeatureLocations.java
index
41ba739
..
94105ae
100644
(file)
--- a/
src/jalview/datamodel/xdb/embl/EmblFeatureLocations.java
+++ b/
src/jalview/datamodel/xdb/embl/EmblFeatureLocations.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,12
+20,17
@@
*/
package jalview.datamodel.xdb.embl;
*/
package jalview.datamodel.xdb.embl;
-import java.util.Enumeration;
import java.util.Vector;
import java.util.Vector;
+/**
+ * Data model for a <loctaion> child element of a <feature> read
+ * from an EMBL query reply
+ *
+ * @see embl_mapping.xml
+ */
public class EmblFeatureLocations
{
public class EmblFeatureLocations
{
- Vector locElements;
+ Vector<EmblFeatureLocElement> locElements;
String locationType;
String locationType;
@@
-68,7
+73,7
@@
public class EmblFeatureLocations
/**
* @return the locElements
*/
/**
* @return the locElements
*/
- public Vector getLocElements()
+ public Vector<EmblFeatureLocElement> getLocElements()
{
return locElements;
}
{
return locElements;
}
@@
-77,7
+82,7
@@
public class EmblFeatureLocations
* @param locElements
* the locElements to set
*/
* @param locElements
* the locElements to set
*/
- public void setLocElements(Vector locElements)
+ public void setLocElements(Vector<EmblFeatureLocElement> locElements)
{
this.locElements = locElements;
}
{
this.locElements = locElements;
}
@@
-110,12
+115,10
@@
public class EmblFeatureLocations
{
int sepos = 0;
int[] se = new int[locElements.size() * 2];
{
int sepos = 0;
int[] se = new int[locElements.size() * 2];
- if (locationType.equalsIgnoreCase("single"))
+ if (locationType.equalsIgnoreCase("single")) // TODO: or "simple" ?
{
{
- for (Enumeration le = locElements.elements(); le.hasMoreElements();)
+ for (EmblFeatureLocElement loce : locElements)
{
{
- EmblFeatureLocElement loce = (EmblFeatureLocElement) le
- .nextElement();
if (accession == null || loce.accession != null
&& accession.equals(loce.accession))
{
if (accession == null || loce.accession != null
&& accession.equals(loce.accession))
{
@@
-130,10
+133,8
@@
public class EmblFeatureLocations
}
else if (locationType.equalsIgnoreCase("join"))
{
}
else if (locationType.equalsIgnoreCase("join"))
{
- for (Enumeration le = locElements.elements(); le.hasMoreElements();)
+ for (EmblFeatureLocElement loce : locElements)
{
{
- EmblFeatureLocElement loce = (EmblFeatureLocElement) le
- .nextElement();
if (accession == null || loce.accession != null
&& accession.equals(loce.accession))
{
if (accession == null || loce.accession != null
&& accession.equals(loce.accession))
{
@@
-150,13
+151,17
@@
public class EmblFeatureLocations
else if (locationType != null)
{
if (jalview.bin.Cache.log != null)
else if (locationType != null)
{
if (jalview.bin.Cache.log != null)
+ {
jalview.bin.Cache.log
.error("EmbleFeatureLocations.getElementRanges cannot deal with locationType=='"
+ locationType + "'");
jalview.bin.Cache.log
.error("EmbleFeatureLocations.getElementRanges cannot deal with locationType=='"
+ locationType + "'");
+ }
else
else
+ {
System.err
.println("EmbleFeatureLocations.getElementRanges cannot deal with locationType=='"
+ locationType + "'");
System.err
.println("EmbleFeatureLocations.getElementRanges cannot deal with locationType=='"
+ locationType + "'");
+ }
}
// trim range if necessary.
if (se != null && sepos != se.length)
}
// trim range if necessary.
if (se != null && sepos != se.length)