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-3383 JAL-3253-applet
[jalview.git]
/
src
/
jalview
/
io
/
AlignFile.java
diff --git
a/src/jalview/io/AlignFile.java
b/src/jalview/io/AlignFile.java
index
7b1e84a
..
c2cf667
100755
(executable)
--- a/
src/jalview/io/AlignFile.java
+++ b/
src/jalview/io/AlignFile.java
@@
-75,9
+75,9
@@
public abstract class AlignFile extends FileParse
/**
* true if parse() has been called
*/
/**
* true if parse() has been called
*/
- private boolean parseCalled;
+ private boolean parseCalled = false;
- private boolean parseImmediately;
+ private boolean parseImmediately = true;
/**
* @return if doParse() was called at construction time
/**
* @return if doParse() was called at construction time
@@
-112,7
+112,7
@@
public abstract class AlignFile extends FileParse
* @param sourceType
* What type of file to read from (File, URL, Pasted String)
*/
* @param sourceType
* What type of file to read from (File, URL, Pasted String)
*/
- public AlignFile(String dataObject, DataSourceType sourceType)
+ public AlignFile(Object dataObject, DataSourceType sourceType)
throws IOException
{
this(true, dataObject, sourceType);
throws IOException
{
this(true, dataObject, sourceType);
@@
-130,9
+130,10
@@
public abstract class AlignFile extends FileParse
* What type of file to read from (File, URL)
* @throws IOException
*/
* What type of file to read from (File, URL)
* @throws IOException
*/
- public AlignFile(boolean parseImmediately, String dataObject,
+ public AlignFile(boolean parseImmediately, Object dataObject,
DataSourceType sourceType) throws IOException
{
DataSourceType sourceType) throws IOException
{
+ // BH allows File or String
super(dataObject, sourceType);
initData();
if (parseImmediately)
super(dataObject, sourceType);
initData();
if (parseImmediately)
@@
-322,14
+323,15
@@
public abstract class AlignFile extends FileParse
*/
protected void initData()
{
*/
protected void initData()
{
- seqs = new Vector<SequenceI>();
- annotations = new Vector<AlignmentAnnotation>();
- seqGroups = new ArrayList<SequenceGroup>();
+ seqs = new Vector<>();
+ annotations = new Vector<>();
+ seqGroups = new ArrayList<>();
parseCalled = false;
}
/**
parseCalled = false;
}
/**
- * DOCUMENT ME!
+ * Create the seqs Vector from a set of parsed sequences in an AlignFile,
+ * FeaturesFile, RnamlFile, or StockholmFile.
*
* @param s
* DOCUMENT ME!
*
* @param s
* DOCUMENT ME!
@@
-337,7
+339,7
@@
public abstract class AlignFile extends FileParse
@Override
public void setSeqs(SequenceI[] s)
{
@Override
public void setSeqs(SequenceI[] s)
{
- seqs = new Vector<SequenceI>();
+ seqs = new Vector<>();
for (int i = 0; i < s.length; i++)
{
for (int i = 0; i < s.length; i++)
{
@@
-408,7
+410,7
@@
public abstract class AlignFile extends FileParse
{
if (newickStrings == null)
{
{
if (newickStrings == null)
{
- newickStrings = new Vector<String[]>();
+ newickStrings = new Vector<>();
}
newickStrings.addElement(new String[] { treeName, newickString });
}
}
newickStrings.addElement(new String[] { treeName, newickString });
}