2021-01-02 16:15:27 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (c) 2012 IT Just working.
|
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
* which accompanies this distribution, and is available at
|
|
|
|
* http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* IT Just working - initial API and implementation
|
|
|
|
*******************************************************************************/
|
|
|
|
package com.minres.scviewer.database.text;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.minres.scviewer.database.IWaveform;
|
|
|
|
import com.minres.scviewer.database.tx.ITxGenerator;
|
|
|
|
|
2021-01-09 10:34:22 +01:00
|
|
|
class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
2021-01-02 16:15:27 +01:00
|
|
|
|
2021-01-09 10:34:22 +01:00
|
|
|
TxStream stream;
|
2021-01-08 20:31:24 +01:00
|
|
|
|
2021-01-03 17:44:52 +01:00
|
|
|
List<TxAttributeType> beginAttrs = new ArrayList<>();
|
2021-01-02 16:15:27 +01:00
|
|
|
|
2021-01-03 17:44:52 +01:00
|
|
|
List<TxAttributeType> endAttrs= new ArrayList<>();
|
2021-01-02 16:15:27 +01:00
|
|
|
|
2021-01-09 10:34:22 +01:00
|
|
|
TxGenerator(TextDbLoader loader, Long id, String name, TxStream stream){
|
|
|
|
super(loader, id, name);
|
2021-01-02 16:15:27 +01:00
|
|
|
this.stream=stream;
|
|
|
|
}
|
|
|
|
|
2021-01-03 14:16:56 +01:00
|
|
|
@Override
|
|
|
|
public IWaveform getStream(){
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
2021-01-02 16:15:27 +01:00
|
|
|
@Override
|
2021-01-09 10:34:22 +01:00
|
|
|
public boolean isSame(IWaveform other) {
|
|
|
|
return(other instanceof TxGenerator && this.getId().equals(other.getId()));
|
2021-01-02 16:15:27 +01:00
|
|
|
}
|
2021-01-09 10:34:22 +01:00
|
|
|
|
2021-01-03 14:16:56 +01:00
|
|
|
public List<TxAttributeType> getBeginAttrs() {
|
2021-01-02 16:15:27 +01:00
|
|
|
return beginAttrs;
|
|
|
|
}
|
|
|
|
|
2021-01-03 14:16:56 +01:00
|
|
|
public List<TxAttributeType> getEndAttrs() {
|
2021-01-02 16:15:27 +01:00
|
|
|
return endAttrs;
|
|
|
|
}
|
2021-01-03 14:16:56 +01:00
|
|
|
|
2021-01-09 10:34:22 +01:00
|
|
|
@Override
|
|
|
|
public String getKind() {
|
|
|
|
return stream.getKind();
|
|
|
|
}
|
2021-01-02 16:15:27 +01:00
|
|
|
}
|