rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public boolean contains(String[] names){ for(int i = 0; i < names.length; i++){ if(this.names.contains(names[i]))
public boolean contains(DataSetSeismogram[] seismos){ for(int i = 0; i < seismos.length; i++){ if(this.names.contains(seismos[i].toString()))
public boolean contains(String[] names){ for(int i = 0; i < names.length; i++){ if(this.names.contains(names[i])) return true; } return false; }
public int sort(DataSetSeismogram[] seismograms, String[] names){ this.names.add(names);
public int sort(DataSetSeismogram[] seismograms){ for(int i = 0; i < seismograms.length; i++){ names.add(seismograms[i].getName()); }
public int sort(DataSetSeismogram[] seismograms, String[] names){ this.names.add(names); return this.names.size() - 1; }
String content = null;
private void doNode(WebdavNsNode node) throws WebdavException { PropFindMethod pm = (PropFindMethod)getNsIntf().findMethod( WebdavMethods.propFind); int status = node.getStatus(); String content = null; openTag(WebdavTags.response); if (status == HttpServletResponse.SC_OK) { if ((report...
if (status == HttpServletResponse.SC_OK) { if ((reportType == reportTypeQuery) || (reportType == reportTypeMultiGet)) { try { content = caldata.process(node); } catch (WebdavException wde) { status = wde.getStatusCode();; if (debug && (status != HttpServletResponse.SC_NOT_FOUND)) { error(wde); } } } }
private void doNode(WebdavNsNode node) throws WebdavException { PropFindMethod pm = (PropFindMethod)getNsIntf().findMethod( WebdavMethods.propFind); int status = node.getStatus(); String content = null; openTag(WebdavTags.response); if (status == HttpServletResponse.SC_OK) { if ((report...
property(CaldavTags.calendarData, content);
private void doNode(WebdavNsNode node) throws WebdavException { PropFindMethod pm = (PropFindMethod)getNsIntf().findMethod( WebdavMethods.propFind); int status = node.getStatus(); String content = null; openTag(WebdavTags.response); if (status == HttpServletResponse.SC_OK) { if ((report...
<!ELEMENT calendar-multiget (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? DAV:href+>
<!ELEMENT calendar-multiget ((DAV:allprop | DAV:propname | DAV:prop)?, DAV:href+)>
private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin...
<!ELEMENT calendar-query (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? filter>
<!ELEMENT calendar-query ((DAV:allprop | DAV:propname | DAV:prop)?, filter, timezone?)>
private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin...
} else if (nodeMatches(curnode, CaldavTags.calendarData)) { if (caldata != null) { if (debug) { trace("REPORT: caldata not null"); } throw new WebdavBadRequest(); } caldata = new CalendarData(debug); caldata.parse(curnode);
private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin...
if (caldata == null) { caldata = new CalendarData(debug); }
private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin...
if (caldata != null) { caldata.dump(); } else { trace("No caldata"); }
private int processDoc(Document doc) throws WebdavException { try { WebdavNsIntf intf = getNsIntf(); Element root = doc.getDocumentElement(); /* Get hold of the PROPFIND method instance - we need it to process possible prop requests. */ PropFindMethod pm = (PropFindMethod)intf.fin...
if (caldata.getErs() != null) {
if (caldata == null) { retrieveRecur = CalFacadeDefs.retrieveRecurMaster; } else if (caldata.getErs() != null) {
public void processResp(HttpServletRequest req, HttpServletResponse resp, int depth) throws WebdavException { resp.setStatus(WebdavStatusCode.SC_MULTI_STATUS); resp.setContentType("text/xml; charset=UTF-8"); String resourceUri = getResourceUri(req); Caldav...
} else if(className.equals("edu.iris.fissures.network.ChannelImpl")) {
} else if(className.equalsIgnoreCase("edu.iris.fissures.network.ChannelImpl")) {
public static Object getParameter(Element base) { String name = XMLUtil.evalString(base, "name"); NodeList typeNode = XMLUtil.evalNodeList(base, "type"); Element type = null; if(typeNode != null && typeNode.getLength() != 0) { type = (Element) typeNode.item(0); } String className = XMLUtil.evalString(type, "name")...
return value;
return new ParameterRef(name, value);
public static Object getParameter(Element base) { String name = XMLUtil.evalString(base, "name"); NodeList typeNode = XMLUtil.evalNodeList(base, "type"); Element type = null; if(typeNode != null && typeNode.getLength() != 0) { type = (Element) typeNode.item(0); } String className = XMLUtil.evalString(type, "name")...
available_data(RequestFilter[] a_filterseq) {
public RequestFilter[] available_data(RequestFilter[] a_filterseq) {
available_data(RequestFilter[] a_filterseq) { return dataCenter.available_data(a_filterseq); }
cancel_request(String a_request) throws edu.iris.Fissures.FissuresException {
public void cancel_request(String a_request) throws edu.iris.Fissures.FissuresException {
cancel_request(String a_request) throws edu.iris.Fissures.FissuresException { }
queue_seismograms(RequestFilter[] a_filterseq) throws edu.iris.Fissures.FissuresException {
public String queue_seismograms(RequestFilter[] a_filterseq) throws edu.iris.Fissures.FissuresException {
queue_seismograms(RequestFilter[] a_filterseq) throws edu.iris.Fissures.FissuresException { return getNextRequestId(); }
request_seismograms(RequestFilter[] a_filterseq, DataCenterCallBack a_client, boolean long_lived, edu.iris.Fissures.Time expiration_time) throws edu.iris.Fissures.FissuresException {
public String request_seismograms(RequestFilter[] a_filterseq, DataCenterCallBack a_client, boolean long_lived, edu.iris.Fissures.Time expiration_time) throws edu.iris.Fissures.FissuresException {
request_seismograms(RequestFilter[] a_filterseq, DataCenterCallBack a_client, boolean long_lived, edu.iris.Fissures.Time expiration_time) throws edu.iris.Fissures.FissuresException { return getNextRequestId(); }
request_status(String a_request) throws edu.iris.Fissures.FissuresException {
public String request_status(String a_request) throws edu.iris.Fissures.FissuresException {
request_status(String a_request) throws edu.iris.Fissures.FissuresException { return new String(); }
retrieve_queue(String a_request) throws edu.iris.Fissures.FissuresException {
public LocalSeismogram[] retrieve_queue(String a_request) throws edu.iris.Fissures.FissuresException {
retrieve_queue(String a_request) throws edu.iris.Fissures.FissuresException { return new LocalSeismogram[0]; }
public HSQLRequestFilterDb (String directoryName, String databaseName, DataCenterOperations router) throws SQLException { super(directoryName, databaseName); this.dataCenterRouter = router; create();
public HSQLRequestFilterDb(String directoryName, String databaseName) throws SQLException { this(directoryName, databaseName, null);
public HSQLRequestFilterDb (String directoryName, String databaseName, DataCenterOperations router) throws SQLException { super(directoryName, databaseName); this.dataCenterRouter = router; create(); }
dsName = args[i+1];
String tmp = args[i+1]; if (tmp.endsWith("/") || tmp.endsWith("\\") || tmp.endsWith(":") || tmp.endsWith(".") ) { tmp = tmp.substring(0, tmp.length()-1); } tmp = tmp.replace(' ','_'); if (tmp.length() > 0) { dsName = tmp; }
public static void main (String[] args) { if (args.length < 4) { System.err.println("Usage: java edu.sc.seis.fissuresUtil.sac.SacDirToDataSet -base url -dir directoryPath -name datasetname [-exclude file] [-paramRef name file]"); return; } // end of if (args.length != 2) String dirName = null; URL base = nu...
if (globals.rintf != null) { globals.rintf.restoreTimezone(entity); }
globals.getTzcache().saveTimeZone(entity.getTzid(), (VTimeZone)o);
public void end(String ns, String name) throws Exception { BwTimeZone entity = (BwTimeZone)pop(); globals.timezones++; try { if (globals.rintf != null) { globals.rintf.restoreTimezone(entity); } } catch (Throwable t) { throw new Exception(t); } }
logger.info(logText.toString());
log(logText.toString());
public String doRefund(String cardnumber, String monthExpires, String yearExpires, String ccVerifyNumber, double amount, String currency, Object parentDataPK, String captureProperties) throws CreditCardAuthorizationException { IWTimestamp stamp = IWTimestamp.RightNow(); strCCNumber = cardnumber; strCCExpire = yearE...
logger.info(logText.toString());
log(logText.toString());
public String doSale(String nameOnCard, String cardnumber, String monthExpires, String yearExpires, String ccVerifyNumber, double amount, String currency, String referenceNumber) throws CreditCardAuthorizationException { try { IWTimestamp stamp = IWTimestamp.RightNow(); strName = nameOnCard; strCCNumber = cardn...
logger = null; if (logger == null) { IWBundle bundle = iwc.getIWMainApplication().getBundle(getBundleIdentifier()); logger = Logger.getLogger(this.getClass().getName()); FileUtil.getFileSeparator(); try { Handler fh = new FileHandler(bundle.getPropertiesRealPath() + "/kortathjonustan.log"); logger.addHandler(fh); lo...
bundle = iwc.getIWMainApplication().getBundle(getBundleIdentifier());
private void init(IWApplicationContext iwc) { logger = null; if (logger == null) { IWBundle bundle = iwc.getIWMainApplication().getBundle(getBundleIdentifier()); logger = Logger.getLogger(this.getClass().getName()); FileUtil.getFileSeparator(); try { //Handler fh = new FileHandler("/Users/kortathjonustan....
return new Vector();
return new ArrayList();
public Collection getProperties(String ns) throws WebdavIntfException { return new Vector(); }
((SeismogramDisplay)basicDisplays.getLast()).addBottomTimeBorder();
public void removeSeismogram(MouseEvent me){ BasicSeismogramDisplay clicked = ((BasicSeismogramDisplay)me.getComponent()); clicked.removeAllSeismograms(); seismograms.remove(clicked); basicDisplays.remove(clicked); ((SeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); this.redraw(); seismograms.revalida...
imageMaker.remove(imagePainter);
public void removeAllSeismograms(){ Iterator e = plotters.keySet().iterator(); while(e.hasNext()){ LocalSeismogram current = ((SeismogramPlotter)e.next()).getSeismogram(); timeConfig.removeSeismogram(current); ampConfig.removeSeismogram(current); } timeConfig.removeTimeSyncListener(t...
if (seisNum > 0 && seisNum <= 50) { return feProps.getProperty("SeismicRegion"+seisNum); }
String propValue = feProps.getProperty("SeismicRegion"+seisNum); if (propValue != null && propValue.length > 1) { return propValue; }
public String getSeismicRegionName(int seisNum) { if (seisNum > 0 && seisNum <= 50) { return feProps.getProperty("SeismicRegion"+seisNum); } // end of if (seisNum > 0 && seisNum <= 50) return "SeisRegion"+seisNum; }
float dt = (float)seis.getSampling().getPeriod().convertTo(UnitImpl.SECOND).get_value();
double dt = seis.getSampling().getPeriod().convertTo(UnitImpl.SECOND).get_value();
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
new MicroSecondDate((long)(seisStart + sampling * i)));
new MicroSecondDate((long)(seisStart + sampling * i)), sta, lta);
public LongShortTrigger[] calcTriggers(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSampl...
ratio);
ratio, ysta, ylta);
public LongShortTrigger[] calcTriggersTJO(LocalSeismogramImpl seis) throws FissuresException { LinkedList out = new LinkedList(); float[] seisData = seis.get_as_floats(); // establish number of points in LTA and STA windows // as well as in trgdly float dt = (float)seis.getSa...
Object val) throws CalFacadeException {
Object val, boolean debug) throws CalFacadeException {
public void initialise(String userid, CallBack cb, Object val) throws CalFacadeException { curUser = userid; this.cb = cb; if (userid != null) { curUsertype = getUsertype(userid); } userAuthRO = null; debug = getLogger().isDebugEnabled(); }
debug = getLogger().isDebugEnabled();
this.debug = debug;
public void initialise(String userid, CallBack cb, Object val) throws CalFacadeException { curUser = userid; this.cb = cb; if (userid != null) { curUsertype = getUsertype(userid); } userAuthRO = null; debug = getLogger().isDebugEnabled(); }
Lineage lineage = lineages[i]; while (lineage != null && lineage.count == 1) { lineage = lineage.parent;
while (lineages[i] != null && lineages[i].count == 1) { lineages[i] = lineages[i].parent;
public RootedTree reconstructPhylogeny(int[] sample, List<Taxon> taxa) { SimpleRootedTree tree = new SimpleRootedTree(); Lineage[] lineages = new Lineage[sample.length]; Node[] nodes = new Node[sample.length]; for (int i = 0; i < sample.length; i++) { lineages[i] = extantLineages[sample[i]]; nodes[i] = tree.cr...
if (lineage == null) {
if (lineages[i] == null) {
public RootedTree reconstructPhylogeny(int[] sample, List<Taxon> taxa) { SimpleRootedTree tree = new SimpleRootedTree(); Lineage[] lineages = new Lineage[sample.length]; Node[] nodes = new Node[sample.length]; for (int i = 0; i < sample.length; i++) { lineages[i] = extantLineages[sample[i]]; nodes[i] = tree.cr...
for (int i = 0; i < lineageCount; i++) {
int i = 0; while (i < lineageCount) {
public RootedTree reconstructPhylogeny(int[] sample, List<Taxon> taxa) { SimpleRootedTree tree = new SimpleRootedTree(); Lineage[] lineages = new Lineage[sample.length]; Node[] nodes = new Node[sample.length]; for (int i = 0; i < sample.length; i++) { lineages[i] = extantLineages[sample[i]]; nodes[i] = tree.cr...
if (lineageCount > 1) { int currentCount = lineages[i].count; lineages[i] = lineages[i].parent; while (lineages[i] != null && lineages[i].count == currentCount) { lineages[i] = lineages[i].parent; } if (lineages[i] == null) { return null; } } } else { i++;
public RootedTree reconstructPhylogeny(int[] sample, List<Taxon> taxa) { SimpleRootedTree tree = new SimpleRootedTree(); Lineage[] lineages = new Lineage[sample.length]; Node[] nodes = new Node[sample.length]; for (int i = 0; i < sample.length; i++) { lineages[i] = extantLineages[sample[i]]; nodes[i] = tree.cr...
if (attr == null) { attr = net.get_attributes();
if (attr == null) { attr = net.get_attributes(); } return attr;
get_attributes() { if (attr == null) { attr = net.get_attributes(); } return attr; }
return attr; }
get_attributes() { if (attr == null) { attr = net.get_attributes(); } return attr; }
String idStr = StationIdUtil.toString(id); if ( ! channelMap.containsKey(idStr)) { channelMap.put(idStr, net.retrieve_for_station(id));
String idStr = StationIdUtil.toString(id); if ( ! channelMap.containsKey(idStr)) { Channel[] chans = net.retrieve_for_station(id); clean(chans); channelMap.put(idStr, chans); } return (Channel[])channelMap.get(idStr);
retrieve_for_station(StationId id) { String idStr = StationIdUtil.toString(id); if ( ! channelMap.containsKey(idStr)) { channelMap.put(idStr, net.retrieve_for_station(id)); } return (Channel[])channelMap.get(idStr); }
return (Channel[])channelMap.get(idStr); }
retrieve_for_station(StationId id) { String idStr = StationIdUtil.toString(id); if ( ! channelMap.containsKey(idStr)) { channelMap.put(idStr, net.retrieve_for_station(id)); } return (Channel[])channelMap.get(idStr); }
if (stations == null) { stations = net.retrieve_stations();
if (stations == null) { stations = net.retrieve_stations(); clean(stations); } return stations;
retrieve_stations() { if (stations == null) { stations = net.retrieve_stations(); } return stations; }
return stations; }
retrieve_stations() { if (stations == null) { stations = net.retrieve_stations(); } return stations; }
String prefix = node.getPrefix(); String nsURI = (prefix != null ? getNamespaceURI(prefix, element, rootNode) : null);
Map nsMap = new HashMap(); String elPrefix = node.getPrefix(); if (elPrefix != null) { String nsURI = getNamespaceURI(elPrefix, element, rootNode); nsMap.put(elPrefix, nsURI); }
private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==...
String attrName = attr.getNodeName(); String attrValue = normalize(attr.getNodeValue());
String atPrefix = attr.getPrefix(); String atName = attr.getNodeName(); String atValue = normalize(attr.getNodeValue());
private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==...
if (prefix != null && attrName.equals("xmlns:" + prefix)) nsURI = attrValue;
if (atPrefix != null && atPrefix.equals("xmlns") == false) { String nsURI = getNamespaceURI(atPrefix, element, rootNode); nsMap.put(atPrefix, nsURI); }
private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==...
out.print(" " + attrName + "='" + attrValue + "'");
out.print(" " + atName + "='" + atValue + "'");
private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==...
if (prefix != null && nsURI == null) { nsURI = getNamespaceURI(prefix, element, null); out.print(" xmlns:" + prefix + "='" + nsURI + "'");
Iterator itPrefix = nsMap.keySet().iterator(); while (itPrefix.hasNext()) { String prefix = (String)itPrefix.next(); String nsURI = (String)nsMap.get(prefix); if (nsURI == null) { nsURI = getNamespaceURI(prefix, element, null); out.print(" xmlns:" + prefix + "='" + nsURI + "'"); }
private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==...
public JDBCNetwork(Connection conn) throws SQLException{ this(conn, new JDBCTime(conn));
public JDBCNetwork() throws SQLException{ this(ConnMgr.createConnection());
public JDBCNetwork(Connection conn) throws SQLException{ this(conn, new JDBCTime(conn)); }
}
} if (dSeries != null) { return dBinarySum(start, finish); }
protected double binarySum(int start, int finish) { if (iSeries != null) { return iBinarySum(start, finish); } // end of if (iSeries != null) if (fSeries != null) { return fBinarySum(start, finish); } // end of if (iSeries != null) return 0; }
if (dSeries != null) { return dBinarySumDevLag(start, finish, mean, lag); }
protected double binarySumDevLag(int start, int finish, double mean, int lag) { if (iSeries != null) { return iBinarySumDevLag(start, finish, mean, lag); } // end of if (iSeries != null) if (fSeries != null) { return fBinarySumDevLag(start, finish, mean, lag); } // end of if (iSeries != null) retur...
if (dSeries != null) { return dBinarySumDevSqr(start, finish, mean); }
protected double binarySumDevSqr(int start, int finish, double mean) { if (iSeries != null) { return iBinarySumDevSqr(start, finish, mean); } // end of if (iSeries != null) if (fSeries != null) { return fBinarySumDevSqr(start, finish, mean); } // end of if (iSeries != null) return 0; }
} else if (dSeries != null) { for (int i = beginIndex; i < endIndex; i++) { minMaxMean[0] = Math.min(minMaxMean[0], dSeries[i]); minMaxMean[1] = Math.max(minMaxMean[1], dSeries[i]); minMaxMean[2] += dSeries[i]; }
private double[] calculateMinMaxMean(int beginIndex, int endIndex){ minMaxMean[0] = Double.POSITIVE_INFINITY; minMaxMean[1] = Double.NEGATIVE_INFINITY; minMaxMean[2] = 0; if (iSeries != null) { for (int i = beginIndex; i < endIndex; i++) { minMaxMean[0] = Math.min(minMaxMean[0], iSeries[i]); minMaxMean[1] = M...
if (dSeries != null) { return dSeries.length; }
public int getLength() { if (iSeries != null) { return iSeries.length; } if (fSeries != null) { return fSeries.length; } return 0; }
if (dSeries != null) { for (int i=0; i< dSeries.length; i++) { bin = (int)Math.floor((dSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } } return histo; }
public int[] histogram(double start, double width, int number) { int[] histo = new int[number]; int bin; if (iSeries != null) { for (int i=0; i< iSeries.length; i++) { bin = (int)Math.floor((iSeries[i]-start)/width); if (bin >= 0 && bin < number) { histo[bin]++; } // end of if (bin >= 0 && bin < number)...
c.set(Calendar.DAY_OF_MONTH, 1);
public CalendarInfo(Locale locale) { this.locale = locale; /** Set the localized names */// SimpleDateFormat dayFormat = new SimpleDateFormat("EEEE", getLocale());// SimpleDateFormat shortDayFormat = new SimpleDateFormat("E", getLocale()); Calendar c = Calendar.getInstance(getLocale()); ArrayLis...
public static String getDayName(Date val, Locale loc) { Formatters fmt = getFormatters(loc); synchronized (fmt) { return fmt.dayFormatter.format(val); }
public String getDayName() { return calInfo.getDayName(getDayOfWeek());
public static String getDayName(Date val, Locale loc) { Formatters fmt = getFormatters(loc); synchronized (fmt) { return fmt.dayFormatter.format(val); } }
SphericalCoords.distance(eventLoc.latitude, eventLoc.longitude, seismoLoc.latitude, seismoLoc.longitude))
SphericalCoords.distance(eventLoc.latitude, eventLoc.longitude, seismoLoc.latitude, seismoLoc.longitude)){ Date endDistance = new Date(); interval = endDistance.getTime() - beginDistance.getTime(); System.out.println("distance calc:" + interval + "ms");
public boolean isFurtherThan(DataSetSeismogram seismo){ try{ Location eventLoc = ((XMLDataSet)dataSet).getEvent().get_preferred_origin().my_location; Location seisLoc = ((XMLDataSet)dataSet).getChannel(seis.channel_id).my_site.my_location; Location seismoLoc = ((XMLDataSet)seismo.getDataSet()).getChanne...
}catch(Exception e){}
}catch(Exception e){ e.printStackTrace(); }
public boolean isFurtherThan(DataSetSeismogram seismo){ try{ Location eventLoc = ((XMLDataSet)dataSet).getEvent().get_preferred_origin().my_location; Location seisLoc = ((XMLDataSet)dataSet).getChannel(seis.channel_id).my_site.my_location; Location seismoLoc = ((XMLDataSet)seismo.getDataSet()).getChanne...
image = null;
protected void resize() { Insets insets = getInsets(); synchronized(imagePainter){ Dimension d = getSize(); int w = (d.width - insets.left - insets.right) * 5, h = d.height - insets.top - insets.bottom; imageSize = new Dimension(w, h); displaySize = new Dimension(d.width - insets.left - insets.right...
Main.getMainFrame().lobby.append(this.getText() + "\n");
Main.getMainFrame().lobby.append("Menu command: " + this.getText() + "\n");
public void actionPerformed(ActionEvent e) { Main.getMainFrame().lobby.append(this.getText() + "\n"); doAction(); }
suffixedDss[i] = new DataSetSeismogram(dss[i], dss[i].toString() + suffix);
dss[i].setName(dss[i].getName() + suffix);
public static DataSetSeismogram[] addSuffix(DataSetSeismogram[] dss, String suffix){ DataSetSeismogram[] suffixedDss = new DataSetSeismogram[dss.length]; for(int i = 0; i < dss.length; i++){ suffixedDss[i] = new DataSetSeismogram(dss[i], dss[i].toString() + suffix); } return s...
return suffixedDss;
return dss;
public static DataSetSeismogram[] addSuffix(DataSetSeismogram[] dss, String suffix){ DataSetSeismogram[] suffixedDss = new DataSetSeismogram[dss.length]; for(int i = 0; i < dss.length; i++){ suffixedDss[i] = new DataSetSeismogram(dss[i], dss[i].toString() + suffix); } return s...
public void renderToGraphics(Graphics g, Dimension size){ JFrame frame = null; try { if(getRootPane() == null){ frame = new JFrame(); frame.getContentPane().add(this); frame.pack(); } Dimension curSize = getSize(); setSize(size); validate(); print(g); setSize(curSize); validate(); } finally { if (frame != null) frame.d...
public void renderToGraphics(Graphics g){ renderToGraphics(g, getPreferredSize());
public void renderToGraphics(Graphics g, Dimension size){ JFrame frame = null; try { if(getRootPane() == null){ frame = new JFrame(); frame.getContentPane().add(this); frame.pack(); } Dimension curSize = getSize(); ...
fileChooser.setCurrentDirectory(Configuration.getLastDirectory());
fileChooser.setSelectedFile(Configuration.getLastDirectory());
public MainPanel(final AudioPlayer owner) { super(new BorderLayout()); this.owner = owner; playlist.setPlayAll(Configuration.isPlayAll()); playlist.setShuffle(Configuration.isShuffle()); playlist.addListener(new IPlaylistListener() { public void playbackStarted(Player player) { URL url = player.getResour...
fileChooser.setCurrentDirectory(Configuration.getLastDirectory());
fileChooser.setSelectedFile(Configuration.getLastDirectory());
public void actionPerformed(ActionEvent e) { final JFileChooser fileChooser = new JFileChooser(); fileChooser.setMultiSelectionEnabled(true); fileChooser.setCurrentDirectory(Configuration.getLastDirectory()); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setFileFilter(ne...
public void addElement(URL url) { int index = getSize(); addElementAt(index, url);
public void addElement(File f) { try { int index = getSize(); addElementAt(index, f.toURL()); } catch (Exception exc) { throw new RuntimeException(exc); }
public void addElement(URL url) { int index = getSize(); addElementAt(index, url); }
public synchronized void play(int index) { int size = getSize(); if (size == 0) { return; } else if (index < 0) { index = 0; } else if (index > size) { index %= size;
public synchronized void play() { if (playingIndex < 0) { playingIndex = 0;
public synchronized void play(int index) { int size = getSize(); if (size == 0) { return; } else if (index < 0) { index = 0; } else if (index > size) { index %= size; } playingIndex = index; if (isPlaying()) { player.stop(); } try { final URL url = (URL)getElementAt(index); if (history.size() > HI...
playingIndex = index; if (isPlaying()) { player.stop(); } try { final URL url = (URL)getElementAt(index); if (history.size() > HISTORY_SIZE) { history.removeFirst(); } history.addLast(url); final Player p = PlayerFactory.createPlayer(url); this.player = p; p.addListener(getPassthroughPlayerListener(player)); p.addList...
play(playingIndex);
public synchronized void play(int index) { int size = getSize(); if (size == 0) { return; } else if (index < 0) { index = 0; } else if (index > size) { index %= size; } playingIndex = index; if (isPlaying()) { player.stop(); } try { final URL url = (URL)getElementAt(index); if (history.size() > HI...
if (playerThread != null && !playerThread.isInterrupted()) { playerThread.interrupt(); }
public synchronized void stop() { if (player != null) { player.stop(); player = null; } }
return null;
return ctrlPanel;
public Component getAppletInstance() { return null;//ctrlPanel; }
_reportFilePathsMap.put(PDF_FORMAT, business.getPdfReport(print, "report"));
private void generateReport(IWContext iwc) throws RemoteException, JRException { if (_dataSource != null && _design != null) { JasperReportBusiness business = getReportBusiness(); _parameterMap.put(DynamicReportDesign.PRM_REPORT_NAME, _reportName); JasperPrint print = business.getReport(_dataSource, _parame...
Link pdf = new Link(_reportName, (String) _reportFilePathsMap.get(PDF_FORMAT));
private PresentationObject getReportLink(IWContext iwc) { Table reports = new Table(2, 4); reports.mergeCells(1, 1, 2, 1); Link excel = new Link(_reportName, (String) _reportFilePathsMap.get(EXCEL_FORMAT)); excel.setTarget(Link.TARGET_NEW_WINDOW); //Link pdf = new Link(_reportName, (String) _reportFilePathsMap.ge...
reports.add(pdf, 2, 3);
private PresentationObject getReportLink(IWContext iwc) { Table reports = new Table(2, 4); reports.mergeCells(1, 1, 2, 1); Link excel = new Link(_reportName, (String) _reportFilePathsMap.get(EXCEL_FORMAT)); excel.setTarget(Link.TARGET_NEW_WINDOW); //Link pdf = new Link(_reportName, (String) _reportFilePathsMap.ge...
logger.debug("dataset append "+config.getChildNodes().getLength());
public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwnerDocument().equals(co...
logger.debug("dataset import "+config.getChildNodes().getLength());
public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwnerDocument().equals(co...
logger.debug("node "+nl.item(i).getLocalName());
public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwnerDocument().equals(co...
Property[] props = seis.getProperties();
/*Property[] props = seis.getProperties();
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme...
}
}*/
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme...
logger.debug("added seis now "+getSeismogramNames().length+" seisnogram names.");
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme...
logger.debug("2 added seis now "+getSeismogramNames().length+" seisnogram names.");
public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme...
logger.debug("found "+names.length+" names in xml"); logger.debug("cache has "+seismogramCache.keySet().size());
protected String[] cacheSeismogramNames() { String[] names = getAllAsStrings("localSeismogram/seismogramAttr/property[name="+dquote+"Name"+dquote+ "]"+"/value/text()"); //String[] names = getAllAsStrings("SacSeismogram/name/text()"); logger.debug("found "+names.length+" names in xml"); logger.debug("cac...
logger.debug("++++++++ name is "+name +" the datasetID name is "+ds.getName());
public DataSet getDataSet(String name) { String[] ids = getDataSetIds(); for (int i=0; i<ids.length; i++) { DataSet ds = getDataSetById(ids[i]); logger.debug("++++++++ name is "+name +" the datasetID name is "+ds.getName()); if (name.equals(ds.getName())) { ret...
NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return null; } for (int i=0; i<nodes.getLength(); i++) { Node n = nodes.item(i); NamedNodeMap map = n.getAttributes(); try { if (n instanceof Element) { Element e = (Element)n; String href = e.getAttribute("xlink:href"); SimpleXLink sl = ne...
public DataSet getDataSetById(String id) { if (dataSetCache.containsKey(id)) { return (DataSet)dataSetCache.get(id); } NodeList nList = evalNodeList(config, "//dataset[@datasetid="+dquote+id+dquote+"]"); if (nList != null && nList.getLength() != 0) { Nod...
logger.debug("External Dataset Id cache :'"+external[i]+"'");
public String[] getDataSetIds() { if (dataSetIdCache == null) { String[] internal = getAllAsStrings("*/@datasetid"); String[] external = getDataSetRefIds(); for (int i=0; i<external.length; i++) { logger.debug("External Dataset Id cache :'"+external[i]+"'"); ...
logger.debug("Dataset Id cache :'"+tmp[i]+"'");
public String[] getDataSetIds() { if (dataSetIdCache == null) { String[] internal = getAllAsStrings("*/@datasetid"); String[] external = getDataSetRefIds(); for (int i=0; i<external.length; i++) { logger.debug("External Dataset Id cache :'"+external[i]+"'"); ...
System.out.println("the length of the nodes is "+nodes.getLength());
String[] getDataSetRefIds() { String[] xlinktmps = getAllAsStrings("datasetRef"); String xlinkNS= "http://www.w3.org/1999/xlink"; NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return new String[0]; } // end of if (nodes == null) System.out.pr...
logger.debug("attribute: "+map.item(j).getLocalName());
String[] getDataSetRefIds() { String[] xlinktmps = getAllAsStrings("datasetRef"); String xlinkNS= "http://www.w3.org/1999/xlink"; NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return new String[0]; } // end of if (nodes == null) System.out.pr...
logger.debug("got href="+href+" base="+getBase()); SimpleXLink sl = new SimpleXLink(docBuilder, e, getBase());
SimpleXLink sl = new SimpleXLink(docBuilder, e, getBase());
String[] getDataSetRefIds() { String[] xlinktmps = getAllAsStrings("datasetRef"); String xlinkNS= "http://www.w3.org/1999/xlink"; NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return new String[0]; } // end of if (nodes == null) System.out.pr...
logger.debug("simpleLink element is"+referredElement.toString());
String[] getDataSetRefIds() { String[] xlinktmps = getAllAsStrings("datasetRef"); String xlinkNS= "http://www.w3.org/1999/xlink"; NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return new String[0]; } // end of if (nodes == null) System.out.pr...
logger.debug("got "+xlinks.length+" datasetRef ids from "+xlinktmps.length+" datasetRefs");
String[] getDataSetRefIds() { String[] xlinktmps = getAllAsStrings("datasetRef"); String xlinkNS= "http://www.w3.org/1999/xlink"; NodeList nodes = evalNodeList(config, "datasetRef"); if (nodes == null) { return new String[0]; } // end of if (nodes == null) System.out.pr...
System.out.println("PROPERTY TAG EXISTS");
public String[] getNoNameSeismogramNames() { NodeList nList; nList = evalNodeList(config, "localSeismogram/seismogramAttr/property"); if(nList == null || (nList != null && nList.getLength() == 0)) { nList = evalNodeList(config, "localSeismogram/seismogramAttr"); //System.out.println("ONLY SEIS ATTR EXISTS"...
logger.debug("getting the parameter "+name);
public Object getParameter(String name) { if (parameterCache.containsKey(name)) { return parameterCache.get(name); } // end of if (parameterCache.containsKey(name)) NodeList nList = evalNodeList(config, "parameter[name/text()="+ ...
logger.debug("The name of the data set is "+getName()); logger.debug("The name of the seismogram is "+name);
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { logger.debug("getting the seismogram fromt the cache"); return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) logger.debug("The name of t...
logger.debug("The &&&&&&&&&&&&&&&&&&& chan_cdoe from dsml file is "+ ((SeismogramAttrImpl)seisAttr).getChannelID().channel_code);
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { logger.debug("getting the seismogram fromt the cache"); return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) logger.debug("The name of t...
logger.debug("The &&&&&&&&&&&&&&&&&&& chan_code after setting is "+ seis.getChannelID().channel_code);
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { logger.debug("getting the seismogram fromt the cache"); return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) logger.debug("The name of t...
System.out.println(indent+" has "+names.length+" seismograms.");
static void testDataSet(DataSet dataset, String indent) { indent = indent+" "; String[] names = dataset.getSeismogramNames(); System.out.println(indent+" has "+names.length+" seismograms."); for (int num=0; num<names.length; num++) { // System.out.println(indent+" Seismogram name="+...
setDocument(new IdeaDocument()); selectIdea(this.getSelectedView().getIdea());
public IdeaMap() { text = new JTextField(""); setLayout(new BorderLayout()); add(text, BorderLayout.NORTH); controller = new IdeaMapController(this); setBackground(DEFAULT_BACKGROUND); JLayeredPane mapArea = new JLayeredPane(); mapArea.setBackground(new Color(0, 0, 0...
log = Logger.getLogger(this.getClass());
log = Logger.getLogger(getClass());
protected Logger getLogger() { if (log == null) { log = Logger.getLogger(this.getClass()); } return log; }