/******************************************************************************* * Copyright (c) 2011 IRIS/DMC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * IRIS/DMC- initial API and implementation * * ACKNOWLEDGEMENT * This software was developed as part of a project supported by * Cooperative Agreement Number G10AC00533 from the United States * Geological Survey. Its contents are solely the responsibility of * the authors and the USGS is not responsible for the efficacy, * safety, or suitability of this software. ******************************************************************************/ import java.util.ArrayList; import java.util.List; import org.joda.time.DateTime; public class StationEpoch implements Epoch, Node { private Station station; private DateTime started; private DateTime ended; private DateTime lastModified; private double latitude; private double longitude; private double elevation; private String swapOrder16; private String swapOrder32; private String site; private String name; private List channels = new ArrayList(); public StationEpoch(DateTime start, DateTime end) { this.started = start; this.ended = end; } public Station getStation() { return station; } public void setStation(Station station) { this.station = station; } public DateTime getStarted() { return started; } public void setStarted(DateTime start) { this.started = start; } public DateTime getEnded() { return ended; } public void setEnded(DateTime end) { this.ended = end; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public double getElevation() { return elevation; } public void setElevation(double elevation) { this.elevation = elevation; } public String getSwapOrder16() { return swapOrder16; } public void setSwapOrder16(String swapOrder16) { this.swapOrder16 = swapOrder16; } public String getSwapOrder32() { return swapOrder32; } public void setSwapOrder32(String swapOrder32) { this.swapOrder32 = swapOrder32; } public String getSite() { return site; } public void setSite(String site) { this.site = site; } public String getName() { return station.getNetCode()+"-"+station.getStaCode(); } public void setName(String name) { this.name = name; } public DateTime getLastModified() { return lastModified; } public void setLastModified(DateTime lastModified) { this.lastModified = lastModified; } public List getChannels() { return channels; } public void add(Channel channel) { if (channel == null) { return; } channel.setEpoch(this); this.channels.add(channel); } @Override public String toString() { return "StationEpoch [station=" + station + ", started=" + started + ", ended=" + ended + ", latitude=" + latitude + ", longitude=" + longitude + ", elevation=" + elevation + ", swapOrder16=" + swapOrder16 + ", swapOrder32=" + swapOrder32 + ", site=" + site + ", name=" + name + "]"; } }