rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public OffsetMeanAmpConfig(){ ampRange = new UnitRangeImpl(-500, 500, UnitImpl.COUNT);
public OffsetMeanAmpConfig(LocalSeismogram aSeis, MicroSecondTimeRange range){ LocalSeismogramImpl seis = (LocalSeismogramImpl)aSeis; int beginIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), range.getBeginTime()); if (beginIndex < 0) beginIndex = 0; if (beginIndex > seis.getNu...
public OffsetMeanAmpConfig(){ ampRange = new UnitRangeImpl(-500, 500, UnitImpl.COUNT); }
this.ideaMap.requestFocusInWindow();
public IdeaMapController(IdeaMap newIdeaMap) { this.ideaMap = newIdeaMap; this.ideaMap.setFocusable(true); this.ideaMap.requestFocusInWindow(); this.ideaMap.addFocusListener(this); this.ideaMap.addKeyListener(this); }
this.ideaMap.setSelectedView(null);
public void deleteSelected() { final IdeaView selected = this.ideaMap.getSelectedView(); if (selected == null) { return; } MapComponent parent = selected.getParent(); if (!(parent instanceof IdeaView)) { this.ideaMap.setSelectedView(null); return; ...
System.out.print("" + direction + " " + nextLineGoingForward + " " + currentLine);
public void navigate(int direction, int breakAt) { int currentLine; int boundaryLine; if (direction == DIRECTION_FORWARD) { currentLine = nextLineGoingForward; boundaryLine = reviewMessages.size(); } else { currentLine = nextLineGoingForward - 1; boundaryLine = firstBreakPointLine - 1; } System.out.print...
System.out.println(" " + currentLine + " " + nextLineGoingForward + " " + boundaryLine);
public void navigate(int direction, int breakAt) { int currentLine; int boundaryLine; if (direction == DIRECTION_FORWARD) { currentLine = nextLineGoingForward; boundaryLine = reviewMessages.size(); } else { currentLine = nextLineGoingForward - 1; boundaryLine = firstBreakPointLine - 1; } System.out.print...
warn("Unable to restore " + entity);
public void end(String ns, String name) throws Exception { BwCategory entity = (BwCategory)pop(); globals.categories++; fixSharableEntity(entity, "Category"); globals.categoriesTbl.put(entity); try { if (globals.rintf != null) { globals.rintf.restoreCategory(entity); } } catch (Thro...
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.ConstraintEditPart.VISUAL_ID);
semanticHint = UMLVisualIDRegistry.getType(ConstraintEditPart.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.ConstraintEditPart.VISUAL_ID); view.setType(semanticHint); ...
events = new Vector();
events = new ArrayList();
public void addEvent(BwEvent val) { if (events == null) { events = new Vector(); } events.add(val); }
events.add(val);
EventInfo ei = new EventInfo(val); ei.setRecurrenceId(val.getRecurrence().getRecurrenceId()); events.add(ei);
public void addEvent(BwEvent val) { if (events == null) { events = new Vector(); } events.add(val); }
Vector v = new Vector();
ArrayList al = new ArrayList();
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.getDtstart()); addProp(v, ICalTags.dtend, comp.getDtend()); addProp(v, ICalTags.duration, comp.getDuration()); addProp(v, ICalTags.transp, comp.getTransp()); addProp(v, ICalTags.due, comp.getDue());
addProp(al, ICalTags.summary, name); addProp(al, ICalTags.dtstart, comp.getDtstart()); addProp(al, ICalTags.dtend, comp.getDtend()); addProp(al, ICalTags.duration, comp.getDuration()); addProp(al, ICalTags.transp, comp.getTransp()); addProp(al, ICalTags.due, comp.getDue());
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
addProp(v, ICalTags.status, comp.getStatus());
addProp(al, ICalTags.status, comp.getStatus());
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
addProp(v, ICalTags.uid, comp.getUid()); addProp(v, ICalTags.sequence, comp.getSequence());
addProp(al, ICalTags.uid, comp.getUid()); addProp(al, ICalTags.sequence, comp.getSequence());
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
addProp(v, ICalTags.hasRecurrence, "0"); addProp(v, ICalTags.hasAlarm, "0"); addProp(v, ICalTags.hasAttachment, "0");
addProp(al, ICalTags.hasRecurrence, "0"); addProp(al, ICalTags.hasAlarm, "0"); addProp(al, ICalTags.hasAttachment, "0");
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
return v;
return al;
public Collection getProperties(String ns) throws WebdavIntfException { init(true); Vector v = new Vector(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(v, ICalTags.summary, name); addProp(v, ICalTags.dtstart, comp.get...
return NATText.atValue("<native closure:"+base_getMethod().base_getName().getText().asNativeText().javaValue+">");
return NATText.atValue("<native closure:"+base_getMethod().base_getName().base_getText().asNativeText().javaValue+">");
public NATText meta_print() throws XTypeMismatch { return NATText.atValue("<native closure:"+base_getMethod().base_getName().getText().asNativeText().javaValue+">"); }
long ct = 0;
public void dumpSection(Iterator it) throws Throwable { if (annotations) { tagStart(sectionEventAnnotations); } else { tagStart(sectionEvents); } long ct = 0; while (it.hasNext()) { dumpEvent((BwEvent)it.next()); ct++; if ((ct % 100) == 0) { info(" ... " + ct); ...
ct++;
public void dumpSection(Iterator it) throws Throwable { if (annotations) { tagStart(sectionEventAnnotations); } else { tagStart(sectionEvents); } long ct = 0; while (it.hasNext()) { dumpEvent((BwEvent)it.next()); ct++; if ((ct % 100) == 0) { info(" ... " + ct); ...
if ((ct % 100) == 0) { info(" ... " + ct);
if ((globals.events % 100) == 0) { info(" ... " + globals.events);
public void dumpSection(Iterator it) throws Throwable { if (annotations) { tagStart(sectionEventAnnotations); } else { tagStart(sectionEvents); } long ct = 0; while (it.hasNext()) { dumpEvent((BwEvent)it.next()); ct++; if ((ct % 100) == 0) { info(" ... " + ct); ...
System.out.println("notes = " + notes);
private void appendIdea(Document document, Element element, Idea idea) throws IOException { Element ideaElement = document.createElement("outline"); ideaElement.setAttribute("text", idea.getText()); ideaElement.setAttribute("angle", "" + idea.getAngle()); String notes = idea.getNotes(); ...
form.getErr().emit("org.bedework.client.noaccess");
form.getErr().emit("org.bedework.client.error.noaccess");
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "noAccess"; // First line of defence } int calId = getIntReqPar...
err.emit("org.bedework.config.badvalue", getName(), getValue());
err.emit("org.bedework.config.error.badvalue", getName(), getValue());
public boolean validate(MessageEmit err) { goodValue = true; if (!getShow()) { return true; } try { setIntVal(Integer.parseInt(getValue())); } catch (Throwable t) { err.emit("org.bedework.config.badvalue", getName(), getValue()); goodValue = false; } return goodValue; }
if (timezonesFilename != null) {
if (from2p3px && (timezonesFilename != null)) {
public CalTimezones getTzcache() throws Throwable { if (tzcache != null) { return tzcache; } if (syspars.getTzid() == null) { throw new Exception("syspars.tzid not initialised"); } tzcache = new TimezonesImpl(debug, getPublicUser(), rintf); tzcache.setDefaultTimeZoneId(syspars.getTzid()); ...
timezones++;
public CalTimezones getTzcache() throws Throwable { if (tzcache != null) { return tzcache; } if (syspars.getTzid() == null) { throw new Exception("syspars.tzid not initialised"); } tzcache = new TimezonesImpl(debug, getPublicUser(), rintf); tzcache.setDefaultTimeZoneId(syspars.getTzid()); ...
Map designParameters = new HashMap(); designParameters.put(REPORT_HEADLINE_KEY, sqlQuery.getName()); JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designParameters, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used");
String uri = null; if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getSynchronizedSimpleExcelReport(queryResult, designBox, "report");
private String executeQueries(SQLQuery sqlQuery, int numberOfRows, QueryToSQLBridge sqlBridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResultSession sessionBean = (QueryResultSession) IBOLookup.getSessionInstance(iwc, QueryResultSession.class); Query...
String uri; if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else if (EXCEL_KEY.equals(outputFormat)) { uri = reportBusiness.getExcelReport(print, "report"); }
private String executeQueries(SQLQuery sqlQuery, int numberOfRows, QueryToSQLBridge sqlBridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResultSession sessionBean = (QueryResultSession) IBOLookup.getSessionInstance(iwc, QueryResultSession.class); Query...
uri = reportBusiness.getHtmlReport(print, "report");
JasperPrint print = reportBusiness.printSynchronizedReport(queryResult, designBox); if (print == null) { return resourceBundle.getLocalizedString("ro_could_not_use_layout", "Layout can't be used"); } if (PDF_KEY.equals(outputFormat)) { uri = reportBusiness.getPdfReport(print, "report"); } else { uri = reportB...
private String executeQueries(SQLQuery sqlQuery, int numberOfRows, QueryToSQLBridge sqlBridge, List executedSQLStatements, IWResourceBundle resourceBundle, IWContext iwc) throws RemoteException { QueryResultSession sessionBean = (QueryResultSession) IBOLookup.getSessionInstance(iwc, QueryResultSession.class); Query...
logError("[ReportQueryOverview] Couldn't retrieve design.");
logError("[QueryResultViewer] Couldn't retrieve design.");
private DesignBox getDesignBox(SQLQuery sqlQuery, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(...
Map designParameters = design.getParameterMap(); String queryName = sqlQuery.getName(); designParameters.put(DesignBox.REPORT_HEADLINE_KEY, queryName);
private DesignBox getDesignBox(SQLQuery sqlQuery, JasperReportBusiness reportBusiness, IWResourceBundle resourceBundle, IWContext iwc) { DesignBox design = null; try { if (designId > 0) { design = reportBusiness.getDesignBox(designId); } else { design = reportBusiness.getDynamicDesignBox(...
System.err.println("[ReportOverview]: Can't retrieve GroupBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[ReportOverview]: Can't retrieve GroupBusiness");
System.err.println("[QueryResultViewer]: Can't retrieve GroupBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[QueryResultViewer]: Can't retrieve GroupBusiness");
public GroupBusiness getGroupBusiness() { try { return (GroupBusiness) IBOLookup.getServiceInstance(getIWApplicationContext(), GroupBusiness.class); } catch (RemoteException ex) { System.err.println("[ReportOverview]: Can't retrieve GroupBusiness. Message is: " + ex.getMessage()); throw new RuntimeExcep...
logError("[ReportOverview] Could not retrieve handler class");
logError("[QueryResultViewer] Could not retrieve handler class");
private InputHandler getInputHandler(String className) { if (className == null) { return null; } InputHandler inputHandler = null; try { inputHandler = (InputHandler) RefactorClassRegistry.forName(className).newInstance(); } catch (ClassNotFoundException ex) { log(ex); logError("[ReportOverview] Cou...
logError("[ReportOverview] Could not instanciate handler class");
logError("[QueryResultViewer] Could not instanciate handler class");
private InputHandler getInputHandler(String className) { if (className == null) { return null; } InputHandler inputHandler = null; try { inputHandler = (InputHandler) RefactorClassRegistry.forName(className).newInstance(); } catch (ClassNotFoundException ex) { log(ex); logError("[ReportOverview] Cou...
System.err.println("[ReportOverview]: Can't retrieve QueryService. Message is: " + ex.getMessage()); throw new RuntimeException("[ReportOverview]: Can't retrieve QueryService");
System.err.println("[QueryResultViewer]: Can't retrieve QueryService. Message is: " + ex.getMessage()); throw new RuntimeException("[QueryResultViewer]: Can't retrieve QueryService");
public QueryService getQueryService() { try { return (QueryService) IBOLookup.getServiceInstance( getIWApplicationContext() ,QueryService.class); } catch (RemoteException ex) { System.err.println("[ReportOverview]: Can't retrieve QueryService. Message is: " + ex.getMessage()); throw new Runti...
System.err.println("[ReportOverview]: Can't retrieve QueryToSqlBridge. Message is: " + ex.getMessage()); throw new RuntimeException("[ReportOverview]: Can't retrieve QueryToSQLBridge");
System.err.println("[QueryResultViewer]: Can't retrieve QueryToSqlBridge. Message is: " + ex.getMessage()); throw new RuntimeException("[QueryResultViewer]: Can't retrieve QueryToSQLBridge");
public QueryToSQLBridge getQueryToSQLBridge() { try { return (QueryToSQLBridge) IBOLookup.getServiceInstance( getIWApplicationContext() ,QueryToSQLBridge.class); } catch (RemoteException ex) { System.err.println("[ReportOverview]: Can't retrieve QueryToSqlBridge. Message is: " + ex.getMessage()); ...
System.err.println("[ReportOverview]: Can't retrieve JasperReportBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[ReportOverview]: Can't retrieve ReportBusiness");
System.err.println("[QueryResultViewer]: Can't retrieve JasperReportBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[QueryResultViewer]: Can't retrieve ReportBusiness");
public JasperReportBusiness getReportBusiness() { try { return (JasperReportBusiness) IBOLookup.getServiceInstance( getIWApplicationContext(), JasperReportBusiness.class); } catch (RemoteException ex) { System.err.println("[ReportOverview]: Can't retrieve JasperReportBusiness. Message is: " + ex.ge...
System.err.println("[ReportOverview]: Can't retrieve UserBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[ReportOverview]: Can't retrieve UserBusiness");
System.err.println("[QueryResultViewer]: Can't retrieve UserBusiness. Message is: " + ex.getMessage()); throw new RuntimeException("[QueryResultViewer]: Can't retrieve UserBusiness");
public UserBusiness getUserBusiness() { try { return (UserBusiness) IBOLookup.getServiceInstance(getIWApplicationContext(), UserBusiness.class); } catch (RemoteException ex) { System.err.println("[ReportOverview]: Can't retrieve UserBusiness. Message is: " + ex.getMessage()); throw new RuntimeException(...
logError("[ReportOverview]: Can't retrieve id of layout");
logError("[QueryResultViewer]: Can't retrieve id of layout");
private String initializeByParsing(IWContext iwc, IWResourceBundle resourceBundle) throws NumberFormatException, RemoteException, FinderException, IOException { // request from self if (iwc.isParameterSet(QUERY_ID_KEY)) { queryId = Integer.parseInt(iwc.getParameter(QUERY_ID_KEY)); designId = Integer.parseInt(iwc...
try { if (trees.size() > 0) { exporter.exportTrees(trees); } } catch (IOException e) { e.printStackTrace(); }
public void cleanUp() { destination.close(); destination = null; }
try { exporter.exportTree(tree); } catch (IOException e) { e.printStackTrace(); }
trees.add(tree);
public void sample(int generation, Population population) { int[] sample = getSample(generation, population); List<Taxon> taxa = new ArrayList<Taxon>(); for (int i = 0; i < sample.length; i++) { taxa.add(Taxon.getTaxon(substituteVariables(label, generation, i + 1))); } if (sample != null) { RootedTree tree = ...
List L = ReportFinder.listOfDataClasses();
Collection L = ReportFinder.listOfDataClasses();
private DropdownMenu getDataEntityDrop(String name, String selected) { List L = ReportFinder.listOfDataClasses(); DropdownMenu drp = new DropdownMenu(name); drp.addMenuElementFirst("-", "-1"); java.util.Iterator I = L.iterator(); while (I.hasNext()) { ICObject obj = (ICObject) I.next(); drp.addMenuElement(obj...
return NATText.atValue("<native method:"+base_getName().getText().asNativeText().javaValue+">");
return NATText.atValue("<native method:"+base_getName().base_getText().asNativeText().javaValue+">");
public NATText meta_print() throws XTypeMismatch { return NATText.atValue("<native method:"+base_getName().getText().asNativeText().javaValue+">"); }
mainPanel.dispose();
public void dispose() { }
return "AudioPlayer";
return "Audio";
public String getTitle() { return "AudioPlayer"; }
xmlAccess = AccessUtil.getXmlString(acl);
xmlAccess = AccessAppUtil.getXmlAclString(acl);
public String getXmlAccess() { try { if (xmlAccess == null) { Acl acl = svci.getAcl(getEvent()); xmlAccess = AccessUtil.getXmlString(acl); } } catch (Throwable t) { error(t); } return xmlAccess; }
BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), intFld());
BwSubscription sub = globals.subscriptionsTbl.getSub( OwnerInfo.makeOwnerInfo(p.getOwner()), intFld());
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("defaultCalendar")) { p.setDefaultCalendar(calendarFld()); } else if...
BwSubscription sub = globals.subscriptionsTbl.getSub(p.getOwner(), stringFld());
BwSubscription sub = globals.subscriptionsTbl.getSub( OwnerInfo.makeOwnerInfo(p.getOwner()), stringFld());
public void field(String name) throws java.lang.Exception{ BwPreferences p = (BwPreferences)top(); if (ownedEntityTags(p, name)) { return; } if (name.equals("email")) { p.setEmail(stringFld()); } else if (name.equals("defaultCalendar")) { p.setDefaultCalendar(calendarFld()); } else if...
publicCalendarRoot = CalEnv.getGlobalProperty("public.calroot"); userCalendarRoot = CalEnv.getGlobalProperty("user.calroot");
publicCalendarRoot = getSvci().getSyspars().getPublicCalendarRoot(); userCalendarRoot = getSvci().getSyspars().getUserCalendarRoot();
public void init(WebdavServlet servlet, HttpServletRequest req, Properties props, boolean debug) throws WebdavIntfException { super.init(servlet, req, props, debug); namespacePrefix = WebdavUtils.getUrlPrefix(req); namespace = namespacePrefix + "/schema";...
form.getMsg().emit("org.bedework.pubevents.message.timezones.imported");
form.getMsg().emit("org.bedework.client.message.timezones.imported");
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } FormFile upFile = form.getUploadFile(); if (upFile == null) { ...
methods.put("OPTIONS", new CalDavOptionsMethod());
public void addMethods(WebdavNsIntf nsIntf) throws WebdavException{ HashMap methods = nsIntf.getMethods(); super.addMethods(nsIntf); // Replace methods methods.put("MKCALENDAR", new MkcalendarMethod()); methods.put("REPORT", new ReportMethod()); }
if (MethodBase.nodeMatches(curnode, CaldavTags.isNotDefined)) { if (cf.getTimeRange() != null) { throw new WebdavBadRequest(); } cf.setIsNotDefined(true); } else if (MethodBase.nodeMatches(curnode, CaldavTags.timeRange)) { if (cf.getIsNotDefined()) { throw new WebdavBadRequest(); }
if (MethodBase.nodeMatches(curnode, CaldavTags.timeRange)) {
private CompFilter parseCompFilter(Node nd) throws WebdavException { String name = getOnlyAttrVal(nd, "name"); if (name == null) { throw new WebdavBadRequest(); } CompFilter cf = new CompFilter(name); Element[] children = getChildren(nd); try { for (int i = 0; i < children.length; i++) { ...
new AGScopeTest(parent, child, parent.getDynamicParent()));
new AGBegin(new NATTable(new ATObject[] { new AGScopeTest(parent, child, parent.getDynamicParent())})));
public void testDelegatedMethodInvocation() { try { NATObject parent = new NATObject(lexicalRoot_); NATObject child = new NATObject(parent, lexicalRoot_, NATObject._IS_A_); ATSymbol lateBoundSelf = AGSymbol.alloc(NATText.atValue("lateBoundSelf")); ATMethod lateBoundSelfTestMethod = new NATMethod( la...
new AGScopeTest(child, child, parent));
new AGBegin(new NATTable(new ATObject[] { new AGScopeTest(child, child, parent)})));
public void testDelegatedMethodInvocation() { try { NATObject parent = new NATObject(lexicalRoot_); NATObject child = new NATObject(parent, lexicalRoot_, NATObject._IS_A_); ATSymbol lateBoundSelf = AGSymbol.alloc(NATText.atValue("lateBoundSelf")); ATMethod lateBoundSelfTestMethod = new NATMethod( la...
new AGDefFunction(superSemantics, NATTable.EMPTY, new AGBegin( new NATTable( new ATObject[] { test } )))), lexicalRoot_, lexicalRoot_));
new AGBegin(new NATTable(new ATObject[] { new AGDefFunction(superSemantics, NATTable.EMPTY, new AGBegin( new NATTable( new ATObject[] { test } )))}))), lexicalRoot_, lexicalRoot_));
public void testExtend() { try { NATObject parent = new NATObject(lexicalRoot_); ATSymbol superSemantics = AGSymbol.alloc(NATText.atValue("superSemantics")); AGScopeTest test = new AGScopeTest(null, null, parent); NATObject child = (NATObject)parent.meta_extend( new NATClosure( new NATMethod(A...
new AGScopeTest(parent, child, parent.getDynamicParent()));
new AGBegin(new NATTable(new ATObject[] { new AGScopeTest(parent, child, parent.getDynamicParent())})));
public void testExtend() { try { NATObject parent = new NATObject(lexicalRoot_); ATSymbol superSemantics = AGSymbol.alloc(NATText.atValue("superSemantics")); AGScopeTest test = new AGScopeTest(null, null, parent); NATObject child = (NATObject)parent.meta_extend( new NATClosure( new NATMethod(A...
new AGScopeTest(object, object, object.getDynamicParent()));
new AGBegin(new NATTable(new ATObject[] { new AGScopeTest(object, object, object.getDynamicParent())})));
public void testMethodInvocation() { try { NATObject object = new NATObject(lexicalRoot_); ATSymbol scopeTest = AGSymbol.alloc(NATText.atValue("scopeTest")); ATMethod scopeTestMethod = new NATMethod( scopeTest, NATTable.EMPTY, new AGScopeTest(object, object, object.getDynamicParent())); object.m...
return this.meta_print();
throw new XTypeMismatch(NATText.class, this);
public NATText asNativeText() throws InterpreterException { return this.meta_print(); // throw new XTypeMismatch("Expected a native text, given: " + this.getClass().getName(), this); }
error("Unable to map filter " + entity); cal = null; globals.calMapErrors++; } else {
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()...
while(e.hasNext()) internalTimeConfig.addSeismogram(((SeismogramPlotter)e.next()).getSeismogram(), begin);
while(e.hasNext()){ added = ((SeismogramPlotter)e.next()).getSeismogram(); internalTimeConfig.addSeismogram(added, begin); }
public Selection (MicroSecondDate begin, MicroSecondDate end, TimeRangeConfig tr, HashMap plotters){ this.begin = begin; this.end = end; this.timeConfig = tr; this.plotters = plotters; internalTimeConfig = new BoundedTimeConfig(); Iterator e = plotters.keySet().iterator(); while(e.hasNext()) internalTimeConfig....
if(beginDistance < .05 || endDistance < .05){ if(beginDistance < endDistance){ this.begin = selectionBegin; internalTimeConfig.setAllBeginTime(selectionBegin); internalTimeConfig.setDisplayInterval(end.difference(begin)); return true; }else{ this.end = selectionEnd; internalTimeConfig.setDisplayInterval(end.difference(...
if(beginDistance < endDistance){ this.begin = selectionBegin; internalTimeConfig.setAllBeginTime(selectionBegin); internalTimeConfig.setDisplayInterval(end.difference(begin)); return true; }else{ this.end = selectionEnd; internalTimeConfig.setDisplayInterval(end.difference(begin)); return true;
public boolean adjustRange(MicroSecondDate selectionBegin, MicroSecondDate selectionEnd){ double timeWidth = timeConfig.getTimeRange().getInterval().getValue(); double beginDistance = Math.abs(begin.getMicroSecondTime() - selectionEnd.getMicroSecondTime())/timeWidth; double endDistance = Math.abs(end.getMicroSecond...
return false;
public boolean adjustRange(MicroSecondDate selectionBegin, MicroSecondDate selectionEnd){ double timeWidth = timeConfig.getTimeRange().getInterval().getValue(); double beginDistance = Math.abs(begin.getMicroSecondTime() - selectionEnd.getMicroSecondTime())/timeWidth; double endDistance = Math.abs(end.getMicroSecond...
if (CalFacadeUtil.isISODate(date)) { Date jdt = CalFacadeUtil.fromISODate(date); form.assignEventDates(jdt); } else if (CalFacadeUtil.isISODateTime(date)) { Date jdt = CalFacadeUtil.fromISODateTime(date); form.assignEventDates(jdt);
if (CalFacadeUtil.isISODateTime(date)) { form.assignEventDates(CalFacadeUtil.fromISODateTime(date)); } else if (CalFacadeUtil.isISODate(date)) { form.assignEventDates(CalFacadeUtil.fromISODate(date)); } else { form.getErr().emit("org.bedework.client.error.baddate", date); return "badDate";
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { form.refreshIsNeeded(); String date = getReqPar(request, "startdate"); if (date != null) { if (CalFacadeUtil.isISODate(date)) { Date jdt = CalFacadeUtil.fromISODate(date); form....
if(node.isResourceBased() && nodeCorrespondsToViewId(node, viewId, context)){ newViewId=node.getResourceURI(); }
public UIViewRoot createView(FacesContext context, String viewId) { ViewNode node = getNode(context); String newViewId=viewId; //if(node.isResourceBased() && nodeCorrespondsToViewId(node, viewId, context)){ // newViewId=node.getResourceURI(); //} if(node.isResourceBased()){ if(!viewId.endsWith(JSP_EXT)){ ne...
if(node.isResourceBased()){ if(!viewId.endsWith(JSP_EXT)){ newViewId=node.getResourceURI(); } }
public UIViewRoot createView(FacesContext context, String viewId) { ViewNode node = getNode(context); String newViewId=viewId; //if(node.isResourceBased() && nodeCorrespondsToViewId(node, viewId, context)){ // newViewId=node.getResourceURI(); //} if(node.isResourceBased()){ if(!viewId.endsWith(JSP_EXT)){ ne...
if (uriWithoutContextAndServlet.endsWith("/")) { uriWithoutContextAndServlet = uriWithoutContextAndServlet.substring(0, uriWithoutContextAndServlet.length() - 1); }
private boolean nodeCorrespondsToViewId(ViewNode node, String viewId, FacesContext context) { // does the viewId correspond to the node? String requestServletPath = context.getExternalContext().getRequestServletPath(); String requestContextPath = context.getExternalContext().getRequestContextPath(); // count the l...
public void init(EObject instance) { for (java.util.Iterator it = featureInitializers.iterator(); it.hasNext();) { IFeatureInitializer nextExpr = (IFeatureInitializer) it.next(); try { nextExpr.init(instance); } catch (RuntimeException e) { UMLDiagramEditorPlugin.getInstance().logError("Feature initialization failed", ...
protected abstract void init();
public void init(EObject instance) { for (java.util.Iterator it = featureInitializers.iterator(); it.hasNext();) { IFeatureInitializer nextExpr = (IFeatureInitializer) it.next(); try { nextExpr.init(instance); } catch (RuntimeException e) { UMLDiagramEditorPlugin.getInstance().logError("Feat...
form.getErr().emit("org.bedework.error.mail.norecipient", 1);
form.getErr().emit("org.bedework.client.error.mail.norecipient", 1);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { BwEvent ev = form.retrieveCurrentEvent(); if (ev == null) { return "noevent"; } String recipient = form.getLastEmail(); if (recipient == null) { form.getErr().emit("org.bedework.er...
form.getMsg().emit("org.bedework.message.event.mailed");
form.getMsg().emit("org.bedework.client.message.event.mailed");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { BwEvent ev = form.retrieveCurrentEvent(); if (ev == null) { return "noevent"; } String recipient = form.getLastEmail(); if (recipient == null) { form.getErr().emit("org.bedework.er...
FileOutputStream fileOutputStream = null; try { File file = new File("outputShow.txt"); fileOutputStream = new FileOutputStream(file); } catch (FileNotFoundException e) { }
public void show() { initData(); FileOutputStream fileOutputStream = null; try { File file = new File("outputShow.txt"); fileOutputStream = new FileOutputStream(file); } catch (FileNotFoundException e) { } for (ReviewMessage reviewMessage : reviewMessages) { try { fileOutputStream.write(charset.en...
try { fileOutputStream.write(charset.encode("" + reviewMessage.getType() + ", " + reviewMessage + "\n").array()); } catch (IOException e) { }
public void show() { initData(); FileOutputStream fileOutputStream = null; try { File file = new File("outputShow.txt"); fileOutputStream = new FileOutputStream(file); } catch (FileNotFoundException e) { } for (ReviewMessage reviewMessage : reviewMessages) { try { fileOutputStream.write(charset.en...
try { fileOutputStream.close(); } catch (IOException e) { }
public void show() { initData(); FileOutputStream fileOutputStream = null; try { File file = new File("outputShow.txt"); fileOutputStream = new FileOutputStream(file); } catch (FileNotFoundException e) { } for (ReviewMessage reviewMessage : reviewMessages) { try { fileOutputStream.write(charset.en...
acl.removeAccess(ace);
acl.removeWho(ace); } it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next();
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { try { Acl acl = checkAccess(ent, privWriteAcl, false).acl; Iterator it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next(); acl.removeAccess(ace); ...
if (ent instanceof BwCalendar) { updatePathInfo((BwCalendar)ent, acl); }
pathInfoMap.flush();
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { try { Acl acl = checkAccess(ent, privWriteAcl, false).acl; Iterator it = aces.iterator(); while (it.hasNext()) { Ace ace = (Ace)it.next(); acl.removeAccess(ace); ...
PathInfo pi = (PathInfo)pathInfoTable.get(path);
PathInfo pi = pathInfoMap.getInfo(path);
private char[] getAclChars(BwShareableDbentity ent) throws CalFacadeException { if (ent instanceof BwShareableContainedDbentity) { BwCalendar container; if (ent instanceof BwCalendar) { container = (BwCalendar)ent; } else { container = ((BwShareableContainedDbentity)ent).getCalendar();...
pathInfoTable.put(path, pi);
pathInfoMap.putInfo(path, pi);
private char[] getAclChars(BwShareableDbentity ent) throws CalFacadeException { if (ent instanceof BwShareableContainedDbentity) { BwCalendar container; if (ent instanceof BwCalendar) { container = (BwCalendar)ent; } else { container = ((BwShareableContainedDbentity)ent).getCalendar();...
form.initFields();
initFields(form);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** Set the objects to null so we get new ones. */ form.initFie...
taggedVal("sub-unremoveable=", sub.getUnremoveable());
taggedVal("sub-unremoveable", sub.getUnremoveable());
private void dumpUserPrefs(BwPreferences p) throws Throwable { tagStart(objectUserPrefs); ownedEntityTags(p); Collection s = p.getSubscriptions(); if (s.size() > 0) { tagStart("subscriptions"); Iterator si = s.iterator(); while (si.hasNext()) { BwSubscription sub = (BwSubscription)si...
return getCal().getEventsByName(cal, val);
return postProcess(getCal().getEventsByName(cal, val), (BwSubscription)null);
public Collection findEventsByName(BwCalendar cal, String val) throws CalFacadeException { return getCal().getEventsByName(cal, val); }
System.out.println("redetermining current selection");
public void selectRegion(MouseEvent one, MouseEvent two){ Insets insets = this.getInsets(); Dimension dim = getSize(); double x1percent, x2percent; if(one.getX() < two.getX()){ x1percent = (one.getX() - insets.left)/(double)(dim.getWidth() - insets.left - insets.right); x2percent = (two.getX() - insets.left...
System.out.println("selected an already existing range");
public void selectRegion(MouseEvent one, MouseEvent two){ Insets insets = this.getInsets(); Dimension dim = getSize(); double x1percent, x2percent; if(one.getX() < two.getX()){ x1percent = (one.getX() - insets.left)/(double)(dim.getWidth() - insets.left - insets.right); x2percent = (two.getX() - insets.left...
if (ent instanceof BwCalSuiteWrapper) { ent = (BwShareableDbentity)((BwCalSuiteWrapper)ent).fetchEntity(); }
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException { getCal().changeAccess(ent, aces); }
TPosAuthorisationEntriesBeanHome home = (TPosAuthorisationEntriesBeanHome) IDOLookup.getHome(TPosAuthorisationEntriesBeanHome.class);
TPosAuthorisationEntriesBeanHome home = (TPosAuthorisationEntriesBeanHome) IDOLookup.getHome(TPosAuthorisationEntriesBean.class);
private String doAuth(String cardnumber, String monthExpires, String yearExpires, double amount, String currency, String transactionType, Object parentDataPK, String authIDRsp) throws TPosException { if(_client != null) { _client.setProperty(TPOS3Client.PN_USERID, _userId); _client.setProperty(TPOS3Client...
private int calculateTextFieldWidthForString(String str){ int fontSize = 9; return (int)( 5+(str.length()*fontSize*0.58));
private int calculateTextFieldWidthForString(String str, int fontSize){ return (int)( 10 +(str.length()* fontSize *0.58));
private int calculateTextFieldWidthForString(String str){ int fontSize = 9; return (int)( 5+(str.length()*fontSize*0.58)); }
int descriptionWidth = (description == null) ? labelWidth : calculateTextFieldWidthForString(description); int inputValueDisplayWidth = (inputValueDisplay == null) ? valueWidth : calculateTextFieldWidthForString(inputValueDisplay);
int descriptionWidth = (description == null) ? labelWidth : calculateTextFieldWidthForString(description, DynamicReportDesign.FONT_SIZE_PAGE_HEADER ); int inputValueDisplayWidth = (inputValueDisplay == null) ? valueWidth : calculateTextFieldWidthForString(inputValueDisplay, DynamicReportDesign.FONT_SIZE_PAGE_HEADER);
public DesignBox getDynamicDesignBox(SQLQuery query, IWResourceBundle resourceBundle, IWContext iwc) throws IOException, JRException { final int columnSpacing = 15; int columnWidth = 120; final int labelWidth = 95; final int valueWidth = 55; Map parameterMap = new HashMap(); DynamicReportDesign desi...
long folderIdentifier = System.currentTimeMillis(); String path = getRealPathToReportFile("report", EXCEL_FILE_EXTENSION,folderIdentifier); try { SimpleReportBusiness srBusiness = (SimpleReportBusiness) IBOLookup.getServiceInstance(getIWApplicationContext(),SimpleReportBusiness.class); srBusiness.writeSimpleExcelFile(...
return getSimpleExcelReportWithFileName(reportData, nameOfReport, description, "report");
public String getSimpleExcelReport(JRDataSource reportData, String nameOfReport, ReportDescription description) { // prepare path long folderIdentifier = System.currentTimeMillis(); String path = getRealPathToReportFile("report", EXCEL_FILE_EXTENSION,folderIdentifier); try { SimpleReportBusiness srBusine...
public JasperPrint printSynchronizedReport(QueryResult dataSource, Map parameterMap, DesignBox designBox) { JasperPrint print; synchronizeResultAndDesign(dataSource, parameterMap, designBox); dataSource.resetDataSource();
public JasperPrint printSynchronizedReport(QueryResult dataSource, DesignBox designBox) { synchronizeAndReset(dataSource, designBox); JasperPrint print = null;
public JasperPrint printSynchronizedReport(QueryResult dataSource, Map parameterMap, DesignBox designBox) { JasperPrint print; synchronizeResultAndDesign(dataSource, parameterMap, designBox); // henceforth we treat the QueryResult as a JRDataSource, // therefore we reset the QueryResult to prepare it ...
map.putAll(parameterMap);
public JasperPrint printSynchronizedReport(QueryResult dataSource, Map parameterMap, DesignBox designBox) { JasperPrint print; synchronizeResultAndDesign(dataSource, parameterMap, designBox); // henceforth we treat the QueryResult as a JRDataSource, // therefore we reset the QueryResult to prepare it ...
public void synchronizeResultAndDesign(QueryResult result, Map parameterMap, DesignBox designBox) {
private void synchronizeResultAndDesign(QueryResult result, DesignBox designBox) {
public void synchronizeResultAndDesign(QueryResult result, Map parameterMap, DesignBox designBox) { JasperDesign reportDesign = designBox.getDesign(); Map designParameterMap = designBox.getParameterMap(); List designFieldsToRemove = new ArrayList(); // get fields of the report design List fields = repor...
parameterMap.put(displayKey, "");
designParameterMap.put(displayKey, "");
public void synchronizeResultAndDesign(QueryResult result, Map parameterMap, DesignBox designBox) { JasperDesign reportDesign = designBox.getDesign(); Map designParameterMap = designBox.getParameterMap(); List designFieldsToRemove = new ArrayList(); // get fields of the report design List fields = repor...
parameterMap.put(displayKey, display);
designParameterMap.put(displayKey, display);
public void synchronizeResultAndDesign(QueryResult result, Map parameterMap, DesignBox designBox) { JasperDesign reportDesign = designBox.getDesign(); Map designParameterMap = designBox.getParameterMap(); List designFieldsToRemove = new ArrayList(); // get fields of the report design List fields = repor...
return JavaInterfaceAdaptor.createNativeATObject(jRcvr.getClass(), args);
return new NATException((InterpreterException) Symbiosis.symbioticInstanceCreation(jRcvr.getClass(), args) .asJavaObjectUnderSymbiosis().getWrappedObject());
public static final ATObject upExceptionCreation(InterpreterException jRcvr, ATTable atInitargs) throws InterpreterException { ATObject[] args = atInitargs.asNativeTable().elements_; return JavaInterfaceAdaptor.createNativeATObject(jRcvr.getClass(), args); }
String name = c.getSimpleName();
String name = getSimpleName(c);
public static final String valueNameOf(Class c) { String name = c.getSimpleName(); if (name.startsWith("AT")) { return "a" + classnameToValuename(name, "AT"); } else if (name.startsWith("NAT")) { return "a native" + classnameToValuename(name, "NAT"); } else if (name.startsWith("AG")) { return "a native AST" ...
public void renderView(FacesContext facesContext, UIViewRoot viewToRender) throws IOException, FacesException {
public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException {
public void renderView(FacesContext facesContext, UIViewRoot viewToRender) throws IOException, FacesException { /* ViewNode node = getNode(facesContext); if (viewToRender == null) { log.warning("viewToRender must not be null"); throw new NullPointerException("viewToRender must no...
super.renderView(facesContext,viewToRender);
ViewNode node = getNode(context); String viewId = viewToRender.getViewId(); String newViewId=viewId; if(node.isResourceBased() && nodeCorrespondsToViewId(node, viewId, context)){ newViewId=node.getResourceURI(); } viewToRender.setViewId(newViewId); super.renderView(context,viewToRender);
public void renderView(FacesContext facesContext, UIViewRoot viewToRender) throws IOException, FacesException { /* ViewNode node = getNode(facesContext); if (viewToRender == null) { log.warning("viewToRender must not be null"); throw new NullPointerException("viewToRender must no...
instance.setSelected(centre); assertEquals("Old selected should now be idea2", idea2, myList.oldSelected); assertEquals("New selected should now be centre", centre, myList.newSelected);
public void testGetSelected() { assertEquals("Should have selected centre by default", instance.getIdea(), instance.getSelected()); Idea idea2 = new Idea("Sub idea"); instance.getIdea().add(idea2); instance.setSelected(idea2); assertEquals("Didn't pick up new select...
BwEvent override = proxy.getTarget();
BwEvent override = proxy.getRef();
public EventUpdateResult addEvent(BwCalendar cal, BwEvent event, Collection overrides) throws CalFacadeException { EventUpdateResult updResult = new EventUpdateResult(); if (event instanceof BwEventProxy) { BwEventProxy proxy = (BwEventP...
getCal().addEvent(event, overrides);
if (event instanceof BwEventProxy) { BwEventProxy proxy = (BwEventProxy)event; BwEvent override = proxy.getRef(); getCal().addEvent(override, overrides); } else { getCal().addEvent(event, overrides); }
public EventUpdateResult addEvent(BwCalendar cal, BwEvent event, Collection overrides) throws CalFacadeException { EventUpdateResult updResult = new EventUpdateResult(); if (event instanceof BwEventProxy) { BwEventProxy proxy = (BwEventP...
vcal.getProperties().add(Method.PUBLISH);
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { String guid = Util.checkNull(request.getParameter("guid")); int calid = getIntReqPar(request, "calid"...
form.initFields();
initFields(form);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** Set the objects to null so we get new ones. */ form.initFie...
throw new Exception("Unimplemented - attendee");
BwAttendee att = globals.attendeesTbl.get(intFld());
public void field(String name) throws Exception { BwEvent e = (BwEvent)top(); if (shareableContainedEntityTags(e, name)) { return; } try { /* pre-hibernate fields */ if (name.equals("lastmod")) { // pre-hibernate e.setLastmod(isoDateTimeFld()); } else if (name.equals("created"))...
if (att == null) { error("Missing attendee - id=" + intFld()); globals.entityError = true; } else { e.addAttendee(att); att.setId(CalFacadeDefs.unsavedItemKey); globals.attendees++; }
public void field(String name) throws Exception { BwEvent e = (BwEvent)top(); if (shareableContainedEntityTags(e, name)) { return; } try { /* pre-hibernate fields */ if (name.equals("lastmod")) { // pre-hibernate e.setLastmod(isoDateTimeFld()); } else if (name.equals("created"))...