bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().getBeginTime().getMicroSecondTime(); long overEndTime = overTimeRange.getEndTime().getMicroSecondTime(); long overBeginTime = overTimeRange.getBeginTime().getMicroSecondTime(); Graphics2D g2 = (Graphics2D)g; if(displayTime == timeConfig.getTimeRange().getInterval().getValue()){ if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated"); this.createImage(); return; } double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * overSize.getWidth(); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); g2.drawImage(((Image)overSizedImage.get()), tx, null); } else{ double scale = displayTime/timeConfig.getTimeRange().getInterval().getValue(); double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * (overSize.getWidth() * scale); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); tx.scale(scale, 1); g2.drawImage(((Image)overSizedImage.get()), tx, null); synchronized(this){ displayInterval = timeConfig.getTimeRange().getInterval();} this.createImage(); } }
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().getBeginTime().getMicroSecondTime(); long overEndTime = overTimeRange.getEndTime().getMicroSecondTime(); long overBeginTime = overTimeRange.getBeginTime().getMicroSecondTime(); Graphics2D g2 = (Graphics2D)g; if(displayTime == timeConfig.getTimeRange().getInterval().getValue()){ if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated"); this.createImage(); return; } double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * overSize.getWidth(); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); g2.drawImage(((Image)overSizedImage.get()), tx, null); } else{ double scale = displayTime/timeConfig.getTimeRange().getInterval().getValue(); double offset = (beginTime - overBeginTime)/ (double)(overTimeInterval) * (overSize.getWidth() * scale); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); tx.scale(scale, 1); g2.drawImage(((Image)overSizedImage.get()), tx, null); synchronized(this){ displayInterval = timeConfig.getTimeRange().getInterval();} this.createImage(); } }
1,118,455
public static void handleException(Exception exception) { JTabbedPane tabbedPane = new JTabbedPane(); JFrame displayFrame = new JFrame("Exception Handler"); JPanel messagePanel = new JPanel(); JLabel exceptionMessageLabel = new JLabel(); JTextArea messageArea = new JTextArea(); messageArea.setLineWrap(true); messageArea.setFont(new Font("BookManOldSytle", Font.BOLD, 12)); messageArea.setWrapStyleWord(true); messageArea.setEditable(false); exceptionMessageLabel.setText(exception.toString()); messagePanel.setLayout(new BorderLayout()); messagePanel.add(exceptionMessageLabel); tabbedPane.addTab("information", messagePanel); JPanel stackTracePanel = new JPanel(); JScrollPane scrollPane = new JScrollPane(stackTracePanel); String traceString = ""; if (exception instanceof WrappedException) { traceString += getStackTrace(((WrappedException)exception).getCausalException()); } traceString += getStackTrace(exception); messageArea.setText(traceString); stackTracePanel.setLayout(new BorderLayout()); stackTracePanel.add(messageArea); tabbedPane.addTab("stackTrace", scrollPane); java.awt.Dimension dimension = new java.awt.Dimension(600, 400); tabbedPane.setPreferredSize(dimension); tabbedPane.setMinimumSize(dimension); displayFrame.getContentPane().add(tabbedPane); displayFrame.setSize(400,400); displayFrame.pack(); displayFrame.show(); }
public static void handleException(Exception exception) { JTabbedPane tabbedPane = new JTabbedPane(); JFrame displayFrame = new JFrame("Exception Handler"); JPanel messagePanel = new JPanel(); JLabel exceptionMessageLabel = new JLabel(); JTextArea messageArea = new JTextArea(); messageArea.setLineWrap(true); messageArea.setFont(new Font("BookManOldSytle", Font.BOLD, 12)); messageArea.setWrapStyleWord(true); messageArea.setEditable(false); exceptionMessageLabel.setText(exception.toString()); messagePanel.setLayout(new BorderLayout()); messagePanel.add(exceptionMessageLabel); tabbedPane.addTab("information", messagePanel); JPanel stackTracePanel = new JPanel(); JScrollPane scrollPane = new JScrollPane(stackTracePanel); String traceString = ""; if (exception instanceof WrappedException) { traceString += getStackTrace(((WrappedException)exception).getCausalException()); } traceString += getStackTrace(exception); messageArea.setText(traceString); stackTracePanel.setLayout(new BorderLayout()); stackTracePanel.add(messageArea); tabbedPane.addTab("stackTrace", scrollPane); java.awt.Dimension dimension = new java.awt.Dimension(600, 400); tabbedPane.setPreferredSize(dimension); tabbedPane.setMinimumSize(dimension); displayFrame.getContentPane().add(tabbedPane); displayFrame.setSize(400,400); displayFrame.pack(); displayFrame.show(); }
1,118,458
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() == null) { return ""; } return new Integer(cache.get_attributes().region.number); case CATALOG: return cache.get_preferred_origin().catalog; case CONTRIBUTOR: return cache.get_preferred_origin().contributor; case LATITUDE: return new Float(cache.get_preferred_origin().my_location.latitude); case LONGITUDE: return new Float(cache.get_preferred_origin().my_location.longitude); case DEPTH: QuantityImpl q = (QuantityImpl)cache.get_preferred_origin().my_location.depth; q = q.convertTo(UnitImpl.KILOMETER); return depthFormat.format(q.getValue())+" km"; case ORIGINTIME: return cache.get_preferred_origin().origin_time.date_time; case MAGTYPE: return cache.get_preferred_origin().magnitudes[0].type; case MAGVALUE: return new Float(cache.get_preferred_origin().magnitudes[0].value); default: return "XXXX"; } } catch (NoPreferredOrigin e) { return "No Pref Origin"; } }
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() == null) { return ""; } return new Integer(cache.get_attributes().region.number); case CATALOG: return cache.get_preferred_origin().catalog; case CONTRIBUTOR: return cache.get_preferred_origin().contributor; case LATITUDE: return new Float(cache.get_preferred_origin().my_location.latitude); case LONGITUDE: return new Float(cache.get_preferred_origin().my_location.longitude); case DEPTH: QuantityImpl q = (QuantityImpl)cache.get_preferred_origin().my_location.depth; q = q.convertTo(UnitImpl.KILOMETER); return depthFormat.format(q.getValue())+" km"; case ORIGINTIME: edu.iris.Fissures.Time fisDate = cache.get_preferred_origin().origin_time; MicroSecondDate msd = new MicroSecondDate(fisDate); return msd.toString(); case MAGTYPE: return cache.get_preferred_origin().magnitudes[0].type; case MAGVALUE: return new Float(cache.get_preferred_origin().magnitudes[0].value); default: return "XXXX"; } } catch (NoPreferredOrigin e) { return "No Pref Origin"; } }
1,118,459
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() == null) { return ""; } return new Integer(cache.get_attributes().region.number); case CATALOG: return cache.get_preferred_origin().catalog; case CONTRIBUTOR: return cache.get_preferred_origin().contributor; case LATITUDE: return new Float(cache.get_preferred_origin().my_location.latitude); case LONGITUDE: return new Float(cache.get_preferred_origin().my_location.longitude); case DEPTH: QuantityImpl q = (QuantityImpl)cache.get_preferred_origin().my_location.depth; q = q.convertTo(UnitImpl.KILOMETER); return depthFormat.format(q.getValue())+" km"; case ORIGINTIME: return cache.get_preferred_origin().origin_time.date_time; case MAGTYPE: return cache.get_preferred_origin().magnitudes[0].type; case MAGVALUE: return new Float(cache.get_preferred_origin().magnitudes[0].value); default: return "XXXX"; } } catch (NoPreferredOrigin e) { return "No Pref Origin"; } }
public Object getValueAt(int row, int col) { if ( ! isRowCached(row)) { return "..."; } CacheEvent cache = getEventForRow(row); try { switch (col) { case NAME: if (cache.get_attributes() == null) { return ""; } return cache.get_attributes().name; case FEREGION: if (cache.get_attributes() == null) { return ""; } return new Integer(cache.get_attributes().region.number); case CATALOG: return cache.get_preferred_origin().catalog; case CONTRIBUTOR: return cache.get_preferred_origin().contributor; case LATITUDE: return new Float(cache.get_preferred_origin().my_location.latitude); case LONGITUDE: return new Float(cache.get_preferred_origin().my_location.longitude); case DEPTH: QuantityImpl q = (QuantityImpl)cache.get_preferred_origin().my_location.depth; q = q.convertTo(UnitImpl.KILOMETER); return depthFormat.format(q.getValue())+" km"; case ORIGINTIME: return cache.get_preferred_origin().origin_time.date_time; case MAGTYPE: String type = cache.get_preferred_origin().magnitudes[0].type; if (type.equals(edu.iris.Fissures.MB_MAG_TYPE.value)) { return "mb"; } if (type.equals(edu.iris.Fissures.ML_MAG_TYPE.value)) { return "ml"; } if (type.equals(edu.iris.Fissures.MBMLE_MAG_TYPE.value)) { return "mbmle"; } if (type.equals(edu.iris.Fissures.MO_MAG_TYPE.value)) { return "MO"; } if (type.equals(edu.iris.Fissures.MS_MAG_TYPE.value)) { return "Ms"; } if (type.equals(edu.iris.Fissures.MSMLE_MAG_TYPE.value)) { return "msmle"; } if (type.equals(edu.iris.Fissures.MW_MAG_TYPE.value)) { return "MW"; } return type; case MAGVALUE: return new Float(cache.get_preferred_origin().magnitudes[0].value); default: return "XXXX"; } } catch (NoPreferredOrigin e) { return "No Pref Origin"; } }
1,118,460
public static JLabel getAmpLabel(){ return amp; }
public static JLabel getAmpLabel(){ return ampLabel; }
1,118,461
public static String getLabelText(){ return time.getText() + amp.getText(); }
public static String getLabelText(){ return timeLabel.getText() + ampLabel.getText(); }
1,118,462
public static JLabel getTimeLabel(){ return time; }
public static JLabel getTimeLabel(){ return timeLabel; }
1,118,463
public void removeAll(){ logger.debug("removing all displays"); super.removeAll(); basicDisplays.clear(); sorter = new SeismogramSorter(); globalRegistrar = null; time.setText(" Time: "); amp.setText(" Amp: "); repaint(); }
public void removeAll(){ logger.debug("removing all displays"); super.removeAll(); basicDisplays.clear(); sorter = new SeismogramSorter(); globalRegistrar = null; time.setText(" Time: "); amp.setText(" Amp: "); repaint(); }
1,118,464
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
1,118,465
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
1,118,466
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
public void setLabels(MicroSecondDate newTime, QuantityImpl newAmp){ calendar.setTime(newTime); if(output.format(calendar.getTime()).length() == 21) time.setText("Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) time.setText("Time: " + output.format(calendar.getTime()) + "0"); else time.setText("Time: " + output.format(calendar.getTime())); double newAmpVal = newAmp.getValue(); String ampString = amplitude; if(Math.abs(newAmpVal) < .001) { ampString += ampFormatExp.format(newAmpVal); } else { ampString += ampFormat.format(newAmpVal); } amp.setText(ampString+" "+ unitDisplayUtil.getNameForUnit(newAmp.getUnit())); }
1,118,467
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
1,118,469
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
1,118,470
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); return currentShape; } catch(Exception e){ e.printStackTrace(); } return currentShape; }
1,118,471
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return currentShape; }
public Shape draw(Dimension size){ GeneralPath currentShape = new GeneralPath(); int scale = 5; int w = size.width, h = size.height; Dimension mySize = new Dimension(w, h); int[] xPixels = null; int[] yPixels = null; int[][] pixels; MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seismogram).getOversizedTimeRange((scale -1)/2); try{ pixels = SeisPlotUtil.calculatePlottable(seismogram, ampConfig.getAmpRange(seismogram), overTimeRange, mySize); xPixels = pixels[0]; yPixels = pixels[1]; SeisPlotUtil.flipArray(yPixels, mySize.height); if(xPixels.length >= 1) currentShape.moveTo(xPixels[0], yPixels[0]); for(int i = 1; i < xPixels.length; i++) currentShape.lineTo(xPixels[i], yPixels[i]); } catch(Exception e){ e.printStackTrace(); } return new GeneralPath(); }
1,118,472
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** User requested a location from the list. Retrieve it, embed it in * the form so we can display the page */ int id = getIntReqPar(request, "locid", -1); BwLocation location = null; if (id >= 0) { location = form.getCalSvcI().getLocation(id); } if (debug) { if (location == null) { logIt("No location with id " + id); } else { logIt("Retrieved location " + location.getId()); } } form.assignAddingLocation(false); form.setLocation(location); if (location == null) { form.getErr().emit("org.bedework.pubevents.error.nosuchlocation", id); return "notFound"; } return "continue"; }
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** User requested a location from the list. Retrieve it, embed it in * the form so we can display the page */ int id = getIntReqPar(request, "locid", -1); BwLocation location = null; if (id >= 0) { location = form.getCalSvcI().getLocation(id); } if (debug) { if (location == null) { logIt("No location with id " + id); } else { logIt("Retrieved location " + location.getId()); } } form.assignAddingLocation(false); form.setLocation(location); if (location == null) { form.getErr().emit("org.bedework.client.error.nosuchlocation", id); return "notFound"; } return "continue"; }
1,118,473
public void dispose() { playlist.stop(); playlist.save(); }
public void dispose() { playlist.setPlayAll(false); playlist.save(); }
1,118,474
public void calculateTicks(){ timeIntv = (endTime.getMicroSecondTime() - beginTime.getMicroSecondTime())/ 1000; if(timeIntv <= 100) this.divCalculateTicks(10); else if(timeIntv <= 500) this.divCalculateTicks(50); else if(timeIntv <= 100) this.divCalculateTicks(100); else if(timeIntv <= 5000) this.divCalculateTicks(500); else if(timeIntv <= 10000) this.divCalculateTicks(1000); else if(timeIntv <= 30000) this.divCalculateTicks(3000); else if(timeIntv <= 60000) this.divCalculateTicks(10000); else if(timeIntv <= 120000) this.divCalculateTicks(20000); else if(timeIntv <= 300000) this.divCalculateTicks(30000); else if(timeIntv <= 600000) this.divCalculateTicks(60000); else if(timeIntv <= 1200000) this.divCalculateTicks(120000); else if(timeIntv <= 3600000) this.divCalculateTicks(360000); else if(timeIntv <= 7300000) this.divCalculateTicks(720000); else this.divCalculateTicks(1440000); }
public void calculateTicks(){ timeIntv = (endTime.getMicroSecondTime() - beginTime.getMicroSecondTime())/ 1000; if(timeIntv <= 100) this.divCalculateTicks(10); else if(timeIntv <= 500) this.divCalculateTicks(50); else if(timeIntv <= 1000) this.divCalculateTicks(100); else if(timeIntv <= 5000) this.divCalculateTicks(500); else if(timeIntv <= 10000) this.divCalculateTicks(1000); else if(timeIntv <= 30000) this.divCalculateTicks(3000); else if(timeIntv <= 60000) this.divCalculateTicks(10000); else if(timeIntv <= 120000) this.divCalculateTicks(20000); else if(timeIntv <= 300000) this.divCalculateTicks(30000); else if(timeIntv <= 600000) this.divCalculateTicks(60000); else if(timeIntv <= 1200000) this.divCalculateTicks(120000); else if(timeIntv <= 3600000) this.divCalculateTicks(360000); else if(timeIntv <= 7300000) this.divCalculateTicks(720000); else this.divCalculateTicks(1440000); }
1,118,475
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = getReqPar(request, "view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
1,118,476
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = getReqPar(request, "addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
1,118,477
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (getReqPar(request, "addSubscription") != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
1,118,478
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (getReqPar(request, "updateSubscription") != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
1,118,479
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (Util.checkNull(request.getParameter("delete")) != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } BwSubscription sub = form.getSubscription(); CalSvcI svc = form.getCalSvcI(); String viewName = request.getParameter("view"); boolean addToDefaultView = false; if (viewName == null) { addToDefaultView = true; String str = request.getParameter("addtodefaultview"); if (str != null) { addToDefaultView = str.equals("y"); } } if (!validateSub(sub, form)) { return "retry"; } if (Util.checkNull(request.getParameter("addSubscription")) != null) { try { svc.addSubscription(sub); } catch (CalFacadeException cfe) { if (CalFacadeException.duplicateSubscription.equals(cfe.getMessage())) { form.getErr().emit(cfe.getMessage()); return "success"; // User will see message and we'll stay on page } throw cfe; } } else if (Util.checkNull(request.getParameter("updateSubscription")) != null) { svc.updateSubscription(sub); } else if (getReqPar(request, "delete") != null) { svc.removeSubscription(sub); } else { } if ((viewName == null) && !addToDefaultView) { // We're done - not adding to a view return "success"; } if (sub != null) { svc.addViewSubscription(viewName, sub); } form.setSubscriptions(svc.getSubscriptions()); return "success"; }
1,118,480
public void testDefExternalField() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.alloc("o2"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o2.x := 3", NATNil._INSTANCE_); try { assertEquals(atThree_, rcvr.meta_select(rcvr, atX_)); } catch(XUndefinedField e) { fail("broken external field definition:"+e.getMessage()); } }
public void testDefExternalField() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.jAlloc("o2"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o2.x := 3", NATNil._INSTANCE_); try { assertEquals(atThree_, rcvr.meta_select(rcvr, atX_)); } catch(XUndefinedField e) { fail("broken external field definition:"+e.getMessage()); } }
1,118,482
public void testDefExternalMethod() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.alloc("o"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o.x() { self }", NATNil._INSTANCE_); try { ATClosure clo = rcvr.meta_lookup(atX_).base_asClosure(); assertEquals(atX_, clo.base_getMethod().base_getName()); assertEquals(rcvr, rcvr.meta_invoke(rcvr, atX_, NATTable.EMPTY)); } catch(XSelectorNotFound e) { fail("broken external method definition:"+e.getMessage()); } }
public void testDefExternalMethod() throws InterpreterException { ATObject rcvr = new NATObject(); AGSymbol rcvnam = AGSymbol.jAlloc("o"); ctx_.base_getLexicalScope().meta_defineField(rcvnam, rcvr); evalAndCompareTo("def o.x() { self }", NATNil._INSTANCE_); try { ATClosure clo = rcvr.meta_lookup(atX_).base_asClosure(); assertEquals(atX_, clo.base_getMethod().base_getName()); assertEquals(rcvr, rcvr.meta_invoke(rcvr, atX_, NATTable.EMPTY)); } catch(XSelectorNotFound e) { fail("broken external method definition:"+e.getMessage()); } }
1,118,483
public void saveTimeZone(String tzid, VTimeZone vtz) throws CalFacadeException { /* For a user update the map to avoid a refetch. For system timezones we will force a refresh when we're done. */ /* Don't use lookup - we might be called from lookup on init */ TimezoneInfo tzinfo = (TimezoneInfo)timezones.get(tzid); TimeZone tz = new TimeZone(vtz); if (tzinfo == null) { tzinfo = new TimezoneInfo(tz); timezones.put(tzid, tzinfo); } else { tzinfo.init(tz); } }
public void saveTimeZone(String tzid, VTimeZone vtz) throws CalFacadeException { /* For a user update the map to avoid a refetch. For system timezones we will force a refresh when we're done. */ /* Don't use lookup - we might be called from lookup on init */ TimezoneInfo tzinfo = (TimezoneInfo)timezones.get(tzid); TimeZone tz = new TimeZone(vtz); if (tzinfo == null) { tzinfo = new TimezoneInfo(tz); timezones.put(tzid, tzinfo); } else { tzinfo.init(tz); } }
1,118,484
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); if(majTickTime <= 1000){ majTickTime = 1000; }else if(majTickTime <= 10000){ majTickTime = 10000; }else if(majTickTime <= 100000){ majTickTime = 100000; } }else if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,485
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,486
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,487
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,488
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,489
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
public void calculateTicks(){ int majTickNum = totalPixels/50; majTickTime = timeIntv/majTickNum; majTickRatio = 10; if(majTickTime <= 30000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("mm:ss"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 100000){ timeFormat = new SimpleDateFormat("ss.S"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 100000; }else if(majTickTime <= 1000000){ majTickTime = 1000000; }else if(majTickTime <= 5000000){ majTickTime = 5000000; }else if(majTickTime <= 1000000){ majTickTime = 10000000; }else majTickTime = 30000000; } else if(majTickTime <= 180000000){ majTickRatio = 6; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 60000000){ majTickTime = 60000000; }else if(majTickTime <= 120000000){ majTickTime = 120000000; }else majTickTime = 180000000; } else if(majTickTime <= 1800000000){ majTickRatio = 10; timeFormat = new SimpleDateFormat("HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 300000000) majTickTime = 300000000; else if(majTickTime <= 600000000) majTickTime = 600000000; else if(majTickTime <= 1200000000){ majTickTime = 1200000000; }else majTickTime = 1800000000; } else if(majTickTime <= 43200000000l){ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd HH:mm"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); if(majTickTime <= 3600000000l){ majTickTime = 3600000000l; }else if(majTickTime <= 7200000000l){ majTickTime = 7200000000l; }else if(majTickTime <= 10800000000l){ majTickTime = 10800000000l; }else if(majTickTime <= 21600000000l){ majTickTime = 21600000000l; }else majTickTime = 43200000000l; } else{ majTickRatio = 6; timeFormat = new SimpleDateFormat("MM/dd"); timeFormat.setTimeZone(TimeZone.getTimeZone("GMT")); majTickTime = 86400000000l; } numTicks = (int)((timeIntv/(double)majTickTime) * majTickRatio); firstLabelTime = (beginTime/majTickTime + 1) * majTickTime; majTickOffset = (int)((firstLabelTime - beginTime)/(double)timeIntv * numTicks); tickOffset = (firstLabelTime - beginTime)/(double)timeIntv/majTickRatio * totalPixels; tickSpacing = totalPixels/(double)numTicks; }
1,118,490
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); return fromIcal(cal, bldr.build(rdr, true)); } catch (ParserException pe) { if (debug) { error(pe); } throw new IcalMalformedException(pe.getMessage()); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } }
public Collection fromIcal(BwCalendar cal, String val) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); return fromIcal(cal, bldr.build(rdr, true)); } catch (ParserException pe) { if (debug) { error(pe); } throw new IcalMalformedException(pe.getMessage()); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } }
1,118,492
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); return fromIcal(cal, bldr.build(rdr, true)); } catch (ParserException pe) { if (debug) { error(pe); } throw new IcalMalformedException(pe.getMessage()); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } }
public Collection fromIcal(BwCalendar cal, Reader rdr) throws CalFacadeException { try { //System.setProperty("ical4j.unfolding.relaxed", "true"); CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); //return fromIcal(cal, bldr.build(new UnfoldingReader(rdr))); UnfoldingReader ufrdr = new UnfoldingReader(new StringReader(val), true); return fromIcal(cal, bldr.build(ufrdr)); } catch (ParserException pe) { if (debug) { error(pe); } throw new IcalMalformedException(pe.getMessage()); } catch (CalFacadeException cfe) { throw cfe; } catch (Throwable t) { throw new CalFacadeException(t); } }
1,118,493
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
1,118,494
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null && !isHidden) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
1,118,495
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else { //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
1,118,496
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); _parameterMap.put(clDesc.getName(), prm); } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
private void generateDataSource(IWContext iwc) throws XMLException, Exception { Locale currentLocale = iwc.getCurrentLocale(); if(_queryPK != null) { QueryService service = (QueryService)(IBOLookup.getServiceInstance(iwc,QueryService.class)); _dataSource = service.generateQueryResult(_queryPK, iwc); } else if (_methodInvokeDoc != null) { List mDescs = _methodInvokeDoc.getMethodDescriptions(); if (mDescs != null) { Iterator it = mDescs.iterator(); if (it.hasNext()) { MethodDescription mDesc = (MethodDescription) it.next(); ClassDescription mainClassDesc = mDesc.getClassDescription(); Class mainClass = mainClassDesc.getClassObject(); String type = mainClassDesc.getType(); String methodName = mDesc.getName(); MethodInput input = mDesc.getInput(); List parameters = null; if (input != null) { parameters = input.getClassDescriptions(); } Object[] prmVal = null; Class[] paramTypes = null; if (parameters != null) { prmVal = new Object[parameters.size()]; paramTypes = new Class[parameters.size()]; ListIterator iterator = parameters.listIterator(); while (iterator.hasNext()) { int index = iterator.nextIndex(); ClassDescription clDesc = (ClassDescription) iterator.next(); Class prmClassType = clDesc.getClassObject(); paramTypes[index] = prmClassType; String[] prmValues = iwc.getParameterValues(getParameterName(clDesc.getName())); String prm = null; Object obj = null; if (prmValues != null && prmValues.length > 0) { prm = prmValues[0]; } ClassHandler cHandler = clDesc.getClassHandler(); InputHandler iHandler = null; boolean isHidden = false; if (cHandler != null) { iHandler = cHandler.getHandler(); isHidden = iHandler instanceof HiddenInputHandler; } if (iHandler != null && !isHidden) { obj = iHandler.getResultingObject(prmValues, iwc); String displayNameOfValue = iHandler.getDisplayNameOfValue(obj, iwc); if (displayNameOfValue != null) { _parameterMap.put(clDesc.getName(), displayNameOfValue); } } else if (!isHidden){ //ONLY HANDLES ONE VALUE! obj = getParameterObject(iwc, prm, prmClassType); if (!isHidden) { _parameterMap.put(clDesc.getName(), prm); } } if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } // switch (index) { // case 0: // obj = new IWTimestamp(23,12,1898).getDate(); // break; // case 1: // obj = new IWTimestamp(23,12,1920).getDate(); // break; // case 2: // obj = new // IWTimestamp(2002,7,10,15,17,39).getTimestamp(); // break; // case 3: // obj = new // IWTimestamp(2002,7,12,15,17,40).getTimestamp(); // break; // } prmVal[index] = obj; } } else { // prmVal = String[0]; } Object forInvocationOfMethod = null; if (ClassDescription.VALUE_TYPE_IDO_SESSION_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getSessionInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_SERVICE_BEAN.equals(type)) { forInvocationOfMethod = IBOLookup.getServiceInstance(iwc, mainClass); } else if (ClassDescription.VALUE_TYPE_IDO_ENTITY_HOME.equals(type)) { forInvocationOfMethod = IDOLookup.getHome(mainClass); //System.out.println("["+this.getClassName()+"]: // not implemented yet for this classType: // "+type); } else { //ClassDescription.VALUE_TYPE_CLASS.equals(type)) forInvocationOfMethod = mainClass.newInstance(); } MethodFinder mf = MethodFinder.getInstance(); Method method = mf.getMethodWithNameAndParameters(mainClass, methodName, paramTypes); try { _dataSource = (JRDataSource) method.invoke(forInvocationOfMethod, prmVal); } catch (InvocationTargetException e) { Throwable someException = e.getTargetException(); if (someException != null && someException instanceof Exception) { throw (Exception) someException; } else { throw e; } } if (_dataSource != null && _dataSource instanceof ReportableCollection) { _extraHeaderParameters = ((ReportableCollection) _dataSource).getExtraHeaderParameters(); if (_extraHeaderParameters != null) { _parameterMap.putAll(_extraHeaderParameters); } } } } } }
1,118,497
public void helpManual() { if (Main.isMac()) { try { Class HelpBook = Class.forName("dg.hipster.HelpBook"); Method launchHelpViewer = HelpBook.getMethod( "launchHelpViewer"); launchHelpViewer.invoke(new Integer(10)); } catch(Exception cnfe) { cnfe.printStackTrace(); } } else { String pwd = System.getProperty("user.dir"); String manualIndex = pwd + File.separatorChar + "manual" + File.separatorChar + "English" + File.separatorChar + "index.html"; showUrlInWindows((new File(manualIndex)).toString()); } }
public void helpManual() { if (Main.isMac()) { try { Class HelpBook = Class.forName("dg.hipster.HelpBook"); Method launchHelpViewer = HelpBook.getMethod( "launchHelpViewer"); launchHelpViewer.invoke(new Integer(10)); } catch(Exception cnfe) { cnfe.printStackTrace(); } } else { String pwd = System.getProperty("launch4j.exedir"); if ((pwd == null) || (pwd.length() == 0)) { pwd = System.getProperty("user.dir"); } String manualIndex = pwd + File.separatorChar + "manual" + File.separatorChar + "English" + File.separatorChar + "index.html"; showUrlInWindows((new File(manualIndex)).toString()); } }
1,118,498
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().getBeginTime().getMicroSecondTime(); long overEndTime = overTimeRange.getEndTime().getMicroSecondTime(); long overBeginTime = overTimeRange.getBeginTime().getMicroSecondTime(); if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated"); this.createImage(); return; } Graphics2D g2 = (Graphics2D)g; if(displayTime == timeConfig.getTimeRange().getInterval().getValue()){ double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * overSize.getWidth(); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); g2.drawImage(((Image)overSizedImage.get()), tx, null); } else{ double scale = displayTime/timeConfig.getTimeRange().getInterval().getValue(); double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * (overSize.getWidth() * scale); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); tx.scale(scale, 1); g2.drawImage(((Image)overSizedImage.get()), tx, null); synchronized(this){ displayInterval = timeConfig.getTimeRange().getInterval();} this.createImage(); } }
public void paint(Graphics g){ if(overSizedImage == null || overSizedImage.get() == null){ logger.debug("the image is null and is being recreated"); this.createImage(); return; } long endTime = timeConfig.getTimeRange().getEndTime().getMicroSecondTime(); long beginTime = timeConfig.getTimeRange().getBeginTime().getMicroSecondTime(); long overEndTime = overTimeRange.getEndTime().getMicroSecondTime(); long overBeginTime = overTimeRange.getBeginTime().getMicroSecondTime(); if(endTime >= overEndTime || beginTime <= overBeginTime){ logger.debug("the image has been dragged past its edge and is being recreated"); this.createImage(); return; } Graphics2D g2 = (Graphics2D)g; if(displayTime == timeConfig.getTimeRange().getInterval().getValue()){ double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * overSize.getWidth(); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); g2.drawImage(((Image)overSizedImage.get()), tx, null); } else{ double scale = displayTime/timeConfig.getTimeRange().getInterval().getValue(); double offset = (beginTime - overBeginTime)/ (double)(overEndTime - overBeginTime) * (overSize.getWidth() * scale); AffineTransform tx = AffineTransform.getTranslateInstance(-offset, 0.0); tx.scale(scale, 1); g2.drawImage(((Image)overSizedImage.get()), tx, null); synchronized(this){ displayInterval = timeConfig.getTimeRange().getInterval();} this.createImage(); } }
1,118,499
public Main() { if (isMac()) { try { Class.forName("dg.hipster.controller.MacAppListener"); } catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); } } }
public Main() { if (isMac()) { try { Class.forName("dg.hipster.controller.MacAppListener"); } catch(ClassNotFoundException cnfe) { cnfe.printStackTrace(); } } }
1,118,502
public void castTo(Class type) throws XJavaException { if (type.isInstance(wrappedObject_)) { staticType_ = type; } else { throw new XJavaException(new ClassCastException("Failed to cast a Java object of type " + staticType_.getSimpleName() + " into a " + type.getSimpleName())); } }
public void castTo(Class type) throws XJavaException { if (type.isInstance(wrappedObject_)) { staticType_ = type; } else { throw new XJavaException(new ClassCastException("Failed to cast a Java object of type " + staticType_.getName() + " into a " + type.getName())); } }
1,118,504
public static Method[] getMethods(Class fromClass, String selector, boolean isStatic) throws XSelectorNotFound { Method[] methods = fromClass.getMethods(); Method m; Vector properMethods = new Vector(methods.length); for (int i = 0; i < methods.length; i++) { m = methods[i]; if ((Modifier.isStatic(m.getModifiers())) == isStatic && m.getName().equals(selector)) { properMethods.add(methods[i]); } } return (Method[]) properMethods.toArray(new Method[properMethods.size()]); }
public static Method[] getMethods(Class fromClass, String selector, boolean isStatic) { Method[] methods = fromClass.getMethods(); Method m; Vector properMethods = new Vector(methods.length); for (int i = 0; i < methods.length; i++) { m = methods[i]; if ((Modifier.isStatic(m.getModifiers())) == isStatic && m.getName().equals(selector)) { properMethods.add(methods[i]); } } return (Method[]) properMethods.toArray(new Method[properMethods.size()]); }
1,118,505
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
1,118,507
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
1,118,508
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
1,118,509
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ System.out.println("Found matching component"); componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram){ List componentSeismograms = new ArrayList(); RequestFilter rf = seismogram.getRequestFilter(); MicroSecondDate startDate = new MicroSecondDate(rf.start_time); MicroSecondDate endDate = new MicroSecondDate(rf.end_time); ChannelId chanId = rf.channel_id; DataSet dataSet = seismogram.getDataSet(); String[] names = dataSet.getDataSetSeismogramNames(); for (int i = 0; i < names.length; i++ ) { System.out.println("Attempting to match on " + names[i]); DataSetSeismogram currentSeis = dataSet.getDataSetSeismogram(names[i]); RequestFilter currentRF = currentSeis.getRequestFilter(); MicroSecondDate currentBegin = new MicroSecondDate(currentRF.start_time); MicroSecondDate currentEnd = new MicroSecondDate(currentRF.end_time); System.out.println("ID: " + ChannelIdUtil.toString(currentRF.channel_id) + "\nSITE CODE: " + currentRF.channel_id.site_code + " NETWORK ID: " + currentRF.channel_id.network_id + " CHANNEL CODE: " + currentRF.channel_id.channel_code + " STATION CODE: " + currentRF.channel_id.station_code); if(areFriends(chanId,currentRF.channel_id)){ System.out.println("the channel ids are equal"); if((currentBegin.equals(startDate) || currentBegin.before(startDate)) && (currentEnd.equals(endDate) || currentBegin.after(endDate))){ componentSeismograms.add(currentSeis); } } } DataSetSeismogram[] components = new DataSetSeismogram[componentSeismograms.size()]; componentSeismograms.toArray(components); return components; }
1,118,510
public void removeSeismogram(LocalSeismogram aSeis){ if(seismos.contains(aSeis)){ MicroSecondTimeRange calcIntv; if(this.timeConfig == null) calcIntv = new MicroSecondTimeRange(((LocalSeismogramImpl)aSeis).getBeginTime(), ((LocalSeismogramImpl)aSeis).getEndTime()); else calcIntv = timeConfig.getTimeRange(aSeis); LocalSeismogramImpl seis = (LocalSeismogramImpl)aSeis; int beginIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), calcIntv.getBeginTime()); if (beginIndex < 0) beginIndex = 0; if (beginIndex > seis.getNumPoints()) beginIndex = seis.getNumPoints(); int endIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), calcIntv.getEndTime()); if (endIndex < 0) endIndex = 0; if (endIndex > seis.getNumPoints()) endIndex = seis.getNumPoints(); if (endIndex == beginIndex) { seismos.remove(aSeis); return; } try { double medDif = (seis.getMaxValue(beginIndex, endIndex).getValue()-seis.getMinValue(beginIndex, endIndex).getValue())/2; if(medDif == this.ampRange.getMaxValue()) this.ampRange = null; } catch (Exception e) { this.ampRange = null; } seismos.remove(aSeis); if(ampRange == null){ this.updateAmpSyncListeners(); } } }
public void removeSeismogram(LocalSeismogram aSeis){ if(seismos.contains(aSeis)){ MicroSecondTimeRange calcIntv; if(this.timeConfig == null) calcIntv = new MicroSecondTimeRange(((LocalSeismogramImpl)aSeis).getBeginTime(), ((LocalSeismogramImpl)aSeis).getEndTime()); else calcIntv = timeConfig.getTimeRange(aSeis); LocalSeismogramImpl seis = (LocalSeismogramImpl)aSeis; int beginIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), calcIntv.getBeginTime()); if (beginIndex < 0) beginIndex = 0; if (beginIndex > seis.getNumPoints()) beginIndex = seis.getNumPoints(); int endIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), calcIntv.getEndTime()); if (endIndex < 0) endIndex = 0; if (endIndex > seis.getNumPoints()) endIndex = seis.getNumPoints(); if (endIndex == beginIndex) { seismos.remove(aSeis); return; } try { double medDif = (seis.getMaxValue(beginIndex, endIndex).getValue()-seis.getMinValue(beginIndex, endIndex).getValue())/2; if(medDif == this.ampRange.getMaxValue()) this.ampRange = null; } catch (Exception e) { this.ampRange = null; } seismos.remove(aSeis); if(ampRange == null){ this.updateAmpSyncListeners(); } } }
1,118,511
public boolean validateGroup(BwGroup updgrp, MessageEmit err) throws Throwable { boolean ok = true; if (updgrp == null) { // bogus call. return false; } updgrp.setAccount(Util.checkNull(updgrp.getAccount())); if (updgrp.getAccount() == null) { err.emit("org.bedework.pubevents.error.missingfield", "Name"); ok = false; } return ok; }
public boolean validateGroup(BwGroup updgrp, MessageEmit err) throws Throwable { boolean ok = true; if (updgrp == null) { // bogus call. return false; } updgrp.setAccount(Util.checkNull(updgrp.getAccount())); if (updgrp.getAccount() == null) { err.emit("org.bedework.pubevents.error.missingfield", "Name"); ok = false; } return ok; }
1,118,514
public void draw(Graphics2D canvas, Dimension size, TimeEvent timeEvent, AmpEvent ampEvent){ setFlagTime(new MicroSecondDate().add(RTTimeRangeConfig.serverTimeOffset)); super.draw(canvas, size, timeEvent, ampEvent); }
public void draw(Graphics2D canvas, Dimension size, TimeEvent timeEvent, AmpEvent ampEvent){ setFlagTime(ClockUtil.now()); super.draw(canvas, size, timeEvent, ampEvent); }
1,118,515
public boolean remove(){ if(internalTimeConfig.getTimeRange().getInterval().getValue()/externalTimeConfig.getTimeRange().getInterval().getValue() < .01) return true; return false; }
public boolean remove(){ if(internalTimeConfig.getTimeRange().getInterval().getValue()/externalTimeConfig.getTimeRange().getInterval().getValue() < .01) return true; return false; }
1,118,516
public Channel[] getSelectedChannels(){ Channel[] inChannels = getChannels(); return getSelectedChannels(inChannels, new MicroSecondDate()); }
public Channel[] getSelectedChannels(MicroSecondDate when){ Channel[] inChannels = getChannels(); return getSelectedChannels(inChannels, new MicroSecondDate()); }
1,118,517
public Channel[] getSelectedChannels(){ Channel[] inChannels = getChannels(); return getSelectedChannels(inChannels, new MicroSecondDate()); }
public Channel[] getSelectedChannels(){ Channel[] inChannels = getChannels(); logger.debug("before prune channels, length="+inChannels.length); inChannels = BestChannelUtil.pruneChannels(inChannels, when); logger.debug("after prune channels, length="+inChannels.length); return getSelectedChannels(inChannels, when); }
1,118,518
public Properties getProperties(Properties props){ super.getProperties(props); props.put("overviewLineWidth", "" + overviewLineWidth); props.put("lineWidthThreshold", "" + lineWidthThreshold); return props; }
public Properties getProperties(Properties props){ props = super.getProperties(props); props.put("overviewLineWidth", "" + overviewLineWidth); props.put("lineWidthThreshold", "" + lineWidthThreshold); return props; }
1,118,519
public DataSetSeismogram getDataSetSeismogram(String name) { LocalSeismogramImpl seis = getSeismogram(name); if(seis != null) { System.out.println("The seismogram is no null"); } else { System.out.println("The seismogram is not null"); } RequestFilter rf = new RequestFilter(seis.getChannelID(), seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime()); return new DataSetSeismogram(rf, null); }
public DataSetSeismogram getDataSetSeismogram(String name) { LocalSeismogramImpl seis = getSeismogram(name); if(seis != null) { System.out.println("The seismogram is no null"); } else { System.out.println("The seismogram is not null"); } RequestFilter rf = new RequestFilter(seis.getChannelID(), seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime()); return new DataSetSeismogram(rf, null); }
1,118,520
public DataSetSeismogram getDataSetSeismogram(String name) { LocalSeismogramImpl seis = getSeismogram(name); if(seis != null) { System.out.println("The seismogram is no null"); } else { System.out.println("The seismogram is not null"); } RequestFilter rf = new RequestFilter(seis.getChannelID(), seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime()); return new DataSetSeismogram(rf, null); }
public DataSetSeismogram getDataSetSeismogram(String name) { LocalSeismogramImpl seis = getSeismogram(name); if(seis != null) { System.out.println("The seismogram is no null"); } else { System.out.println("The seismogram is not null"); } RequestFilter rf = new RequestFilter(seis.getChannelID(), seis.getBeginTime().getFissuresTime(), seis.getEndTime().getFissuresTime()); return new DataSetSeismogram(rf, null); }
1,118,521
protected List getSemanticChildrenList() { List result = new LinkedList(); EObject modelObject = ((View) getHost().getModel()).getElement(); View viewObject = (View) getHost().getModel(); EObject nextValue; int nodeVID; for (Iterator values = ((org.eclipse.uml2.uml.Package) modelObject).getPackagedElements().iterator(); values.hasNext();) { nextValue = (EObject) values.next(); nodeVID = UMLVisualIDRegistry.getNodeVisualID(viewObject, nextValue); if (Stereotype2EditPart.VISUAL_ID == nodeVID) { result.add(nextValue); } } return result; }
protected List getSemanticChildrenList() { List result = new LinkedList(); EObject modelObject = ((View) getHost().getModel()).getElement(); View viewObject = (View) getHost().getModel(); EObject nextValue; int nodeVID; for (Iterator values = ((Package) modelObject).getPackagedElements().iterator(); values.hasNext();) { nextValue = (EObject) values.next(); nodeVID = UMLVisualIDRegistry.getNodeVisualID(viewObject, nextValue); if (Stereotype2EditPart.VISUAL_ID == nodeVID) { result.add(nextValue); } } return result; }
1,118,522
public boolean removeDisplay(BasicSeismogramDisplay display){ if(basicDisplays.contains(display)){ if(basicDisplays.size() == 1){ this.removeAll(); return true; } super.remove(display); basicDisplays.remove(display); remove(display.getSeismograms()); ((BasicSeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((BasicSeismogramDisplay)basicDisplays.getLast()).addBottomTimeBorder(); super.revalidate(); display.destroy(); repaint(); return true; } return false; }
public boolean removeDisplay(BasicSeismogramDisplay display){ if(basicDisplays.contains(display)){ if(basicDisplays.size() == 1){ this.removeAll(); return true; } super.remove(display); basicDisplays.remove(display); ((BasicSeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((BasicSeismogramDisplay)basicDisplays.getLast()).addBottomTimeBorder(); super.revalidate(); display.destroy(); repaint(); return true; } return false; }
1,118,523
public LogEntry getLogEntry(HttpServletRequest request, String logname) { StringBuffer sb = new StringBuffer(logname); sb.append(":"); sb.append(getSessionId(request)); sb.append(":"); sb.append(getLogPrefix()); return new LogEntryImpl(sb, this); }
public LogEntry getLogEntry(HttpServletRequest request, String logname) { StringBuffer sb = new StringBuffer(logname); sb.append(":"); sb.append(getSessionId(request)); sb.append(":"); sb.append(getLogPrefix(request)); return new LogEntryImpl(sb, this); }
1,118,524
private String getLogPrefix() { try { if (logPrefix == null) { logPrefix = JspUtil.getProperty(getMessages(), "edu.rpi.sss.util.action.logprefix", "unknown"); } return logPrefix; } catch (Throwable t) { error(t); return "LOG-PREFIX-EXCEPTION"; } }
protected String getLogPrefix(HttpServletRequest request) { try { if (logPrefix == null) { logPrefix = JspUtil.getProperty(getMessages(), "edu.rpi.sss.util.action.logprefix", "unknown"); } return logPrefix; } catch (Throwable t) { error(t); return "LOG-PREFIX-EXCEPTION"; } }
1,118,525
public static final ATSymbol downSelector(String jSelector) { return AGSymbol.alloc(javaToAmbientTalkSelector(jSelector)); }
public static final ATSymbol downSelector(String jSelector) { return AGSymbol.jAlloc(javaToAmbientTalkSelector(jSelector)); }
1,118,526
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public Channel[] retrieve_grouping( Channel[] channels, Channel channel) { ChannelId channelId = channel.get_id(); String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,528
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,529
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,530
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,531
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,532
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new Channel[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new Channel[0]; }
1,118,533
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,534
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,535
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,536
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channels[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,537
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; logger.debug("ORIENTATION "+orientation+"The matched channelStr is "+channelStr); } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
public ChannelId[] retrieve_grouping( ChannelId[] channelIds, ChannelId channelId) { String givenChannelStr = channelId.channel_code; String givenPrefixStr = givenChannelStr.substring(0, givenChannelStr.length() - 1); char givenOrientation = givenChannelStr.charAt(givenChannelStr.length() - 1); String searchString = ""; ChannelId[] rtnchannels = new ChannelId[3]; logger.debug("The given prefixxStr is "+givenPrefixStr); for(int j = 0; j < channelIds.length; j++) { logger.debug("THe channel Str is "+ ChannelIdUtil.toString(channelIds[j])); } logger.debug("The given Channel is "+givenChannelStr+" given Orientation is "+givenOrientation); for(int i = 0; i < patterns.length; i++) { if(patterns[i].indexOf(givenOrientation) != -1) { searchString = patterns[i]; logger.debug("The search String is "+searchString); searchString = searchString.replace(givenOrientation, '_'); logger.debug("The search string after is "+searchString); } else { return new ChannelId[0]; } int count = 0; rtnchannels = new ChannelId[3]; rtnchannels[count] = channelId; count++; logger.debug("The length of the channels is "+channelIds.length); for(int counter = 0; counter < channelIds.length; counter++) { String channelStr = channelIds[counter].channel_code; String prefixStr = channelStr.substring(0, channelStr.length() - 1); char orientation = channelStr.charAt(channelStr.length() - 1); logger.debug("The channelstr is "+channelStr); logger.debug("The prefixStr is "+prefixStr); logger.debug("orientation is "+orientation); //the below if will not be need once the sac is fixed //if(orientation == givenOrientation) rtnchannels[0] = channelIds[counter]; if(prefixStr.equals(givenPrefixStr) && searchString.indexOf(orientation) != -1) { //if(givenPrefixStr.indexOf(prefixStr) != -1 && searchString.indexOf(orientation) != -1) { logger.debug("The searchString is "+searchString); searchString = searchString.replace(orientation,'_'); rtnchannels[count] = channelIds[counter]; count++; } } if( searchString.equals("___") ) { //System.out.println("---------------___----------> RETURNING THE CHANNELS"); for(int counter = 0; counter < rtnchannels.length; counter++) { //if(rtnchannels[counter] == null) //System.out.println(" IS NULL "); // else //System.out.println(" IS NOT NULL "); } return rtnchannels; } } return new ChannelId[0]; }
1,118,538
public static ControlHeader read(DataInput in) throws IOException, SeedFormatException { byte[] seqBytes = new byte[6]; in.readFully(seqBytes); String seqNumString = new String(seqBytes); int sequenceNum =0; try { sequenceNum = Integer.valueOf(seqNumString).intValue(); } catch (NumberFormatException e) { System.err.println("seq num unreadable, setting to 0 "+e.toString()); } // end of try-catch byte typeCode = in.readByte(); int b = in.readByte(); boolean continuationCode; if (b == 32) { // a space, so no continuation continuationCode = false; } else if (b == 42) { // an asterisk, so is a continuation continuationCode = true; } else { throw new SeedFormatException("ControlHeader, expected space or *, but got"+b); } if (typeCode == (byte)'D') { // Data Header return DataHeader.read(in, sequenceNum, (char)typeCode, continuationCode); } else { // Control header return new ControlHeader(sequenceNum, typeCode, continuationCode); } }
public static ControlHeader read(DataInput in) throws IOException, SeedFormatException { byte[] seqBytes = new byte[6]; in.readFully(seqBytes); String seqNumString = new String(seqBytes); int sequenceNum =0; try { sequenceNum = Integer.valueOf(seqNumString).intValue(); } catch (NumberFormatException e) { System.err.println("seq num unreadable, setting to 0 "+e.toString()); } // end of try-catch byte typeCode = in.readByte(); int b = in.readByte(); boolean continuationCode; if (b == 32) { // a space, so no continuation continuationCode = false; } else if (b == 42) { // an asterisk, so is a continuation continuationCode = true; } else { throw new SeedFormatException("ControlHeader, expected space or *, but got"+b); } if (typeCode == (byte)'D') { // Data Header return DataHeader.read(in, sequenceNum, (char)typeCode, continuationCode); } else { // Control header return new ControlHeader(sequenceNum, typeCode, continuationCode); } }
1,118,539
public void stationDataChanged(StationDataEvent s) { Station[] stations = s.getStations(); for (int i = 0; i < stations.length; i++){ if (!stationMap.containsKey(stations[i].name)){ stationNames.add(stations[i].name); omgraphics.add(new OMStation(stations[i])); } List stationList = (List)stationMap.get(stations[i].name); if (stationList == null){ stationList = new LinkedList(); stationMap.put(stations[i].name, stationList); } stationList.add(stations[i]); } repaint(); }
public void stationDataChanged(StationDataEvent s) { Station[] stations = s.getStations(); for (int i = 0; i < stations.length; i++){ if (!stationMap.containsKey(stations[i].name)){ stationNames.add(stations[i].name); synchronized(omgraphics){ omgraphics.add(new OMStation(stations[i])); } } List stationList = (List)stationMap.get(stations[i].name); if (stationList == null){ stationList = new LinkedList(); stationMap.put(stations[i].name, stationList); } stationList.add(stations[i]); } repaint(); }
1,118,541
public ATObject base_apply(ATTable arguments, ATContext ctx) throws NATException { NATCallframe scope = new NATCallframe(ctx.base_getLexicalScope()); Evaluator.defineParamsForArgs(name_.getText().asNativeText().javaValue, scope, parameters_, arguments); return body_.meta_eval(ctx.base_withLexicalEnvironment(scope)); }
public ATObject base_apply(ATTable arguments, ATContext ctx) throws NATException { NATCallframe scope = new NATCallframe(ctx.base_getLexicalScope()); Evaluator.defineParamsForArgs(name_.base_getText().asNativeText().javaValue, scope, parameters_, arguments); return body_.meta_eval(ctx.base_withLexicalEnvironment(scope)); }
1,118,542
public Object clone() { return new BwRecurrence((Collection)((TreeSet)getRrules()).clone(), (Collection)((TreeSet)getExrules()).clone(), (Collection)((TreeSet)getRdates()).clone(), (Collection)((TreeSet)getExdates()).clone(), getRecurrenceId(), getLatestDate(), getExpanded()); }
public Object clone() { return new BwRecurrence((Collection)((TreeSet)getRrules()).clone(), (Collection)((TreeSet)getExrules()).clone(), (Collection)((TreeSet)getRdates()).clone(), (Collection)((TreeSet)getExdates()).clone(), getRecurrenceId(), getLatestDate(), getExpanded()); }
1,118,543
public DateTimeFormatter getEnd() { try { if (end == null) { end = new DateTimeFormatter(getCalInfo(), getEvent().getDtend(), ctz); } } catch (Throwable t) { error(t); } return end; }
public DateTimeFormatter getEnd() { try { if (end == null) { end = new DateTimeFormatter(getCalInfo(), dt, ctz); } } catch (Throwable t) { error(t); } return end; }
1,118,544
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.findMethod( WebdavMethods.propFind); if (pm == null) { return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } if (nodeMatches(root, CaldavTags.calendarQuery)) { reportType = reportTypeQuery; } else if (nodeMatches(root, CaldavTags.calendarMultiget)) { reportType = reportTypeMultiGet; } else if (nodeMatches(root, CaldavTags.freeBusyQuery)) { reportType = reportTypeFreeBusy; } else if (nodeMatches(root, WebdavTags.expandProperty)) { reportType = reportTypeExpandProperty; } else { throw new WebdavBadRequest(); } Element[] children = getChildren(root); for (int i = 0; i < children.length; i++) { Element curnode = children[i]; /** The names come through looking something like A:allprop etc. */ String nm = curnode.getLocalName(); String ns = curnode.getNamespaceURI(); if (debug) { trace("reqtype: " + nm + " ns: " + ns); } if (reportType == reportTypeFreeBusy) { freeBusy = new FreeBusyQuery(intf, debug); freeBusy.parse(curnode); } else if (reportType == reportTypeExpandProperty) { } else { /* Two possibilities: <!ELEMENT calendar-multiget (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? DAV:href+> <!ELEMENT calendar-query (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? filter> */ /* First try for a property request */ PropFindMethod.PropRequest pr = pm.tryPropRequest(curnode); if (pr != null) { if (preq != null) { if (debug) { trace("REPORT: preq not null"); } throw new WebdavBadRequest(); } preq = pr; } 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); } else if ((reportType == reportTypeQuery) && nodeMatches(curnode, CaldavTags.filter)) { if (filter != null) { if (debug) { trace("REPORT: filter not null"); } throw new WebdavBadRequest(); } filter = new Filter(intf, debug); int st = filter.parse(curnode); if (st != HttpServletResponse.SC_OK) { return st; } } else if ((reportType == reportTypeMultiGet) && nodeMatches(curnode, WebdavTags.href)) { String href = XmlUtil.getElementContent(curnode); if ((href == null) || (href.length() == 0)) { throw new WebdavBadRequest(); } if (hrefs == null) { hrefs = new Vector(); } hrefs.add(href); } else { if (debug) { trace("REPORT: unexpected element"); } throw new WebdavBadRequest(); } } } // Final validation if (reportType == reportTypeMultiGet) { if (hrefs == null) { // need at least 1 throw new WebdavBadRequest(); } } else if (reportType == reportTypeQuery) { if (caldata == null) { // same as empty element? caldata = new CalendarData(debug); } if (filter == null) { // filter required throw new WebdavBadRequest(); } } if (debug) { trace("REPORT: "); if (reportType == reportTypeFreeBusy) { trace("free-busy"); freeBusy.dump(); } else if (reportType == reportTypeQuery) { // Query - optional props + optional calendar data + filter if (caldata != null) { caldata.dump(); } else { trace("No caldata"); } filter.dump(); } else if (reportType == reportTypeMultiGet) { // Multi-get - optional props + optional calendar data + one or more hrefs if (caldata != null) { caldata.dump(); } else { trace("No caldata"); } Iterator it = hrefs.iterator(); while (it.hasNext()) { String href = (String)it.next(); trace(" <DAV:href>" + href + "</DAV:href>"); } } else { } } return HttpServletResponse.SC_OK; } catch (WebdavException wde) { throw wde; } catch (Throwable t) { System.err.println(t.getMessage()); if (debug) { t.printStackTrace(); } return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } }
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.findMethod( WebdavMethods.propFind); if (pm == null) { return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } if (nodeMatches(root, CaldavTags.calendarQuery)) { reportType = reportTypeQuery; } else if (nodeMatches(root, CaldavTags.calendarMultiget)) { reportType = reportTypeMultiGet; } else if (nodeMatches(root, CaldavTags.freeBusyQuery)) { reportType = reportTypeFreeBusy; } else if (nodeMatches(root, WebdavTags.expandProperty)) { reportType = reportTypeExpandProperty; } else { throw new WebdavBadRequest(); } Element[] children = getChildren(root); for (int i = 0; i < children.length; i++) { Element curnode = children[i]; /** The names come through looking something like A:allprop etc. */ String nm = curnode.getLocalName(); String ns = curnode.getNamespaceURI(); if (debug) { trace("reqtype: " + nm + " ns: " + ns); } if (reportType == reportTypeFreeBusy) { freeBusy = new FreeBusyQuery(intf, debug); freeBusy.parse(curnode); } else if (reportType == reportTypeExpandProperty) { } else { /* Two possibilities: <!ELEMENT calendar-multiget (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? DAV:href+> <!ELEMENT calendar-query (DAV:allprop | DAV:propname | DAV:prop)? calendar-data? filter> */ /* First try for a property request */ PropFindMethod.PropRequest pr = pm.tryPropRequest(curnode); if (pr != null) { if (preq != null) { if (debug) { trace("REPORT: preq not null"); } throw new WebdavBadRequest(); } preq = pr; } 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); } else if ((reportType == reportTypeQuery) && nodeMatches(curnode, CaldavTags.filter)) { if (filter != null) { if (debug) { trace("REPORT: filter not null"); } throw new WebdavBadRequest(); } filter = new Filter(intf, debug); int st = filter.parse(curnode); if (st != HttpServletResponse.SC_OK) { return st; } } else if ((reportType == reportTypeMultiGet) && nodeMatches(curnode, WebdavTags.href)) { String href = XmlUtil.getElementContent(curnode); if ((href == null) || (href.length() == 0)) { throw new WebdavBadRequest(); } if (hrefs == null) { hrefs = new ArrayList(); } hrefs.add(href); } else { if (debug) { trace("REPORT: unexpected element"); } throw new WebdavBadRequest(); } } } // Final validation if (reportType == reportTypeMultiGet) { if (hrefs == null) { // need at least 1 throw new WebdavBadRequest(); } } else if (reportType == reportTypeQuery) { if (caldata == null) { // same as empty element? caldata = new CalendarData(debug); } if (filter == null) { // filter required throw new WebdavBadRequest(); } } if (debug) { trace("REPORT: "); if (reportType == reportTypeFreeBusy) { trace("free-busy"); freeBusy.dump(); } else if (reportType == reportTypeQuery) { // Query - optional props + optional calendar data + filter if (caldata != null) { caldata.dump(); } else { trace("No caldata"); } filter.dump(); } else if (reportType == reportTypeMultiGet) { // Multi-get - optional props + optional calendar data + one or more hrefs if (caldata != null) { caldata.dump(); } else { trace("No caldata"); } Iterator it = hrefs.iterator(); while (it.hasNext()) { String href = (String)it.next(); trace(" <DAV:href>" + href + "</DAV:href>"); } } else { } } return HttpServletResponse.SC_OK; } catch (WebdavException wde) { throw wde; } catch (Throwable t) { System.err.println(t.getMessage()); if (debug) { t.printStackTrace(); } return HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } }
1,118,545
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); CaldavBWIntf intf = (CaldavBWIntf)getNsIntf(); WebdavNsNode node = intf.getNode(resourceUri); openTag(WebdavTags.multistatus); int status = HttpServletResponse.SC_OK; Collection nodes = null; if (reportType == reportTypeQuery) { try { int retrieveRecur; if (caldata.getErs() != null) { /* expand XXX use range */ retrieveRecur = CalFacadeDefs.retrieveRecurExpanded; } else if (caldata.getLrs() != null) { /* expand XXX use range */ retrieveRecur = CalFacadeDefs.retrieveRecurOverrides; } else { retrieveRecur = CalFacadeDefs.retrieveRecurMaster; } nodes = intf.query(node, retrieveRecur, filter); } catch (WebdavException wde) { status = wde.getStatusCode(); } } else if (reportType == reportTypeMultiGet) { nodes = new Vector(); if (hrefs != null) { Iterator it = hrefs.iterator(); while (it.hasNext()) { String href = intf.getUri((String)it.next()); try { nodes.add(intf.getNode(href)); } catch (WebdavException we) { nodes.add(new CaldavCalNode(we.getStatusCode(), debug)); } } } } else if (reportType == reportTypeFreeBusy) { try { nodes = intf.getFreeBusy(node, freeBusy); } catch (WebdavException wde) { if (debug) { trace("intf.getFreeBusy exception"); } status = wde.getStatusCode(); } } else if (reportType == reportTypeExpandProperty) { } if (status != HttpServletResponse.SC_OK) { if (debug) { trace("REPORT status " + status); } // Entire request failed. node.setStatus(status); doNode(node); } else if (nodes != null) { Iterator it = nodes.iterator(); while (it.hasNext()) { WebdavNsNode curnode = (WebdavNsNode)it.next(); doNode(curnode); } } closeTag(WebdavTags.multistatus); flush(); }
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); CaldavBWIntf intf = (CaldavBWIntf)getNsIntf(); WebdavNsNode node = intf.getNode(resourceUri); openTag(WebdavTags.multistatus); int status = HttpServletResponse.SC_OK; Collection nodes = null; if (reportType == reportTypeQuery) { try { int retrieveRecur; if (caldata.getErs() != null) { /* expand XXX use range */ retrieveRecur = CalFacadeDefs.retrieveRecurExpanded; } else if (caldata.getLrs() != null) { /* expand XXX use range */ retrieveRecur = CalFacadeDefs.retrieveRecurOverrides; } else { retrieveRecur = CalFacadeDefs.retrieveRecurMaster; } nodes = intf.query(node, retrieveRecur, filter); } catch (WebdavException wde) { status = wde.getStatusCode(); } } else if (reportType == reportTypeMultiGet) { nodes = new ArrayList(); if (hrefs != null) { Iterator it = hrefs.iterator(); while (it.hasNext()) { String href = intf.getUri((String)it.next()); try { nodes.add(intf.getNode(href)); } catch (WebdavException we) { nodes.add(new CaldavCalNode(we.getStatusCode(), debug)); } } } } else if (reportType == reportTypeFreeBusy) { try { nodes = intf.getFreeBusy(node, freeBusy); } catch (WebdavException wde) { if (debug) { trace("intf.getFreeBusy exception"); } status = wde.getStatusCode(); } } else if (reportType == reportTypeExpandProperty) { } if (status != HttpServletResponse.SC_OK) { if (debug) { trace("REPORT status " + status); } // Entire request failed. node.setStatus(status); doNode(node); } else if (nodes != null) { Iterator it = nodes.iterator(); while (it.hasNext()) { WebdavNsNode curnode = (WebdavNsNode)it.next(); doNode(curnode); } } closeTag(WebdavTags.multistatus); flush(); }
1,118,546
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else{ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray.length<1){ encryptedClassName = "6975"; } else{ encryptedClassName = urlArray[0]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else{ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray.length<1){ Class defaultClass = Class.forName("com.idega.workspace.WorkspaceLoginPage"); encryptedClassName = IWMainApplication.getEncryptedClassName(defaultClass); } else{ encryptedClassName = urlArray[0]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
1,118,547
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else{ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray.length<1){ encryptedClassName = "6975"; } else{ encryptedClassName = urlArray[0]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
private Class getDescriptorClassNameForViewId(String viewId) throws ClassNotFoundException{ String encryptedClassName = null; //if(viewId.startsWith("/window")){ // encryptedClassName = viewId.substring(11,viewId.length()); //} //else if(urlArray.length==1){ String[] urlArray= StringHandler.breakDownURL(viewId); if(urlArray.length<1){ encryptedClassName = "6975"; } else if(urlArray.length==1){ encryptedClassName = urlArray[0]; } //String encryptedClassName=urlArray[1]; //} String realClassName = IWMainApplication.decryptClassName(encryptedClassName); return Class.forName(realClassName); }
1,118,548
public PageWrapper(UIComponent child){ if(child instanceof com.idega.presentation.Page){ this.child=child; } else{ this.child = new com.idega.presentation.Page(); child.getChildren().add(child); } }
public PageWrapper(UIComponent child){ if(child instanceof com.idega.presentation.Page){ this.child=child; } else{ this.child = new com.idega.presentation.Page(); this.child.getChildren().add(child); } }
1,118,550
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { AffineTransform insetMove = AffineTransform.getTranslateInstance(x, y); copy.transform(insetMove); FontMetrics fm = copy.getFontMetrics(); copy.drawString(title, left+(width-left - right - fm.stringWidth(title))/2, (height-bottom/2)+(fm.getAscent())/2); } finally { copy.dispose(); } } }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { try { AffineTransform insetMove = AffineTransform.getTranslateInstance(x, y); copy.transform(insetMove); FontMetrics fm = copy.getFontMetrics(); copy.drawString(title, left+(width-left - right - fm.stringWidth(title))/2, (height-bottom/2)+(fm.getAscent())/2); } finally { copy.dispose(); } } }
1,118,551
public ATNil meta_addField(ATField field) throws NATException { return this.meta_defineField(field.getName(), field.getValue()); }
public ATNil meta_addField(ATField field) throws NATException { return this.meta_defineField(field.getName(), field.getFieldValue()); }
1,118,552
public boolean mouseClicked(MouseEvent e){ System.out.println("mouseClicked"); synchronized(circles){ Iterator it = circles.iterator(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ System.out.println("Selection of event " + current.getEvent()); int rowToSelect = tableModel.getRowForEvent(current.getEvent()); if (rowToSelect != -1){ selectionModel.setSelectionInterval(rowToSelect, rowToSelect); } return true; } } } return false; }
public boolean mouseClicked(MouseEvent e){ synchronized(circles){ Iterator it = circles.iterator(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ System.out.println("Selection of event " + current.getEvent()); int rowToSelect = tableModel.getRowForEvent(current.getEvent()); if (rowToSelect != -1){ selectionModel.setSelectionInterval(rowToSelect, rowToSelect); } return true; } } } return false; }
1,118,553
public boolean mouseClicked(MouseEvent e){ System.out.println("mouseClicked"); synchronized(circles){ Iterator it = circles.iterator(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ System.out.println("Selection of event " + current.getEvent()); int rowToSelect = tableModel.getRowForEvent(current.getEvent()); if (rowToSelect != -1){ selectionModel.setSelectionInterval(rowToSelect, rowToSelect); } return true; } } } return false; }
public boolean mouseClicked(MouseEvent e){ System.out.println("mouseClicked"); synchronized(circles){ Iterator it = circles.iterator(); while(it.hasNext()){ OMEvent current = (OMEvent)it.next(); if(current.getBigCircle().contains(e.getX(), e.getY())){ int rowToSelect = tableModel.getRowForEvent(current.getEvent()); if (rowToSelect != -1){ selectionModel.setSelectionInterval(rowToSelect, rowToSelect); } return true; } } } return false; }
1,118,554
private void addModule(final ModuleContainer module) { if (!module.isPanel() && !module.isConfigurable()) { return; } String name = module.getName(); if (name == null || name.length() == 0) { name = "Untitled"; } JMenu m = new JMenu(name); m.setMnemonic(name.charAt(0)); if (module.isPanel()) { JMenuItem i = new JMenuItem("New instance"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show("Module could not be instantiated", exc); } } }); m.add(i); } if (module.isConfigurable()) { JMenuItem i = new JMenuItem("Configure"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { IPanel config = ModuleConfigFactory.newInstance(module); addTab(config); } catch (Exception exc) { ExceptionDialog.show("Module configuration could not " + "be started", exc); } } }); m.add(i); } if (module.getInformationResource() != null) { JMenuItem i = new JMenuItem("Info"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInformationResource(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } } }); m.add(i); } add(m, getMenuCount() - 1); table.put(module, m); }
private void addModule(final ModuleContainer module) { if (!module.isPanel() && !module.isConfigurable()) { return; } String name = module.getName(); if (name == null || name.length() == 0) { name = "Untitled"; } JMenu m = new JMenu(name); m.setMnemonic(name.charAt(0)); if (module.isPanel()) { JMenuItem i = new JMenuItem("New instance"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show("Module could not be instantiated", exc); } } }); m.add(i); } if (module.isConfigurable()) { JMenuItem i = new JMenuItem("Configure"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { IPanel config = ModuleConfigFactory.newInstance(module); addTab(config); } catch (Exception exc) { ExceptionDialog.show("Module configuration could not " + "be started", exc); } } }); m.add(i); } if (module.getInfoURL() != null) { JMenuItem i = new JMenuItem("Info"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInformationResource(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } } }); m.add(i); } add(m, getMenuCount() - 1); table.put(module, m); }
1,118,555
private void addModule(final ModuleContainer module) { if (!module.isPanel() && !module.isConfigurable()) { return; } String name = module.getName(); if (name == null || name.length() == 0) { name = "Untitled"; } JMenu m = new JMenu(name); m.setMnemonic(name.charAt(0)); if (module.isPanel()) { JMenuItem i = new JMenuItem("New instance"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show("Module could not be instantiated", exc); } } }); m.add(i); } if (module.isConfigurable()) { JMenuItem i = new JMenuItem("Configure"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { IPanel config = ModuleConfigFactory.newInstance(module); addTab(config); } catch (Exception exc) { ExceptionDialog.show("Module configuration could not " + "be started", exc); } } }); m.add(i); } if (module.getInformationResource() != null) { JMenuItem i = new JMenuItem("Info"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInformationResource(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } } }); m.add(i); } add(m, getMenuCount() - 1); table.put(module, m); }
private void addModule(final ModuleContainer module) { if (!module.isPanel() && !module.isConfigurable()) { return; } String name = module.getName(); if (name == null || name.length() == 0) { name = "Untitled"; } JMenu m = new JMenu(name); m.setMnemonic(name.charAt(0)); if (module.isPanel()) { JMenuItem i = new JMenuItem("New instance"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { ModuleFactory.newInstance(module); } catch (Exception exc) { ExceptionDialog.show("Module could not be instantiated", exc); } } }); m.add(i); } if (module.isConfigurable()) { JMenuItem i = new JMenuItem("Configure"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { IPanel config = ModuleConfigFactory.newInstance(module); addTab(config); } catch (Exception exc) { ExceptionDialog.show("Module configuration could not " + "be started", exc); } } }); m.add(i); } if (module.getInformationResource() != null) { JMenuItem i = new JMenuItem("Info"); i.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInfoURL(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } } }); m.add(i); } add(m, getMenuCount() - 1); table.put(module, m); }
1,118,556
public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInformationResource(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } }
public void actionPerformed(ActionEvent arg0) { try { URL url = module.getInfoURL(); HTMLBrowser browser = new HTMLBrowser(url) { public String getTitle() { return module.getName() +" Info"; } }; addTab(browser); } catch (Exception exc) { ExceptionDialog.show("Module information could not " + "be started", exc); } }
1,118,558
private LicensePanel() { super(new GridLayout(1, 1)); final JLabel label = new JLabel(Messages.getString("LicensePanel.LOADING")); //$NON-NLS-1$ add(label); new Thread() { public void run() { JTextComponent copyright = createCopyrightPanel(); HTMLBrowser license = new HTMLBrowser(LICENSE_HTML); remove(label); JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT); splitPane.add(new JScrollPane(copyright)); splitPane.add(new JScrollPane(license)); int location = (int)((double)getHeight() * 0.4); splitPane.setDividerLocation((location > 0) ? location : 100); add(splitPane); repaint(); revalidate(); } }.start(); }
private LicensePanel() { super(new GridLayout(1, 1)); final JLabel label = new JLabel(Messages.getString("LicensePanel.LOADING")); //$NON-NLS-1$ add(label); new Thread() { public void run() { JTextComponent copyright = createCopyrightPanel(); HTMLBrowser license = new HTMLBrowser(LICENSE_HTML); remove(label); JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT); splitPane.add(new JScrollPane(copyright)); splitPane.add(license); int location = (int)((double)getHeight() * 0.4); splitPane.setDividerLocation((location > 0) ? location : 100); add(splitPane); repaint(); revalidate(); } }.start(); }
1,118,560
public Object clone() { return new BwCalendar((BwUser)getOwner().clone(), getPublick(), (BwUser)getCreator().clone(), getAccess(), getName(), getPath(), getSummary(), getDescription(), getMailListId(), getCalendarCollection(), getCalendar(), getChildren(), getCalType()); }
public Object clone() { BwCalendar cal = new BwCalendar((BwUser)getOwner().clone(), getPublick(), (BwUser)getCreator().clone(), getAccess(), getName(), getPath(), getSummary(), getDescription(), getMailListId(), getCalendarCollection(), getCalendar(), getChildren(), getCalType()); }
1,118,561
public BwCalendar shallowClone() { return new BwCalendar((BwUser)getOwner().clone(), getPublick(), (BwUser)getCreator().clone(), getAccess(), getName(), getPath(), getSummary(), getDescription(), getMailListId(), getCalendarCollection(), getCalendar(), null, getCalType()); }
public BwCalendar shallowClone() { BwCalendar cal = new BwCalendar((BwUser)getOwner().clone(), getPublick(), (BwUser)getCreator().clone(), getAccess(), getName(), getPath(), getSummary(), getDescription(), getMailListId(), getCalendarCollection(), getCalendar(), null, getCalType()); }
1,118,563
public static int insertAll(Station sta, PreparedStatement stmt, int index, JDBCNetwork netTable, JDBCLocation locTable, JDBCTime time) throws SQLException { index = insertId(sta.get_id(), stmt, index, netTable, time); index = insertOnlyStation(sta, stmt, index, locTable, time); return index; }
public static int insertAll(Station sta, PreparedStatement stmt, int index, JDBCNetwork netTable, JDBCLocation locTable, JDBCTime time) throws SQLException { index = insertId(sta.get_id(), stmt, index, netTable, time); index = insertOnlyStation(sta, stmt, index, netTable, locTable, time); return index; }
1,118,565
public static int insertOnlyStation(Station sta, PreparedStatement stmt, int index, JDBCLocation locTable, JDBCTime time) throws SQLException { stmt.setInt(index++, time.put(sta.effective_time.end_time)); stmt.setString(index++, sta.name); stmt.setString(index++, sta.operator); stmt.setString(index++, sta.description); stmt.setInt(index++, locTable.put(sta.my_location)); return index; }
public static int insertOnlyStation(Station sta, PreparedStatement stmt, int index, JDBCNetwork netTable, JDBCLocation locTable, JDBCTime time) throws SQLException { stmt.setInt(index++, time.put(sta.effective_time.end_time)); stmt.setString(index++, sta.name); stmt.setString(index++, sta.operator); stmt.setString(index++, sta.description); stmt.setInt(index++, locTable.put(sta.my_location)); return index; }
1,118,566
public int put(Station sta) throws SQLException { int dbid; try { dbid = getDBId(sta.get_id()); // No NotFound exception, so already added the id // now check if the attrs are added getIfNameExists.setInt(1, dbid); ResultSet rs = getIfNameExists.executeQuery(); if (!rs.next()) {//No name, so we need to add the attr part int index = insertOnlyStation(sta, updateSta, 1, locTable, time); updateSta.setInt(index, dbid); updateSta.executeUpdate(); } } catch (NotFound notFound) { // no id found so ok to add the whole thing dbid = seq.next(); putAll.setInt(1, dbid); insertAll(sta, putAll, 2, netTable, locTable, time); dbIdsToStations.put(new Integer(dbid), sta); putAll.executeUpdate(); } return dbid; }
public int put(Station sta) throws SQLException { int dbid; try { dbid = getDBId(sta.get_id()); // No NotFound exception, so already added the id // now check if the attrs are added getIfNameExists.setInt(1, dbid); ResultSet rs = getIfNameExists.executeQuery(); if (!rs.next()) {//No name, so we need to add the attr part int index = insertOnlyStation(sta, updateSta, 1, netTable, locTable, time); updateSta.setInt(index, dbid); updateSta.executeUpdate(); } } catch (NotFound notFound) { // no id found so ok to add the whole thing dbid = seq.next(); putAll.setInt(1, dbid); insertAll(sta, putAll, 2, netTable, locTable, time); dbIdsToStations.put(new Integer(dbid), sta); putAll.executeUpdate(); } return dbid; }
1,118,568
protected synchronized Runnable getFromQueue() throws InterruptedException { while (queue.isEmpty()) { wait(); } return (Runnable)queue.removeLast(); }
private synchronized Runnable getFromQueue() throws InterruptedException { while (queue.isEmpty()) { wait(); } return (Runnable)queue.removeLast(); }
1,118,570
private CalEnv getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; }
private CalEnvI getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; }
1,118,572
private CalEnv getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; }
private CalEnv getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnvI env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; }
1,118,573
private CalEnv getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = new CalEnv(envPrefix, debug); frm.assignEnv(env); return env; }
private CalEnv getEnv(HttpServletRequest request, BwActionFormBase frm) throws Throwable { CalEnv env = frm.getEnv(); if (env != null) { return env; } HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } String envPrefix = "org.bedework.app." + appName + "."; env = CalEnvFactory.getEnv(envPrefix, debug); frm.assignEnv(env); return env; }
1,118,574
public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm; String adminUserId = null; CalEnv env = getEnv(request, form); setConfig(request, form); setSessionAttr(request, "org.bedework.logprefix", form.retrieveConfig().getLogPrefix()); boolean guestMode = env.getAppBoolProperty("guestmode"); if (guestMode) { form.assignCurrentUser(null); } else { adminUserId = form.getCurrentAdminUser(); if (adminUserId == null) { adminUserId = form.getCurrentUser(); } } if (getPublicAdmin(form)) { /** We may want to masquerade as a different user */ String temp = getReqPar(request, "adminUserId"); if (temp != null) { adminUserId = temp; } } BwSession s = getState(request, form, messages, adminUserId, getPublicAdmin(form)); if (s == null) { /* An error should have been emitted. The superclass will return an error forward.*/ return forward; } form.setSession(s); form.setGuest(s.isGuest()); if (form.getGuest()) { // force public view on - off by default form.setPublicView(true); } String appBase = form.getAppBase(); if (appBase != null) { // Embed in request for pages that cannot access the form (loggedOut) request.setAttribute("org.bedework.action.appbase", appBase); } if (form.getNewSession() && !getPublicAdmin(form)) { // Set to default view setView(null, form); } /* Set up ready for the action */ int temp = actionSetup(request, response, form); if (temp != forwardNoAction) { return forwards[temp]; } if (form.getNewSession()) { // Set the default skin BwPreferences prefs = form.fetchSvci().getUserPrefs(); String skinName = prefs.getSkinName(); form.getPresentationState().setSkinName(skinName); form.getPresentationState().setSkinNameSticky(true); } /* see if we got cancelled */ String reqpar = request.getParameter("cancelled"); if (reqpar != null) { /** Set the objects to null so we get new ones. */ initFields(form); form.getMsg().emit("org.bedework.client.message.cancelled"); return "cancelled"; } if (!getPublicAdmin(form)) { /* Set up or refresh frequently used information, */ getSubscriptions(form); } try { forward = doAction(request, response, s, form); if (!getPublicAdmin(form)) { /* See if we need to refresh */ checkRefresh(form); } } catch (CalFacadeAccessException cfae) { form.getErr().emit("org.bedework.client.error.noaccess", "for that action"); forward="noAccess"; } catch (Throwable t) { form.getErr().emit("org.bedework.client.error.exc", t.getMessage()); form.getErr().emit(t); } return forward; }
public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm; String adminUserId = null; CalEnvI env = getEnv(request, form); setConfig(request, form); setSessionAttr(request, "org.bedework.logprefix", form.retrieveConfig().getLogPrefix()); boolean guestMode = env.getAppBoolProperty("guestmode"); if (guestMode) { form.assignCurrentUser(null); } else { adminUserId = form.getCurrentAdminUser(); if (adminUserId == null) { adminUserId = form.getCurrentUser(); } } if (getPublicAdmin(form)) { /** We may want to masquerade as a different user */ String temp = getReqPar(request, "adminUserId"); if (temp != null) { adminUserId = temp; } } BwSession s = getState(request, form, messages, adminUserId, getPublicAdmin(form)); if (s == null) { /* An error should have been emitted. The superclass will return an error forward.*/ return forward; } form.setSession(s); form.setGuest(s.isGuest()); if (form.getGuest()) { // force public view on - off by default form.setPublicView(true); } String appBase = form.getAppBase(); if (appBase != null) { // Embed in request for pages that cannot access the form (loggedOut) request.setAttribute("org.bedework.action.appbase", appBase); } if (form.getNewSession() && !getPublicAdmin(form)) { // Set to default view setView(null, form); } /* Set up ready for the action */ int temp = actionSetup(request, response, form); if (temp != forwardNoAction) { return forwards[temp]; } if (form.getNewSession()) { // Set the default skin BwPreferences prefs = form.fetchSvci().getUserPrefs(); String skinName = prefs.getSkinName(); form.getPresentationState().setSkinName(skinName); form.getPresentationState().setSkinNameSticky(true); } /* see if we got cancelled */ String reqpar = request.getParameter("cancelled"); if (reqpar != null) { /** Set the objects to null so we get new ones. */ initFields(form); form.getMsg().emit("org.bedework.client.message.cancelled"); return "cancelled"; } if (!getPublicAdmin(form)) { /* Set up or refresh frequently used information, */ getSubscriptions(form); } try { forward = doAction(request, response, s, form); if (!getPublicAdmin(form)) { /* See if we need to refresh */ checkRefresh(form); } } catch (CalFacadeAccessException cfae) { form.getErr().emit("org.bedework.client.error.noaccess", "for that action"); forward="noAccess"; } catch (Throwable t) { form.getErr().emit("org.bedework.client.error.exc", t.getMessage()); form.getErr().emit(t); } return forward; }
1,118,575