rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
List preliminaryResults = new ArrayList(); | private void queryDatabaseForSeismogram(List resultCollector, RequestFilter request, boolean returnSeismograms, boolean ignoreNetworkTimes) throws SQLException { // Retr... | |
preliminaryResults.add(seis); | resultCollector.add(seis); | private void queryDatabaseForSeismogram(List resultCollector, RequestFilter request, boolean returnSeismograms, boolean ignoreNetworkTimes) throws SQLException { // Retr... |
LocalSeismogramImpl[] seis = (LocalSeismogramImpl[])preliminaryResults.toArray(new LocalSeismogramImpl[0]); for(int j = 0; j < seis.length; j++) { resultCollector.add(seis[j]); } | logger.debug("After adding " + seismogramFile + " there are " + resultCollector.size() + " items"); | private void queryDatabaseForSeismogram(List resultCollector, RequestFilter request, boolean returnSeismograms, boolean ignoreNetworkTimes) throws SQLException { // Retr... |
resultCollector.add(cutter.apply(req)); | req = cutter.apply(req); if(req != null) { resultCollector.add(req); } | private void queryDatabaseForSeismogram(List resultCollector, RequestFilter request, boolean returnSeismograms, boolean ignoreNetworkTimes) throws SQLException { // Retr... |
public EncodedCut(RequestFilter rf) { super(rf); | public EncodedCut(MicroSecondDate begin, MicroSecondDate end) { super(begin, end); | public EncodedCut(RequestFilter rf) { super(rf); } |
return new LocalSeismogramImpl(seis, ds); | LocalSeismogramImpl outSeis = new LocalSeismogramImpl(seis, ds); outSeis.begin_time = seis.getBeginTime() .add((TimeInterval)seis.getSampling() .getPeriod() .multiplyBy(firstUsedPoint)) .getFissuresTime(); outSeis.num_points = pointsInNewSeis; return outSeis; | public LocalSeismogramImpl apply(LocalSeismogramImpl seis) throws FissuresException { if(!overlaps(seis)) { return null; } if(!seis.is_encoded()) { return super.apply(seis); } int beginIndex = getBeginIndex(seis); int endIndex = getEndIndex(... |
public Document createDocument(DataSet dataset, File dataDirectory) | public Element createDocument(DataSet dataset, File dataDirectory) | public Document createDocument(DataSet dataset, File dataDirectory) throws ParserConfigurationException, MalformedURLException { DocumentBuilder docBuilder = XMLDataSet.getDocumentBuilder(); Document doc = docBuilder.newDocument(); Element element = doc.createElement("dataset"); i... |
doc.appendChild(element); return doc; | return element; | public Document createDocument(DataSet dataset, File dataDirectory) throws ParserConfigurationException, MalformedURLException { DocumentBuilder docBuilder = XMLDataSet.getDocumentBuilder(); Document doc = docBuilder.newDocument(); Element element = doc.createElement("dataset"); i... |
Attr id = doc.createAttribute("datasetid"); id.setValue(dataset.getId()); element.appendChild(id); | element.setAttribute("datasetid", dataset.getId()); | public void insert(Element element, DataSet dataset, File directory) throws MalformedURLException { Document doc = element.getOwnerDocument(); Attr id = doc.createAttribute("datasetid"); id.setValue(dataset.getId()); element.appendChild(id); element.appendChild(XMLUtil.crea... |
Document doc = createDocument(dataset, saveDirectory); Writer xmlWriter = new Writer(true); | Element doc = createDocument(dataset, saveDirectory); Writer xmlWriter = new Writer(); | public void save(DataSet dataset, File saveDirectory) throws IOException, ParserConfigurationException, MalformedURLException { File dataDir = new File(saveDirectory, "data"); Document doc = createDocument(dataset, saveDirectory); Writer xmlWriter = new Writer(true); BufferedWriter bu... |
logger.debug("Done with save to "+saveDirectory.toString()); | public void save(DataSet dataset, File saveDirectory) throws IOException, ParserConfigurationException, MalformedURLException { File dataDir = new File(saveDirectory, "data"); Document doc = createDocument(dataset, saveDirectory); Writer xmlWriter = new Writer(true); BufferedWriter bu... | |
if (findGroup(group.getAccount()) != null) { throw new CalFacadeException(CalFacadeException.duplicateAdminGroup); } | public void addGroup(BwGroup group) throws CalFacadeException { getSess().save(group); } | |
if (iHandler != null && !(iHandler instanceof HiddenInputHandler)) { | if (iHandler != null && !isHidden) { | 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 ... |
else { | else if (!isHidden){ | 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 ... |
_parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); | if (!isHidden) { _parameterMap.put(_prmLablePrefix + clDesc.getName(), clDesc.getLocalizedName(currentLocale) + ":"); } | 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 ... |
Iterator e = globalFilters.iterator(); while(e.hasNext()){ applyFilter((ColoredFilter)e.next()); } } | public void add(DataSetSeismogram[] seismos){ registrar.add(seismos); for(int i = 0; i < seismos.length; i++){ if(seismos[i] ! = null){ seismograms.add(seismos[i]); SeismogramShape newPlotter; if (autoColor) { newPlotter = new SeismogramShape(seismos[i], seisColors[seisCount%seisColors.length]); }else... | |
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.PropertyEditPart.VISUAL_ID); | semanticHint = UMLVisualIDRegistry.getType(PropertyEditPart.VISUAL_ID); | protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) { if (semanticHint == null) { semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.PropertyEditPart.VISUAL_ID); view.setType(semanticHint); }... |
form.getErr().emit("org.bedework.error.nosuchevent", id); | form.getErr().emit("org.bedework.client.error.nosuchevent", id); | public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } int id = form.getEventId(); if (id < 0) { // Do nothing form.getErr().emit("org.bedework.error.nosuchevent", id); return "doNoth... |
form.getMsg().emit("org.bedework.message.added.eventrefs", 1); | form.getMsg().emit("org.bedework.client.message.added.eventrefs", 1); | public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } int id = form.getEventId(); if (id < 0) { // Do nothing form.getErr().emit("org.bedework.error.nosuchevent", id); return "doNoth... |
if (!((this.queryAttributes != null && seed.keySet().containsAll(this.queryAttributes)) || (this.queryAttributes == null && seed.containsKey(this.getDefaultAttributeName())))) { | args = new Object[this.queryAttributes.size()]; for (int index = 0; index < args.length; index++) { final String attrName = (String) this.queryAttributes.get(index); args[index] = seed.get(attrName); } } else if (this.queryAttributes == null && seed.containsKey(this.getDefaultAttributeName())) { if (this.log.isDebugEn... | public final Map getUserAttributes(final Map seed) { // Checks to make sure the argument & state is valid if (seed == null) throw new IllegalArgumentException("The query seed Map cannot be null."); //Ensure the data needed to run the query is avalable if (!((this.queryAttribut... |
} final Object[] args = new Object[this.queryAttributes.size()]; for (int index = 0; index < args.length; index++) { final String attrName = (String) this.queryAttributes.get(index); args[index] = seed.get(attrName); | public final Map getUserAttributes(final Map seed) { // Checks to make sure the argument & state is valid if (seed == null) throw new IllegalArgumentException("The query seed Map cannot be null."); //Ensure the data needed to run the query is avalable if (!((this.queryAttribut... | |
form.getErr().emit("org.bedework.error.missingsubscriptionid"); | form.getErr().emit("org.bedework.client.error.missingsubscriptionid"); | protected EventInfo findEvent(HttpServletRequest request, BwActionFormBase form) throws Throwable { EventInfo ev = null; /* XXX temp set up subscription here - we'll pass it to svci later */ int subid = getIntReqPar(request, "subid", -1); if (subid < 0) { form.getEr... |
form.getErr().emit("org.bedework.error.nosuchevent", guid); | form.getErr().emit("org.bedework.client.error.nosuchevent", guid); | protected EventInfo findEvent(HttpServletRequest request, BwActionFormBase form) throws Throwable { EventInfo ev = null; /* XXX temp set up subscription here - we'll pass it to svci later */ int subid = getIntReqPar(request, "subid", -1); if (subid < 0) { form.getEr... |
form.getErr().emit("org.bedework.error.exc", t.getMessage()); | form.getErr().emit("org.bedework.client.error.exc", t.getMessage()); | public synchronized BwSession getState(HttpServletRequest request, BwActionFormBase form, MessageResources messages, String adminUserId, boolean admin) throws... |
form.assignAuthorisedUser(ua.getUsertype() != UserAuth.noPrivileges); if (debug) { try { debugMsg("UserAuth says that current user has the type: " + ua.getUsertype()); } catch (Throwable t) { form.getErr().emit("org.bedework.error.exc", t.getMessage()); form.getErr().emit(t); return null; } } | public synchronized BwSession getState(HttpServletRequest request, BwActionFormBase form, MessageResources messages, String adminUserId, boolean admin) throws... | |
form.getMsg().emit("org.bedework.message.cancelled"); | form.getMsg().emit("org.bedework.client.message.cancelled"); | public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm... |
form.getErr().emit("org.bedework.error.noaccess", "for that action"); | form.getErr().emit("org.bedework.client.error.noaccess", "for that action"); | public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm... |
form.getErr().emit("org.bedework.error.exc", t.getMessage()); | form.getErr().emit("org.bedework.client.error.exc", t.getMessage()); | public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm... |
Vector v = new Vector(); | ArrayList al = new ArrayList(); | public Iterator getChildren(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); Vector v = new Vector(); if (!uwnode.getCollection()) { // Don't think we should have been called return v.iterator(); } if (debug) { debugMsg(... |
return v.iterator(); | return al.iterator(); | public Iterator getChildren(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); Vector v = new Vector(); if (!uwnode.getCollection()) { // Don't think we should have been called return v.iterator(); } if (debug) { debugMsg(... |
v.addElement(new CaldavCalNode(wi, svci, trans, debug)); | al.add(new CaldavCalNode(wi, svci, trans, debug)); | public Iterator getChildren(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); Vector v = new Vector(); if (!uwnode.getCollection()) { // Don't think we should have been called return v.iterator(); } if (debug) { debugMsg(... |
v.addElement(cnode); | al.add(cnode); | public Iterator getChildren(WebdavNsNode node) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(node); Vector v = new Vector(); if (!uwnode.getCollection()) { // Don't think we should have been called return v.iterator(); } if (debug) { debugMsg(... |
Collection nodes = new Vector(); | Collection nodes = new ArrayList(); | public Collection getFreeBusy(WebdavNsNode wdnode, FreeBusyQuery freeBusy) throws WebdavIntfException { try { CaldavBwNode uwnode = getBwnode(wdnode); if (!(uwnode instanceof CaldavCalNode)) { throw WebdavIntfException.badRequest(); } CaldavCalNode cnode = ... |
String contextRoot = JspUtil.getContext(req); if ((contextRoot != null) && (contextRoot.startsWith("/"))) { contextRoot = contextRoot.substring(1); } if ((contextRoot == null) || (contextRoot.length() == 0)) { contextRoot = "root"; } | public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); String contextRoot = JspUtil.getContext(req); if ((contextRoot != null) && (conte... | |
envPrefix = CalEnv.getProperty("org.bedework.envprefix." + contextRoot); | HttpSession session = req.getSession(); ServletContext sc = session.getServletContext(); String appName = sc.getInitParameter("bwappname"); if ((appName == null) || (appName.length() == 0)) { appName = "unknown-app-name"; } envPrefix = "org.bedework.app." + appName + "."; | public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); String contextRoot = JspUtil.getContext(req); if ((contextRoot != null) && (conte... |
Collection evnodes = new Vector(); | Collection evnodes = new ArrayList(); | public Collection query(WebdavNsNode wdnode, int retrieveRecur, Filter fltr) throws WebdavIntfException { CaldavBwNode node = getBwnode(wdnode); CalSvcI svci = getSvci(); Collection events; try { events = fltr.query(node, retrieveRecur, svci); } catch (WebdavException wde)... |
private String chooseOutputFile() { final JFileChooser fc = new JFileChooser(); String extensions[] = {"pdf"}; | private String chooseOutputFile(String extension) { final JFileChooser fc; if (lastSaveLocation != null) { fc = new JFileChooser(lastSaveLocation); } else { fc = new JFileChooser(); } String extensions[] = new String[1]; extensions[0] = extension; | private String chooseOutputFile() { final JFileChooser fc = new JFileChooser(); String extensions[] = {"pdf"}; fc.setFileFilter(new FileNameFilter(extensions)); fc.setDialogTitle("Save as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal = fc.showSaveDialog(d... |
fc.setDialogTitle("Save as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal = fc.showSaveDialog(display); | fc.setDialogTitle("Save to File"); fc.setSelectedFile(new File("output."+extension)); int returnVal = fc.showSaveDialog(null); | private String chooseOutputFile() { final JFileChooser fc = new JFileChooser(); String extensions[] = {"pdf"}; fc.setFileFilter(new FileNameFilter(extensions)); fc.setDialogTitle("Save as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal = fc.showSaveDialog(d... |
return fc.getSelectedFile().getAbsolutePath(); | File file = fc.getSelectedFile(); lastSaveLocation = file.getParentFile(); String newExtension = file.getName().substring(file.getName().lastIndexOf(".")+1); System.out.println("extension old="+file.getName()+" ext="+extension+" new="+newExtension); if ( ! newExtension.equalsIgnoreCase(extension)) { file = new File(f... | private String chooseOutputFile() { final JFileChooser fc = new JFileChooser(); String extensions[] = {"pdf"}; fc.setFileFilter(new FileNameFilter(extensions)); fc.setDialogTitle("Save as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal = fc.showSaveDialog(d... |
String tmp = chooseOutputFile(); | String tmp = chooseOutputFile("pdf"); | public void createPDF() { if (display != null) { if (display instanceof VerticalSeismogramDisplay) { basicDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (basicDisplays == null) return; if (basicDisplays.size() == 0)... |
"The number of seismograms selected must less than " + (numOfSeis + 1), | "The number of seismograms selected can be at most " + numOfSeis, | private void getImagesPerPage(int numSeis){ final int numOfSeis = numSeis; final JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new BorderLayout()); dialog.setTitle("Printing Options"); dialog.setModal(true); JLabel information = new JLabel("Seismograms p... |
"The number of seismograms selected must less than " + (numOfSeis + 1), | "The number of seismograms selected can be at most " + numOfSeis, | public void actionPerformed(ActionEvent e){ int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, ... |
this.events = new Vector(); | this.events = new ArrayList(); | public FormattedEvents(Collection events, CalendarInfo calInfo, CalTimezones ctz) { if (events == null) { this.events = new Vector(); } else { this.events = events; } this.calInfo = calInfo; this.ctz = ctz; } |
seis.setProperty(seisNameKey, name); | seis.setName(name); | public void addSeismogram(LocalSeismogramImpl seis, AuditInfo[] audit) { seismogramNameCache = null; // Note this does not set the xlink, as the seis has not been saved anywhere yet. Document doc = config.getOwnerDocument(); Element localSeismogram = doc.createEleme... |
seis.setProperty(seisNameKey, name); | seis.setName(name); | public void addSeismogramRef(LocalSeismogramImpl seis, URL seisURL, String name, Property[] props, ParameterRef[] parm_ids, AuditInfo[] audit) { seismogramNameCache = null; S... |
list.setCellRenderer(new ListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { return new JLabel(value.toString()); } }); try { Properties props = new Properties(ModuleContainer.getIdByClass(AudioPlayer.class)); props.load();... | public MainPanel(final AudioPlayer owner) { super(new BorderLayout()); this.owner = owner; try { dev = FactoryRegistry.systemRegistry().createAudioDevice(); } catch (Exception exc) { throw new RuntimeException(exc); } playList = new DefaultListModel(); final JList list = new JList(playList); JButton ... | |
public void next() { | public synchronized void next() { | public void next() { pause(); playingIndex--; play(); } |
playingIndex--; | playingIndex++; | public void next() { pause(); playingIndex--; play(); } |
public void pause() { | public synchronized void pause() { | public void pause() { if (player != null) { player.close(); try { stream.close(); } catch (Exception exc) { exc.printStackTrace(); } } } |
try { stream.close(); } catch (Exception exc) { exc.printStackTrace(); } | stream = null; player = null; | public void pause() { if (player != null) { player.close(); try { stream.close(); } catch (Exception exc) { exc.printStackTrace(); } } } |
public void play() { | public synchronized void play() { | public void play() { try { int playListSize = playList.size(); if (playListSize == 0) { return; } if (playingIndex == -1) { playingIndex = 0; } if (playingIndex >= playListSize) { playingIndex %= playListSize; } File file = (File)playList.get(playingIndex); stream = new FileInputStream(f... |
if (playingIndex == -1) { | if (playingIndex < 0) { | public void play() { try { int playListSize = playList.size(); if (playListSize == 0) { return; } if (playingIndex == -1) { playingIndex = 0; } if (playingIndex >= playListSize) { playingIndex %= playListSize; } File file = (File)playList.get(playingIndex); stream = new FileInputStream(f... |
player.play(); | Thread t = new Thread() { public void run() { try { player.play(); if (player.isComplete()) { next(); } } catch (Exception exc) { exc.printStackTrace(); ExceptionDialog.show(exc); } } }; t.setDaemon(true); t.start(); | public void play() { try { int playListSize = playList.size(); if (playListSize == 0) { return; } if (playingIndex == -1) { playingIndex = 0; } if (playingIndex >= playListSize) { playingIndex %= playListSize; } File file = (File)playList.get(playingIndex); stream = new FileInputStream(f... |
public void prev() { | public synchronized void prev() { | public void prev() { pause(); playingIndex++; play(); } |
playingIndex++; | playingIndex--; | public void prev() { pause(); playingIndex++; play(); } |
sess.save(user); | sess.update(user); | public void addUser(BwUser user) throws CalFacadeException { checkOpen(); user.setCategoryAccess(access.getDefaultPersonalAccess()); user.setLocationAccess(access.getDefaultPersonalAccess()); user.setSponsorAccess(access.getDefaultPersonalAccess()); user.setQuota(getSyspars().getDefaultUserQuota()); ... |
sess.saveOrUpdate(val); | sess.update(val); | private void logon(BwUser val) throws CalFacadeException { checkOpen(); Timestamp now = new Timestamp(System.currentTimeMillis()); val.setLogon(now); val.setLastAccess(now); sess.saveOrUpdate(val); } |
null, | public CalSvcI getSvci() throws WebdavIntfException { if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return svci; } try { svci = new CalSvc(... | |
public BwOwnedDbentity(BwUser owner, boolean publick) { | public BwOwnedDbentity() { | public BwOwnedDbentity(BwUser owner, boolean publick) { super(); this.owner = owner; this.publick = publick; } |
this.owner = owner; this.publick = publick; | public BwOwnedDbentity(BwUser owner, boolean publick) { super(); this.owner = owner; this.publick = publick; } | |
private void addProp(Vector v, QName tag, Object val) { | private void addProp(Collection c, QName tag, Object val) { | private void addProp(Vector v, QName tag, Object val) { if (val != null) { v.addElement(new WebdavProperty(tag, String.valueOf(val))); } } |
v.addElement(new WebdavProperty(tag, String.valueOf(val))); | c.add(new WebdavProperty(tag, String.valueOf(val))); | private void addProp(Vector v, QName tag, Object val) { if (val != null) { v.addElement(new WebdavProperty(tag, String.valueOf(val))); } } |
break; | allHere = false; | public void renderToGraphics(Graphics g, Dimension size) { PRINTING = true; boolean allHere = true; long totalWait = 0; Iterator seisIt = iterator(DrawableSeismogram.class); while(seisIt.hasNext()){ DrawableSeismogram cur = (DrawableSeismogram)seisIt.next(); ... |
logger.debug("Rendering to graphics after waiting " + totalWait + " millis for data to arrive"); allHere = true; | public void renderToGraphics(Graphics g, Dimension size) { PRINTING = true; boolean allHere = true; long totalWait = 0; Iterator seisIt = iterator(DrawableSeismogram.class); while(seisIt.hasNext()){ DrawableSeismogram cur = (DrawableSeismogram)seisIt.next(); ... | |
logger.debug("Rendering to graphics after waiting " + totalWait + " millis for data to arrive"); | public void renderToGraphics(Graphics g, Dimension size) { PRINTING = true; boolean allHere = true; long totalWait = 0; Iterator seisIt = iterator(DrawableSeismogram.class); while(seisIt.hasNext()){ DrawableSeismogram cur = (DrawableSeismogram)seisIt.next(); ... | |
public void testPut() throws CodecException { | public void testPut() throws CodecException, SQLException { | public void testPut() throws CodecException { Plottable plottable = createPlottable(); JDBCPlottable jdbcPlot = new JDBCPlottable(ConnMgr.createConnection(), new Properties()); int dbid = jdbcPlot.put(plottable); Plottable out = jdbcPlot.... |
int dbid = jdbcPlot.put(plottable); Plottable out = jdbcPlot.get(dbid); | public void testPut() throws CodecException { Plottable plottable = createPlottable(); JDBCPlottable jdbcPlot = new JDBCPlottable(ConnMgr.createConnection(), new Properties()); int dbid = jdbcPlot.put(plottable); Plottable out = jdbcPlot.... | |
form.setSubscriptions(svc.getSubscriptions()); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.fetch... | |
if (form.getNewSession()) { | if (form.getNewSession() && !getPublicAdmin(form)) { | public String performAction(HttpServletRequest request, HttpServletResponse response, UtilActionForm frm, MessageResources messages) throws Throwable { String forward = "success"; BwActionFormBase form = (BwActionFormBase)frm... |
openHibSess(); hibSave(o); closeHibSess(); | if (false) { openHibSess(); hibSave(o); closeHibSess(); } | public void restoreFilter(BwFilter o) throws Throwable { openHibSess(); hibSave(o); closeHibSess(); } |
if (atName.equals("xmlns") && atValue.equals("") == false) | if ((atName.equals("xmlns") && atValue.equals("")) == false) | private void printInternal(Node node, boolean indentEndMarker) { // is there anything to do? if (node == null) { return; } // JBAS-2117 - Don't skip the DOCUMENT_NODE // if (node instanceof Document) node = ((Document)node).getDocumentElement(); if (wroteXMLDeclaration ==... |
System.out.println("THe e NEW AMPLITUDE is Min = "+getMinHorizontalAmplitude()+ " Max = "+getMaxHorizontalAmplitude()); | public synchronized void addParticleMotionDisplay(DataSetSeismogram hseis, DataSetSeismogram vseis, TimeConfigRegistrar timeRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, String key, boolean horizPlane) { ParticleMotion pa... | |
logger.debug("IN DRAW AZIMUTH"); | public void drawAzimuth(ParticleMotion particleMotion, Graphics2D graphics2D) { if(!particleMotion.isHorizontalPlane()) return; Shape sector = getSectorShape(); graphics2D.setColor(Color.blue); graphics2D.fill(sector); graphics2D.draw(sector); graphics2D.setStroke(new BasicStroke(2.0f)); graphi... | |
logger.debug("IN DRAW LABELS"); | public void drawLabels(ParticleMotion particleMotion, Graphics2D graphics2D) { Color color = new Color(0, 0, 0, 128); graphics2D.setColor(color); java.awt.Dimension dimension = getSize(); float fontSize = dimension.width / 20; if(fontSize < 4) fontSize = 4; else if(fontSize > 32) fontSize = 32; Font f... | |
if(!recalculateValues) { recalculateValues = false; System.out.println(" DRAWING THE PARTICLE MOTION WITHOUT RECALCULATING THE VALUES"); ((Graphics2D)g).draw(particleMotion.getShape()); return; } logger.debug("IN DRAW PARTICLE MOTION"); | public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.hseis.getSeismogram(); LocalSeismogramImpl vseis = particleMotion.vseis.getSeismogram(); AmpConfigRegistrar vAmpCo... | |
int[][] hPixels = SimplePlotUtil.compressYvalues(hseis, | int[][] hPixels = SimplePlotUtil.getPlottableSimple(hseis, hunitRangeImpl, microSecondTimeRange, dimension); /*SimplePlotUtil.compressYvalues(hseis, | public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.hseis.getSeismogram(); LocalSeismogramImpl vseis = particleMotion.vseis.getSeismogram(); AmpConfigRegistrar vAmpCo... |
*/ | public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.hseis.getSeismogram(); LocalSeismogramImpl vseis = particleMotion.vseis.getSeismogram(); AmpConfigRegistrar vAmpCo... | |
int[][] vPixels = SimplePlotUtil.compressYvalues(vseis, | int[][] vPixels = SimplePlotUtil.getPlottableSimple(vseis, vunitRangeImpl, microSecondTimeRange, dimension); SimplePlotUtil.flipArray(vPixels[1], dimension.height); Date utilEndTime = Calendar.getInstance().getTime(); System.out.println("The UTIL TIME is ******* "+ (utilEndTime.getTime() - utilStartTime.getTime())... | public void drawParticleMotion(ParticleMotion particleMotion, Graphics g) { Graphics2D graphics2D = (Graphics2D) g; Dimension dimension = super.getSize(); LocalSeismogramImpl hseis = particleMotion.hseis.getSeismogram(); LocalSeismogramImpl vseis = particleMotion.vseis.getSeismogram(); AmpConfigRegistrar vAmpCo... |
for(int counter = 0; counter < len; counter++) { | /*for(int counter = 0; counter < len; counter++) { | public Shape getParticleMotionPath(int[] x, int[] y) { int len = x.length; if(y.length < len) { len = y.length;} GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_EVEN_ODD); if(len != 0) { generalPath.moveTo(x[0], y[0]); } for(int counter = 1; counter < len; counter++) { generalPath.lineTo(x[cou... |
} | }*/ | public Shape getParticleMotionPath(int[] x, int[] y) { int len = x.length; if(y.length < len) { len = y.length;} GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_EVEN_ODD); if(len != 0) { generalPath.moveTo(x[0], y[0]); } for(int counter = 1; counter < len; counter++) { generalPath.lineTo(x[cou... |
logger.debug("IN PAINT COMPONENT"); | public void paintComponent(Graphics g) { // if(setSelected == 1) g.setColor(Color.red); //else if(setSelected == 2) g.setColor(getBackground()); Graphics2D graphics2D = (Graphics2D)g; if(startPoint != null && endPoint != null) { graphics2D.setColor(Color.yellow); //logger.debug("Start Point "+startPoint.... | |
Date endTime = Calendar.getInstance().getTime(); System.out.println("THE TIME TAKEN IS ********** "+ (endTime.getTime() - startTime.getTime())); | public void paintComponent(Graphics g) { // if(setSelected == 1) g.setColor(Color.red); //else if(setSelected == 2) g.setColor(getBackground()); Graphics2D graphics2D = (Graphics2D)g; if(startPoint != null && endPoint != null) { graphics2D.setColor(Color.yellow); //logger.debug("Start Point "+startPoint.... | |
recalculateValues = true; | public void resize() { setSize(super.getSize()); //particleMotionDisplay.resize(); repaint(); } | |
param.setAttributeNS(xlinkNS, "type", "simple"); param.setAttributeNS(xlinkNS, "href", paramURL.toString()); | param.setAttributeNS(xlinkNS, "xlink:type", "simple"); param.setAttributeNS(xlinkNS, "xlink:href", paramURL.toString()); | public void addParameterRef(URL paramURL, String name, AuditInfo[] audit) { Document doc = config.getOwnerDocument(); Element param = doc.createElement("parameterRef"); param.setAttributeNS(xlinkNS, "type", "simple"); param.setAttributeNS(xlinkNS, "href", paramURL.toString()); Text text = doc.createTextNode... |
form.getErr().emit("org.bedework.client.missingfield", "name"); | form.getErr().emit("org.bedework.client.error.missingfield", "name"); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.getCa... |
form.getErr().emit("org.bedework.client.notadded"); | form.getErr().emit("org.bedework.client.error.viewnotadded"); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } CalSvcI svc = form.getCa... |
public SeismogramIterator(LocalSeismogramImpl[] seismograms){ this(seismograms, DisplayUtils.getFullTime(seismograms)); | public SeismogramIterator(String name, LocalSeismogramImpl[] seismograms){ this(name, seismograms, DisplayUtils.getFullTime(seismograms)); | public SeismogramIterator(LocalSeismogramImpl[] seismograms){ this(seismograms, DisplayUtils.getFullTime(seismograms)); } |
SoftReference softStat = (SoftReference)statisticsMap.get(seis); Statistics stat; if(softStat == null){ | Statistics stat = (Statistics)statisticsMap.get(seis); if(stat == null){ | private Statistics getStatistics(LocalSeismogramImpl seis){ SoftReference softStat = (SoftReference)statisticsMap.get(seis); Statistics stat; if(softStat == null){ stat = new Statistics(seis); statisticsMap.put(seis, new SoftReference(stat)); }else{ stat ... |
statisticsMap.put(seis, new SoftReference(stat)); }else{ stat = (Statistics)softStat.get(); if(stat == null){ stat = new Statistics(seis); statisticsMap.put(seis, new SoftReference(stat)); } | statisticsMap.put(seis, stat); | private Statistics getStatistics(LocalSeismogramImpl seis){ SoftReference softStat = (SoftReference)statisticsMap.get(seis); Statistics stat; if(softStat == null){ stat = new Statistics(seis); statisticsMap.put(seis, new SoftReference(stat)); }else{ stat ... |
public double[] minMaxMean(int startPoint, int endPoint){ double max = Double.NEGATIVE_INFINITY; double min = Double.POSITIVE_INFINITY; double meanStore = 0; for(int i = startPoint; i < endPoint; i++){ Object[] array = getSeisAtWithInternal(startPoint); LocalSeismogramImpl current = (LocalSeismogramImpl)array[0]; int i... | public double[] minMaxMean(){ return minMaxMean(currentPoint, lastPoint); } | public double[] minMaxMean(int startPoint, int endPoint){ double max = Double.NEGATIVE_INFINITY; double min = Double.POSITIVE_INFINITY; double meanStore = 0; for(int i = startPoint; i < endPoint; i++){ Object[] array = getSeisAtWithInternal(startPoint); LocalSeismog... |
if(timeRange.getBeginTime().equals(seisTimeRange.getBeginTime())){ | if(timeRange == DisplayUtils.ZERO_TIME){ | public void setTimeRange(MicroSecondTimeRange timeRange){ this.timeRange = timeRange; if(timeRange.getBeginTime().equals(seisTimeRange.getBeginTime())){ currentPoint = 0; }else{ currentPoint = (int)DisplayUtils.linearInterp(seisTimeRange.getBeginTime().getMicroSecondTime()... |
currentPoint = (int)DisplayUtils.linearInterp(seisTimeRange.getBeginTime().getMicroSecondTime(), seisTimeRange.getEndTime().getMicroSecondTime(), numPoints, timeRange.getBeginTime().getMicroSecondTime()); } if(timeRange.getEndTime().equals(seisTimeRange.getEndTime())){ lastPoint = numPoints; }else{ lastPoint = (int)Di... | long seisBegin = seisTimeRange.getBeginTime().getMicroSecondTime(); long seisEnd = seisTimeRange.getEndTime().getMicroSecondTime(); long timeBegin = timeRange.getBeginTime().getMicroSecondTime(); long timeEnd = timeRange.getEndTime().getMicroSecondTime(); currentPoint = (int)DisplayUtils.linearInterp(seisBegin, seisEnd... | public void setTimeRange(MicroSecondTimeRange timeRange){ this.timeRange = timeRange; if(timeRange.getBeginTime().equals(seisTimeRange.getBeginTime())){ currentPoint = 0; }else{ currentPoint = (int)DisplayUtils.linearInterp(seisTimeRange.getBeginTime().getMicroSecondTime()... |
if (taggedEntityId(ent, name)) { | if (ownedEntityTags(ent, name)) { | public void field(String name) throws Exception { BwOrganizer ent = (BwOrganizer)top(); if (taggedEntityId(ent, name)) { return; } if (name.equals("cn")) { ent.setCn(stringFld()); } else if (name.equals("dir")) { ent.setDir(stringFld()); } else if (name.equals("lang")) { ent.setL... |
public static boolean validateEvent(CalSvcI svci, BwEvent ev, boolean descriptionRequired, | public static boolean validateEvent(CalSvcI svci, BwEvent ev, boolean publicEvent, | public static boolean validateEvent(CalSvcI svci, BwEvent ev, boolean descriptionRequired, MessageEmit err) throws CalFacadeException { boolean ok = true; ev.setSummary(checkNull(ev.getSummary())); ev.setDescription(checkNull(ev.getDescription())); if (ev.getCalendar()... |
if (descriptionRequired) { | if (publicEvent) { | public static boolean validateEvent(CalSvcI svci, BwEvent ev, boolean descriptionRequired, MessageEmit err) throws CalFacadeException { boolean ok = true; ev.setSummary(checkNull(ev.getSummary())); ev.setDescription(checkNull(ev.getDescription())); if (ev.getCalendar()... |
} else if (ev.getDescription().length() > BwEvent.maxDescriptionLength) { err.emit("org.bedework.validation.error.toolong.description", String.valueOf(BwEvent.maxDescriptionLength)); | } else if (ev.getDescription().length() > maxDescLen) { err.emit("org.bedework.validation.error.toolong.description", String.valueOf(maxDescLen)); | public static boolean validateEvent(CalSvcI svci, BwEvent ev, boolean descriptionRequired, MessageEmit err) throws CalFacadeException { boolean ok = true; ev.setSummary(checkNull(ev.getSummary())); ev.setDescription(checkNull(ev.getDescription())); if (ev.getCalendar()... |
comp.update(file, true); | if (comp != null) { comp.update(file, true); } | public MainPanel(final AudioPlayer owner) { super(new BorderLayout()); playlist.setPlayAll(Configuration.isPlayAll()); playlist.setRandom(Configuration.isRandom()); list = new JList(playlist.getListModel()); list.setCellRenderer(new ListCellRenderer() { public Component getListCellRendererComponent(JList li... |
comp.update(file, false); | if (comp != null) { comp.update(file, false); } | public MainPanel(final AudioPlayer owner) { super(new BorderLayout()); playlist.setPlayAll(Configuration.isPlayAll()); playlist.setRandom(Configuration.isRandom()); list = new JList(playlist.getListModel()); list.setCellRenderer(new ListCellRenderer() { public Component getListCellRendererComponent(JList li... |
comp.update(file, false); | if (comp != null) { comp.update(file, false); } | public void playbackCompleted(Player player) { File file = player.getFile(); updatePlayingLabel(null); ListComponent comp = (ListComponent)labeltable.get(file); comp.update(file, false); } |
comp.update(file, true); | if (comp != null) { comp.update(file, true); } | public void playbackStarted(Player player) { File file = player.getFile(); updatePlayingLabel(file); ListComponent comp = (ListComponent)labeltable.get(file); comp.update(file, true); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.