rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
assertEquals("stat["+i+"]", 0, out[0], 0.0000001); assertEquals("stat["+i+"]", 1, out[1], 0.0000001);
assertEquals("stat["+i+"]", 0, out[0], 0.0000001*size); assertEquals("stat["+i+"]", 1, out[1], 0.0000001*size);
public void testLinearLeastSquares() throws Exception { // JUnitDoclet begin method linearLeastSquares for ( int i = 0; i<stat.length; i++) { double[] out = stat[i].linearLeastSquares(); assertEquals("stat["+i+"]", 0, out[0], 0.0000001); assertEquals("stat["+i+"]", 1, ...
suite.addTestSuite(LexicalRootTest.class); suite.addTestSuite(NATNamespaceTest.class);
public static Test suite() { TestSuite suite = new TestSuite("All AT2 Interpreter-related tests."); //$JUnit-BEGIN$ suite.addTestSuite(InvocationTest.class); suite.addTestSuite(MirrorTest.class); suite.addTestSuite(ReflectionTest.class); suite.addTestSuite(NATObjectClosureTest.class); suite.addTestSuite(TestFie...
ServiceContext context = new ServiceContext(id, propBytes);
ServiceContext context = new ServiceContext(ID, propBytes);
public void send_request(ClientRequestInfo info) throws ForwardRequest { ServiceContext context = new ServiceContext(id, propBytes); info.add_request_service_context(context, true); }
new URLDataSetSeismogram(names[i], sacURL,
new URLDataSetSeismogram(sacURL,
protected void checkForLegacySeismograms() { //this supports loading of classic seismogram datasets that were //created before dataset seismograms if(getDataSetSeismogramNames().length == 0) { String[] names = getSeismogramNames(); logger.info("No DataSetSeismograms in da...
this);
this, names[i]);
protected void checkForLegacySeismograms() { //this supports loading of classic seismogram datasets that were //created before dataset seismograms if(getDataSetSeismogramNames().length == 0) { String[] names = getSeismogramNames(); logger.info("No DataSetSeismograms in da...
BwUser filterOwner = globals.getFixOwner(); if (filterOwner == null) { error("Filter owner " + globals.fixOwner + " does not exist"); } entity.setOwner(filterOwner);
entity.setOwner(globals.getPublicUser());
public void end(String ns, String name) throws Exception { BwFilter entity = (BwFilter)pop(); globals.filters++; globals.filtersTbl.put(entity); try { if (globals.from2p3px) { /* We are converting filter definitions into calendar definitions. */ BwCalendar cal = new BwCalendar()...
_designDoc.setPageWidth(595); _designDoc.setPageHeight(842);
_designDoc.setPageWidth(PAGE_WIDTH_PORTRAIT_A4); _designDoc.setPageHeight(PAGE_HEIGHT_PORTRAIT_A4);
private void initializeDocument(String name) { _designDoc = new DesignDocument(name); // set A 4 paper size _designDoc.setPageWidth(595); _designDoc.setPageHeight(842); _designDoc.setColumnWidth(540); _designDoc.setColumnSpacing(15); _designDoc.setLeftMargin(20); _designDoc.setRightMargin(20); _designDoc.set...
_designDoc.setLeftMargin(20); _designDoc.setRightMargin(20); _designDoc.setTopMargin(10); _designDoc.setBottomMargin(30);
_designDoc.setLeftMargin(PAGE_LEFT_MARGIN); _designDoc.setRightMargin(PAGE_RIGHT_MARGIN); _designDoc.setTopMargin(PAGE_TOP_MARGIN); _designDoc.setBottomMargin(PAGE_BOTTOM_MARGIN);
private void initializeDocument(String name) { _designDoc = new DesignDocument(name); // set A 4 paper size _designDoc.setPageWidth(595); _designDoc.setPageHeight(842); _designDoc.setColumnWidth(540); _designDoc.setColumnSpacing(15); _designDoc.setLeftMargin(20); _designDoc.setRightMargin(20); _designDoc.set...
this.setAttribute(ATTRIBUTE_IS_BLANK_WHEN_NULL, Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_BLANK_WHEN_NULL, String.valueOf(value));
public void setIsBlankWhenNull(boolean value){ this.setAttribute(ATTRIBUTE_IS_BLANK_WHEN_NULL, Boolean.toString(value)); }
this.setAttribute(ATTRIBUTE_IS_STRETCH_WITH_OVERFLOW, Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_STRETCH_WITH_OVERFLOW, String.valueOf(value));
public void setIsStretchWithOverflow(boolean value){ this.setAttribute(ATTRIBUTE_IS_STRETCH_WITH_OVERFLOW, Boolean.toString(value)); }
this.setAttribute(ATTRIBUTE_IS_PRINT_REPEATED_VALUES,Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_PRINT_REPEATED_VALUES,String.valueOf(value));
public void setIsPrintRepeatedValues(boolean value){ this.setAttribute(ATTRIBUTE_IS_PRINT_REPEATED_VALUES,Boolean.toString(value)); }
this.setAttribute(ATTRIBUTE_IS_REMOVE_LINE_WHEN_BLANK,Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_REMOVE_LINE_WHEN_BLANK,String.valueOf(value));
public void setIsRemoveLineWhenBlank(boolean value){ this.setAttribute(ATTRIBUTE_IS_REMOVE_LINE_WHEN_BLANK,Boolean.toString(value)); }
this.setAttribute(ATTRIBUTE_IS_PRINT_IN_FIRST_WHOLE_BAND,Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_PRINT_IN_FIRST_WHOLE_BAND,String.valueOf(value));
public void setIsPrintInFirstWholeBand(boolean value){ this.setAttribute(ATTRIBUTE_IS_PRINT_IN_FIRST_WHOLE_BAND,Boolean.toString(value)); }
this.setAttribute(ATTRIBUTE_IS_PRINT_WHEN_DETAIL_OVERFLOWS,Boolean.toString(value));
this.setAttribute(ATTRIBUTE_IS_PRINT_WHEN_DETAIL_OVERFLOWS,String.valueOf(value));
public void setIsPrintWhenDetailOverflows(boolean value){ this.setAttribute(ATTRIBUTE_IS_PRINT_WHEN_DETAIL_OVERFLOWS,Boolean.toString(value)); }
ev.setCalendar(svci.getPreferredCalendar());
int id = getIntReqPar(request, "calId", -1); if (id < 0) { ev.setCalendar(svci.getPreferredCalendar()); } else { BwCalendar calendar = svci.getCalendar(id); if (calendar == null) { form.getErr().emit("org.bedework.client.error.nosuchcalendar", id); return "notFound"; } ev.setCalendar(calendar); }
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { // Just ignore this return "doNothing"; } BwEvent ev = form.getNewEvent(); if (ev == null) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); ...
if ((sub == null) || (sub.getCalendar() == null)) {
if ((sub != null) && (!sub.getInternalSubscription())) {
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { // Just ignore this return "doNothing"; } BwEvent ev = form.getNewEvent(); if (ev == null) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); ...
ev.setCalendar(sub.getCalendar());
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { // Just ignore this return "doNothing"; } BwEvent ev = form.getNewEvent(); if (ev == null) { return "doNothing"; } CalSvcI svci = form.fetchSvci(); ...
auth.setCurrency(properties.get(PROPERTY_CURRENCY_CODE).toString());
auth.setCurrency(getCurrencyAbbreviation(properties.get(PROPERTY_CURRENCY_CODE).toString()));
private void storeAuthorizationEntry(String encodedCardnumber, Object parentDataPK, Hashtable properties, String authorizationType) throws IDOLookupException, CreateException { KortathjonustanAuthorisationEntriesHome authHome = (KortathjonustanAuthorisationEntriesHome) IDOLookup.getHome(KortathjonustanAuthorisationEn...
form.assignAddingSponsor(false);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar != null)...
public IdeaView(Idea anIdea) { this(anIdea, true);
public IdeaView() { this(null);
public IdeaView(Idea anIdea) { this(anIdea, true); }
paint(g, new Point(0, 0), this);
paint(g, new Point(0, 0), this, getAngle());
public void paint(Graphics g) { paint(g, new Point(0, 0), this); }
return new Vector();
return new ArrayList();
private Collection getCategoryCollection(int kind) { try { if (kind == publicEntity) { return calsvci.getPublicCategories(); } if (kind == ownersEntity) { return calsvci.getCategories(); } if (kind == editableEntity) { return calsvci.getEditableCategories(); } ...
currentSubscriptions = new Vector();
currentSubscriptions = new ArrayList();
public Collection getCurrentSubscriptions() { if (currentSubscriptions == null) { currentSubscriptions = new Vector(); } return currentSubscriptions; }
return new Vector();
return new ArrayList();
public Collection getInstanceOwners() { try { return fetchSvci().getInstanceOwners(); } catch (Throwable t) { err.emit(t); return new Vector(); } }
return new Vector();
return new ArrayList();
private Collection getSponsorCollection(int kind) { try { if (kind == publicEntity) { return calsvci.getPublicSponsors(); } if (kind == ownersEntity) { return calsvci.getSponsors(); } if (kind == editableEntity) { return calsvci.getEditableSponsors(); } // Wo...
subscriptions = new Vector();
subscriptions = new ArrayList();
public Collection getSubscriptions() { if (subscriptions == null) { subscriptions = new Vector(); } return subscriptions; }
sysStats = new Vector();
sysStats = new ArrayList();
public Collection getSysStats() { if (sysStats == null) { sysStats = new Vector(); } return sysStats; }
String vsdate = viewStart.getDateTime().getDate().substring(0, 8);
String vsdate = viewStart.getDateTime().getDtval().substring(0, 8); if (debug) { action.logIt("vsdate=" + vsdate); }
public static void gotoDateView(BwCalAbstractAction action, BwActionForm form, String date, int newViewTypeI, boolean debug) throws Throwable { /* We get a new view if either the date...
String calSuiteName = getReqPar(request, "calSuite");
String calSuiteName = getReqPar(request, "calSuiteName");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca...
Graphics2D copy = (Graphics2D)g;
Graphics2D copy = (Graphics2D)g.create();
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { ...
if (parentView.isRoot()) { previousAngle = views.get(views.size() - 1).getAngle() - 2 * Math.PI; }
private double getNewAngle(final IdeaView parentView, final IdeaView previousView, final IdeaView view, final IdeaView nextView) { final List<IdeaView> views = parentView.getSubViews(); final double v = view.getV(); double minDiffAngle = Math.PI / 2 / views.size(); ...
if (parentView.isRoot()) { nextAngle = views.get(0).getAngle() + 2 * Math.PI; }
private double getNewAngle(final IdeaView parentView, final IdeaView previousView, final IdeaView view, final IdeaView nextView) { final List<IdeaView> views = parentView.getSubViews(); final double v = view.getV(); double minDiffAngle = Math.PI / 2 / views.size(); ...
NodeList seisAttrNode = XMLUtil.evalNodeList(e, "seismogramAttr");
NodeList seisAttrNode = XMLUtil.evalNodeList(e, "../seismogramAttr");
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) String urlString = "NONE"; NodeList nList = evalNodeList(conf...
seis.setAttributes(XMLSeismogramAttr.getSeismogramAttr((Element)seisAttrNode.item(0)));
SeismogramAttr seisAttr = XMLSeismogramAttr.getSeismogramAttr((Element)seisAttrNode.item(0)); logger.debug("The &&&&&&&&&&&&&&&&&&& chan_cdoe from dsml file is "+ ((SeismogramAttrImpl)seisAttr).getChannelID().channel_code); seis.setAttributes(seisAttr); logger.debug("The &&&&&&&&&&&&&&&&&&& chan_code after setting is ...
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { return (LocalSeismogramImpl)seismogramCache.get(name); } // end of if (seismogramCache.containsKey(name)) String urlString = "NONE"; NodeList nList = evalNodeList(conf...
boolean taggedStart = false; boolean annotations = false;
if (annotations) { tagStart(sectionEventAnnotations); } else { tagStart(sectionEvents); }
public void dumpSection(Iterator it) throws Throwable { boolean taggedStart = false; boolean annotations = false; while (it.hasNext()) { BwEvent e = (BwEvent)it.next(); if (!taggedStart) { if (e instanceof BwEventAnnotation) { tagStart(sectionEventAnnotations); annota...
BwEvent e = (BwEvent)it.next(); if (!taggedStart) { if (e instanceof BwEventAnnotation) { tagStart(sectionEventAnnotations); annotations = true; } else { tagStart(sectionEvents); } taggedStart = true; } dumpEvent(e);
dumpEvent((BwEvent)it.next());
public void dumpSection(Iterator it) throws Throwable { boolean taggedStart = false; boolean annotations = false; while (it.hasNext()) { BwEvent e = (BwEvent)it.next(); if (!taggedStart) { if (e instanceof BwEventAnnotation) { tagStart(sectionEventAnnotations); annota...
JDBCStation jdbcStation = new JDBCStation(conn);
public static void main(String[] args) throws SQLException, IOException { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); ConnectionCreator connCreator = new ConnectionCreator(props); Connection conn = connCreator.createConnection(); JDBCSeismog...
String oldName = args[args.length - 2]; String newName = args[args.length - 1]; if(verbose) { int numOld = numOfStationCodes(jdbcStation, oldName); System.out.println(); System.out.println("Updating " + numOld + " instances of " + oldName + " to " + newName + "."); } jdbcSeisFile.updateStationCode(oldName, newName); if...
jdbcSeisFile.populateStationName();
public static void main(String[] args) throws SQLException, IOException { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); ConnectionCreator connCreator = new ConnectionCreator(props); Connection conn = connCreator.createConnection(); JDBCSeismog...
} else if (path.endsWith(".rdo")) {
} else if (path.endsWith(".do")) {
public int doStartTag() throws JspException { if (!PortletServlet.isPortletRequest(pageContext.getRequest())) { return super.doStartTag(); } String urlStr = null; BodyContent bodyContent = pageContext.pushBody(); try { super.doStartTag(); URL url = new URL(bodyContent.getString()); ...
final JFileChooser fc = new JFileChooser(); String extensions[] = new String[1]; extensions[0] = "pdf"; fc.setFileFilter(new FileNameFilter(extensions)); fc.setDialogTitle("SAVE as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal = fc.showSaveDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION...
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(display); if (returnVal == JFileChooser.APPROVE_OPTION) { return fc.getSelectedFile...
private String chooseOutputFile() { final JFileChooser fc = new JFileChooser(); String extensions[] = new String[1]; extensions[0] = "pdf"; fc.setFileFilter(new FileNameFilter(extensions)); fc.setDialogTitle("SAVE as PDF"); fc.setSelectedFile(new File("output.pdf")); int returnVal...
if (display != null) { if (display instanceof VerticalSeismogramDisplay) { verticleDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (verticleDisplays == null) return; if (verticleDisplays.size() == 0) { return;
if (display != null) { if (display instanceof VerticalSeismogramDisplay) { basicDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (basicDisplays == null) return; if (basicDisplays.size() == 0) { return; } } getImagesPerPage(basicDisplays.size()); if(seisPerPageSet){ String tmp = chooseOutputFile(); if (...
public void createPDF() { if (display != null) { if (display instanceof VerticalSeismogramDisplay) { verticleDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (verticleDisplays == null) return; if (verticleDisplays.size() == 0) { return; } } ...
} init(verticleDisplays.size()); String tmp = this.chooseOutputFile(); if (tmp == null) { createPDF("default.pdf"); } else { createPDF(tmp); }
public void createPDF() { if (display != null) { if (display instanceof VerticalSeismogramDisplay) { verticleDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (verticleDisplays == null) return; if (verticleDisplays.size() == 0) { return; } } ...
}
public void createPDF() { if (display != null) { if (display instanceof VerticalSeismogramDisplay) { verticleDisplays = ((VerticalSeismogramDisplay)display).getDisplays(); if (verticleDisplays == null) return; if (verticleDisplays.size() == 0) { return; } } ...
int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of seismograms selected must be greater than 0", "Selected Too Few", JOptionPane.WARNING_MESSAGE); }else if(currentNumber > numOfSeis){ JOptionPane.showMessageDialog(null, "The num...
int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of seismograms selected must be greater than 0", "Selected Too Few", JOptionPane.WARNING_MESSAGE); }else if(currentNumber > numOfSeis){ JOptionPane.showMessageDialog(null, "The num...
public void actionPerformed(ActionEvent e){ int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of sei...
}
public void actionPerformed(ActionEvent e){ int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of sei...
setSeisPerPage(-1); dialog.dispose(); }
dialog.dispose(); }
public void actionPerformed(ActionEvent e){ setSeisPerPage(-1); dialog.dispose(); }
imagesPerPage = num;
seisPerPageSet = true; imagesPerPage = num;
private void setSeisPerPage(int num) { imagesPerPage = num; }
sb.append("name=");
sb.append(", name=");
public String toString() { StringBuffer sb = new StringBuffer("BwCalendar{"); toStringSegment(sb); sb.append("name="); sb.append(String.valueOf(getName())); sb.append(", path="); sb.append(String.valueOf(getPath())); sb.append(", summary="); sb.append(String.valueOf(getSummary())); sb.appen...
if (getCurrentAccess() != null) { sb.append(", currentAccess="); sb.append(getCurrentAccess()); } sb.append("}");
public String toString() { StringBuffer sb = new StringBuffer("BwCalendar{"); toStringSegment(sb); sb.append("name="); sb.append(String.valueOf(getName())); sb.append(", path="); sb.append(String.valueOf(getPath())); sb.append(", summary="); sb.append(String.valueOf(getSummary())); sb.appen...
CalSvcIPars pars = new CalSvcIPars(account, UserAuth.superUser,
CalSvcIPars pars = new CalSvcIPars(account,
private void init() throws Throwable { svci = new CalSvc(); CalSvcIPars pars = new CalSvcIPars(account, UserAuth.superUser, account, null, // XXX needs envPrefix true, // public ...
fail("Expected IllegalArgumentException on getUserAttributes(String null)");
fail("Expected IllegalArgumentException on getUserAttributes((Map)null)");
public void testNullSeed() { IPersonAttributeDao dao = getPersonAttributeDaoInstance(); Map nullMap = null; try { dao.getUserAttributes(nullMap); } catch (IllegalArgumentException iae) { // good, as expected return; } fail("Expected IllegalA...
fail("Expected IllegalArgumentException on getUserAttributes(String null)");
fail("Expected IllegalArgumentException on getUserAttributes((String)null)");
public void testNullUid() { IPersonAttributeDao dao = getPersonAttributeDaoInstance(); String nullString = null; try { dao.getUserAttributes(nullString); } catch (IllegalArgumentException iae) { // good, as expected return; } fail("Expected ...
public Vector getParamFilters() {
public Collection getParamFilters() {
public Vector getParamFilters() { if (paramFilters == null) { paramFilters = new Vector(); } return paramFilters; }
paramFilters = new Vector();
paramFilters = new ArrayList();
public Vector getParamFilters() { if (paramFilters == null) { paramFilters = new Vector(); } return paramFilters; }
} else { ok = BwWebUtil.validateEvent(svci, event, true, err);
} else if (!BwWebUtil.validateEvent(svci, event, true, err)) { ok = false;
private boolean validateEvent(PEActionForm form, CalSvcI svci, BwEvent event, MessageEmit err) throws Throwable { boolean ok = validateEventCategory(form, svci, event, err); if (!validateEventSponsor(form, svci, event, err)) { ok = false; } if (!validateEventLo...
String appName = env.getAppProperty("app.name"); String appRoot = env.getAppProperty("app.root");
String appName = env.getAppProperty("name"); String appRoot = env.getAppProperty("root");
public void setup(HttpServletRequest request, ActionForm form, MessageResources messages) throws Throwable { BwSession s = BwWebUtil.getState(request); if (s != null) { } else { CalEnv env = getEnv(form); String appName = env.getAppProperty("app.name"); St...
return AGSymbol.alloc(javaToAmbientTalkSelector(jSelector).replaceFirst(JavaInterfaceAdaptor._BASE_PREFIX_, ""));
if (jSelector.startsWith(JavaInterfaceAdaptor._BGET_PREFIX_)) { return downFieldName(stripPrefix(jSelector, JavaInterfaceAdaptor._BGET_PREFIX_)); } else if (jSelector.startsWith(JavaInterfaceAdaptor._BSET_PREFIX_)) { return downFieldName(stripPrefix(jSelector, JavaInterfaceAdaptor._BSET_PREFIX_)); } else if (jSelector....
public static final ATSymbol downBaseLevelSelector(String jSelector) throws NATException { return AGSymbol.alloc(javaToAmbientTalkSelector(jSelector).replaceFirst(JavaInterfaceAdaptor._BASE_PREFIX_, "")); }
return AGSymbol.alloc(javaToAmbientTalkSelector(jSelector).replaceFirst(JavaInterfaceAdaptor._META_PREFIX_, ""));
if (jSelector.startsWith(JavaInterfaceAdaptor._BGET_PREFIX_)) { return downFieldName(stripPrefix(jSelector, JavaInterfaceAdaptor._BGET_PREFIX_)); } else if (jSelector.startsWith(JavaInterfaceAdaptor._BSET_PREFIX_)) { return downFieldName(stripPrefix(jSelector, JavaInterfaceAdaptor._BSET_PREFIX_)); } else if (jSelector....
public static final ATSymbol downMetaLevelSelector(String jSelector) throws NATException { return AGSymbol.alloc(javaToAmbientTalkSelector(jSelector).replaceFirst(JavaInterfaceAdaptor._META_PREFIX_, "")); }
String nam = atSelector.getText().asNativeText().javaValue;
String nam = atSelector.base_getText().asNativeText().javaValue;
public static final String upSelector(ATSymbol atSelector) throws NATException { // : -> _ String nam = atSelector.getText().asNativeText().javaValue; nam = nam.replaceAll(":", "_"); // operator symbol -> _op{code}_ Matcher m = symbol.matcher(nam); StringBuffer sb = new StringBuffer(); while (m.find()) { //...
if (Main.getMain().getMode() >= Main.MODE_IN_GAME) { Main.getNetworkConnection().writeMessage("LV;"); }
public void doAction() { if (Main.getMain().getMode() >= Main.MODE_IN_GAME) { Main.getNetworkConnection().writeMessage("LV;"); } Main.getNetworkConnection().writeMessage("SG;" + SerializedData.getSerializedData().getMaxPlayerCount()); }
if (syspars == null) { sess.namedQuery("getSystemPars"); sess.setString("name", getSystemName()); syspars = (BwSystem)sess.getUnique(); if (syspars == null) { throw new CalFacadeException("No system parameters with name " + getSystemName()); } if (debug) { trace("Read system parameters: " + syspars); } } return sys...
return getSyspars(getSystemName());
public BwSystem getSyspars() throws CalFacadeException { if (syspars == null) { sess.namedQuery("getSystemPars"); sess.setString("name", getSystemName()); syspars = (BwSystem)sess.getUnique(); if (syspars == null) { throw new CalFacadeException("No system parameters with name " + ...
int i = table.getSelectedRow(); int j = table.getSelectedColumn(); String arg = (String)table.getCellEditor(i, j).getCellEditorValue(); model.args.set(i, arg); model.fireTableCellUpdated(i, j);
int row = table.getSelectedRow(); String arg = (String)table.getCellEditor(row, 1).getCellEditorValue(); model.updateArg(row, arg);
public LoadPanel() { super(new GridLayout(1, 0)); setBorder(new TitledBorder(Messages.getString("ModuleAutoStartConfigurationPanel.START_AUTOMATICALLY") +":")); //$NON-NLS-1$ //$NON-NLS-2$ final JTable table = new JTable(model); DefaultCellEditor dce = new DefaultCellEditor(new JTextField()); dce.addCell...
int i = table.getSelectedRow(); int j = table.getSelectedColumn(); String arg = (String)table.getCellEditor(i, j).getCellEditorValue(); model.args.set(i, arg); model.fireTableCellUpdated(i, j);
int row = table.getSelectedRow(); String arg = (String)table.getCellEditor(row, 1).getCellEditorValue(); model.updateArg(row, arg);
public void editingStopped(ChangeEvent arg0) { int i = table.getSelectedRow(); int j = table.getSelectedColumn(); String arg = (String)table.getCellEditor(i, j).getCellEditorValue(); model.args.set(i, arg); model.fireTableCellUpdated(i, j); }
if (getPath() == null) { return null; }
public String getEncodedPath() throws CalFacadeException { try { return URLEncoder.encode(getPath(), "UTF-8"); } catch (Throwable t) { throw new CalFacadeException(t); } }
TimeScaleCalc (int totalPixels, MicroSecondDate beginTime, MicroSecondDate endTime, TimeConfigRegistrar tr){ if (endTime.before(beginTime)) { throw new IllegalArgumentException("endTime must be after beginTime, "+beginTime.toString()+" "+endTime.toString()); }
TimeScaleCalc (int totalPixels, TimeConfigRegistrar tr){
TimeScaleCalc (int totalPixels, MicroSecondDate beginTime, MicroSecondDate endTime, TimeConfigRegistrar tr){ if (endTime.before(beginTime)) { throw new IllegalArgumentException("endTime must be after beginTime, "+beginTime.toString()+" "+endTime.toString()); } this.totalPixels = totalPixels; setTimes(); calcu...
calculateTicks();
TimeScaleCalc (int totalPixels, MicroSecondDate beginTime, MicroSecondDate endTime, TimeConfigRegistrar tr){ if (endTime.before(beginTime)) { throw new IllegalArgumentException("endTime must be after beginTime, "+beginTime.toString()+" "+endTime.toString()); } this.totalPixels = totalPixels; setTimes(); calcu...
LinkedList tmp = new LinkedList(dssDataListeners);
LinkedList tmp; synchronized(dssDataListeners){ tmp = new LinkedList(dssDataListeners); }
protected void fireNewDataEvent(SeisDataChangeEvent event) { // use temp array to avoid concurrentModificationException LinkedList tmp = new LinkedList(dssDataListeners); Iterator iterator = tmp.iterator(); while(iterator.hasNext()) { SeisDataChangeListener dssDataListener = (...
this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpConfigRegistrar; particleDisplayPanel = new JLayeredPane(); OverlayLayout overlayLayout = new OverlayLayout(particleDisplayPanel);
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpCo...
radioPanel = new JPanel(); this.setLayout(new BorderLayout()); particleDisplayPanel.setLayout(overlayLayout); radioPanel.setLayout(new GridLayout(1, 0));
JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please Wait ....For the Particle Motion Window"; JLabel jLabel = new JLabel(message); JTextArea textArea = new JTextArea(); informationPanel.setLayout(new BorderLayout()); informationPanel.add(textArea, BorderLayout.CENTER); ...
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpCo...
if(timeConfigRegistrar != null) { timeConfigRegistrar.addTimeSyncListener(this); }
displayFrame.getContentPane().add(informationPanel); displayFrame.setSize(new java.awt.Dimension(500, 300)); displayFrame.pack(); displayFrame.show(); try { Thread.sleep(5000); }catch(Exception e) {} createGUI(timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar);
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpCo...
view = new ParticleMotionView(this); view.setSize(new java.awt.Dimension(300, 300)); particleDisplayPanel.add(view, PARTICLE_MOTION_LAYER); hAmpScaleMap = new AmpScaleMapper(50, 4, new UnitRangeImpl(-100, 100, UnitImpl.COUNT) ); vAmpScaleMap = new AmpScaleMapper(50, 4, new UnitRangeImpl(-100, 100, UnitImpl.COUNT) ); ...
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpCo...
displayFrame.dispose();
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { this.hAmpConfigRegistrar = hAmpConfigRegistrar; this.vAmpConfigRegistrar = vAmpCo...
public void changeAccess(Object o, Collection aces) throws CalFacadeException { getCal().changeAccess(o, aces);
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { getCal().changeAccess(ent, aces);
public void changeAccess(Object o, Collection aces) throws CalFacadeException { getCal().changeAccess(o, aces); }
public Collection getAces(Object o) throws CalFacadeException { return getCal().getAces(o);
public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { return getCal().getAces(ent);
public Collection getAces(Object o) throws CalFacadeException { return getCal().getAces(o); }
} if (uri.endsWith("/")) { uri = uri.substring(0, uri.length() - 1);
private CaldavURI findURI(String uri, boolean decoded, BwCalendar cal) throws WebdavIntfException { try { /*Remove all "." and ".." components */ if (decoded) { try { uri = new URI(null, null, uri, null).toString(); } catch (Throwable t) { if (de...
if (!ns.equals(CaldavDefs.caldavNamespace)) {
if ((!ns.equals(CaldavDefs.caldavNamespace) && !ns.equals(CaldavDefs.icalNamespace))) {
public void generatePropValue(WebdavNsNode node, WebdavProperty pr) throws WebdavIntfException { QName tag = pr.getTag(); String ns = tag.getNamespaceURI(); boolean isCalendar = node instanceof CaldavCalNode; CaldavCalNode calNode = null; BwCalendar cal = null; if (isC...
if (tag.equals(CaldavTags.calendarDescription)) {
if (tag.equals(ICalTags.summary)) { openPropstat(); xml.property(tag, pr.getPval()); closePropstat(); } else if (tag.equals(ICalTags.dtstart)) { openPropstat(); xml.property(tag, pr.getPval()); closePropstat(); } else if (tag.equals(ICalTags.dtend)) { openPropstat(); xml.property(tag, pr.getPval()); closePropstat(); } ...
public void generatePropValue(WebdavNsNode node, WebdavProperty pr) throws WebdavIntfException { QName tag = pr.getTag(); String ns = tag.getNamespaceURI(); boolean isCalendar = node instanceof CaldavCalNode; CaldavCalNode calNode = null; BwCalendar cal = null; if (isC...
Object o = RequestUtils.lookup(pageContext, name, property, scope);
Object o = TagUtils.getInstance().lookup(pageContext, name, property, scope);
protected Object getObject(String name, String scope, String property, boolean required) throws JspTagException { try { Object o = RequestUtils.lookup(pageContext, name, property, scope); if (o == null) { if (required) { throw new JspTagException("Unable t...
int labelWidth = (int)fm.getStringBounds(label, copy).getWidth(); if (label != null && label.length() != 0 && pixelLoc + labelWidth < width) { copy.drawString(label, pixelLoc - labelWidth/2, top - majorTickLength- fm.getLeading());
if (label != null && label.length() != 0 ) { int labelWidth = (int)fm.getStringBounds(label, copy).getWidth(); if(pixelLoc + labelWidth < width){ copy.drawString(label, pixelLoc - labelWidth/2, top - majorTickLength- fm.getLeading()); }
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g.create(); if (copy != null) { t...
Acl acl = getAces(ent, privWriteAcl);
Acl acl = checkAccess(ent, privWriteAcl, false).acl;
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { try { Acl acl = getAces(ent, privWriteAcl); Iterator it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next(); acl.removeAccess(ace); acl.addAce...
if (accessible(sdbe, desiredAccess, nullForNoAccess)) {
if (checkAccess(sdbe, desiredAccess, nullForNoAccess).accessAllowed) {
public Collection checkAccess(Collection ents, int desiredAccess, boolean nullForNoAccess) throws CalFacadeException { TreeSet out = new TreeSet(); Iterator it = ents.iterator(); while (it.hasNext()) { BwShareableDbentity sdbe = (BwShareableDbentity)it.next(); ...
CalEnv env = getEnv(request, form); String appRoot = env.getAppProperty("root");
String appRoot = form.retrieveConfig().getAppRoot(); String portalPlatform = form.retrieveConfig().getPortalPlatform(); if (isPortlet && (portalPlatform != null)) { appRoot += "." + portalPlatform; }
private synchronized BwSession getState(HttpServletRequest request, BwActionFormBase form, MessageResources messages, String adminUserId, boolean admin) t...
fail("Expected an exception of type " + interpreterExceptionClass.getSimpleName());
fail("Expected an exception of type " + Evaluator.getSimpleName(interpreterExceptionClass));
public void evalAndTestException(String input, Class interpreterExceptionClass) { try { ATAbstractGrammar ptree = NATParser._INSTANCE_.base_parse(NATText.atValue(input)); ptree.meta_eval(ctx_); fail("Expected an exception of type " + interpreterExceptionClass.getSimpleName()); // test should throw an ...
File inFile = new File(forTestClass.getResource(forTestClass.getSimpleName() + "-" + name).toURI());
File inFile = new File(new URI(forTestClass.getResource(Evaluator.getSimpleName(forTestClass) + "-" + name).toString()));
public static final ATObject evalSnippet(Class forTestClass, String name, ATContext inContext) throws InterpreterException { try { File inFile = new File(forTestClass.getResource(forTestClass.getSimpleName() + "-" + name).toURI()); // load the code from the file String code = Evaluator.loadContentOfFil...
return null;
return NATNil._INSTANCE_;
public static final ATObject evalSnippet(Class forTestClass, String name, ATContext inContext) throws InterpreterException { try { File inFile = new File(forTestClass.getResource(forTestClass.getSimpleName() + "-" + name).toURI()); // load the code from the file String code = Evaluator.loadContentOfFil...
paramNames[i] = AGSymbol.alloc(Evaluator.valueNameOf(paramTypes[i]));
paramNames[i] = AGSymbol.jAlloc(Evaluator.valueNameOf(paramTypes[i]));
public ATTable base_getParameters() throws InterpreterException { Class[] paramTypes = javaMethod_.getParameterTypes(); AGSymbol[] paramNames = new AGSymbol[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { paramNames[i] = AGSymbol.alloc(Evaluator.valueNameOf(paramTypes[i])); } return new NATTab...
null,
public Synchml(String account, String deviceId, URIgen uriGen, boolean debug) throws CalFacadeException { svci = new CalSvc(); this.deviceId = deviceId; this.debug = debug; CalSvcIPars pars = new CalSvcIPars(account, UserAuth.noPrivileges, ...
access.accessible(parent, privWrite, false); if (parent.getCalendarCollection()) { throw new CalFacadeException(CalFacadeException.illegalCalendarCreation); } String path = parent.getPath(); if (path == null) { if (parent.getPublick()) { path = ""; } else { path = "/users/" + parent.getOwner().getAccount(); } } ...
calendars.addCalendar(val, parent);
public void addCalendar(BwCalendar val, BwCalendar parent) throws CalFacadeException { checkOpen(); /* We need write access to the parent */ access.accessible(parent, privWrite, false); /** Is the parent a calendar collection? *//* sess.namedQuery("countCalendarEventRefs"); sess.setEntity("cal",...
checkOpen(); user.setCategoryAccess(access.getDefaultPersonalAccess()); user.setLocationAccess(access.getDefaultPersonalAccess()); user.setSponsorAccess(access.getDefaultPersonalAccess()); user.setQuota(getSyspars().getDefaultUserQuota()); sess.save(user); sess.namedQuery("getCalendarByPath"); String path = "/"...
addNewUser(user); calendars.addNewCalendars();
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.namedQuery("countCalendarEventRefs"); sess.setEntity("cal", val); Integer res = (Integer)sess.getUnique(); if (debug) { trace(" ----------- count = " + res); } if (res == null) { return false; } return res.intValue() > 0;
return calendars.checkCalendarRefs(val);
public boolean checkCalendarRefs(BwCalendar val) throws CalFacadeException { checkOpen(); sess.namedQuery("countCalendarEventRefs"); sess.setEntity("cal", val); Integer res = (Integer)sess.getUnique(); if (debug) { trace(" ----------- count = " + res); } if (res == null) { return false;...
BwCalendar parent = val.getCalendar(); if (parent == null) { throw new CalFacadeException(CalFacadeException.cannotDeleteCalendarRoot); } parent.removeChild(val); sess.update(parent); return true;
return calendars.deleteCalendar(val);
public boolean deleteCalendar(BwCalendar val) throws CalFacadeException { checkOpen(); BwCalendar parent = val.getCalendar(); if (parent == null) { throw new CalFacadeException(CalFacadeException.cannotDeleteCalendarRoot); } //sess.delete(val); parent.removeChild(val); sess.update(parent); ...
sess.namedQuery("getUserCalendarCollections"); sess.setEntity("owner", user); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWriteContent, true);
return calendars.getAddContentCalendarCollections();
public Collection getAddContentCalendarCollections() throws CalFacadeException { if (currentMode == CalintfUtil.guestMode) { return new TreeSet(); } checkOpen(); sess.namedQuery("getUserCalendarCollections"); sess.setEntity("owner", user); sess.cacheableQuery(); return access.checkA...
sess.namedQuery("getPublicCalendarCollections"); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWriteContent, true);
return calendars.getAddContentPublicCalendarCollections();
public Collection getAddContentPublicCalendarCollections() throws CalFacadeException { checkOpen(); sess.namedQuery("getPublicCalendarCollections"); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWriteContent, true); }
sess.namedQuery("getCalendarById"); sess.setInt("id", val); sess.cacheableQuery(); return (BwCalendar)sess.getUnique();
return calendars.getCalendar(val);
public BwCalendar getCalendar(int val) throws CalFacadeException { checkOpen(); sess.namedQuery("getCalendarById"); sess.setInt("id", val); sess.cacheableQuery(); return (BwCalendar)sess.getUnique(); }
sess.namedQuery("getUserCalendarCollections"); sess.setEntity("owner", user); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWrite, true);
return calendars.getCalendarCollections();
public Collection getCalendarCollections() throws CalFacadeException { checkOpen(); sess.namedQuery("getUserCalendarCollections"); sess.setEntity("owner", user); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWrite, true); }
sess.namedQuery("getCalendarByPath"); sess.setString("path", userCalendarRootPath + "/" + user.getAccount()); sess.cacheableQuery(); return (BwCalendar)sess.getUnique();
return calendars.getCalendars();
public BwCalendar getCalendars() throws CalFacadeException { if (currentMode == CalintfUtil.guestMode) { return getPublicCalendars(); } checkOpen(); sess.namedQuery("getCalendarByPath"); sess.setString("path", userCalendarRootPath + "/" + user.getAccount()); sess.cacheableQuery(); return (Bw...
StringBuffer sb = new StringBuffer(); sb.append("/"); sb.append(getSyspars().getUserCalendarRoot()); sb.append("/"); sb.append(user.getAccount()); sb.append("/"); sb.append(getSyspars().getUserDefaultCalendar()); return getCalendar(sb.toString());
return calendars.getDefaultCalendar();
public BwCalendar getDefaultCalendar() throws CalFacadeException { StringBuffer sb = new StringBuffer(); sb.append("/"); sb.append(getSyspars().getUserCalendarRoot()); sb.append("/"); sb.append(user.getAccount()); sb.append("/"); sb.append(getSyspars().getUserDefaultCalendar()); return getCale...
sess.namedQuery("getPublicCalendarCollections"); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWrite, true);
return calendars.getPublicCalendarCollections();
public Collection getPublicCalendarCollections() throws CalFacadeException { checkOpen(); sess.namedQuery("getPublicCalendarCollections"); sess.cacheableQuery(); return access.checkAccess(sess.getList(), privWrite, true); }
sess.namedQuery("getCalendarByPath"); sess.setString("path", publicCalendarRootPath); sess.cacheableQuery(); return (BwCalendar)sess.getUnique();
return calendars.getPublicCalendars();
public BwCalendar getPublicCalendars() throws CalFacadeException { checkOpen(); sess.namedQuery("getCalendarByPath"); sess.setString("path", publicCalendarRootPath); sess.cacheableQuery(); /* XXX access checks */ return (BwCalendar)sess.getUnique(); }
StringBuffer sb = new StringBuffer(); sb.append("/"); sb.append(getSyspars().getUserCalendarRoot()); sb.append("/"); sb.append(user.getAccount()); sb.append("/"); sb.append(getSyspars().getDefaultTrashCalendar()); return getCalendar(sb.toString());
return calendars.getTrashCalendar();
public BwCalendar getTrashCalendar() throws CalFacadeException { StringBuffer sb = new StringBuffer(); sb.append("/"); sb.append(getSyspars().getUserCalendarRoot()); sb.append("/"); sb.append(user.getAccount()); sb.append("/"); sb.append(getSyspars().getDefaultTrashCalendar()); return getCalen...