rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
comp.update(file, false);
if (comp != null) { comp.update(file, false); }
public void playbackStopped(Player player) { File file = player.getFile(); updatePlayingLabel(null); ListComponent comp = (ListComponent)labeltable.get(file); comp.update(file, false); }
URL dirURL = new URL(base, directory.getName());
URL dirURL = new URL(base, directory.getName()+"/");
void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); dataset = new XMLDataSet(docBuilder, base, "genid"+Math.roun...
System.out.println("returning true");
public boolean isSelectionSelected(int currx, int curry) { if( (currx > (endx - 10) && currx < (endx + 10) && curry >= beginy && curry <= endy) || (currx > (beginx - 10) && currx < (beginx + 10) && curry >= beginy && curry <= endy) ) { Syst...
System.out.println("return false");
public boolean isSelectionSelected(int currx, int curry) { if( (currx > (endx - 10) && currx < (endx + 10) && curry >= beginy && curry <= endy) || (currx > (beginx - 10) && currx < (beginx + 10) && curry >= beginy && curry <= endy) ) { Syst...
form.initFields(); form.setEvent(null);
initFields(form);
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access and set request parameters */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** Set the objects to null so we get new o...
form.resetEvent();
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access and set request parameters */ if (!form.getAuthorisedUser()) { return "noAccess"; } /** Set the objects to null so we get new o...
*/
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /* Check access */ if (!form.getUserAuth().isSuperUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar !...
str = getReqPar(request, "email"); if (str != null) { prefs.setEmail(str); }
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); BwPreferences prefs; /* Refetch the prefs */ if (getPublicAdmin...
JTextPane pane = new JTextPane(doc);
public Console() { final PrintStream oldOut = System.out; final PrintStream oldErr = System.err; final SimpleAttributeSet attr = new SimpleAttributeSet(); final DefaultStyledDocument doc = new DefaultStyledDocument(); StyleConstants.setFontFamily(attr, "Monospaced"); PrintStream newOut = new PrintStream(new Ou...
pane.setCaretPosition(doc.getLength());
public void write(int i) throws IOException { oldOut.write(i); try { StyleConstants.setForeground(attr, Color.BLACK); doc.insertString(doc.getLength(), Character.toString((char)i), attr); } catch (Exception exc) { exc.printStackTrace(); } }
pane.setCaretPosition(doc.getLength());
public void write(int i) throws IOException { oldErr.write(i); try { StyleConstants.setForeground(attr, Color.RED); doc.insertString(doc.getLength(), Character.toString((char)i), attr); } catch (Exception exc) { exc.printStackTrace(); } }
testScope.meta_defineField(AGSymbol.alloc("symbol"), symbol);
testScope.meta_defineField(AGSymbol.jAlloc("symbol"), symbol);
public void setUp() throws Exception { globalLexScope = Evaluator.getGlobalLexicalScope(); testScope = new NATCallframe(globalLexScope); final NATClosure symbol = new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTable arguments) throws InterpreterException { return AGSymbol.alloc(arguments...
AGSymbol.alloc("echo:"),
AGSymbol.jAlloc("echo:"),
public void setUp() throws Exception { globalLexScope = Evaluator.getGlobalLexicalScope(); testScope = new NATCallframe(globalLexScope); final NATClosure symbol = new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTable arguments) throws InterpreterException { return AGSymbol.alloc(arguments...
AGSymbol.alloc("doesNotUnderstandX"),
AGSymbol.jAlloc("doesNotUnderstandX"),
public void setUp() throws Exception { globalLexScope = Evaluator.getGlobalLexicalScope(); testScope = new NATCallframe(globalLexScope); final NATClosure symbol = new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTable arguments) throws InterpreterException { return AGSymbol.alloc(arguments...
AGSymbol.alloc("nativeException"),
AGSymbol.jAlloc("nativeException"),
public void setUp() throws Exception { globalLexScope = Evaluator.getGlobalLexicalScope(); testScope = new NATCallframe(globalLexScope); final NATClosure symbol = new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTable arguments) throws InterpreterException { return AGSymbol.alloc(arguments...
AGSymbol.alloc("echo:"),
AGSymbol.jAlloc("echo:"),
public void testInterpreterExceptionHandling() { try { ATObject globalLexScope = Evaluator.getGlobalLexicalScope(); ATObject testScope = new NATCallframe(globalLexScope); testScope.meta_defineField( AGSymbol.alloc("echo:"), new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTabl...
AGSymbol.alloc("doesNotUnderstandX"),
AGSymbol.jAlloc("doesNotUnderstandX"),
public void testInterpreterExceptionHandling() { try { ATObject globalLexScope = Evaluator.getGlobalLexicalScope(); ATObject testScope = new NATCallframe(globalLexScope); testScope.meta_defineField( AGSymbol.alloc("echo:"), new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTabl...
AGSymbol.alloc("nativeException"),
AGSymbol.jAlloc("nativeException"),
public void testInterpreterExceptionHandling() { try { ATObject globalLexScope = Evaluator.getGlobalLexicalScope(); ATObject testScope = new NATCallframe(globalLexScope); testScope.meta_defineField( AGSymbol.alloc("echo:"), new NativeClosure(NATNil._INSTANCE_) { public ATObject base_apply(ATTabl...
if (globals.inOwnerKey) { return; }
public void end(String ns, String name) throws Exception { field(name); }
return true; } if (name.equals("owner-key")) {
protected boolean ownedEntityTags(BwOwnedDbentity entity, String name) throws Exception { if (taggedEntityId(entity, name)) { return true; } if (name.equals("owner")) { entity.setOwner(userFld()); return true; } if (name.equals("public")) { entity....
sorter = new SeismogramSorter();
sorter = new AlphaSeisSorter();
public VerticalSeismogramDisplay(MouseForwarder mouseForwarder, MouseMotionForwarder motionForwarder){ this.mouseForwarder = mouseForwarder; this.motionForwarder = motionForwarder; seismograms = new JLayeredPane(); seismograms.setLayout(new BoxLayout(seismograms, BoxLayout.Y_AXIS)); this.getViewport().add(seismogra...
}}
creator.getCurrentSelection().setDisplay(selectionDisplay.addDisplay(first, tr, first.getName() + " " + creator.getCurrentSelection().getColor())); while(e.hasNext()){ selectionDisplay.addSeismogram(((LocalSeismogramImpl)e.next()), 0); } selectionWindow.getContentPane().add(selectionDisplay); Toolkit tk = Toolkit.getDe...
public void createSelectionDisplay(BasicSeismogramDisplay creator){ if(selectionDisplay == null){ logger.debug("creating selection display"); selectionDisplay = new VerticalSeismogramDisplay(mouseForwarder, motionForwarder); }}
sorter = new SeismogramSorter();
sorter = new AlphaSeisSorter();
public void removeAll(){ logger.debug("removing all displays"); this.stopImageCreation(); seismograms.removeAll(); remove(seismograms); basicDisplays = new LinkedList(); sorter = new SeismogramSorter(); globalTimeRegistrar = new TimeConfigRegistrar(); globalAmpRegistrar = new AmpConfigRegistrar(new RMeanAmpConfig()...
clicked.remove(me);
clicked.remove();
public void removeSeismogram(MouseEvent me){ BasicSeismogramDisplay clicked = ((BasicSeismogramDisplay)me.getComponent()); clicked.remove(me); seismograms.remove(clicked); basicDisplays.remove(clicked); ((SeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((SeismogramDisplay)basicDisplays.getLast()).ad...
}else if(current.hasNewData()){ setAmpRange(current.getDSS()); changed = true;
protected AmpEvent calculateAmp(){ Iterator e = ampData.keySet().iterator(); boolean changed = false; while(e.hasNext()){ AmpConfigData current = (AmpConfigData)ampData.get(e.next()); //checks for the time update equaling the old time if(current.setTime(getTime(...
if ( data.getSeismograms().length == 0) { return data.setCleanRange(DisplayUtils.ZERO_RANGE); } LocalSeismogramImpl seis = (LocalSeismogramImpl)data.getSeismograms()[0];
if ( data.getSeismograms().length == 0) { return data.setCleanRange(DisplayUtils.ZERO_RANGE); } LocalSeismogramImpl seis = data.getSeismograms()[0];
private boolean setAmpRange(DataSetSeismogram seismo){ AmpConfigData data = (AmpConfigData)ampData.get(seismo); if ( data.getSeismograms().length == 0) { return data.setCleanRange(DisplayUtils.ZERO_RANGE); } // end of if () LocalSeismogramImpl seis = (LocalSeismogramImpl)data.getSeismograms()[0];...
BwPreferences p = new BwPreferences();
BwPreferences prefs = new BwPreferences();
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
p.setId(nextId);
prefs.setId(nextId);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
p.setOwner(o);
prefs.setOwner(o);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
addSubscription(p, globals.publicUser, cal, true);
addSubscription(prefs, globals.publicUser, cal, true);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
p.setDefaultCalendar(cal);
prefs.setDefaultCalendar(cal);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
true, true, false);
false, false, false);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
p.addSubscription(sub);
prefs.addSubscription(sub); curView = new BwView(); curView.setName(globals.syspars.getDefaultUserViewName()); curView.addSubscription(defSub); curView.setOwner(o); prefs.addView(curView);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
addSubscription(p, o, cal, true);
addSubscription(prefs, o, cal, true);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
globals.rintf.restoreUserPrefs(p);
globals.rintf.restoreUserPrefs(prefs);
private void makePrefs() throws Throwable { Iterator it = globals.usersTbl.values().iterator(); int nextId = 1; if (globals.publicUser == null) { throw new Exception("Public user must be defined"); } while (it.hasNext()) { BwUser o = (BwUser)it.next(); BwPreferences p = new BwPreferences...
globals.getTzcache();
void open() throws Throwable { if (globals.rintf == null) {// globals.rintf = new JdbcRestore(); globals.rintf = new HibRestore(globals.debug); globals.rintf.init(url, driver, id, pw, globals); globals.rintf.open(); } if (globals.from2p3px) { // System prefs are set up by run time pa...
globals.sysparsSetDefaultUserQuota = true;
boolean processArgs(String[] args) throws Throwable { if (args == null) { return true; } for (int i = 0; i < args.length; i++) { if (args[i].equals("")) { // null arg generated by ant } else if (args[i].equals("-debug")) { globals.debug = true; } else if (args[i].equals("-nd...
LinkedList staList = (LinkedList)stationMap.get(selected[i]); out.addAll(staList);
LinkedList staList = (LinkedList)stationMap.get(((Station)selected[i]).name); out.addAll(staList);
public Station[] getSelectedStations(){ LinkedList out = new LinkedList(); Object[] selected = stationList.getSelectedValues(); for ( int i=0; i<selected.length; i++) { LinkedList staList = (LinkedList)stationMap.get(selected[i]); out.addAll(staList); } // end of for () return (Station[])out.toArray(new S...
int index0 = index - 5; int index1 = index + 5;
int max = list.getLastVisibleIndex() - list.getFirstVisibleIndex(); int index0 = index - max / 3; int index1 = index + max / 3;
private void scrollToPlayingFile() { File file = playlist.getPlayingFile(); DefaultListModel listModel = playlist.getListModel(); if (file == null || listModel == null) { return; } int index = listModel.indexOf(file); if (index != -1) { int index0 = index - 5; int index1 = index + 5; while (index0 < 0) {...
Rectangle r = list.getCellBounds(index0, index1);
Point p0 = indexToLocation(index0); Point p1 = indexToLocation(index1); int x = p0.x; int y = p0.y; int width = p1.x - x; int height = p1.y - y; Rectangle r = new Rectangle(x, y, width, height);
private void scrollToPlayingFile() { File file = playlist.getPlayingFile(); DefaultListModel listModel = playlist.getListModel(); if (file == null || listModel == null) { return; } int index = listModel.indexOf(file); if (index != -1) { int index0 = index - 5; int index1 = index + 5; while (index0 < 0) {...
CalSvcI svc = form.fetchSvci();
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); form.setSubscriptions(svc.getSubscriptions()); return "success"; ...
form.setSubscriptions(svc.getSubscriptions());
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); form.setSubscriptions(svc.getSubscriptions()); return "success"; ...
public boolean checkRead(AccessPrincipal who, String owner, char[] aclChars)
public CurrentAccess checkRead(AccessPrincipal who, String owner, char[] aclChars)
public boolean checkRead(AccessPrincipal who, String owner, char[] aclChars) throws AccessException { return new Acl(debug).evaluateAccess(who, owner, privSetRead, aclChars); }
public boolean checkReadWrite(AccessPrincipal who, String owner, char[] aclChars)
public CurrentAccess checkReadWrite(AccessPrincipal who, String owner, char[] aclChars)
public boolean checkReadWrite(AccessPrincipal who, String owner, char[] aclChars) throws AccessException { return new Acl(debug).evaluateAccess(who, owner, privSetReadWrite, aclChars); }
public boolean evaluateAccess(AccessPrincipal who, String owner, Privilege[] how, String aclString)
public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, Privilege[] how, String aclString)
public boolean evaluateAccess(AccessPrincipal who, String owner, Privilege[] how, String aclString) throws AccessException { return new Acl(debug).evaluateAccess(who, owner, how, aclString.toCharArray()); }
if (netdcgiven.length == 1 || ! showNetworks) {
if ( ! showNetworks) {
public void setNetworkDCs(NetworkDCOperations[] netdcgiven) { netdc = netdcgiven; channels.clear(); sites.clear(); clearStations(); networks.clear(); for (int i=0; i<netdcgiven.length; i++) { NetworkLoader networkLoader = new NetworkLoader(netdcgiven[i]); if (netdcgiven.le...
int pixelIndex = 0;
public static int[][] compressXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, Dimension size) throws CodecException { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; ...
out[1][numAdded+1] = (int)getMaxValue(tempYvalues, 0, j-1);
out[1][numAdded+1] = getMaxValue(tempYvalues, 0, j-1);
public static int[][] compressXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, Dimension size) throws CodecException { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; ...
LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram;
protected static int[][] compressYvalues(LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size)throws CodecException { LocalSeismogramImpl ...
comp[1][j+1] = (int)getMaxValue(uncomp[1], startIndex, endIndex);
comp[1][j+1] = getMaxValue(uncomp[1], startIndex, endIndex);
protected static int[][] compressYvalues(LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size)throws CodecException { LocalSeismogramImpl ...
double tmpDouble;
public static LocalSeismogramImpl createCustomSineWave(){ int[] dataBits = new int[1200]; double tmpDouble; for (int i=0; i<dataBits.length; i++) { dataBits[i] = (int)Math.round(Math.sin(0 + i*Math.PI*1/20.0)*1000); } ...
double tmpDouble;
public static LocalSeismogramImpl createHighSineWave(double phase, double hertz) { int[] dataBits = new int[120]; double tmpDouble; for (int i=0; i<dataBits.length; i++) { dataBits[i] = (int)Math.round(Math.sin(phase + i*Math...
double tmpDouble;
public static LocalSeismogramImpl createLowSineWave(double phase, double hertz) { int[] dataBits = new int[120]; double tmpDouble; for (int i=0; i<dataBits.length; i++) { dataBits[i] = (int)Math.round(Math.sin(phase + i*Math....
LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram;
protected static void scaleYvalues(int[][] comp, LocalSeismogram seismogram, MicroSecondTimeRange tr, UnitRangeImpl ampRange, Dimension size) { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; double yMin = ampRange.getMinValue(); double yMax ...
styles.add(NotationFactory.eINSTANCE.createDrawerStyle());
protected List createStyles(View view) { List styles = new ArrayList(); styles.add(NotationFactory.eINSTANCE.createDrawerStyle()); styles.add(NotationFactory.eINSTANCE.createSortingStyle()); styles.add(NotationFactory.eINSTANCE.createFilteringStyle()); return styles; }
creator.getInternalRegistrar().shaleTime(0, 1);
private void addGroupedSelection(Selection creator, VerticalSeismogramDisplay reaper){ DataSetSeismogram[] creatorSeismos = creator.getSeismograms(); DataSetSeismogram[][] componentSorted = DisplayUtils.getComponents(creatorSeismos); Arrival[] parentArrivals = creator.getParent().getArrivals();...
creator.getInternalRegistrar().shaleTime(0, 1);
private void addSelection(Selection creator, VerticalSeismogramDisplay reaper){ DataSetSeismogram[] creatorSeismos = creator.getSeismograms(); DataSetSeismogram[] newSeismos = new DataSetSeismogram[creatorSeismos.length]; for(int i = 0; i < creatorSeismos.length; i++){ // newSei...
particleDisplay = new ParticleMotionDisplay((DataSetSeismogram)creator.getSeismograms()[0],
particleDisplay = new ParticleMotionDisplay(creator.getSeismograms()[0],
public void createParticleDisplay(BasicSeismogramDisplay creator, boolean advancedOption){ if(particleAllowed){ if(particleDisplay == null){ particleDisplay = new ParticleMotionDisplay((DataSetSeismogram)creator.getSeismograms()[0], ...
particleDisplay.addParticleMotionDisplay((DataSetSeismogram)creator.getSeismograms()[0],
particleDisplay.addParticleMotionDisplay(creator.getSeismograms()[0],
public void createParticleDisplay(BasicSeismogramDisplay creator, boolean advancedOption){ if(particleAllowed){ if(particleDisplay == null){ particleDisplay = new ParticleMotionDisplay((DataSetSeismogram)creator.getSeismograms()[0], ...
throw new InternalServerException("Smile currently does not support environments other than Http Servlet Environment.");
throw new RuntimeException("CbpViewHandler: idegaWeb currently does not support environments other than Http Servlet Environment.");
private void initializeResponseWriter(FacesContext ctx) throws FacesException { //check if running in httpservlet environment boolean httpServletEnv = true; if (!(ctx.getExternalContext().getRequest() instanceof HttpServletRequest)) { throw new InternalServerException("Smile currently does not support environment...
if (component instanceof Screen) { writeState(ctx); }
private void renderComponent(UIComponent component, FacesContext ctx) { try { component.encodeBegin(ctx); if(component.getRendersChildren()) { component.encodeChildren(ctx); } else { Iterator it; UIComponent currentChild; it = component.getChildren().iterator(); while(it.hasNext()) { currentC...
public ParamFilter(String name, boolean isDefined) {
public ParamFilter(String name, boolean isNotDefined) {
public ParamFilter(String name, boolean isDefined) { this.name = name; this.isDefined = isDefined; }
this.isDefined = isDefined;
this.isNotDefined = isNotDefined;
public ParamFilter(String name, boolean isDefined) { this.name = name; this.isDefined = isDefined; }
networks.addElement(cache);
networkAdd(cache);
public void run() { setProgressOwner(this); CacheNetworkAccess cache; logger.debug("Before networks"); if(configuredNetworks == null || configuredNetworks.length == 0) { NetworkAccess[] nets = netdc.a_finder().retrieve_all(); netDCToNetMap.put(netdc, nets); setProgressMax(this, nets.length+1);...
addStation(newStations[j]);
stationAdd(newStations[j]);
public void run() { setProgressOwner(this); setProgressMax(this, 100); logger.debug("There are "+nets.length+" selected networks."); try { synchronized (ChannelChooser.this) { if (this.equals(getStationLoader())) { clearStationsFromThread(); } } int netProgressInc = 50 / nets.length; in...
public boolean init(String authenticatedUser,
public boolean init(String url, String authenticatedUser,
public boolean init(String authenticatedUser, String user, boolean publicAdmin, Groups groups, String synchId, boolean debug) throws CalFacadeException;
numErrors = getLastHandledErNo();
public HTMLReporter(File directory) throws IOException{ this.directory = directory; initIndexFile(); }
BufferedWriter out = new BufferedWriter(new FileWriter(index)); writeln(out, "<html>"); writeln(out, " <head>"); writeln(out, " <title>Errors</title>"); writeln(out, " <style media="+q+"all"+q+">@import "+q+"../main.css"+q+";</style>"); writeln(out, " </head>"); writeln(out, " <body>"); writeln(out, " ...
if(index.exists()) { BufferedWriter out = new BufferedWriter(new FileWriter(index, true)); writeln(out, "<hr>"); writeln(out, "SOD was restarted at " + ClockUtil.now() + ".<br>"); writeln(out, "There have been " + numErrors + " errors so far."); writeln(out, "<hr>"); out.close(); } else { BufferedWriter out = new Buffe...
protected void initIndexFile() throws IOException { char q = '"'; File index = new File(directory, "index.html"); BufferedWriter out = new BufferedWriter(new FileWriter(index)); writeln(out, "<html>"); writeln(out, " <head>"); writeln(out, " <title>Errors</title>"); ...
public void report(String message, Throwable e, List sections) throws IOException{ int cur = GlobalExceptionHandler.getNumHandled(); File outFile = new File(directory, "Exception_"+cur+".html");
public void report(String message, Throwable e, List sections) throws IOException { File outFile = new File(directory, "Exception_" + ++numErrors + ".html");
public void report(String message, Throwable e, List sections) throws IOException{ int cur = GlobalExceptionHandler.getNumHandled(); File outFile = new File(directory, "Exception_"+cur+".html"); appendToIndexFile(outFile, e); BufferedWriter bw = new BufferedWriter(new FileWriter(outFile)...
String str = getHeader(e, cur);
String str = getHeader(e, numErrors);
public void report(String message, Throwable e, List sections) throws IOException{ int cur = GlobalExceptionHandler.getNumHandled(); File outFile = new File(directory, "Exception_"+cur+".html"); appendToIndexFile(outFile, e); BufferedWriter bw = new BufferedWriter(new FileWriter(outFile)...
long extraTime = scale*(endTime.getMicroSecondTime() - beginTime.getMicroSecondTime()); return new MicroSecondTimeRange(new MicroSecondDate(beginTime.getMicroSecondTime() - extraTime), new MicroSecondDate(endTime.getMicroSecondTime() + extraTime));
long interval = endTime.getMicroSecondTime() - beginTime.getMicroSecondTime(); long totalTime = scale*interval; return new MicroSecondTimeRange(new MicroSecondDate((long)(beginTime.getMicroSecondTime() - ((totalTime/(double)interval) - 1) * interval)), new MicroSecondDate(beginTime.getMicroSecondTime() + totalTime));
public MicroSecondTimeRange getOversizedTimeRange(int scale){ long extraTime = scale*(endTime.getMicroSecondTime() - beginTime.getMicroSecondTime()); return new MicroSecondTimeRange(new MicroSecondDate(beginTime.getMicroSecondTime() - extraTime), new MicroSecondDate(endTime.getMicroSecondTime() + extraTime))...
bsd = new BasicSeismogramDisplay(seismos, names, null);
bsd = new BasicSeismogramDisplay(seismos, null);
public TestBSD(){ super("TestBSD"); edu.iris.Fissures.Time begin = new edu.iris.Fissures.Time("19911015T163000.000Z", -1); DataSetSeismogram[] seismos = {new DataSetSeismogram(((LocalSeismogramImpl)SimplePlotUtil. createSineWave()),null)}; String[] names = {"FIRST"}; bsd = new BasicSeismogra...
bsd.add(seismos, names);
bsd.add(seismos);
public void addTestData(int numSeis){ DataSetSeismogram[] seismos = new DataSetSeismogram[numSeis]; String[] names = new String[numSeis]; for(int i = 0; i < numSeis; i++){ seismos[i] = new DataSetSeismogram(((LocalSeismogramImpl)SimplePlotUtil.createTestData()), null); names[i] = "SINE" + 1; } bsd.add(seism...
null,
private void init() throws Throwable { svci = new CalSvc(); CalSvcIPars pars = new CalSvcIPars(account, UserAuth.superUser, account, true, // public false, // caldav ...
FileOutputStream fileOutputStream = null; try { File file = new File("output.txt"); fileOutputStream = new FileOutputStream(file); } catch (FileNotFoundException e) { } try { for (ReviewMessage reviewMessage : reviewMessages) { fileOutputStream.write(charset.encode("" + reviewMessage + "\n").array()); } } catch (IOExce...
public void loadLogFile(String filename) { initData(); reviewMessages.clear(); try { FileReader fileReader = new FileReader(filename); BufferedReader bufferedReader = new BufferedReader(fileReader); for (;;) { String line = bufferedReader.readLine(); if (!(line instanceof String)) { break; } i...
StringBuffer queryExecuted = new StringBuffer(); if(executedSQLStatements!=null && !executedSQLStatements.isEmpty()){ Iterator iterator = executedSQLStatements.iterator(); while (iterator.hasNext()) { queryExecuted.append( (String) iterator.next()); queryExecuted.append("\n"); } } debug(queryExecuted.toString());
private void getSingleQueryView(IWBundle bundle, IWResourceBundle resourceBundle, String action, IWContext iwc) throws RemoteException { String errorMessage = null; QueryService queryService = getQueryService(); int currentQueryId = ((Integer) parameterMap.get(CURRENT_QUERY_ID)).intValue(); QueryHelper queryHelp...
MicroSecondTimeRange pastTime = (MicroSecondTimeRange)seismoTimes.get(aSeis);
public UnitRangeImpl getAmpRange(DataSetSeismogram aSeis){ LocalSeismogramImpl seis = aSeis.getSeismogram(); MicroSecondTimeRange pastTime = (MicroSecondTimeRange)seismoTimes.get(aSeis); if(timeRegistrar == null){ return getAmpRange(aSeis, (MicroSecondTimeRange)seismoTimes.get(aSeis)); }else{ if (!tim...
if(meanDiff >= this.ampRange.getMaxValue() - 1)
if(meanDiff >= this.ampRange.getMaxValue() - 1){ this.prevRange = this.ampRange;
public void removeSeismogram(DataSetSeismogram aSeis){ if (seismoAmps.size() == 1) { super.removeSeismogram(aSeis); return; } // end of if (seismos.size() == 1) MicroSecondTimeRange calcIntv; LocalSeismogramImpl seis = aSeis.getSeismogram(); if(this.timeRegistrar == null) calcIntv = new MicroSecondTime...
}
} }
public void removeSeismogram(DataSetSeismogram aSeis){ if (seismoAmps.size() == 1) { super.removeSeismogram(aSeis); return; } // end of if (seismos.size() == 1) MicroSecondTimeRange calcIntv; LocalSeismogramImpl seis = aSeis.getSeismogram(); if(this.timeRegistrar == null) calcIntv = new MicroSecondTime...
while(e.hasNext())
while(e.hasNext()){
public void removeSeismogram(DataSetSeismogram aSeis){ if (seismoAmps.size() == 1) { super.removeSeismogram(aSeis); return; } // end of if (seismos.size() == 1) MicroSecondTimeRange calcIntv; LocalSeismogramImpl seis = aSeis.getSeismogram(); if(this.timeRegistrar == null) calcIntv = new MicroSecondTime...
} if(ampRange == null){ ampRange = prevRange; }
public void removeSeismogram(DataSetSeismogram aSeis){ if (seismoAmps.size() == 1) { super.removeSeismogram(aSeis); return; } // end of if (seismos.size() == 1) MicroSecondTimeRange calcIntv; LocalSeismogramImpl seis = aSeis.getSeismogram(); if(this.timeRegistrar == null) calcIntv = new MicroSecondTime...
logger.debug("corbaloc not null");
public org.omg.CORBA.Object getRoot() { org.omg.CORBA.Object rootObj = null; if(nameServiceCorbaLoc != null) { logger.debug("corbaloc not null"); logger.info("Using name service corba loc=" + nameServiceCorbaLoc); rootObj = orb.string_to_object(nameServiceCorbaLoc); ...
logger.debug("corbaloc is null, resolve initial references");
logger.debug("resolve initial references");
public org.omg.CORBA.Object getRoot() { org.omg.CORBA.Object rootObj = null; if(nameServiceCorbaLoc != null) { logger.debug("corbaloc not null"); logger.info("Using name service corba loc=" + nameServiceCorbaLoc); rootObj = orb.string_to_object(nameServiceCorbaLoc); ...
String idstr = request.getParameter("cal");
String idstr = getReqPar(request, "cal");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
idstr = request.getParameter("event");
idstr = getReqPar(request, "event");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.noentityid");
form.getErr().emit("org.bedework.client.error.noentityid");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.badentityid");
form.getErr().emit("org.bedework.client.error.badentityid");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.nosuchcalendar", id);
form.getErr().emit("org.bedework.client.error.nosuchcalendar", id);
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
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"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.unimplemented");
form.getErr().emit("org.bedework.client.error.unimplemented");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.badhow");
form.getErr().emit("org.bedework.client.error.badhow");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.badwhotype");
form.getErr().emit("org.bedework.client.error.badwhotype");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
form.getErr().emit("org.bedework.error.usernotfound");
form.getErr().emit("org.bedework.client.error.usernotfound");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { if (form.getGuest()) { return "doNothing"; } String idstr = request.getParameter("cal"); boolean calid = idstr != null; if (!calid) { idstr = request.getParameter("event"); } ...
Collection fbs = new Vector();
Collection fbs = new ArrayList();
public Collection getFreeBusy(CalSvcI svci, String user) throws WebdavException { Iterator it = timeRanges.iterator(); Collection fbs = new Vector(); while (it.hasNext()) { TimeRange tr = (TimeRange)it.next(); try { BwFreeBusy fb = svci.getFreeBusy(null, new BwUser(user), ...
timeRanges = new Vector();
timeRanges = new ArrayList();
public int parse(Node nd) throws WebdavException { try { if (timeRanges == null) { timeRanges = new Vector(); } if (!MethodBase.nodeMatches(nd, CaldavTags.timeRange)) { throw new WebdavBadRequest(); } TimeRange tr = CalDavParseUtil.parseTimeRange(nd, intf.getSvci().getTimezon...
double d = n*sumSqrToN - sumToN*sumToN;
double d = (n+1)*sumSqrToN - sumToN*sumToN;
public double[] linearLeastSquares() { int n = getLength()-1; // use zero based, so n => n-1 int sumToN = n*(n+1)/2; int sumSqrToN = n*(n+1)*(2*n+1)/6; double sumValues = binarySum(0, getLength()); double indexSumValues = binaryIndexSum(0, getLength()); double d = n*sumSqrT...
out[1] = (n * indexSumValues - sumValues * sumValues)/d;
out[1] = ((n+1) * indexSumValues - sumToN * sumValues)/d;
public double[] linearLeastSquares() { int n = getLength()-1; // use zero based, so n => n-1 int sumToN = n*(n+1)/2; int sumSqrToN = n*(n+1)*(2*n+1)/6; double sumValues = binarySum(0, getLength()); double indexSumValues = binaryIndexSum(0, getLength()); double d = n*sumSqrT...
return this.ldapAttributesToPortalAttributes;
return this.attributesMapper.getLdapAttributesToPortalAttributes();
public Map getLdapAttributesToPortalAttributes() { return this.ldapAttributesToPortalAttributes; }
if (this.ldapContext == null) throw new IllegalStateException("LDAP context is null");
if (this.contextSource == null) throw new IllegalStateException("ContextSource is null");
public 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."); if (this.ldapContext == null) throw new IllegalStateException("LDAP context is null"); if (this.query == null) throw ...
try { final SearchControls sc = new SearchControls(); sc.setSearchScope(SearchControls.SUBTREE_SCOPE); sc.setTimeLimit(this.timeLimit);
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 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."); if (this.ldapContext == null) throw new IllegalStateException("LDAP context is null"); if (this.query == null) throw ...