rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
PreparedStatement ps = conn.prepareStatement(sqlStatement); setParameters(ps, parameters);
public void doTag(XMLOutput output) throws Exception { if (!maxRowsSpecified) { Object obj = context.getVariable("org.apache.commons.jelly.sql.maxRows"); if (obj != null) { if (obj instanceof Integer) { maxRows = ((Integer) obj).intValue(); ...
ResultSet rs = ps.executeQuery();
ResultSet rs = null; if ( parameters == null || parameters.size() == 0 ) { Statement statement = conn.createStatement(); rs = statement.executeQuery(sqlStatement); } else { PreparedStatement ps = conn.prepareStatement(sqlStatement); setParameters(ps, parameters); rs = ps.executeQuery(); }
public void doTag(XMLOutput output) throws Exception { if (!maxRowsSpecified) { Object obj = context.getVariable("org.apache.commons.jelly.sql.maxRows"); if (obj != null) { if (obj instanceof Integer) { maxRows = ((Integer) obj).intValue(); ...
ApplicationDowntimeTrackingThread thread = new ApplicationDowntimeTrackingThread(appConfig); threads.add(thread); thread.start();
addApplication(appConfig);
public void start() { // TODO: threads for new applications are not getting started for (ApplicationConfig appConfig : ApplicationConfigManager .getAllApplications()) { ApplicationDowntimeTrackingThread thread = new ApplicationDowntimeTrackingThread(appConfig)...
addListener(recorder);
EventSystem eventSystem = EventSystem.getInstance(); eventSystem.addListener(recorder, ApplicationEvent.class); eventSystem.addListener(new EventListener(){ public void handleEvent(EventObject event) { if(!(event instanceof ApplicationEvent)){ throw new IllegalArgumentException("event must be of type ApplicationEve...
public void start() { // TODO: threads for new applications are not getting started for (ApplicationConfig appConfig : ApplicationConfigManager .getAllApplications()) { ApplicationDowntimeTrackingThread thread = new ApplicationDowntimeTrackingThread(appConfig)...
for(ApplicationDowntimeTrackingThread thread: threads){
for(ApplicationHeartBeatThread thread: threads){
public void stop() { for(ApplicationDowntimeTrackingThread thread: threads){ thread.end(); } threads.clear(); eventListeners.clear(); }
eventListeners.clear();
public void stop() { for(ApplicationDowntimeTrackingThread thread: threads){ thread.end(); } threads.clear(); eventListeners.clear(); }
String component = DashboardComponentHelper.drawComponent(context,
String component = DashboardComponentHelper.refreshComponent(context,
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ Str...
query.create( "select folders from " + PhotoFolder.class.getName() );
query.create( "select folders from " + PhotoFolder.class.getName() + " where name = \"Top\"" );
public void testRetrieve() { DList folders = null; Transaction tx = odmg.newTransaction(); tx.begin(); try { OQLQuery query = odmg.newOQLQuery(); query.create( "select folders from " + PhotoFolder.class.getName() ); folders = (DList) query.execute(); tx.commit(); } catch ( Exception e ) { tx.abo...
if (! (node instanceof DBTreeRoot)) { while (node != null) { path.add(0, node); node = node.getParent(); }
while (node != null && node != root) { path.add(0, node); node = node.getParent();
public SQLObject[] getPathToNode(SQLObject node) { LinkedList path = new LinkedList(); if (! (node instanceof DBTreeRoot)) { while (node != null) { path.add(0, node); node = node.getParent(); } } path.add(0, root); return (SQLObject[]) path.toArray(new SQLObject[path.size()]); }
public LockedColumnException(String message) { super(message);
public LockedColumnException(SQLRelationship lockingRelationship) { super("Locked column belongs to relationship "+lockingRelationship); this.lockingRelationship = lockingRelationship;
public LockedColumnException(String message) { super(message); }
registerTag("assertThrown", AssertThrownTag.class);
registerTag("assertThrows", AssertThrowsTag.class);
public JUnitTagLibrary() { registerTag("assert", AssertTag.class); registerTag("assertEquals", AssertEqualsTag.class); registerTag("assertThrown", AssertThrownTag.class); registerTag("fail", FailTag.class); registerTag("run", RunTag.class ); registerTag("case", CaseTag.class )...
script.addAttribute(attrQName, expression);
int p = attrQName.indexOf(':'); String prefix = p>=0 ? attrQName.substring(0,p): ""; script.addAttribute(list.getLocalName(i), prefix, list.getURI(i), expression);
protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new Stati...
writer.write(new Config(applicationConfigs, dashboardConfigs));
writer.write(new Config(applicationConfigs));
private static void saveConfig(){ ConfigWriter writer = ConfigWriter.getInstance(); writer.write(new Config(applicationConfigs, dashboardConfigs)); }
tag.setContext(context);
public void run(JellyContext context, XMLOutput output) throws Exception { DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map...
if (value instanceof SQLObject) { if (((SQLObject) value).isPopulated()) { setForeground(Color.black); } else { setForeground(Color.lightGray); } }
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { setText(value.toString()); if (value instanceof SQLDatabase) { setIcon(dbIcon); ...
JButton okButton = new JDefaultButton(okAction); okButton.setText(actionButtonTitle);
public static JDialog createArchitectPanelDialog( final ArchitectPanel arch, final Window dialogParent, final String dialogTitle, final String actionButtonTitle, final Action okAction, final Action cancelAction) { final JDialog d; if (dialogParent instanceof Frame) { d = new JDialog((Frame) dial...
makeJDialogCancellable(d, closeAction);
public static JDialog createArchitectPanelDialog( final ArchitectPanel arch, final Window dialogParent, final String dialogTitle, final String actionButtonTitle, final Action okAction, final Action cancelAction) { final JDialog d; if (dialogParent instanceof Frame) { d = new JDialog((Frame) dial...
makeJDialogCancellable(d, cancelAction);
public static JDialog createArchitectPanelDialog( final ArchitectPanel arch, final Window dialogParent, final String dialogTitle, final String actionButtonTitle, final Action okAction, final Action cancelAction) { final JDialog d; if (dialogParent instanceof Frame) { d = new JDialog((Frame) dial...
TablePane tp = new TablePane(t);
TablePane tp = new TablePane(t, pp.getFontRenderContext());
public void actionPerformed(ActionEvent evt) { SQLTable t = new SQLTable(); t.initFolders(true); t.setTableName("New_Table"); TablePane tp = new TablePane(t); pp.addFloating(tp); }
AlertSourceConfig alertSrcConfig = alertConfig.getAlertSourceConfig(); request.setAttribute("alertSourceType",alertSrcConfig.getSourceType()); request.setAttribute("sourceMBean", alertSrcConfig.getObjectName()); request.setAttribute("notificationType", alertSrcConfig.getNotificationType()); form.setAlertSourceType(aler...
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
script.run( parser.getContext(), output );
script.run( parser.getJellyContext(), output );
protected void runScript(String name) throws Exception { InputStream in = getClass().getResourceAsStream( name ); Script script = parser.parse( in ); script = script.compile(); log.info( "Evaluating: " + script ); script.run( parser.getContext(), output ); ...
registerTag("sort", SortTag.class);
public XMLTagLibrary() { registerTag("out", ExprTag.class); registerTag("if", IfTag.class); registerTag("forEach", ForEachTag.class); registerTag("parse", ParseTag.class); registerTag("set", SetTag.class); registerTag("transform", TransformTag.class); registerTag("pa...
if (attributeName.equals("select")) {
if (attributeName.equals("select") || attributeName.equals("sort")) {
public Expression createExpression( ExpressionFactory factory, TagScript tagScript, String attributeName, String attributeValue) throws Exception { // #### may need to include some namespace URI information in the XPath instance? if (attributeName.equals("select")) { ...
if(this.countsOrRatios == SHOW_COUNTS) {
if(this.countsOrRatios == SHOW_HAP_COUNTS) {
public Object getValueAt(Object node, int column) { HaplotypeAssociationNode n = (HaplotypeAssociationNode) node; switch (column){ case 0: return n.getName(); case 1: return n.getFreq(); case 2: i...
} else if(this.countsOrRatios == SHOW_RATIOS) { return n.getRatios();
} else if(this.countsOrRatios == SHOW_HAP_RATIOS) { return n.getCCFreqs();
public Object getValueAt(Object node, int column) { HaplotypeAssociationNode n = (HaplotypeAssociationNode) node; switch (column){ case 0: return n.getName(); case 1: return n.getFreq(); case 2: i...
if(url == null){ return host + ":" + port; }
public String getURL() { return url; }
public Map runNamedScript( String name, Map params ) throws Exception { return runNamedScript(name, params, createXMLOutput()); }
public Map runNamedScript( String name, Map params ) throws Exception;
public Map runNamedScript( String name, Map params ) throws Exception { return runNamedScript(name, params, createXMLOutput()); }
public Map runScript( String url, Map params, XMLOutput output ) throws Exception { URL actualUrl = null; try { actualUrl = new URL( url ); } catch( MalformedURLException x ) { throw new JellyException( "Could not find script at URL [" + url + "]: " + x.getMessage(), x ); } JellyContext context = createJellyContext()...
public Map runScript( String url, Map params, XMLOutput output ) throws Exception;
public Map runScript( String url, Map params, XMLOutput output ) throws Exception { URL actualUrl = null; try { actualUrl = new URL( url ); } catch( MalformedURLException x ) { throw new JellyException( "Could not find script at URL [" + url + "]: " + ...
logger.logActivity(username, user.getName()+" logged in successfully");
logger.logActivity(username, "logged in successfully");
public void login(ServiceContext context, String username, String password) throws ServiceException{ LoginCallbackHandler callbackHandler = new LoginCallbackHandler(); callbackHandler.setUsername(username); callbackHandler.setPassword(password); ...
JPanel missingCutoffPanel = new JPanel(); missingCutoffField = new NumberTextField("25",3, false); missingCutoffPanel.add(new JLabel("Exclude individuals with >")); missingCutoffPanel.add(missingCutoffField); missingCutoffPanel.add(new JLabel("% missing genotypes.")); contents.add(missingCutoffPanel);
void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPan...
con.setCatalog(getName());
try { con.setCatalog(getName()); } catch (SQLException ex) { logger.info("populate: Could not setCatalog("+getName()+"). Assuming it's a permission problem. Stack trace:", ex); return; }
public void populate() throws ArchitectException { if (populated) return; logger.debug("SQLCatalog: populate starting"); int oldSize = children.size(); synchronized (parent) { Connection con = null; ResultSet rs = null; try { con = ((SQLDatabase) parent).getConnection(); DatabaseMetaData dbmd = ...
TablePane tp = new TablePane(newTable);
TablePane tp = new TablePane(newTable, getFontRenderContext());
public synchronized TablePane importTableCopy(SQLTable source, Point preferredLocation) throws ArchitectException { SQLTable newTable = SQLTable.getDerivedInstance(source, db); // adds newTable to db String key = source.getTableName().toLowerCase(); // ensure tablename is unique if (logger.isDebugEnabled()) logg...
inputArray[1] = "";
inputArray[1] = null;
public static void main(String[] args) { //set defaults Options.setMissingThreshold(0.5); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); Options.setHaplotypeDisplayThreshold(1); Options.setMaxDistance(500); Options.setLDColorScheme(STD_SCHEME); ...
monitorObjName = new ObjectName("jmanage:name=" + alertName +
monitorObjName = new ObjectName("jmanage.alerts:name=" + alertName +
public void register(AlertHandler handler, String alertId, String alertName){ assert this.handler == null; assert connection == null; this.handler = handler; /* start looking for this notification */ connection = ServerConnector.getS...
monitorObjName, null, null);
monitorObjName, new Object[0], new String[0]);
public void register(AlertHandler handler, String alertId, String alertName){ assert this.handler == null; assert connection == null; this.handler = handler; /* start looking for this notification */ connection = ServerConnector.getS...
logger.log(Level.SEVERE, "Error while closing connection", e);
logger.log(Level.WARNING, "Error while closing connection", e);
public void unregister() { assert connection != null; assert monitorObjName != null; try { /* remove notification listener */ connection.removeNotificationListener(monitorObjName, listener, filter, null); } catch (Exception e) { logger.l...
if(!_submitBelowTopics) {
private PresentationObject getMailInputTable(IWContext iwc){ Table T = new Table(); T.setCellpaddingAndCellspacing(0); T.setColor(_bgColor); TextInput email = new TextInput("nl_email"); email.setStyleAttribute(_inputStyle); email.setLength(_inputLength); email.setContent(iwrb.getLocal...
T.add(send, 1, 3); if (_showCancelImage) T.add(cancel, 1, 3);
if(!_submitBelowTopics) { T.add(send, 1, 3); if (_showCancelImage) T.add(cancel, 1, 3); }
private PresentationObject getMailInputTable(IWContext iwc){ Table T = new Table(); T.setCellpaddingAndCellspacing(0); T.setColor(_bgColor); TextInput email = new TextInput("nl_email"); email.setStyleAttribute(_inputStyle); email.setLength(_inputLength); email.setContent(iwrb.getLocal...
T.add(send, 3, 1); if (_showCancelImage) T.add(cancel, 3, 1);
if(!_submitBelowTopics) { T.add(send, 3, 1); if (_showCancelImage) T.add(cancel, 3, 1); }
private PresentationObject getMailInputTable(IWContext iwc){ Table T = new Table(); T.setCellpaddingAndCellspacing(0); T.setColor(_bgColor); TextInput email = new TextInput("nl_email"); email.setStyleAttribute(_inputStyle); email.setLength(_inputLength); email.setContent(iwrb.getLocal...
}
private PresentationObject getMailInputTable(IWContext iwc){ Table T = new Table(); T.setCellpaddingAndCellspacing(0); T.setColor(_bgColor); TextInput email = new TextInput("nl_email"); email.setStyleAttribute(_inputStyle); email.setLength(_inputLength); email.setContent(iwrb.getLocal...
dge.getDragSource().startDrag (dge, null, new DnDTreePathTransferable(paths), tp);
JLabel label = new JLabel(tp.getModel().getName()+"."+tp.draggingColumn.getName()); Dimension labelSize = label.getPreferredSize(); label.setSize(labelSize); BufferedImage dragImage = new BufferedImage(labelSize.width, labelSize.height, BufferedImage.TYPE_4BYTE_ABGR); Graphics2D imageGraphics = dragImage.createGraphics...
public void dragGestureRecognized(DragGestureEvent dge) { Point p = ((MouseEvent) dge.getTriggerEvent()).getPoint(); PlayPenComponent c = contentPane.getComponentAt(p); if ( c instanceof TablePane ) { TablePane tp = (TablePane) c; int colIndex = TablePane.COLUMN_INDEX_NONE; Point dragOrigi...
if (start < 0){ start = 0; }
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if(command.equals("Cancel")) { this.dispose(); } if (command.equals("GO")){ if(rangeInput.getText().equals("")){ JOptionPane.showMessageDialog(this, ...
System.out.println("Interrupted while waiting for engine");
logger.error("Interrupted while waiting for engine", ex);
public void waitForProcessCompletion() { try { iss.join(); ess.join(); } catch (InterruptedException ex) { System.out.println("Interrupted while waiting for engine"); } output.append("Execution halted"); }
VariantSequence vs = (VariantSequence)taggedByCurTag.get(j); vs.removeTag(dumpedTS);
VariantSequence vs = (VariantSequence)taggedByHap.get(j); vs.removeTag(ts);
public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagByVarSeq = new Hashtable(); PotentialTagComparator ptcomp = new Potential...
Component c = ((JTabbedPane)hv.tabs.getComponent(currTab)).getSelectedComponent();
Component c = ((JTabbedPane)((HaploviewTab)hv.tabs.getComponent(currTab)).getComponent()).getSelectedComponent();
public ExportDialog(HaploView h){ super(h, "Export Data"); hv = h; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel tabPanel = new JPanel(); int currTab = hv.tabs.getSelectedIndex(); tabPanel.setBorder(new TitledBo...
rsq =((PairwiseLinkage)dpTable.getLDStats(v2Index, v1Index)).getRSquared();
pl = dpTable.getLDStats(v2Index,v1Index); }else{ pl = dpTable.getLDStats(v1Index,v2Index); }
public LocusCorrelation getCorrelation(VariantSequence v1, VariantSequence v2) { if(v1 == v2) { return new LocusCorrelation(null,1); } if (v1 instanceof SNP && v2 instanceof SNP){ //we are comparing two snps int v1Index = ((Integer)indicesByVarSeq.get(v1)).intVa...
}else{ rsq = ((PairwiseLinkage)dpTable.getLDStats(v1Index, v2Index)).getRSquared();
if(pl == null) { rsq = 0; } else { rsq =pl.getRSquared();
public LocusCorrelation getCorrelation(VariantSequence v1, VariantSequence v2) { if(v1 == v2) { return new LocusCorrelation(null,1); } if (v1 instanceof SNP && v2 instanceof SNP){ //we are comparing two snps int v1Index = ((Integer)indicesByVarSeq.get(v1)).intVa...
if (((String)table.getValueAt(row,1)).equals(hv.getChosenMarker())){ cell.setBackground(Color.cyan);
if (hv.getChosenMarker() != null){ if (((String)table.getValueAt(row,1)).equals(hv.getChosenMarker())){ cell.setBackground(Color.cyan); }
public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column); ...
sql.append("SELECT COUNT(*)");
sql.append("SELECT COUNT(*) \"ROWCOUNT\""); int i = 0;
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingDistinctCount) { sql.append(",\n COUNT(DISTINCT ").append(col.getName()).append(")");
if (findingDistinctCount && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n COUNT(DISTINCT ").append(col.getName()).append(") \"DISTINCTCOUNT_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMin) { sql.append(",\n MIN(").append(col.getName()).append(")");
if (findingMin && col.getType() != Types.LONGVARCHAR && col.getType() != Types.VARBINARY && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n MIN(").append(col.getName()).append(") \"MINVALUE_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMax) { sql.append(",\n MAX(").append(col.getName()).append(")");
if (findingMax && col.getType() != Types.LONGVARCHAR && col.getType() != Types.VARBINARY && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n MAX(").append(col.getName()).append(") \"MAXVALUE_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingAvg) { sql.append(",\n AVG(").append(col.getName()).append(")");
if (findingAvg && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY && col.getType() != Types.VARBINARY && col.getType() != Types.TIMESTAMP && col.getType() != Types.CHAR && col.getType() != Types.VARCHAR ) { sql.append(",\n AVG(").append(col.getName()).append(") \"AVGVALUE_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMinLength) { sql.append(",\n MIN(LENGTH(").append(col.getName()).append("))");
if (findingMinLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n MIN(LENGTH(").append(col.getName()).append(")) \"MINLENGTH_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMaxLength) { sql.append(",\n MAX(LENGTH(").append(col.getName()).append("))");
if (findingMaxLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n MAX(LENGTH(").append(col.getName()).append(")) \"MAXLENGTH_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingAvgLength) { sql.append(",\n AVG(LENGTH(").append(col.getName()).append("))");
if (findingAvgLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { sql.append(",\n AVG(LENGTH(").append(col.getName()).append(")) \"AVGLENGTH_"+i+"\"");
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
int rscol = 1; TableProfileResult tableProfileResult = new TableProfileResult(endTime-startTime,rs.getInt(rscol++));
TableProfileResult tableProfileResult = new TableProfileResult(endTime-startTime,rs.getInt("ROWCOUNT"));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingDistinctCount) { colResult.setDistinctValueCount(rs.getInt(rscol++));
if (findingDistinctCount && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { lastSQL = "DISTINCTCOUNT_"+i; colResult.setDistinctValueCount(rs.getInt(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMin) { colResult.setMinValue(rs.getObject(rscol++));
if (findingMin && col.getType() != Types.LONGVARCHAR && col.getType() != Types.VARBINARY && col.getType() != Types.LONGVARBINARY ) { lastSQL = "MINVALUE_"+i; colResult.setMinValue(rs.getObject(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMax) { colResult.setMaxValue(rs.getObject(rscol++));
if (findingMax && col.getType() != Types.LONGVARCHAR && col.getType() != Types.VARBINARY && col.getType() != Types.LONGVARBINARY ) { lastSQL = "MAXVALUE_"+i; colResult.setMaxValue(rs.getObject(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingAvg) { colResult.setAvgValue(rs.getObject(rscol++));
if (findingAvg && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY && col.getType() != Types.VARBINARY && col.getType() != Types.TIMESTAMP && col.getType() != Types.CHAR && col.getType() != Types.VARCHAR ) { lastSQL = "AVGVALUE_"+i; colResult.setAvgValue(rs.getObject(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMinLength) { colResult.setMinLength(rs.getInt(rscol++));
if (findingMinLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { lastSQL = "MINLENGTH_"+i; colResult.setMinLength(rs.getInt(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingMaxLength) { colResult.setMaxLength(rs.getInt(rscol++));
if (findingMaxLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { lastSQL = "MAXLENGTH_"+i; colResult.setMaxLength(rs.getInt(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
if (findingAvgLength) { colResult.setAvgLength(rs.getInt(rscol++));
if (findingAvgLength && col.getType() != Types.LONGVARCHAR && col.getType() != Types.LONGVARBINARY ) { lastSQL = "AVGLENGTH_"+i; colResult.setAvgLength(rs.getInt(lastSQL));
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
i++;
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { conn = db.getConnection(); ...
desc );
"%" + desc + "%" );
protected void updateQuery() { query.clear(); String photographer = basicFields.getPhotographer(); if( photographer.length() > 0 ) { query.setLikeCriteria( PhotoQuery.FIELD_PHOTOGRAPHER, photographer ); } String desc = basicFields.getDescription(); if( desc.length() > 0 ) { query.setLikeCriteria( Phot...
txw.commit();
protected void addSubfolder( PhotoFolder subfolder ) { subfolders.add( subfolder ); modified(); // Inform all parents & their that the structure has changed subfolderStructureChanged( this ); }
db = odmg.newDatabase(); try { db.open( "repository.xml", Database.OPEN_READ_WRITE ); } catch ( ODMGException e ) { log.warn( "Could not open database: " + e.getMessage() ); db = null; }
db = ODMG.getODMGDatabase();
public static Database getODMGDatabase() { if ( db == null ) { db = odmg.newDatabase(); try { db.open( "repository.xml", Database.OPEN_READ_WRITE ); } catch ( ODMGException e ) { log.warn( "Could not open database: " + e.getMessage() ); db = null; } } return db; }
odmg = OJB.getInstance();
odmg = ODMG.getODMGImplementation();
public static Implementation getODMGImplementation() { if ( odmg == null ) { odmg = OJB.getInstance(); } return odmg; }
Transaction tx = odmg.currentTransaction(); boolean mustCommit = false; if ( tx == null ) { tx = odmg.newTransaction(); tx.begin(); mustCommit = true; } tx.lock( this, Transaction.WRITE );
log.debug( "Field modified" );
protected void modified() { // Find the current transaction or create a new one Transaction tx = odmg.currentTransaction(); boolean mustCommit = false; if ( tx == null ) { tx = odmg.newTransaction(); tx.begin(); mustCommit = true; } // Add folder to the transaction tx.lock( this, Transaction.WRITE ); /...
if ( mustCommit ) { tx.commit(); }
protected void modified() { // Find the current transaction or create a new one Transaction tx = odmg.currentTransaction(); boolean mustCommit = false; if ( tx == null ) { tx = odmg.newTransaction(); tx.begin(); mustCommit = true; } // Add folder to the transaction tx.lock( this, Transaction.WRITE ); /...
txw.commit();
protected void removeSubfolder( PhotoFolder subfolder ) { subfolders.remove( subfolder ); modified(); // Inform all parents & their that the structure has changed subfolderStructureChanged( this ); }
txw.commit();
public void setDescription(String v) { this.description = v; modified(); }
txw.commit();
public void setName(String v) { this.name = v; modified(); }
txw.commit();
public void setParentFolder( PhotoFolder newParent ) { // If the parent is already set, remove the folder from its subfolders if ( parent != null ) { parent.removeSubfolder( this ); } this.parent = newParent; if ( parent != null ) { parent.addSubfolder( this ); } modified(); }
ArchitectFrame.getMainInstance();
public SQLTestCase(String name) throws Exception { super(name); ArchitectFrame.getMainInstance(); // creates an ArchitectFrame, which loads settings //FIXME: a better approach would be to have an initialsation method // in the business model, which does not depend on the init routine in ArchitectFrame. }
PlDotIni plini = new PlDotIni(); plini.read(new File("pl.regression.ini")); db = new SQLDatabase(plini.getDataSource("regression_test"));
db = new SQLDatabase(getDataSource());
protected void setUp() throws Exception { PlDotIni plini = new PlDotIni(); plini.read(new File("pl.regression.ini")); db = new SQLDatabase(plini.getDataSource("regression_test")); }
dPrimeDisplay.refresh(0);
dPrimeDisplay.refresh();
public void componentResized(ComponentEvent e) { if (dPrimeDisplay != null){ dPrimeDisplay.refresh(0); } }
changeKey(1);
public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ...
dPrimeDisplay.refresh(Integer.valueOf(command.substring(5)).intValue()+1); changeKey(Integer.valueOf(command.substring(5)).intValue()+1);
currentScheme = Integer.valueOf(command.substring(5)).intValue()+1; dPrimeDisplay.colorDPrime(currentScheme); dPrimeDisplay.refresh(); changeKey(currentScheme);
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command == READ_GENOTYPES){ ReadDataDialog readDialog = new ReadDataDialog("Open new data", this); readDialog.pack(); readDialog.setVisible(true); } else if (command == READ_...
dPrimeDisplay.refresh(0);
dPrimeDisplay.refresh();
public void changeBlocks(int method){ theData.guessBlocks(method); dPrimeDisplay.refresh(0); currentBlockDef = method; try{ if (tabs.getSelectedIndex() == VIEW_HAP_NUM){ hapDisplay.getHaps(); } }catch(HaploViewException hve) { JOptio...
changeKey(1);
void processData(final String[][] hminfo, String[] in) { final String[] inputOptions = in; if (inputOptions[2].equals("")){ inputOptions[2] = "0"; } maxCompDist = Long.parseLong(inputOptions[2])*1000; this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); ...
changeKey(1);
public Object construct(){ dPrimeDisplay=null; theData.infoKnown = false; File markerFile; if (inputOptions[1].equals("")){ markerFile = null; }else{ markerFile = new File(inputOptions[1]); ...
dPrimeDisplay.refresh(0);
dPrimeDisplay.refresh();
void readMarkers(File inputFile, String[][] hminfo){ try { theData.prepareMarkerInput(inputFile,maxCompDist,hminfo); if (checkPanel != null){ checkPanel.refreshNames(); } if (tdtPanel != null){ tdtPanel.refreshNames(); } ...
if ( p != null && folder != null ) { folder.addPhoto( p );
if ( p != null ) { if ( photoInstanceCounts.containsKey( p ) ) { int refCount = ((Integer)photoInstanceCounts.get( p ) ).intValue(); photoInstanceCounts.remove( p ); photoInstanceCounts.put( p, Integer.valueOf( refCount+1 )); } else { folder.addPhoto( p ); photoInstanceCounts.put( p, Integer.valueOf( 1 )); }
void indexDirectory( File dir, PhotoFolder folder, int startPercent, int endPercent ) { File files[] = dir.listFiles(); // Count the files int fileCount = 0; int subdirCount = 0; for ( int n = 0; n < files.length; n++ ) { if ( files[n].isDirectory() ) { s...
Iterator iter = photoInstanceCounts.keySet().iterator(); while ( iter.hasNext() ) { PhotoInfo p = (PhotoInfo ) iter.next(); int refCount = ((Integer)photoInstanceCounts.get( p )).intValue(); if ( refCount == 0 ) { folder.removePhoto( p ); } }
void indexDirectory( File dir, PhotoFolder folder, int startPercent, int endPercent ) { File files[] = dir.listFiles(); // Count the files int fileCount = 0; int subdirCount = 0; for ( int n = 0; n < files.length; n++ ) { if ( files[n].isDirectory() ) { s...
ImageInstance oldInstance = null; try { oldInstance = ImageInstance.retrieve( volume, volume.mapFileToVolumeRelativeName(f ) ); } catch ( PhotoNotFoundException e ) { } if ( oldInstance != null ) { if ( oldInstance.doConsistencyCheck() ) { PhotoInfo photo = null; try { photo = PhotoInfo.retrievePhotoInfo(oldInstance....
PhotoInfo indexFile( File f ) { indexedFileCount++; // Check whether this is really an image file ODMGXAWrapper txw = new ODMGXAWrapper(); ImageInstance instance = ImageInstance.create( volume, f ); if ( instance == null ) { currentEvent.setResult( ExtVolIndexer...
} if (skip == 2){ if (Chromosome.dataChrom != null){ if (!Chromosome.dataChrom.equals(s)){ throw new PedFileException("Hapmap file format error on line " + (k+1)+ ":\n There appear to be multiple chromosomes in the file."); } }else{ Chromosome.dataChrom = s; }
public void parseHapMap(Vector rawLines) throws PedFileException { int colNum = -1; int numLines = rawLines.size(); Individual ind; this.order = new Vector(); //sort first Vector lines = new Vector(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[]...
if ( model.isErrorColumnProfile(row) )
if ( model.isErrorColumnProfile(row2) )
public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values(...
List<ColumnValueCount> topNValue = model.getTopNValueAt(row);
List<ColumnValueCount> topNValue = model.getTopNValueAt(row2);
public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values(...
toolTip.append("<td align=\"right\">");
toolTip.append("<td align=\"right\"><b>[");
public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values(...
toolTip.append("</td>");
toolTip.append("]</td>");
public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values(...
return super.getCellRenderer(row, column);
return super.getCellRenderer(row2, column);
public TableCellRenderer getCellRenderer(int row, int column) { TableModelSortDecorator t = (TableModelSortDecorator) getModel(); ProfileTableModel model = (ProfileTableModel) t.getTableModel(); int modelColumn = convertColumnIndexToModel(column); ProfileColumn pc = ProfileColumn.values(...
public void doTag(XMLOutput output) throws Exception {
public void doTag(XMLOutput output) throws JellyTagException {
public void doTag(XMLOutput output) throws Exception { calledCreatepath = false; calledSetClasspath = false; invokeBody(output); if (! calledCreatepath) { throw new AssertionFailedError("call to createClasspath() was not made"); } if (! calledSet...
for (int j = i+1; j < dPrime.getLength(i); j++){
for (int j = i+1; j < i + dPrime.getLength(i); j++){
public void colorDPrime(int scheme){ currentScheme = scheme; DPrimeTable dPrime = theData.dpTable; noImage = true; if (scheme == STD_SCHEME){ // set coloring based on LOD and D' for (int i = 0; i < Chromosome.getSize()-1; i++){ for (int j = i+1; j < d...
doColumnProfile(table.getColumns(), conn);
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; TableProfileResult tableResult = new TablePro...
tableResult.setCreateEndTime(System.currentTimeMillis()); putResult(table, tableResult);
private void doTableProfile(SQLTable table) throws SQLException, ArchitectException { SQLDatabase db = table.getParentDatabase(); Connection conn = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; TableProfileResult tableResult = new TablePro...
colResult.setAvgLength(rs.getInt(columnName));
colResult.setAvgLength(rs.getDouble(columnName));
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
String[] inputArray = new String[2];
String[] inputArray = new String[3];
public static void main(String[] args) { //set defaults Options.setTaggerRsqCutoff(Tagger.DEFAULT_RSQ_CUTOFF); Options.setTaggerLODCutoff(Tagger.DEFAULT_LOD_CUTOFF); Options.setMissingThreshold(0.5); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); ...
inputArray[2] = null;
public static void main(String[] args) { //set defaults Options.setTaggerRsqCutoff(Tagger.DEFAULT_RSQ_CUTOFF); Options.setTaggerLODCutoff(Tagger.DEFAULT_LOD_CUTOFF); Options.setMissingThreshold(0.5); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); ...