rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
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); } final NamingEnumeration userlist = this.ldapContext.search(this.baseDN, this.query, args, sc); try { ... | final SearchExecutor se = new QuerySearchExecutor(this.baseDN, this.query, args, this.searchControls); final CollectingSearchResultCallbackHandler srch = this.ldapTemplate.new AttributesMapperCallbackHandler(this.attributesMapper); this.ldapTemplate.search(se, srch); final List results = srch.getList(); return (Map)D... | 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 ... |
this.ldapAttributesToPortalAttributes = MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(ldapAttributesToPortalAttributesArg); final Collection userAttributeCol = MultivaluedPersonAttributeUtils.flattenCollection(this.ldapAttributesToPortalAttributes.values()); | final Map ldapAttributesToPortalAttributes = MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(ldapAttributesToPortalAttributesArg); this.attributesMapper = new PersonAttributesMapper(ldapAttributesToPortalAttributes); final Collection userAttributeCol = MultivaluedPersonAttributeUtils.flattenCollection(... | public void setLdapAttributesToPortalAttributes(final Map ldapAttributesToPortalAttributesArg) { this.ldapAttributesToPortalAttributes = MultivaluedPersonAttributeUtils.parseAttributeToAttributeMapping(ldapAttributesToPortalAttributesArg); final Collection userAttributeCol = MultivaluedPersonAttributeUtils.flattenCo... |
this.searchControls.setTimeLimit(this.timeLimit); | public void setTimeLimit(int timeLimit) { this.timeLimit = timeLimit; } | |
sb.append("ldapContext=").append(this.ldapContext); | sb.append("contextSource=").append(this.contextSource); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append(super.toString()); sb.append("["); sb.append("ldapContext=").append(this.ldapContext); sb.append(", timeLimit=").append(this.timeLimit); sb.append(", baseDN=").append(this.baseDN); sb.append(", query=").a... |
sb.append(", ldapAttributesToPortalAttributes=").append(this.ldapAttributesToPortalAttributes); | sb.append(", ldapAttributesToPortalAttributes=").append(this.getLdapAttributesToPortalAttributes()); | public String toString() { StringBuffer sb = new StringBuffer(); sb.append(super.toString()); sb.append("["); sb.append("ldapContext=").append(this.ldapContext); sb.append(", timeLimit=").append(this.timeLimit); sb.append(", baseDN=").append(this.baseDN); sb.append(", query=").a... |
return new URL((URL)source, info.getInfoURL()); | URL context = new URL("jar", "", source.toString() +"!/"); return new URL(context, info.getInfoURL()); | public URL getInfoURL() { if (info != null && info.getInfoURL() != null && source instanceof URL) { try { return new URL((URL)source, info.getInfoURL()); } catch (Exception exc) { return null; } } else { return null; } } |
exc.printStackTrace(); | public URL getInfoURL() { if (info != null && info.getInfoURL() != null && source instanceof URL) { try { return new URL((URL)source, info.getInfoURL()); } catch (Exception exc) { return null; } } else { return null; } } | |
path.append(mainApp.getIWCacheManager().IW_ROOT_CACHE_DIRECTORY) | path.append(IWCacheManager.IW_ROOT_CACHE_DIRECTORY) | public String getRealPathToReportFile(String fileName, String extension) { IWMainApplication mainApp = getIWApplicationContext().getApplication(); String separator = FileUtil.getFileSeparator(); StringBuffer path = new StringBuffer(mainApp.getApplicationRealPath()); path.append(mainApp.getIWCacheManager()... |
String separator = FileUtil.getFileSeparator(); | String separator = "/"; | private String getURIToReport(String reportName, String extension) { IWMainApplication mainApp = getIWApplicationContext().getApplication(); String separator = FileUtil.getFileSeparator(); String appContextURI = mainApp.getApplicationContextURI(); StringBuffer uri = new StringBuffer(appContextURI); if(... |
uri.append(mainApp.getIWCacheManager().IW_ROOT_CACHE_DIRECTORY) | uri.append(IWCacheManager.IW_ROOT_CACHE_DIRECTORY) | private String getURIToReport(String reportName, String extension) { IWMainApplication mainApp = getIWApplicationContext().getApplication(); String separator = FileUtil.getFileSeparator(); String appContextURI = mainApp.getApplicationContextURI(); StringBuffer uri = new StringBuffer(appContextURI); if(... |
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... |
logger.error(section.getName()+":"+section.getContents()); | logger.debug(section.getName()+":"+section.getContents()); | public void report(String message, Throwable e, List sections) throws IOException{ if (e.getCause() != null) { logger.error(message, e.getCause()); } logger.error(message, e); Iterator it = sections.iterator(); while(it.hasNext()) { Section section = (Section... |
public static AbstractNode getLessOrEqualNode(AbstractNode root, Location loc) { AbstractNode smallestSoFar = null; AbstractNode current = root; boolean greater = false; while (current != null && !greater) { if (current.getStart().compareTo(loc) <= 0) smallestSoFar = current; else greater = true; current = getNextNode(... | public static AbstractNode getLessOrEqualNode(AbstractNode root, int offset, IDocument doc) { try { int line = doc.getLineOfOffset(offset); IRegion r = doc.getLineInformation(line); return getLessOrEqualNode(root, new Location(line, offset - r.getOffset())); } catch (BadLocationException e) { PydevPlugin.log(IStatus.WA... | public static AbstractNode getLessOrEqualNode(AbstractNode root, Location loc) { AbstractNode smallestSoFar = null; AbstractNode current = root; boolean greater = false; while (current != null && !greater) { if (current.getStart().compareTo(loc) <= 0) smallestSoFar = current; else greater = true; curre... |
return smallestSoFar; | return null; | public static AbstractNode getLessOrEqualNode(AbstractNode root, Location loc) { AbstractNode smallestSoFar = null; AbstractNode current = root; boolean greater = false; while (current != null && !greater) { if (current.getStart().compareTo(loc) <= 0) smallestSoFar = current; else greater = true; curre... |
public synchronized String getDateString() { | public String getDateString() { | public synchronized String getDateString() { Formatters fmt = getFormatters(); return fmt.shortDateFormatter.format(cal.getTime()); } |
return fmt.shortDateFormatter.format(cal.getTime()); | synchronized (fmt) { return fmt.shortDateFormatter.format(cal.getTime()); } | public synchronized String getDateString() { Formatters fmt = getFormatters(); return fmt.shortDateFormatter.format(cal.getTime()); } |
Formatters fmt = (Formatters)formattersTbl.get(loc); if (fmt == null) { fmt = new Formatters(loc); formattersTbl.put(loc, fmt); } return fmt; | return getFormatters(loc); | private Formatters getFormatters() { Locale loc = calInfo.getLocale(); Formatters fmt = (Formatters)formattersTbl.get(loc); if (fmt == null) { fmt = new Formatters(loc); formattersTbl.put(loc, fmt); } return fmt; } |
public synchronized String getLongDateString() { | public String getLongDateString() { | public synchronized String getLongDateString() { Formatters fmt = getFormatters(); return fmt.longDateFormatter.format(cal.getTime()); } |
return fmt.longDateFormatter.format(cal.getTime()); | synchronized (fmt) { return fmt.longDateFormatter.format(cal.getTime()); } | public synchronized String getLongDateString() { Formatters fmt = getFormatters(); return fmt.longDateFormatter.format(cal.getTime()); } |
public synchronized String getMonthName() { | public String getMonthName() { | public synchronized String getMonthName() { Formatters fmt = getFormatters(); FieldPosition f = new FieldPosition(DateFormat.MONTH_FIELD); StringBuffer s = fmt.longDateFormatter.format(cal.getTime(), new StringBuffer(), f); return s.substring(f.getBeginIndex(), f.getEndIndex()); } |
StringBuffer s = fmt.longDateFormatter.format(cal.getTime(), new StringBuffer(), f); return s.substring(f.getBeginIndex(), f.getEndIndex()); | synchronized (fmt) { StringBuffer s = fmt.longDateFormatter.format(cal.getTime(), new StringBuffer(), f); return s.substring(f.getBeginIndex(), f.getEndIndex()); } | public synchronized String getMonthName() { Formatters fmt = getFormatters(); FieldPosition f = new FieldPosition(DateFormat.MONTH_FIELD); StringBuffer s = fmt.longDateFormatter.format(cal.getTime(), new StringBuffer(), f); return s.substring(f.getBeginIndex(), f.getEndIndex()); } |
public synchronized String getTimeString() { | public String getTimeString() { | public synchronized String getTimeString() { Formatters fmt = getFormatters(); return fmt.shortTimeFormatter.format(cal.getTime()); } |
return fmt.shortTimeFormatter.format(cal.getTime()); | synchronized (fmt) { return fmt.shortTimeFormatter.format(cal.getTime()); } | public synchronized String getTimeString() { Formatters fmt = getFormatters(); return fmt.shortTimeFormatter.format(cal.getTime()); } |
globals.ownersTbl.put(entity); | public void end(String ns, String name) throws Exception { BwUser entity = (BwUser)pop(); globals.users++; if (globals.config.getFrom2p3px()) { entity.setCategoryAccess(globals.getDefaultPersonalAccess()); entity.setLocationAccess(globals.getDefaultPersonalAccess()); entity.setSponsorAccess(gl... | |
Object[] options = new String[3]; options[0] = "Replace"; options[1] = "Choose Again"; options[2] = "Cancel"; int n = JOptionPane.showOptionDialog(display, | String[] options = {"Yes", "No", "Choose again"}; int n = JOptionPane.showOptionDialog(null, | private String chooseOutputFile(String extension) { final JFileChooser fc; if (lastSaveLocation != null) { fc = new JFileChooser(lastSaveLocation); } else { fc = new JFileChooser(); } String extensions[] = new String[1]; extensions[0] = extension; ... |
null, options, options[0]); if (n == JOptionPane.CANCEL_OPTION) { | null, options, options[0]); if (n == JOptionPane.NO_OPTION) { | private String chooseOutputFile(String extension) { final JFileChooser fc; if (lastSaveLocation != null) { fc = new JFileChooser(lastSaveLocation); } else { fc = new JFileChooser(); } String extensions[] = new String[1]; extensions[0] = extension; ... |
String fileName = file.getAbsolutePath(); | private String chooseOutputFile(String extension) { final JFileChooser fc; if (lastSaveLocation != null) { fc = new JFileChooser(lastSaveLocation); } else { fc = new JFileChooser(); } String extensions[] = new String[1]; extensions[0] = extension; ... | |
} else { | private String chooseOutputFile(String extension) { final JFileChooser fc; if (lastSaveLocation != null) { fc = new JFileChooser(lastSaveLocation); } else { fc = new JFileChooser(); } String extensions[] = new String[1]; extensions[0] = extension; ... | |
final int numOfSeis = numSeis; final JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new BorderLayout()); dialog.setTitle("Printing Options"); dialog.setModal(true); JLabel information = new JLabel("Seismograms per page: "); Integer[] numbers = new Integer[numOfSeis]; for(int i = 0; i < numOfSeis; i+... | if(!seisPerPageSet){ final int numOfSeis = numSeis; final JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new BorderLayout()); dialog.setTitle("Printing Options"); dialog.setModal(true); JLabel information = new JLabel("Seismograms per page: "); Integer[] numbers = new Integer[numOfSeis]; for(int i =... | private void getImagesPerPage(int numSeis){ final int numOfSeis = numSeis; final JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new BorderLayout()); dialog.setTitle("Printing Options"); dialog.setModal(true); JLabel information = new JLabel("Seismograms p... |
} }); JButton cancel = new JButton("Cancel"); cancel.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ dialog.dispose(); } }); JPanel north = new JPanel(new BorderLayout()); north.setBorder(EMPTY_BORDER); north.add(information, BorderLayout.WEST); north.add(options, BorderLayout.EAST);... | }); JPanel north = new JPanel(new BorderLayout()); north.setBorder(EMPTY_BORDER); north.add(information, BorderLayout.WEST); north.add(options, BorderLayout.EAST); JPanel south = new JPanel(new BorderLayout()); south.setBorder(EMPTY_BORDER); south.add(cancel, BorderLayout.WEST); south.add(next, BorderLayout.EAST); dial... | private void getImagesPerPage(int numSeis){ final int numOfSeis = numSeis; final JDialog dialog = new JDialog(); dialog.getContentPane().setLayout(new BorderLayout()); dialog.setTitle("Printing Options"); dialog.setModal(true); JLabel information = new JLabel("Seismograms p... |
int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of seismograms selected must be greater than 0", "Selected Too Few", JOptionPane.WARNING_MESSAGE); }else if(currentNumber > numOfSeis){ JOptionPane.showMessageDialog(null, "The num... | int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, "The number of seismograms selected must be greater than 0", "Selected Too Few", JOptionPane.WARNING_MESSAGE); }else if(currentNumber > numOfSeis){ JOptionPane.showMessageDialog(null, "The num... | public void actionPerformed(ActionEvent e){ int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, ... |
} | public void actionPerformed(ActionEvent e){ int currentNumber = ((Integer)options.getSelectedItem()).intValue(); if(currentNumber < 0){ JOptionPane.showMessageDialog(null, ... | |
semanticHint = UMLVisualIDRegistry.getType(org.eclipse.uml2.diagram.profile.edit.parts.ProfileContentsEditPart.VISUAL_ID); | semanticHint = UMLVisualIDRegistry.getType(ProfileContentsEditPart.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.ProfileContentsEditPart.VISUAL_ID); view.setType(semanticHi... |
if (event == null) { event = new BwEventObj(); eventInfo = new EventInfo(event); } return event; | return getEditEvent(); | public BwEvent getEvent() { if (event == null) { event = new BwEventObj(); eventInfo = new EventInfo(event); } return event; } |
event = val; try { if (val == null) { getEventDates().setNewEvent(getEvent(), fetchSvci().getTimezones()); } else { getEventDates().setFromEvent(getEvent(), fetchSvci().getTimezones()); } } catch (Throwable t) { err.emit(t); } if (debug) { debugMsg("setEvent(), dates=" + getEventDates()); } resetEvent(); | setEditEvent(val); | public void setEvent(BwEvent val) { event = val; try { if (val == null) { getEventDates().setNewEvent(getEvent(), fetchSvci().getTimezones()); } else { getEventDates().setFromEvent(getEvent(), fetchSvci().getTimezones()); } } catch (Throwable t) { err.emit(t); } if (de... |
this(name, description, false, false, index); | this.name = name; this.description = description; this.abstractPriv = abstractPriv; this.denial = denial; setIndex(index); | public Privilege(String name, String description, int index) { this(name, description, false, false, index); } |
public void addContainedPrivilege(Privilege val) { | void addContainedPrivilege(Privilege val) { | public void addContainedPrivilege(Privilege val) { containedPrivileges.add(val); } |
if(file.isDirectory()) { | if(batch) { finished = processBatchRefTek(file, verbose, conn, ncFile, jdbcSeisFile, chanTable); } else if(file.isDirectory()) { | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... |
fileLoc, | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... | |
chanTable); | chanTable, props); | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... |
File seismogramFile = new File(fileLoc); File dataStream = new File(seismogramFile.getParent()); File unitId = new File(dataStream.getParent()); | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... | |
unitId.getAbsolutePath(), | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... | |
} else { printHelp(); | public static void main(String[] args) throws FissuresException, IOException, SeedFormatException, SQLException, NotFound { BasicConfigurator.configure(); Properties props = Initializer.loadProperties(args); boolean verbose = false; boolean finished = false; NCFile ncFi... | |
System.out.println(" -rt | Batch process of RT130 data"); System.out.println(" | No other types of data can be processed"); | private static void printHelp() { System.out.println(); System.out.println(" The last argument must be a directory or file location."); System.out.println(" The default SOD properties file is server.properties."); System.out.println(" The default database properties file is serv... | |
String absoluteBaseDirectory, | private static boolean readEntireDirectory(String baseDirectory, boolean verbose, Connection conn, NCFile ncFile, String absoluteBas... | |
JDBCChannel chanTable) | JDBCChannel chanTable, Properties props) | private static boolean readEntireDirectory(String baseDirectory, boolean verbose, Connection conn, NCFile ncFile, String absoluteBas... |
absoluteBaseDirectory, | private static boolean readEntireDirectory(String baseDirectory, boolean verbose, Connection conn, NCFile ncFile, String absoluteBas... | |
chanTable); | chanTable, props); | private static boolean readEntireDirectory(String baseDirectory, boolean verbose, Connection conn, NCFile ncFile, String absoluteBas... |
readSingleFile(files[i].getAbsolutePath(), | readSingleFile(files[i].getCanonicalPath(), | private static boolean readEntireDirectory(String baseDirectory, boolean verbose, Connection conn, NCFile ncFile, String absoluteBas... |
String absoluteBaseDirectory, | private static boolean readSingleFile(String fileLoc, boolean verbose, Connection conn, NCFile ncFile, String absoluteBaseDirectory, ... | |
JDBCChannel chanTable) | JDBCChannel chanTable, Properties props) | private static boolean readSingleFile(String fileLoc, boolean verbose, Connection conn, NCFile ncFile, String absoluteBaseDirectory, ... |
finished = processRefTek(jdbcSeisFile, conn, fileLoc, fileName, verbose, ncFile, absoluteBaseDirectory, chanTable); | finished = processSingleRefTek(jdbcSeisFile, conn, fileLoc, fileName, verbose, ncFile, chanTable, props); | private static boolean readSingleFile(String fileLoc, boolean verbose, Connection conn, NCFile ncFile, String absoluteBaseDirectory, ... |
} else if(fileName.equals("SOH.RT")) { if(verbose) { System.out.println("Ignoring State of Health file " + fileName + "."); } } else { if(verbose) { | } else if(verbose) { if(fileName.equals("SOH.RT")) { System.out.println("Ignoring file: " + fileName + "."); } else if(fileName.equals(".DS_Store")) { System.out.println("Ignoring Mac OS X file: " + fileName + "."); } else { | private static boolean readSingleFile(String fileLoc, boolean verbose, Connection conn, NCFile ncFile, String absoluteBaseDirectory, ... |
public void saveSeismogramToDatabase(Channel channel, | public void saveSeismogramToDatabase(ChannelId channelId, | public void saveSeismogramToDatabase(Channel channel, LocalSeismogramImpl seis, String fileLocation, SeismogramFileTypes filetype) throws SQLException { // Get absolute file path... |
throws SQLException { | throws SQLException, IOException { int channel_id = chanTable.put(channelId); int begin_time_id = timeTable.put(seis.getBeginTime().getFissuresTime()); int end_time_id = timeTable.put(seis.getEndTime().getFissuresTime()); | public void saveSeismogramToDatabase(Channel channel, LocalSeismogramImpl seis, String fileLocation, SeismogramFileTypes filetype) throws SQLException { // Get absolute file path... |
String absoluteFilePath = seismogramFile.getPath(); insert.setInt(1, chanTable.put(channel)); insert.setInt(2, timeTable.put(seis.getBeginTime().getFissuresTime())); insert.setInt(3, timeTable.put(seis.getEndTime().getFissuresTime())); insert.setString(4, absoluteFilePath); insert.setInt(5, filetype.getIntValue()); ins... | String absoluteFilePath = seismogramFile.getCanonicalPath(); int fileTypeInt = filetype.getIntValue(); selectSeismogram.setInt(1, channel_id); selectSeismogram.setString(2, absoluteFilePath); ResultSet results = selectSeismogram.executeQuery(); if(results.next()) { } else { insert.setInt(1, channel_id); insert.setInt(... | public void saveSeismogramToDatabase(Channel channel, LocalSeismogramImpl seis, String fileLocation, SeismogramFileTypes filetype) throws SQLException { // Get absolute file path... |
Object val) throws CalFacadeException { | Object val, boolean debug) throws CalFacadeException { | public void initialise(String userid, CallBack cb, Object val) throws CalFacadeException { throw new CalFacadeException("Method not accessible"); } |
mailer = (MailerIntf)CalEnv.getGlobalObject("mailerclass", | mailer = (MailerIntf)CalEnvFactory.getEnv(null, debug).getGlobalObject("mailerclass", | public MailerIntf getMailer() { if (mailer != null) { return mailer; } try { mailer = (MailerIntf)CalEnv.getGlobalObject("mailerclass", MailerIntf.class); mailer.init(svci, debug); } catch (Throwable t) { error(t); ... |
taggedEntityId("owner", entity.getOwner()); | ownerKey(entity.getOwner()); | protected void ownedEntityTags(BwOwnedDbentity entity) throws Throwable { taggedEntityId(entity); taggedEntityId("owner", entity.getOwner()); taggedVal("public", entity.getPublick()); } |
taggedVal("owner-account", val.getAccount()); taggedVal("owner-kind", val.getKind()); | tagStart("owner-key"); taggedVal("account", val.getAccount()); taggedVal("kind", val.getKind()); tagEnd("owner-key"); | protected void ownerKey(BwPrincipal val) throws Throwable { taggedVal("owner-account", val.getAccount()); taggedVal("owner-kind", val.getKind()); } |
ical = new Calendar(); | ical = IcalTranslator.newIcal(); | public void setFreeBusy(BwFreeBusy fb) throws WebdavIntfException { try { VFreeBusy vfreeBusy = VFreeUtil.toVFreeBusy(fb); if (vfreeBusy != null) { ical = new Calendar(); ical.getComponents().add(vfreeBusy); vfreeBusyString = ical.toString(); contentLen = vfreeBusyString.lengt... |
sess.getTransaction().commit(); | private synchronized void closeSess() throws Throwable {// sess.commit(); try { if (sess != null) { sess.close(); // sess.disconnect(); } // } catch (Throwable t) { // Discard session if we get errors on close.// sess = null; } finally { sess = null; } } | |
openSess(); closeSess(); | public void open() throws Throwable { openSess(); /* This doesn't work - at least with mysql Connection conn = sess.connection(); PreparedStatement ps = null; ps = conn.prepareStatement("SET REFERENTIAL_INTEGRITY FALSE"); ps.executeUpdate(); ps.close(); ps = conn.prepareStatement("delete from ... | |
entry.setMember((BwPrincipal)it.next()); | entry.setMember(pr); | public void restoreAdminGroup(BwAdminGroup o) throws Throwable { openSess(); if (globals.from2p3px) { // No id assigned o.setId(adminGroupId); adminGroupId++; } save(o); log.debug("Saved admin group " + o); closeSess(); /* Save members. */ Collection c = o.getGroupMembers();... |
if (!checkOnlyUser(o)) { return; } | public void restoreAlarm(BwAlarm o) throws Throwable { openHibSess(); hibSave(o); closeHibSess(); } | |
if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getUser().getAccount()) == null)) { return; } | public void restoreAuthUser(BwAuthUser o) throws Throwable { openHibSess();// if (o.getId() <= 0) {// o.setId(o.getUser().getId());// } hibSave(o); closeHibSess(); } | |
if (!checkOnlyUser(o)) { return; } | public void restoreCalendar(BwCalendar o) throws Throwable { openSess(); restoreCalendar(o, sess.connection()); closeSess(); } | |
if (!checkOnlyUser(o)) { return; } | public void restoreCalendars(BwCalendar o) throws Throwable { openSess(); restoreCalendars(o, sess.connection()); sess.update(o); closeSess(); } | |
if (!checkOnlyUser(o)) { return; } | public void restoreCategory(BwCategory o) throws Throwable { openSess(); save(o); closeSess(); } | |
if (!checkOnlyUser(o)) { return; } | public void restoreEvent(BwEvent o) throws Throwable { openHibSess(); hibSave(o); closeHibSess(); } | |
if (!checkOnlyUser(o)) { return null; } | public Integer restoreLocation(BwLocation o) throws Throwable { openSess(); StringBuffer sb = new StringBuffer(); sb.append("select ent.id from "); sb.append(BwLocation.class.getName()); sb.append(" ent where ent.address=:address and ent.owner=:owner"); Query q = sess.createQuery(sb.toString()); ... | |
if (!checkOnlyUser(o)) { return null; } | public Integer restoreSponsor(BwSponsor o) throws Throwable { openSess(); StringBuffer sb = new StringBuffer(); sb.append("select ent.id from "); sb.append(BwSponsor.class.getName()); sb.append(" ent where ent.name=:name and ent.owner=:owner"); Query q = sess.createQuery(sb.toString()); q.setStri... | |
if (!checkOnlyUser(o)) { return; } | public void restoreTimezone(BwTimeZone o) throws Throwable { openSess(); save(o); closeSess(); } | |
if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getAccount()) == null)) { return; } | public void restoreUser(BwUser o) throws Throwable { try { openSess(); //sess.save(o, new Integer(o.getId())); save(o); closeSess(); } catch (Throwable t) { log.error("Exception restoring user " + o); throw t; } } | |
if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getUser().getAccount()) == null)) { return; } | public void restoreUserInfo(BwUserInfo o) throws Throwable { openSess(); save(o); closeSess(); } | |
if (!checkOnlyUser(o)) { return; } | public void restoreUserPrefs(BwPreferences o) throws Throwable { openHibSess(); /* Unset the subscription id - hibernate cascades cause an error * We'll just have to go with a new id */ Iterator it = o.iterateSubscriptions(); while (it.hasNext()) { BwSubscription sub = (BwSubscription)it.next... | |
if (!checkOnlyUser(o)) { return; } | public void update(BwEvent o) throws Throwable { openHibSess(); hibSess.update(o); closeHibSess(); } | |
String appPrefix = null; if (pars.getPublicAdmin()) { appPrefix = CalEnv.webAdminAppPrefix; } else if (pars.isGuest()) { if (pars.getCaldav()) { appPrefix = CalEnv.caldavPublicAppPrefix; } else { appPrefix = CalEnv.webPublicAppPrefix; } } else { if (pars.getCaldav()) { appPrefix = CalEnv.caldavPersonalAppPrefix; } els... | env = new CalEnv(pars.getEnvPrefix(), debug); | public void init(CalSvcIPars parsParam) throws CalFacadeException { pars = (CalSvcIPars)parsParam.clone(); debug = pars.getDebug(); //if (userAuth != null) { // userAuth.reinitialise(getUserAuthCallBack()); //} if (userGroups != null) { userGroups.init(getGroupsCallBack()); } if (adminGr... |
adminCanEditAllPublicCategories = env.getAppBoolProperty("app.allowEditAllCategories"); adminCanEditAllPublicLocations = env.getAppBoolProperty("app.allowEditAllLocations"); adminCanEditAllPublicSponsors = env.getAppBoolProperty("app.allowEditAllSponsors"); | adminCanEditAllPublicCategories = env.getAppBoolProperty("allowEditAllCategories"); adminCanEditAllPublicLocations = env.getAppBoolProperty("allowEditAllLocations"); adminCanEditAllPublicSponsors = env.getAppBoolProperty("allowEditAllSponsors"); | public void init(CalSvcIPars parsParam) throws CalFacadeException { pars = (CalSvcIPars)parsParam.clone(); debug = pars.getDebug(); //if (userAuth != null) { // userAuth.reinitialise(getUserAuthCallBack()); //} if (userGroups != null) { userGroups.init(getGroupsCallBack()); } if (adminGr... |
al.add(new CalendarData(CaldavTags.calendarData, debug)); | public Collection getProperties(String ns) throws WebdavIntfException { init(true); ArrayList al = new ArrayList(); getVevent(); // init comp if (comp == null) { throw new WebdavIntfException("getProperties, comp == null"); } addProp(al, ICalTags.summary, name); addProp(al, ICalTags.dtstart,... | |
idea.setDescription(getDescription()); idea.setUrl(getUrl()); | public Idea clone() { Idea idea = new Idea(getText()); idea.setAngle(getAngle()); idea.setLength(getLength()); idea.setNotes(getNotes()); idea.setV(getV()); for (Idea subIdea : this.subIdeas) { idea.add(subIdea.clone()); } return idea; } | |
repaint(); | public void componentResized(ComponentEvent e) { resize(); } | |
repaint(); | public void componentShown(ComponentEvent e) { resize(); } | |
repaint(); | protected void resize() { Insets insets = getInsets(); Dimension d = getSize(); displaySize = new Dimension(d.width - insets.left - insets.right, d.height - insets.top - insets.bottom); if(displaySize.height < 0 || displaySize.width < 0){ return; } timeScaleMap.setTotalPixels(displaySize.width); ampScaleMap.se... | |
String showClass=(String) getSessionObject(request, UMLBrowserFormConstants.CLASS_VIEW); | String showClass = null; if (getSessionObject(request, UMLBrowserFormConstants.CLASS_VIEW) != null) showClass=getSessionObject(request, UMLBrowserFormConstants.CLASS_VIEW).toString(); | public ActionForward resetPkgOptions( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm dynaForm = (DynaActionForm) form; String projectId = ((String) dynaForm.get(UMLBrowserFormConstant... |
Calendar cal = bldr.build(new StringReader(val), true); | UnfoldingReader ufrdr = new UnfoldingReader(new StringReader(val), true); Calendar cal = bldr.build(ufrdr); | public Collection toVEvent(String val) throws CalFacadeException { try { CalendarBuilder bldr = new CalendarBuilder(new CalendarParserImpl()); Calendar cal = bldr.build(new StringReader(val), true); Vector evs = new Vector(); if (cal == null) { return evs; } ComponentList clist... |
throw new XIllegalOperation("Field " + name_.getText().asNativeText().javaValue + " cannot be set."); | throw new XIllegalOperation("Field " + name_.base_getText().asNativeText().javaValue + " cannot be set."); | public ATObject base_setValue(ATObject newValue) throws NATException { // certain fields may not have setters if(setter_ != null) return getter_.base_apply(new NATTable(new ATObject[] { newValue })); throw new XIllegalOperation("Field " + name_.getText().asNativeText().javaValue + " cannot be set."); } |
return NATText.atValue("<native field:"+name_.getText().asNativeText().javaValue+">"); | return NATText.atValue("<native field:"+name_.base_getText().asNativeText().javaValue+">"); | public NATText meta_print() throws XTypeMismatch { return NATText.atValue("<native field:"+name_.getText().asNativeText().javaValue+">"); } |
public XMLDataSetAccess(DocumentBuilder docBuilder, Element config) { this.docBuilder = docBuilder; this.config = config; | public XMLDataSetAccess(DocumentBuilder docBuilder, String id, String name, String Owner) { Document doc = docBuilder.newDocument(); config = doc.createElement("dataset"); Element nameE = doc.createElement("name"); Element ownerE = doc.createElement("owner"); config.setAttribute("datasetid", id); config.appendChild(nam... | public XMLDataSetAccess(DocumentBuilder docBuilder, Element config) { this.docBuilder = docBuilder; this.config = config; } |
evalNodeList(config, "dataset[@datasetid="+dquote+id+dquote+"]"); | evalNodeList(config, " | public DataSetAccess getDataSet(String id) { NodeList nList = evalNodeList(config, "dataset[@datasetid="+dquote+id+dquote+"]"); if (nList != null && nList.getLength() != 0) { System.out.println("got "+nList.getLength()); Node n = nList.item(0); if (n instanceof Element) { return new XMLDataSetAcc... |
System.out.println("got "+nList.getLength()); | public DataSetAccess getDataSet(String id) { NodeList nList = evalNodeList(config, "dataset[@datasetid="+dquote+id+dquote+"]"); if (nList != null && nList.getLength() != 0) { System.out.println("got "+nList.getLength()); Node n = nList.item(0); if (n instanceof Element) { return new XMLDataSetAcc... | |
return getAllAsStrings("dataset/@datasetid"); | return getAllAsStrings("*/@datasetid"); | public String[] getDataSetIds() { return getAllAsStrings("dataset/@datasetid"); } |
System.out.println("got "+nList.getLength()); | public Element getParamter(String name) { NodeList nList = evalNodeList(config, "dataset/parameter[name/text()="+ dquote+name+dquote+"]"); if (nList != null && nList.getLength() != 0) { System.out.println("got "+nList.getLength()); Node n = nList.item(0); if (n instanceof Element) { ... | |
evalNodeList(config, "dataset/SacSeismogram[name="+dquote+name+dquote+"]"); | evalNodeList(config, "SacSeismogram[name="+dquote+name+dquote+"]"); | public LocalSeismogramImpl getSeismogram(String name) { NodeList nList = evalNodeList(config, "dataset/SacSeismogram[name="+dquote+name+dquote+"]"); if (nList != null && nList.getLength() != 0) { try { System.out.println("got "+nList.getLength()); Node n = nList.item(0); if (n instanceof Element) { ... |
System.out.println("got "+nList.getLength()); | public LocalSeismogramImpl getSeismogram(String name) { NodeList nList = evalNodeList(config, "dataset/SacSeismogram[name="+dquote+name+dquote+"]"); if (nList != null && nList.getLength() != 0) { try { System.out.println("got "+nList.getLength()); Node n = nList.item(0); if (n instanceof Element) { ... | |
return getAllAsStrings("dataset/SacSeismogram/name/text()"); | return getAllAsStrings("SacSeismogram/name/text()"); | public String[] getSeismogramNames() { return getAllAsStrings("dataset/SacSeismogram/name/text()"); } |
for (int i=0; i<nList.getLength(); i++) { Node n = nList.item(i); if (n instanceof Element) { Element nodeElement = (Element)n; System.out.println(nodeElement.getTagName()+" {"+nodeElement.getAttribute("xlink:href")+"}"); if (nodeElement.getTagName().equals("dataset")) { System.out.println("######dataset yes"); dat... | if (docElement.getTagName().equals("dataset")) { System.out.println("dataset yes"); dataset = new XMLDataSet(docBuilder, docElement); System.out.println(docElement.getTagName()+" {"+docElement.getAttribute("datasetid")+"}"); testDataSet(dataset, " "); } | public static void main (String[] args) { try { BasicConfigurator.configure(); System.out.println("Starting.."); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); // just for testing Document doc = docBuilder.pa... |
if (dataset != null) { String[] names = dataset.getSeismogramNames(); for (int num=0; num<names.length; num++) { System.out.println("Seismogram name="+names[num]); LocalSeismogramImpl seis = dataset.getSeismogram(names[num]); System.out.println(seis.getNumPoints()+" "+seis.getMinValue()); } } } } | public static void main (String[] args) { try { BasicConfigurator.configure(); System.out.println("Starting.."); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); // just for testing Document doc = docBuilder.pa... | |
System.out.println("index = "+ index); | public void goToPrevious() { try { int index = previousURLs.size() - 1; System.out.println("index = "+ index); if (index >= 0) { URL prev = (URL)previousURLs.get(index); previousURLs.remove(index); URL current = getPage(); nextURLs.add(current); setPage(prev); } } catch (Exception exc) { sho... | |
setText("<center>"+ t.getLocalizedMessage() +"</center>"); | public void showError(Throwable t) { try { super.setPage(resourceToURL("htmlerror.html")); // bad workaround: setText("<center>"+ t.getLocalizedMessage() +"</center>");// does not work -- why??// HTMLDocument doc = (HTMLDocument)getDocument();// Element msgElem = doc.getElement("message");// doc.setInnerH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.