rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (getLogger().isDebugEnabled()) { getLogger().debug("About to flush"); }
public void flush() throws CalFacadeException { if (exc != null) { // Didn't hear me last time? throw new CalFacadeException(exc); } try { sess.flush(); } catch (Throwable t) { handleException(t); } }
Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("handleException called"); log.error(this, t);
if (getLogger().isDebugEnabled()) { getLogger().debug("handleException called"); getLogger().error(this, t);
private void handleException(Throwable t) throws CalFacadeException { try { Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("handleException called"); log.error(this, t); } } catch (Throwable dummy) {} try { if (tx != null) { try { tx.rollback...
Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("Enter rollback");
if (getLogger().isDebugEnabled()) { getLogger().debug("Enter rollback");
public void rollback() throws CalFacadeException {/* if (exc != null) { // Didn't hear me last time? throw new CalFacadeException(exc); }*/ Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("Enter rollback"); } try { if (tx != null && !tx.wasCommitted() && ...
if (log.isDebugEnabled()) { log.debug("About to rollback");
if (getLogger().isDebugEnabled()) { getLogger().debug("About to rollback");
public void rollback() throws CalFacadeException {/* if (exc != null) { // Didn't hear me last time? throw new CalFacadeException(exc); }*/ Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("Enter rollback"); } try { if (tx != null && !tx.wasCommitted() && ...
Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("HibSession: ", t);
if (getLogger().isDebugEnabled()) { getLogger().debug("HibSession: ", t);
private void rollbackException(Throwable t) { Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("HibSession: ", t); } log.error(this, t); }
log.error(this, t);
getLogger().error(this, t);
private void rollbackException(Throwable t) { Logger log = getLogger(); if (log.isDebugEnabled()) { log.debug("HibSession: ", t); } log.error(this, t); }
public void changeAccess(Object o, Collection aces) throws CalFacadeException {
public void changeAccess(BwShareableDbentity ent, Collection aces) throws CalFacadeException {
public void changeAccess(Object o, Collection aces) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException(); }
public Collection getAces(Object o) throws CalFacadeException {
public Collection getAces(BwShareableDbentity ent) throws CalFacadeException {
public Collection getAces(Object o) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException(); }
calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
private int getEventColumn(EventAccess eventAccess) { try { Origin origin = eventAccess.get_preferred_origin(); edu.iris.Fissures.Time time = origin.origin_time; long microSeconds = ( new MicroSecondDate(time)).getMicroSecondTime(); Calendar calendar = Calendar.getInstance(); Date date = new D...
System.out.println("THe hour of the day is "+hours);
private int getEventRow(EventAccess eventAccess) { try { Origin origin = eventAccess.get_preferred_origin(); edu.iris.Fissures.Time time = origin.origin_time; long microSeconds = ( new MicroSecondDate(time)).getMicroSecondTime(); float colhours = microSeconds/(1000 * 1000 * 60 * 60); Calendar c...
this.addSeismogram(curr, ((MicroSecondDate)newData.get(curr)));
this.addSeismogram(curr);
public void setData(HashMap newData){ Iterator e = newData.keySet().iterator(); while(e.hasNext()){ DataSetSeismogram curr = ((DataSetSeismogram)e.next()); this.addSeismogram(curr, ((MicroSecondDate)newData.get(curr))); } updateTimeSyncListeners(); }
updateTimeSyncListeners();
public void setData(HashMap newData){ Iterator e = newData.keySet().iterator(); while(e.hasNext()){ DataSetSeismogram curr = ((DataSetSeismogram)e.next()); this.addSeismogram(curr, ((MicroSecondDate)newData.get(curr))); } updateTimeSyncListeners(); }
jdbcCatalog, jdbcContributor,
public static void main(String[] args) { org.omg.CORBA_2_3.ORB orb = null; EventDCImpl ac_impl = null; EventDC ac = null; Connection dcConn = null; Connection checkQuitConn = null; JDBCQuitTable quit = null; QuitChecker quitChecker = null; FissuresNamingServic...
this.jdbcCatalog = jdbcCatalog; this.jdbcContributor = jdbcContributor;
public EventFinderImpl(JDBCEventAccess jdbcEventAccess, org.omg.PortableServer.POA poa) { this.poa = poa; this.jdbcEventAccess = jdbcEventAccess; }
public FissuresNamingService(org.omg.CORBA_2_3.ORB orb) { this.orb = orb;
public FissuresNamingService(java.util.Properties props) { String[] args = new String[0]; orb = (org.omg.CORBA_2_3.ORB)org.omg.CORBA.ORB.init(args, props); AllVTFactory vt = new AllVTFactory(); vt.register(orb);
public FissuresNamingService(org.omg.CORBA_2_3.ORB orb) { this.orb = orb; }
} else if (argpar("-onlyusers", args, i)) { i++; if (args[i].equals("*")) { } else { globals.onlyUsers = true; String[] users = args[i].split(","); for (int oui = 0; oui < users.length; oui++) { info("Only user: " + users[oui]); globals.onlyUsersMap.put(users[oui], users[oui]); } }
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...
public TPosClient(IWApplicationContext iwc) throws Exception {
public TPosClient(IWApplicationContext iwc, CreditCardMerchant merchant) throws Exception { this._merchant = merchant;
public TPosClient(IWApplicationContext iwc) throws Exception { init(iwc); }
throw new CreditCardAuthorizationException("Unsupported");
return (doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "5", null, referenceNumber));
public String creditcardAuthorization(String nameOnCard, String cardnumber, String monthExpires, String yearExpires, String ccVerifyNumber, double amount, String currency, String referenceNumber) throws CreditCardAuthorizationException{ throw new CreditCardAuthorizationException("Unsupported"); }
private String doAuth(String cardnumber, String monthExpires, String yearExpires, double amount, String currency, String transactionType, Object parentDataPK) throws TPosException {
private String doAuth(String cardnumber, String monthExpires, String yearExpires, double amount, String currency, String transactionType, Object parentDataPK, String authRspID) throws TPosException {
private String doAuth(String cardnumber, String monthExpires, String yearExpires, double amount, String currency, String transactionType, Object parentDataPK) throws TPosException { if(_client != null) { _client.setProperty(TPOS3Client.PN_USERID, _userId); _client.setProperty(TPOS3Client.PN_PASSWORD, _pas...
boolean valid = _client.sendAuthorisationReq();
boolean valid = false; try { valid = _client.sendAuthorisationReq(); } catch (IllegalArgumentException e) { getKeys(); createNewBatch(); _client.setProperty(TPOS3Client.PN_USERID, _userId); _client.setProperty(TPOS3Client.PN_PASSWORD, _passwd); _client.setProperty(TPOS3Client.PN_MERCHANTID, _merchantId); _client.setPro...
private String doAuth(String cardnumber, String monthExpires, String yearExpires, double amount, String currency, String transactionType, Object parentDataPK) throws TPosException { if(_client != null) { _client.setProperty(TPOS3Client.PN_USERID, _userId); _client.setProperty(TPOS3Client.PN_PASSWORD, _pas...
return doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "3", parentDataPK);
return doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "3", parentDataPK, null);
public String doRefund(String cardnumber, String monthExpires, String yearExpires, String ccVerifyNumber, double amount, String currency, Object parentDataPK, String captureProperties) throws TPosException { System.out.println("Warning : TPosClient is NOT using CVC number"); return doAuth(cardnumber, monthExpir...
return (doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "1", null));
return (doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "1", null, null));
public String doSale(String nameOnCard, String cardnumber, String monthExpires, String yearExpires, String ccVerifyNumber, double amount, String currency, String referenceNumber) throws TPosException { return (doAuth(cardnumber, monthExpires, yearExpires, amount, currency, "1", null)); }
System.out.println("TPosClient : Using default TPosMerchant");
System.out.println("TPosClient : Using default TPosMerchant, ipset = "+ipset);
private void init(IWApplicationContext iwc) throws Exception{ _iwc = iwc; _iwb = iwc.getIWMainApplication().getBundle(IW_BUNDLE_IDENTIFIER); //if (_iwb != null) { // _iwrb = _iwb.getResourceBundle(iwc); //} String path = _iwb.getPropertiesRealPath(); if (path == null) { throw new Exception(...
System.out.println("TPosClient : Using TPosMerchant "+_merchant.getName());
System.out.println("TPosClient : Using TPosMerchant "+_merchant.getName()+", ipset = "+ipset);
private void init(IWApplicationContext iwc) throws Exception{ _iwc = iwc; _iwb = iwc.getIWMainApplication().getBundle(IW_BUNDLE_IDENTIFIER); //if (_iwb != null) { // _iwrb = _iwb.getResourceBundle(iwc); //} String path = _iwb.getPropertiesRealPath(); if (path == null) { throw new Exception(...
form.getErr().emit("org.bedework.error.eventnotfound");
form.getErr().emit("org.bedework.client.error.eventnotfound");
public String doAction(HttpServletRequest request, BwActionForm form) throws Throwable { int eventId = form.getEventId(); if (eventId < 0) { // Do nothing return "doNothing"; } EventInfo ei = form.getCalSvcI().getEvent(eventId); BwEvent ev = null; if (ei != null) { ...
for (int hi = 0; hi <= howchs.length; hi++) {
for (int hi = 0; hi < howchs.length; hi++) {
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca...
if (!found) { form.getErr().emit("org.bedework.client.error.badhow"); return "error"; }
if (!found) { form.getErr().emit("org.bedework.client.error.badhow"); return "error";
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca...
svci.updateEvent(ev);
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca...
svci.updateCalendar(cal);
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca...
SeismogramAttr[] seismogramAttrs = getSeismogramAttrs(); ChannelId[] channelIds = new ChannelId[seismogramAttrs.length];
public ChannelId[] getChannelIds() { SeismogramAttr[] seismogramAttrs = getSeismogramAttrs(); ChannelId[] channelIds = new ChannelId[seismogramAttrs.length]; for(int counter = 0; counter < seismogramAttrs.length; counter++) { channelIds[counter] = ((SeismogramAttrImpl)seismogramAttrs[counter]).getChannelID(); }...
} return channelIds; }
}*/ }
public ChannelId[] getChannelIds() { SeismogramAttr[] seismogramAttrs = getSeismogramAttrs(); ChannelId[] channelIds = new ChannelId[seismogramAttrs.length]; for(int counter = 0; counter < seismogramAttrs.length; counter++) { channelIds[counter] = ((SeismogramAttrImpl)seismogramAttrs[counter]).getChannelID(); }...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double dBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return d...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double dBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += dSeries[i]; } return val; } else { int middle = (start + finish) / 2; return dBinarySum...
if (finish-start < lag+8) {
if (finish-start < lag+SPLIT_SUMMING_LIMIT) {
private double dBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (dSeries[i]-mean)*(dSeries[i+lag]-mean); ...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double dBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (dSeries[i]-mean)*(dSeries[i]-mean); } return val; } else { int middle = (start...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double fBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return f...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double fBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += fSeries[i]; } return val; } else { int middle = (start + finish) / 2; return fBinarySum...
if (finish-start < lag+8) {
if (finish-start < lag+SPLIT_SUMMING_LIMIT) {
private double fBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (fSeries[i]-mean)*(fSeries[i+lag]-mean); ...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double fBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (fSeries[i]-mean)*(fSeries[i]-mean); } return val; } else { int middle = (start...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double iBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return i...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double iBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += iSeries[i]; } return val; } else { int middle = (start + finish) / 2; return iBinarySum...
if (finish-start < lag+8) {
if (finish-start < lag+SPLIT_SUMMING_LIMIT) {
private double iBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (iSeries[i]-mean)*(iSeries[i+lag]-mean); ...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double iBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (iSeries[i]-mean)*(iSeries[i]-mean); } return val; } else { int middle = (start...
int sumToN = n*(n+1)/2; int sumSqrToN = n*(n+1)*(2*n+1)/6;
double sumToN = 1.0*n*(n+1)/2; double sumSqrToN = 1.0*n*(n+1)*(2*n+1)/6;
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+1)*sum...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double sBinaryIndexSum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += i * sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return s...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double sBinarySum(int start, int finish) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += sSeries[i]; } return val; } else { int middle = (start + finish) / 2; return sBinarySum...
if (finish-start < lag+8) {
if (finish-start < lag+SPLIT_SUMMING_LIMIT) {
private double sBinarySumDevLag(int start, int finish, double mean, int lag) { if (finish-start < lag+8) { double val = 0; for (int i=start; i< finish && i<getLength()-lag; i++) { val += (sSeries[i]-mean)*(sSeries[i+lag]-mean); ...
if (finish-start < 8) {
if (finish-start < SPLIT_SUMMING_LIMIT) {
private double sBinarySumDevSqr(int start, int finish, double mean) { if (finish-start < 8) { double val = 0; for (int i=start; i< finish; i++) { val += (sSeries[i]-mean)*(sSeries[i]-mean); } return val; } else { int middle = (start...
public PSNEventRecord(PSNHeader header, DataInputStream data) throws IOException{ dis = data; fixedHeader = header; varHeader = new PSNVariableHeader(dis, (int)header.getVarHeadLength()); readSampleData(); if(fixedHeader.getFlags() == 1){ if(dis.readShort() != 0){ throw new IOException("CRC-16 check has wrong value!");...
public PSNEventRecord(DataInputStream data) throws IOException{ this(new PSNHeader(data), data);
public PSNEventRecord(PSNHeader header, DataInputStream data) throws IOException{ dis = data; fixedHeader = header; varHeader = new PSNVariableHeader(dis, (int)header.getVarHeadLength()); readSampleData(); if(fixedHeader.getFlags() == 1){ if(dis.readShort() != 0){ ...
throw new XDuplicateSlot("method", name.getText().asNativeText().javaValue);
throw new XDuplicateSlot("method", name.base_getText().asNativeText().javaValue);
public ATNil meta_addMethod(ATMethod method) throws NATException { ATSymbol name = method.base_getName(); if (methodDictionary_.containsKey(name)) { throw new XDuplicateSlot("method", name.getText().asNativeText().javaValue); } else { // first check whether the method dictionary is shared if (this.isFlagSe...
int xvalue;
int xvalue = 0;
protected static int[][] compressYvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, config, size); // enough points to take the extra time to compress the line int[][] comp = new int[...
if(uncomp[0].length != 0) xvalue = umcomp[0][0];;
endIndex = 0; if(uncomp[0].length != 0) xvalue = uncomp[0][0];;
protected static int[][] compressYvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, config, size); // enough points to take the extra time to compress the line int[][] comp = new int[...
comp[1][j] = getMinValue(uncomp[1], startIndex, endIndex); comp[1][j+1] = (int)getMaxValue(uncomp[1], startIndex, endIndex); comp[0][j] = uncomp[0][endIndex]; comp[0][j+1] = uncomp[0][endIndex];
protected static int[][] compressYvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size)throws UnsupportedDataEncoding { int[][] uncomp = scaleXvalues(seismogram, config, size); // enough points to take the extra time to compress the line int[][] comp = new int[...
out[1][numAdded] = getMinValue(tempYvalues, 0, j-1); out[1][numAdded+1] = (int)getMaxValue(tempYvalues, 0, j-1);
out[1][numAdded] = tempYvalues[j-1]; out[1][numAdded+1] = tempYvalues[j-1];
protected static int[][] scaleXvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size) throws UnsupportedDataEncoding { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; int[][] out = new int[2][]; int seisIndex = 0; int pixelIndex = 0; int numAdded = 0; if ...
out[0][numAdded] = xvalue; out[0][numAdded+1] = xvalue; out[1][numAdded] = tempYvalues[j-1]; out[1][numAdded+1] = tempYvalues[j-1];
protected static int[][] scaleXvalues(LocalSeismogram seismogram, TimePlotConfig config, Dimension size) throws UnsupportedDataEncoding { LocalSeismogramImpl seis = (LocalSeismogramImpl)seismogram; int[][] out = new int[2][]; int seisIndex = 0; int pixelIndex = 0; int numAdded = 0; if ...
BwFreeBusyComponent fbc = new BwFreeBusyComponent();
public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw ne...
eventPeriods.add(new EventPeriod(new DateTime(dstart), new DateTime(dend)));
DateTime psdt = new DateTime(dstart); DateTime pedt = new DateTime(dend); psdt.setUtc(true); pedt.setUtc(true); eventPeriods.add(new EventPeriod(psdt, pedt));
public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw ne...
fb.addTime(fbc);
if (fbc != null) { fb.addTime(fbc); }
public BwFreeBusy getFreeBusy(BwCalendar cal, BwPrincipal who, BwDateTime start, BwDateTime end, BwDuration granularity, boolean returnAll) throws CalFacadeException { if (!(who instanceof BwUser)) { throw ne...
particleWindow.setLocation(400 * particleDisplays, tk.getScreenSize().height);
if(400*particleDisplays < tk.getScreenSize().width){ particleWindow.setLocation(400 * particleDisplays, tk.getScreenSize().height - 400); }else{ particleWindow.setLocation(tk.getScreenSize().width - 400, tk.getScreenSize().height - 400); }
public void createParticleDisplay(BasicSeismogramDisplay creator){ if(particleDisplay == null){ logger.debug("creating particle display"); particleWindow = new JFrame(); LocalSeismogramImpl seis = (((LocalSeismogramImpl)((DataSetSeismogram)creator.getSeismograms().getFirst()).getSeismogram())); part...
selectionWindow.setLocation(tk.getScreenSize().width, tk.getScreenSize().height - selectionDisplays * 250);
if((selectionDisplays + 1) * 220 < tk.getScreenSize().height){ selectionWindow.setLocation(tk.getScreenSize().width - 400, tk.getScreenSize().height - (selectionDisplays + 1) * 220); }else{ selectionWindow.setLocation(tk.getScreenSize().width - 400, 0); }
public void createSelectionDisplay(BasicSeismogramDisplay creator){ if(selectionDisplay == null){ logger.debug("creating selection display"); selectionWindow = new JFrame(); //selectionWindow.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); selectionWindow.setSize(400, 220); JToolBar infoBar =...
original.setSize(new Dimension(45, 10));
public FilterSelection(VerticalSeismogramDisplay listener){ this.add(original); this.add(teleseismic); this.add(smoothTeleseismic); this.add(vSmoothTeleseismic); this.add(regional); this.add(local); original.addItemListener(filterCheck); teleseismic.addItemListener(filterCheck); smoothTeleseismic.addItemListener(fi...
queryMap.put(queryAttr, "awp9");
queryMap.put(queryAttr, "susan");
public void testDefaultAttrMap() { final String queryAttr = "uid"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr); LdapPersonAttributeDao impl = new LdapPersonAttributeDao(); Map ldapAttribsToPortalAttribs = new HashMap(); ldapAttr...
assertEquals("andrew.petro@yale.edu", attribs.get("mail"));
assertEquals("susan.bramhall@yale.edu", attribs.get("mail"));
public void testDefaultAttrMap() { final String queryAttr = "uid"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr); LdapPersonAttributeDao impl = new LdapPersonAttributeDao(); Map ldapAttribsToPortalAttribs = new HashMap(); ldapAttr...
queryMap.put(queryAttr1, "awp9");
queryMap.put(queryAttr1, "susan");
public void testInsufficientAttrQuery() { final String queryAttr1 = "uid"; final String queryAttr2 = "alias"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr1); queryAttrList.add(queryAttr2); LdapPersonAttributeDao impl = new LdapPersonAttri...
queryMap.put(queryAttr, "awp9");
queryMap.put(queryAttr, "susan");
public void testInvalidAttrMap() { final String queryAttr = "uid"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr); LdapPersonAttributeDao impl = new LdapPersonAttributeDao(); Map ldapAttribsToPortalAttribs = new HashMap(); ldapAttr...
queryMap.put(queryAttr1, "awp9"); queryMap.put(queryAttr2, "andrew.petro");
queryMap.put(queryAttr1, "susan"); queryMap.put(queryAttr2, "susan.bramhall");
public void testMultiAttrQuery() { final String queryAttr1 = "uid"; final String queryAttr2 = "alias"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr1); queryAttrList.add(queryAttr2); LdapPersonAttributeDao impl = new LdapPersonAttributeDao...
assertEquals("andrew.petro@yale.edu", attribs.get("email"));
assertEquals("susan.bramhall@yale.edu", attribs.get("email"));
public void testMultiAttrQuery() { final String queryAttr1 = "uid"; final String queryAttr2 = "alias"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr1); queryAttrList.add(queryAttr2); LdapPersonAttributeDao impl = new LdapPersonAttributeDao...
queryMap.put(queryAttr, "awp9");
queryMap.put(queryAttr, "susan");
public void testSingleAttrQuery() { final String queryAttr = "uid"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr); LdapPersonAttributeDao impl = new LdapPersonAttributeDao(); Map ldapAttribsToPortalAttribs = new HashMap(); ldapAtt...
assertEquals("andrew.petro@yale.edu", attribs.get("email"));
assertEquals("susan.bramhall@yale.edu", attribs.get("email"));
public void testSingleAttrQuery() { final String queryAttr = "uid"; final List queryAttrList = new LinkedList(); queryAttrList.add(queryAttr); LdapPersonAttributeDao impl = new LdapPersonAttributeDao(); Map ldapAttribsToPortalAttribs = new HashMap(); ldapAtt...
} else if (MethodBase.nodeMatches(curnode, CaldavTags.expandRecurrenceSet) || MethodBase.nodeMatches(curnode, CaldavTags.expand)) {
} else if (MethodBase.nodeMatches(curnode, CaldavTags.expand)) {
public void parse(Node nd) throws WebdavException { /* Either empty - show everything or comp + optional (expand-recurrence-set or limit-recurrence-set) */ NamedNodeMap nnm = nd.getAttributes(); if ((nnm != null) && (nnm.getLength() > 1)) { throw new Webdav...
} else if (MethodBase.nodeMatches(curnode, CaldavTags.limitFreebusySet)) { if (lfs != null) { throw new WebdavBadRequest(); } lfs = new LimitFreebusySet(); parseTimeRange(curnode, lfs);
public void parse(Node nd) throws WebdavException { /* Either empty - show everything or comp + optional (expand-recurrence-set or limit-recurrence-set) */ NamedNodeMap nnm = nd.getAttributes(); if ((nnm != null) && (nnm.getLength() > 1)) { throw new Webdav...
if (sess.transactionStarted()) { sess.rollback(); }
public synchronized void close() throws CalFacadeException { if (!isOpen) { if (debug) { log.debug("Close for " + objTimestamp + " closed session"); } return; } if (debug) { log.debug("Close for " + objTimestamp); } try { if (sess != null) { sess.disconnect(); ...
return bldr.build(new StringReader(val), true);
UnfoldingReader ufrdr = new UnfoldingReader(new StringReader(val), true); return bldr.build(ufrdr);
public static Calendar getCalendar(String val) throws CalFacadeException { try { CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); return bldr.build(new StringReader(val), true); } catch (Throwable t) { throw new CalFacadeException(t); } }
AccessUtil(boolean superUser, boolean debug) throws CalFacadeException { this.superUser = superUser;
AccessUtil(boolean debug) throws CalFacadeException {
AccessUtil(boolean superUser, boolean debug) throws CalFacadeException { this.superUser = superUser; this.debug = debug; try { access = new Access(debug); } catch (Throwable t) { throw new CalFacadeException(t); } }
public EventProperties(CalintfImpl cal,
public EventProperties(Calintf cal, AccessUtil access, BwUser user,
public EventProperties(CalintfImpl cal, String keyFieldName, String className, String refQuery, int minId, boolean debug) { this.cal = cal; this.keyFieldName = keyFieldName; this.className ...
this.cal = cal;
super(cal, access, user, debug);
public EventProperties(CalintfImpl cal, String keyFieldName, String className, String refQuery, int minId, boolean debug) { this.cal = cal; this.keyFieldName = keyFieldName; this.className ...
this.debug = debug;
public EventProperties(CalintfImpl cal, String keyFieldName, String className, String refQuery, int minId, boolean debug) { this.cal = cal; this.keyFieldName = keyFieldName; this.className ...
this.debug = debug;
CalTimezonesImpl(Calintf cal, BwStats stats, boolean publicAdmin, boolean debug) throws CalFacadeException { this.cal = cal; this.stats = (BwRWStats)stats; this.publicAdmin = publicAdmin; this.debug = debug; // Force fetch of timezones //lookup("not-a-timezone"); }
return "success";
return "notFound";
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (!form.getUserAuth().isSuperUser()) { return "noAccess"; // First line of defence } CalSvc...
public boolean init(String url,
public boolean init(String systemName, String url,
public boolean init(String url, String authenticatedUser, String user, boolean publicAdmin, Groups groups, String synchId, boolean debug) throws CalFacadeException { boolean userAdded = sup...
boolean userAdded = super.init(url, authenticatedUser, user, publicAdmin,
boolean userAdded = super.init(systemName, url, authenticatedUser, user, publicAdmin,
public boolean init(String url, String authenticatedUser, String user, boolean publicAdmin, Groups groups, String synchId, boolean debug) throws CalFacadeException { boolean userAdded = sup...
public BwUser getUser(int id) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException();
public BwUser getUser() throws CalFacadeException { return user;
public BwUser getUser(int id) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException(); }
public void updateUser(BwUser user) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException();
public void updateUser() throws CalFacadeException { updateUser(getUser());
public void updateUser(BwUser user) throws CalFacadeException { checkOpen(); throw new CalFacadeUnimplementedException(); }
MicroSecondDate now = new MicroSecondDate();
MicroSecondDate now = ClockUtil.now();
public static void main(String[] args) { /* Initializes the corba orb, finds the naming service and other startup * tasks. See AbstractClient for the code in this method. */ init(args); try { /** This step is not required, but sometimes helps to determine if * a ...
public int sort(DataSetSeismogram[] seismograms, String name){
public int sort(DataSetSeismogram[] seismograms){
public int sort(DataSetSeismogram[] seismograms, String name){ int i = 0; while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){ i++; } names.add(i, name); return i; }
while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){
while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(seismograms[i].getName()) < 0){
public int sort(DataSetSeismogram[] seismograms, String name){ int i = 0; while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){ i++; } names.add(i, name); return i; }
names.add(i, name);
names.add(i, seismograms[i].getName());
public int sort(DataSetSeismogram[] seismograms, String name){ int i = 0; while(i < names.size() && ((String)names.get(i)).compareToIgnoreCase(name) < 0){ i++; } names.add(i, name); return i; }
repaint();
public void removeDisplay(BasicSeismogramDisplay display){ seismograms.remove(display); basicDisplays.remove(display); ((SeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((SeismogramDisplay)basicDisplays.getLast()).addBottomTimeBorder(); seismograms.revalidate(); }
return getFont(key, Font.decode(null));
return getFont(key, new Font("SansSerif", 12, Font.PLAIN));
public Font getFont(String key) { return getFont(key, Font.decode(null)); }
public EventProperties(Calintf cal, AccessUtil access, BwUser user,
public EventProperties(Calintf cal, AccessUtil access,
public EventProperties(Calintf cal, AccessUtil access, BwUser user, int currentMode, boolean ignoreCreator, String keyFieldName, String className, String refQuery, int minId, ...
super(cal, access, user, currentMode, ignoreCreator, debug);
super(cal, access, currentMode, ignoreCreator, debug);
public EventProperties(Calintf cal, AccessUtil access, BwUser user, int currentMode, boolean ignoreCreator, String keyFieldName, String className, String refQuery, int minId, ...
clicked.removeAllSeismograms();
clicked.remove(me);
public void removeSeismogram(MouseEvent me){ BasicSeismogramDisplay clicked = ((BasicSeismogramDisplay)me.getComponent()); clicked.removeAllSeismograms(); seismograms.remove(clicked); basicDisplays.remove(clicked); ((SeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((SeismogramDisplay)basicDisplays.g...
this.time.setText(" Time: " + output.format(calendar.getTime()));
if(output.format(calendar.getTime()).length() == 21) this.time.setText(" Time: " + output.format(calendar.getTime()) + "00"); else if(output.format(calendar.getTime()).length() == 22) this.time.setText(" Time: " + output.format(calendar.getTime()) + "0"); else this.time.setText(" Time: " + output.format(calendar....
public void setLabels(MicroSecondDate time, double amp){ calendar.setTime(time); this.time.setText(" Time: " + output.format(calendar.getTime())); if(amp < 0) if(Math.abs(amp) < 10) this.amp.setText(" Amplitude: -000" + Math.abs(Math.round(amp))); else if(Math.abs(amp) < 100) this.amp.setText(" Ampl...
public void addNewCalendars() throws CalFacadeException {
public void addNewCalendars(BwUser user) throws CalFacadeException {
public void addNewCalendars() throws CalFacadeException { HibSession sess = getSess(); /* Add a user collection to the userCalendarRoot and then a default calendar collection. */ sess.namedQuery("getCalendarByPath"); String path = userCalendarRootPath; sess.setString("path", path); BwCalendar...
public BwFreeBusy getFreeBusy(CalSvcI svci, String account) throws WebdavException {
public BwFreeBusy getFreeBusy(CalSvcI svci, BwCalendar cal, String account) throws WebdavException {
public BwFreeBusy getFreeBusy(CalSvcI svci, String account) throws WebdavException { try { BwUser user = svci.findUser(account); if (user == null) { throw WebdavIntfException.unauthorized(); } BwFreeBusy fb = svci.getFreeBusy(null, user, timeRange.ge...
BwFreeBusy fb = svci.getFreeBusy(null, user,
BwFreeBusy fb = svci.getFreeBusy(cal, user,
public BwFreeBusy getFreeBusy(CalSvcI svci, String account) throws WebdavException { try { BwUser user = svci.findUser(account); if (user == null) { throw WebdavIntfException.unauthorized(); } BwFreeBusy fb = svci.getFreeBusy(null, user, timeRange.ge...
CalSvcIPars pars = new CalSvcIPars(account, UserAuth.noPrivileges,
CalSvcIPars pars = new CalSvcIPars(account,
public CalSvcI getSvci() throws WebdavIntfException { boolean publicMode = (account == null); if (svci != null) { if (!svci.isOpen()) { try { svci.open(); svci.beginTransaction(); } catch (Throwable t) { throw new WebdavIntfException(t); } } return ...
seisName = seisName.substring(seisName.length()-4);
seisName = seisName.substring(0,seisName.length()-4);
void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); URL dirURL = base; System.out.println(" dirURL is "+dirURL.toString()); try { ...
seis.setName(seisName);
void process() throws ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); String userName = System.getProperty("user.name"); URL dirURL = base; System.out.println(" dirURL is "+dirURL.toString()); try { ...
System.out.println("Sample rate: " + seismogramData.sample_rate);
private PacketType finalizeSeismogramCreation(PacketType seismogramData, PacketType stateOfHealthData, boolean gapInData) { if(gapInData) { System.out.println("The data collecting unit stopped recordi...