Fixed inconsitencies
This commit is contained in:
@ -96,7 +96,7 @@ public class SQLiteDb extends HierNode implements IWaveformDb {
|
||||
@Override
|
||||
public IWaveform getStreamByName(String name) {
|
||||
for (IWaveform n : getAllWaves())
|
||||
if (n.getName().equals(name))
|
||||
if (n.getFullName().equals(name))
|
||||
return n;
|
||||
return null;
|
||||
}
|
||||
@ -110,7 +110,7 @@ public class SQLiteDb extends HierNode implements IWaveformDb {
|
||||
|
||||
private void buildHierarchyNodes() throws InputFormatException{
|
||||
for(IWaveform stream:getAllWaves()){
|
||||
String[] hier = stream.getFullName().split("\\./");
|
||||
String[] hier = stream.getFullName().split("\\.");
|
||||
IHierNode node = this;
|
||||
for(String name:hier){
|
||||
IHierNode n1 = null;
|
||||
|
@ -151,4 +151,9 @@ public class Tx implements ITx {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ITx o) {
|
||||
return this.getBeginTime().compareTo(o.getBeginTime());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.NavigableSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.minres.scviewer.database.HierNode;
|
||||
import com.minres.scviewer.database.ITxGenerator;
|
||||
@ -26,7 +28,7 @@ public class TxStream extends HierNode implements ITxStream {
|
||||
|
||||
private HashMap<Integer, TxGenerator> generators;
|
||||
|
||||
private List<ITx> transactions;
|
||||
private NavigableSet<ITx> transactions;
|
||||
|
||||
public TxStream(SQLiteDb trSQLiteDb, ScvStream scvStream) {
|
||||
super(scvStream.getName());
|
||||
@ -74,7 +76,7 @@ public class TxStream extends HierNode implements ITxStream {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ITx> getTransactions() {
|
||||
public NavigableSet<ITx> getTransactions() {
|
||||
checkTransactions();
|
||||
return transactions;
|
||||
}
|
||||
@ -94,7 +96,7 @@ public class TxStream extends HierNode implements ITxStream {
|
||||
if(generators==null) getGenerators();
|
||||
SQLiteDatabaseSelectHandler<ScvTx> handler = new SQLiteDatabaseSelectHandler<ScvTx>(ScvTx.class, db.getDb(),
|
||||
"stream="+scvStream.getId());
|
||||
transactions=new ArrayList<ITx>();
|
||||
transactions=new TreeSet<ITx>();
|
||||
try {
|
||||
for(ScvTx scvTx:handler.selectObjects()){
|
||||
transactions.add(new Tx(this, generators.get(scvTx.getGenerator()), scvTx));
|
||||
|
Reference in New Issue
Block a user