edu.iris.dmc.seed.control.station.B060 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-4-seed Show documentation
Show all versions of java-4-seed Show documentation
Java API to work with seismic dataless seed
The newest version!
package edu.iris.dmc.seed.control.station;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import edu.iris.dmc.io.SeedStringBuilder;
import edu.iris.dmc.seed.Blockette;
public class B060 extends AbstractResponseBlockette{
private List stages = new ArrayList();
public B060() {
super(60, "Response Reference Blockette");
}
public List getStages() {
return stages;
}
public void setStages(List stages) {
this.stages = stages;
}
public void add(Stage stage) {
this.stages.add(stage);
}
@Override
public String toSeedString() {
SeedStringBuilder builder = new SeedStringBuilder("0" + this.getType() + "####");
builder.append(this.getStages().size(), 2);
for (Stage stage : this.getStages()) {
builder.append(stage.getSequence(), 2);
builder.append(stage.getResponses().size(), 2);
for (Integer lookup : stage.getResponses()) {
builder.append(lookup, 4);
}
}
builder.replace(3, 7, builder.length(), "####");
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy