rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
noImage = true;
public void colorDPrime(int scheme){ currentScheme = scheme; PairwiseLinkage dPrime[][] = theData.filteredDPrimeTable; if (scheme == STD_SCHEME){ // set coloring based on LOD and D' for (int i = 0; i < dPrime.length; i++){ for (int j = i+1; j < dPrime[i].len...
processData(theData.getPedFile().getHMInfo());
void readPedGenotypes(String[] f, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is either 3 or...
processData(theData.getPedFile().getHMInfo());
void readPedGenotypes(String[] f, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is either 3 or...
g2.setColor((val < 50) ? Color.gray : Color.black); if (boxColor.getGreen() < 100 && boxColor.getBlue() < 100 && boxColor.getRed() < 100){
if (boxColor.getGreen() < 175 && boxColor.getBlue() < 175 && boxColor.getRed() < 175){
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() < 2){ //if there zero or only one valid marker return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zoomi...
}else{ g2.setColor((val < 50) ? Color.gray : Color.black);
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() < 2){ //if there zero or only one valid marker return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zoomi...
if ( db == null ) { log.error( "Could not find dbname for configuration " ); return; } if ( ODMG.initODMG( "", "", db ) ) { log.debug( "Connection succesful!!!" ); } else { log.error( "Error logging into Photovault" ); }
if ( db == null ) { log.error( "Could not find dbname for configuration " ); return; } try { ODMG.initODMG( "", "", db ); log.debug( "Connection succesful!!!" ); } catch (PhotovaultException e ) { log.error( "Error logging into Photovault: " + e.getMessage() ); System.exit( 1 ); }
private JUnitOJBManager() { System.setProperty( "photovault.configfile", "conf/junittest_config.xml" ); log.error( "Initializing OB for JUnit tests" ); createDatabase(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); settings.setConfiguration( "pv_junit" ); PVData...
if (isExportLibraries() && parent != null) { parent.registerTagLibrary( namespaceURI, taglib ); }
public void registerTagLibrary(String namespaceURI, TagLibrary taglib) { if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + taglib); } taglibs.put(namespaceURI, taglib); if (isExportLibraries() && parent != null) { ...
System.err.println( " update view" );
protected void updateViews( Object source ) { if ( views == null ) { return; } Iterator iter = views.iterator(); while ( iter.hasNext() ) { Object view = iter.next(); if ( view != source ) { updateView( view ); } } }
logger.error("TablePane's parent is "+c.getParent());
public void computeSize(TablePane c) { int height = 0; int width = 0; try { Insets insets = c.getInsets(); SQLTable table = c.getModel(); int cols = table.getColumns().size(); Font font = c.getFont(); if (font == null) { logger.error("Null font in TablePane "+c); return; } FontMetrics metrics = ...
dbcs.setName("Target Database"); dbcs.setDisplayName("Target Database");
dbcs.setName("Not Configured"); dbcs.setDisplayName("Not Configured");
private final void setDatabase(SQLDatabase newdb) { if (newdb == null) throw new NullPointerException("db must be non-null"); this.db = newdb; db.setIgnoreReset(true); if (db.getDataSource() == null) { ArchitectDataSource dbcs = new ArchitectDataSource(); dbcs.setName("Target Database"); dbcs.setDisplayName(...
doublehet = 0; int m1a1 = 0; int m1a2 = 0; int m2a1 = 0; int m2a2 = 0; int m1H = 0; int m2H = 0; for (int i = 0; i < chromosomes.size(); i++){ byte a1 = ((Chromosome) chromosomes.elementAt(i)).getGenotype(pos1); byte a2 = ((Chromosome) chromosomes.elementAt(i)).getGenotype(pos2); if (m1a1 > 0){ if (m1a2 == 0 && !(a1 ...
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
if (m1a2==0){ if (m1H==0){ return null; } else { if (m1a1 == 1){ m1a2=2; } else { m1a2 = 1; } } } if (m2a2==0){ if (m2H==0){ return null; } else { if (m2a1 == 1){ m2a2=2; } else { m2a2 = 1; } }
if (Chromosome.getMarker(pos1).getMAF() == 0 || Chromosome.getMarker(pos2).getMAF() == 0){ return null;
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
marker1num[m1a1]=1; marker1num[m1a2]=2;
marker1num[Chromosome.getMarker(pos1).getMajor()]=1; marker1num[Chromosome.getMarker(pos1).getMinor()]=2;
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
marker2num[m2a1]=1; marker2num[m2a2]=2;
marker2num[Chromosome.getMarker(pos2).getMajor()]=1; marker2num[Chromosome.getMarker(pos2).getMinor()]=2;
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
} else if ((a1 == 5 && a2 == 5) || (a1 == 5 && !(a2 == b2)) || (a2 == 5 && !(a1 == b1))) doublehet++;
} else if ((a1 >= 5 && a2 >= 5) || (a1 >= 5 && !(a2 == b2)) || (a2 >= 5 && !(a1 == b1))) doublehet++;
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
else if (a1 == 5){
else if (a1 >= 5){
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
} else if (a2 == 5){
} else if (a2 >= 5){
public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ...
int[] hetcount = new int[theBlock.length]; int[][] loc = new int[theBlock.length][5]; int[][] convert = new int[theBlock.length][5]; int[][] unconvert = new int[theBlock.length][5];
} */
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
for (int i = 0; i < chromosomes.size(); i++){ Chromosome thisChrom = (Chromosome)chromosomes.elementAt(i); for (int j = 0; j < theBlock.length; j++){ byte theGeno = thisChrom.getFilteredGenotype(theBlock[j]); if (theGeno == 5){ hetcount[j]++; } else { loc[j][theGeno]++; } } } for (int j = 0; j < theBlock.length; j++)...
byte[] thisHap;
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
if (theGeno == 5){ hapstr.append("h");
if (theGeno >= 5){ thisHap[j] = 'h';
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
hapstr.append(convert[j][theGeno]);
if (theGeno == a1){ thisHap[j] = '1'; }else if (theGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
inputHaploVector.add(hapstr.toString()); hapstr = new StringBuffer(theBlock.length);
inputHaploVector.add(thisHap); thisHap = new byte[theBlock.length];
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
if (nextGeno == 5){ hapstr.append("h"); }else{ hapstr.append(convert[j][nextGeno]);
if (nextGeno >= 5){ thisHap[j] = 'h'; } else { if (nextGeno == a1){ thisHap[j] = '1'; }else if (nextGeno == a2){ thisHap[j] = '2'; }else{ thisHap[j] = '0'; }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
inputHaploVector.add(hapstr.toString()); hapstr = new StringBuffer(theBlock.length);
inputHaploVector.add(thisHap);
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
String[] input_haplos = (String[])inputHaploVector.toArray(new String[0]);
byte[][] input_haplos = (byte[][])inputHaploVector.toArray(new byte[0][0]);
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
char[][] input_haplos2 = new char[input_haplos.length][]; for (int j = 0; j < input_haplos.length; j++){ input_haplos2[j] = input_haplos[j].toCharArray(); }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
theEM.full_em_breakup(input_haplos2, 4, num_haplos_present, haplos_present, haplo_freq, block_size, 0);
theEM.full_em_breakup(input_haplos, 4, num_haplos_present, haplos_present, haplo_freq, block_size, 0);
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
genos[j] = unconvert[j][Integer.parseInt(aString.substring(j, j+1))];
byte returnBit = Byte.parseByte(aString.substring(j,j+1)); if (returnBit == 1){ genos[j] = Chromosome.getFilteredMarker(theBlock[j]).getMajor(); }else{ if (Chromosome.getFilteredMarker(theBlock[j]).getMinor() == 0){ genos[j] = 8; }else{ genos[j] = Chromosome.getFilteredMarker(theBlock[j]).getMinor(); } }
Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo...
genos[q] = 5;
genos[q] = 9;
void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; ...
if (genos[q] < 0 || genos[q] > 5){
if (genos[q] < 0 || genos[q] > 9){
void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; ...
byte a1 = 0;
byte a1 = 0; byte a2 = 0;
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
if (thisAllele == 5){
if (thisAllele >= 5){
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
Math.rint(maf*100.0)/100.0));
Math.rint(maf*100.0)/100.0, a1, a2));
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
markerInfo.add(new SNP("Marker " + String.valueOf(i+1), (i*4000), Math.rint(maf*100.0)/100.0));
markerInfo.add(new SNP("Marker " + String.valueOf(i+1), (i*4000), Math.rint(maf*100.0)/100.0,a1,a2));
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
viewPane.setCollection( e.getSelected() );
PhotoFolder f = e.getSelected(); if ( f != null ) { viewPane.setCollection( f ); }
protected void createUI() { tabPane = new JTabbedPane(); queryPane = new QueryPane(); treePane = new PhotoFolderTree(); tabPane.addTab( "Query", queryPane ); tabPane.addTab( "Folders", treePane ); viewPane = new TableCollectionView(); viewPane.setCollection( queryPane.getResultCollection() ); // Set listeners to bo...
viewPane.setCollection( e.getSelected() );
PhotoFolder f = e.getSelected(); if ( f != null ) { viewPane.setCollection( f ); }
public void photoFolderTreeSelectionChanged( PhotoFolderTreeEvent e ) { viewPane.setCollection( e.getSelected() ); }
throw new JellyException( "This tag does not understand the attribute '" + name + "'" );
throw new JellyException( "This tag does not understand the attribute '" + name + "'", getColumnNumber(), getLineNumber() );
public Script compile() throws Exception { if (tag instanceof CompilableTag) { ((CompilableTag) tag).compile(); } List typeList = new ArrayList(); List methodList = new ArrayList(); List expressionList = new ArrayList(); BeanInfo info = Introspector.getBeanInfo(t...
+ valueTypeName + ". Exception: " + e, e
+ valueTypeName + ". Exception: " + e, getColumnNumber(), getLineNumber()
public void run(JellyContext context, XMLOutput output) throws Exception { tag.setContext(context); // initialize all the properties of the tag before its used // if there is a problem abort this tag for (int i = 0, size = expressions.length; i < size; i++) { Expressio...
runTag(output);
try { tag.doTag(output); } catch (JellyException e) { handleException(e); } catch (Exception e) { handleException(e); }
public void run(JellyContext context, XMLOutput output) throws Exception { tag.setContext(context); // initialize all the properties of the tag before its used // if there is a problem abort this tag for (int i = 0, size = expressions.length; i < size; i++) { Expressio...
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
public ArchitectFrame() throws ArchitectException { mainInstance = this; architectSession = ArchitectSession.getInstance(); init(); }
public void exit() {
public void exit() { if (getProject().isSaveInProgress()) { JOptionPane.showMessageDialog(this, "Project is saving, cannot exit the Power Architect. Please wait for the save to finish, and then try again.", "Warning", JOptionPane.WARNING_MESSAGE); return; }
public void exit() { if (promptForUnsavedModifications()) { try { closeProject(getProject()); saveSettings(); } catch (ArchitectException e) { logger.error("Couldn't save settings: "+e); } System.exit(0); } }
} finally { project.setSaveInProgress(false);
public boolean saveOrSaveAs(boolean showChooser, boolean separateThread) { if (project.getFile() == null || showChooser) { JFileChooser chooser = new JFileChooser(project.getFile()); chooser.addChoosableFileFilter(ASUtils.ARCHITECT_FILE_FILTER); int response = chooser.showSaveDialog(ArchitectFrame.this); if (...
} finally { project.setSaveInProgress(false);
public void run() { try { lastSaveOpSuccessful = false; project.save(finalSeparateThread ? pm : null); lastSaveOpSuccessful = true; } catch (Exception ex) { lastSaveOpSuccessful = false; JOptionPane.showMessageDialog (ArchitectFrame.this, "Can't save project: "+ex.getMessage()); ...
fc.setSelectedFile(null);
fc.setSelectedFile(new File(""));
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_...
this.session = session;
this.session = s;
public void setSession(Session s) { this.session = session; }
if (parent instanceof ScrolledComposite && widget instanceof Control) { ScrolledComposite scrolledComposite = (ScrolledComposite) parent; scrolledComposite.setContent((Control) widget); }
protected void attachWidgets(Widget parent, Widget widget) { }
log.debug( "entry: indexDirectory " + dir.getAbsolutePath() );
void indexDirectory( File dir, PhotoFolder folder, int startPercent, int endPercent ) { /** Maintain information how many instances for the photos that were previously added to the folder is found */ HashMap photoInstanceCounts = new HashMap(); HashSet foldersNotFound =...
log.debug( "exit: indexFile " + f.getAbsolutePath() );
PhotoInfo indexFile( File f ) { indexedFileCount++; // Check if the instance already exists n database ImageInstance oldInstance = null; try { oldInstance = ImageInstance.retrieve( volume, volume.mapFileToVolumeRelativeName(f ) ); } catch ( P...
public void doTag(XMLOutput output) throws Exception { Class throwableClass = getThrowableClass();
public void doTag(XMLOutput output) throws JellyTagException { Class throwableClass = null;
public void doTag(XMLOutput output) throws Exception { Class throwableClass = getThrowableClass(); try { invokeBody(output); } catch (Throwable t) { if (t instanceof JellyException) { // unwrap Jelly exceptions which wrap other exceptions JellyException je = (Jelly...
throwableClass = getThrowableClass();
public void doTag(XMLOutput output) throws Exception { Class throwableClass = getThrowableClass(); try { invokeBody(output); } catch (Throwable t) { if (t instanceof JellyException) { // unwrap Jelly exceptions which wrap other exceptions JellyException je = (Jelly...
if (userCancel) return;
if (userCancel) { remove(col.getParentTable()); return; }
private void doColumnProfile(List<SQLColumn> columns, Connection conn) throws SQLException, ArchitectException { Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { if ( columns.size() == 0 ) return; SQLColumn c...
if (userCancel) break;
if (userCancel) { remove(col.getParentTable()); break; }
private void doColumnProfile(List<SQLColumn> columns, Connection conn) throws SQLException, ArchitectException { Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { if ( columns.size() == 0 ) return; SQLColumn c...
int i = 0;
final int i = 0;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(",\n COUNT(DISTINCT \"");
sql.append(",\n COUNT(DISTINCT "); sql.append(databaseIdentifierQuoteString);
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append("\") AS DISTINCTCOUNT_"+i);
sql.append(databaseIdentifierQuoteString); sql.append(") AS DISTINCTCOUNT_"+i); tryCount++;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(",\n MIN(\"");
sql.append(",\n MIN("); sql.append(databaseIdentifierQuoteString);
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append("\") AS MINVALUE_"+i);
sql.append(databaseIdentifierQuoteString); sql.append(") AS MINVALUE_"+i); tryCount++;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(",\n MAX(\"");
sql.append(",\n MAX("); sql.append(databaseIdentifierQuoteString);
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append("\") AS MAXVALUE_"+i);
sql.append(databaseIdentifierQuoteString); sql.append(") AS MAXVALUE_"+i); tryCount++;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(ddlg.getAverageSQLFunctionName("\""+col.getName()+"\""));
sql.append(ddlg.getAverageSQLFunctionName(databaseIdentifierQuoteString+ col.getName()+ databaseIdentifierQuoteString));
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(ddlg.getStringLengthSQLFunctionName("\""+col.getName()+"\""));
sql.append(ddlg.getStringLengthSQLFunctionName(databaseIdentifierQuoteString+ col.getName()+databaseIdentifierQuoteString));
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
sql.append(ddlg.caseWhen("\""+col.getName()+"\"", "NULL", "1"));
sql.append(ddlg.caseWhenNull( databaseIdentifierQuoteString+ col.getName()+ databaseIdentifierQuoteString, "1"));
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
SQLTable table = col.getParentTable(); sql.append("\n FROM "); sql.append(DDLUtils.toQualifiedName(table.getCatalogName(), table.getSchemaName(), table.getName(), databaseIdentifierQuoteString, databaseIdentifierQuoteString)); stmt = conn.createStatement(); stmt.setEscapeProcessing(false); lastSQL = sql.toString(); ...
if ( tryCount > 0 ) { sql.append("\n FROM "); sql.append(DDLUtils.toQualifiedName(table.getCatalogName(), table.getSchemaName(), table.getName(), databaseIdentifierQuoteString, databaseIdentifierQuoteString)); stmt = conn.createStatement(); stmt.setEscapeProcessing(false); lastSQL = sql.toString(); rs = stmt.execute...
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
if (findingMin && pfd.isMinValue() ) { columnName = "MINVALUE_"+i; colResult.setMinValue(rs.getObject(columnName));
else { throw new IllegalStateException("Query executed, but returns no rows:\n" + lastSQL + "\nColumn Name: " + columnName );
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
if (findingMax && pfd.isMaxValue() ) { columnName = "MAXVALUE_"+i; colResult.setMaxValue(rs.getObject(columnName)); } if (findingAvg && pfd.isAvgValue() ) { columnName = "AVGVALUE_"+i; colResult.setAvgValue(rs.getObject(columnName)); } if (findingMinLength && pfd.isMinLength() ) { columnName = "MINLENGTH_"+i; colResult...
rs.close(); rs = null;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
else { throw new IllegalStateException("Query executed, but returns no rows:\n" + lastSQL + "\nColumn Name: " + columnName ); } rs.close(); rs = null;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
rs.close(); rs = null;
private ColumnProfileResult execProfileFunction(ProfileFunctionDescriptor pfd, SQLColumn col, DDLGenerator ddlg, Connection conn) throws SQLException { long createStartTime = System.currentTimeMillis(); int i = 0; StringBuffer sql = ...
public void remove(SQLObject sqo){
public void remove(SQLObject sqo) throws ArchitectException{
public void remove(SQLObject sqo){ results.remove(sqo); }
if ( sqo instanceof SQLTable ) { for ( SQLColumn col: ((SQLTable)sqo).getColumns()) { results.remove(col); } } else if ( sqo instanceof SQLColumn ) { SQLTable table = ((SQLColumn)sqo).getParentTable(); boolean allColumnDeleted = true; for ( SQLColumn col: table.getColumns()) { if ( getResult(col) != null ) { allColumnD...
public void remove(SQLObject sqo){ results.remove(sqo); }
userCancel = true;
userCancel = cancelled;
public void setCancelled(boolean cancelled) { synchronized (monitorableMutex) { userCancel = true; } }
InputStream in = context.getResourceAsStream(uri); return getSAXReader().read(in, uri);
source = context.getResource(uri); } if (source instanceof URL) { return getSAXReader().read((URL) source);
protected Document parse(Object source) throws Exception { // #### we should allow parsing to output XML events to // the output if no var is specified if (source instanceof String) { String uri = (String) source; InputStream in = context.getResourceAsStream(uri); ...
} else if (source instanceof URL) { return getSAXReader().read((URL) source);
protected Document parse(Object source) throws Exception { // #### we should allow parsing to output XML events to // the output if no var is specified if (source instanceof String) { String uri = (String) source; InputStream in = context.getResourceAsStream(uri); ...
double overThresh = crossVal*100 - mycolorThresh; float lineRed, lineGreen, lineBlue; if(overThresh < (50-mycolorThresh)/2){ lineRed=0.0f; lineBlue=new Double(0.9-((overThresh/((50-mycolorThresh)/2))*0.9)).floatValue(); lineGreen=0.9f-lineBlue;
Color lineColor; if (crossVal > 0.25){ lineColor = new Color(255,0,0); }else if (crossVal > 0.20){ lineColor = new Color(255,153,0); }else if (crossVal > 0.15){ lineColor = new Color(0,204,0); }else if (crossVal > 0.5){ lineColor = new Color(0,51,204);
public void haploDraw(Graphics gr, boolean myuseThickness, int mycolorThresh, int mycrossThinThresh, int mycrossThickThresh, double[] gapDPrime, Haplotype[][] hapsInBlocks){ Graphics2D g = (Graphics2D) gr; final BasicStroke stroke = new BasicStroke(1.0f); final BasicStroke wideStroke = new BasicStroke(2.0f)...
lineBlue=0.0f; lineRed=new Double(((overThresh-(50-mycolorThresh)/2)/((50-mycolorThresh)/2))*0.9).floatValue(); lineGreen=0.9f-lineRed;
lineColor = new Color(0,0,153);
public void haploDraw(Graphics gr, boolean myuseThickness, int mycolorThresh, int mycrossThinThresh, int mycrossThickThresh, double[] gapDPrime, Haplotype[][] hapsInBlocks){ Graphics2D g = (Graphics2D) gr; final BasicStroke stroke = new BasicStroke(1.0f); final BasicStroke wideStroke = new BasicStroke(2.0f)...
Color lineColor = new Color(lineRed, lineGreen, lineBlue);
public void haploDraw(Graphics gr, boolean myuseThickness, int mycolorThresh, int mycrossThinThresh, int mycrossThickThresh, double[] gapDPrime, Haplotype[][] hapsInBlocks){ Graphics2D g = (Graphics2D) gr; final BasicStroke stroke = new BasicStroke(1.0f); final BasicStroke wideStroke = new BasicStroke(2.0f)...
"Edited user "+user.getName()+"/"+user.getPassword());
"Edited user "+user.getName());
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
ProfileResult old = results.remove(sqo);
results.remove(sqo);
public void remove(SQLObject sqo) throws ArchitectException{ ProfileResult old = results.remove(sqo); if ( sqo instanceof SQLTable ) { for ( SQLColumn col: ((SQLTable)sqo).getColumns()) { results.remove(col); } } else if ( sqo ...
newOutput.setContentHandler( new SafeContentHandler(newOutput.getContentHandler()) );
protected void writeBody(Writer writer) throws SAXException, JellyTagException { XMLOutput newOutput = createXMLOutput(writer); try { newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); } finally { try { newOutput.close...
Map paramValues = new HashMap(); if(appForm.getJndiFactory() != null) paramValues.put(ApplicationConfig.JNDI_FACTORY, appForm.getJndiFactory()); if(appForm.getJndiURL() != null) paramValues.put(ApplicationConfig.JNDI_URL, appForm.getJndiURL()); appConfigData.setParamValues(paramValues);
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ ...
return flavors[i];
best = flavors[i]; } else { logger.debug("NO!");
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { logger.debug("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); logger.debug("representation class = "+cls); ...
logger.debug("NO!"); return null;
return best;
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { logger.debug("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); logger.debug("representation class = "+cls); ...
logger.debug("MyJTreeTransferHandler.importData: got object of type "+someData.getClass().getName());
logger.debug("MyJTreeTransferHandler.importData: got object of type "+someData.getClass().getName()+" @"+someData.hashCode());
public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Object so...
public PlayPen(SQLDatabase db) { super(); if (db == null) throw new NullPointerException("db must be non-null"); this.db = db; relationships = new LinkedList(); try { ArchitectUtils.listenToHierarchy(this, db); } catch (ArchitectException ex) { logger.error("Couldn't listen to database", ex); }
public PlayPen() {
public PlayPen(SQLDatabase db) { super(); if (db == null) throw new NullPointerException("db must be non-null"); this.db = db; relationships = new LinkedList(); try { ArchitectUtils.listenToHierarchy(this, db); } catch (ArchitectException ex) { logger.error("Couldn't listen to database", ex); } setLayout(n...
tableNames = new HashMap();
public PlayPen(SQLDatabase db) { super(); if (db == null) throw new NullPointerException("db must be non-null"); this.db = db; relationships = new LinkedList(); try { ArchitectUtils.listenToHierarchy(this, db); } catch (ArchitectException ex) { logger.error("Couldn't listen to database", ex); } setLayout(n...
this.sendLetter((EmailLetter)letters.iterator().next(),topic);
Email eEmail =MailFinder.getInstance().lookupEmail(email); this.sendLetter((EmailLetter)letters.iterator().next(),topic,eEmail);
public void sendWelcomeLetters(MailTopic topic,String email)throws RemoteException,FinderException{ Collection letters = MailFinder.getInstance().getEmailLetters(((Integer)topic.getPrimaryKey()).intValue(),EmailLetter.TYPE_SUBSCRIPTION); if(letters!=null &&!letters.isEmpty()){ this.sendLetter((EmailLetter)lett...
if (logger.isDebugEnabled()) { mi = new JMenuItem(new AbstractAction("Show Mappings") { public void actionPerformed(ActionEvent e) { StringBuffer componentList = new StringBuffer(); for ( ColumnMapping columnMap : getModel().getMappings()) { componentList.append(columnMap).append("\n"); } JOptionPane.showMessageDialo...
protected void createPopup() { ArchitectFrame af = ArchitectFrame.getMainInstance(); popup = new JPopupMenu(); JMenuItem mi; mi = new JMenuItem(af.editRelationshipAction); mi.setActionCommand(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN); popup.add(mi); mi = new JMenuItem(af.deleteSelectedAction); mi.set...
StringTokenizer enum = new StringTokenizer(value, ",");
StringTokenizer items = new StringTokenizer(value, ",");
protected RGB parseRGB(String value) { StringTokenizer enum = new StringTokenizer(value, ","); int red = 0; int green = 0; int blue = 0; if (enum.hasMoreTokens()) { red = parseNumber(enum.nextToken()); }
if (enum.hasMoreTokens()) { red = parseNumber(enum.nextToken());
if (items.hasMoreTokens()) { red = parseNumber(items.nextToken());
protected RGB parseRGB(String value) { StringTokenizer enum = new StringTokenizer(value, ","); int red = 0; int green = 0; int blue = 0; if (enum.hasMoreTokens()) { red = parseNumber(enum.nextToken()); }
if (items.hasMoreTokens()) { green = parseNumber(items.nextToken()); } if (items.hasMoreTokens()) { blue = parseNumber(items.nextToken()); } return new RGB(red, green, blue); }
protected RGB parseRGB(String value) { StringTokenizer enum = new StringTokenizer(value, ","); int red = 0; int green = 0; int blue = 0; if (enum.hasMoreTokens()) { red = parseNumber(enum.nextToken()); }
ind = new Individual(numLines);
ind = new Individual(numLines-1);
public void parseHapMap(File inFile) throws PedFileException, IOException { int colNum = -1; Vector lines = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inFile)); String line; while((line = reader.readLine())!=null){ if (line.length() == 0){ ...
byte[] markers = new byte[2]; markers[0] = (byte)allele1; markers[1]= (byte)allele2; ind.addMarker(markers);
ind.addMarker((byte)allele1,(byte)allele2);
public void parseHapMap(File inFile) throws PedFileException, IOException { int colNum = -1; Vector lines = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inFile)); String line; while((line = reader.readLine())!=null){ if (line.length() == 0){ ...
ind = new Individual(numTokens);
ind = new Individual(numMarkers);
public void parseLinkage(File inputFile) throws PedFileException, IOException { int colNum = -1; boolean withOptionalColumn = false; int numLines = 0; Individual ind; this.allIndividuals = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inputFile)); ...
ind.setFamilyID(tokenizer.nextToken().trim()); ind.setIndividualID(tokenizer.nextToken().trim()); ind.setDadID(tokenizer.nextToken().trim()); ind.setMomID(tokenizer.nextToken().trim());
ind.setFamilyID(new String(tokenizer.nextToken().trim())); ind.setIndividualID(new String(tokenizer.nextToken().trim())); ind.setDadID(new String(tokenizer.nextToken().trim())); ind.setMomID(new String(tokenizer.nextToken().trim()));
public void parseLinkage(File inputFile) throws PedFileException, IOException { int colNum = -1; boolean withOptionalColumn = false; int numLines = 0; Individual ind; this.allIndividuals = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inputFile)); ...
byte[] markers = new byte[2]; markers[0] = Byte.parseByte((tokenizer.nextToken().trim())); markers[1]= Byte.parseByte((tokenizer.nextToken().trim())); if(markers[0] <0 || markers[0] > 4 || markers[1] <0 || markers[1] >4) {
genotype1 = Byte.parseByte((tokenizer.nextToken().trim())); genotype2 = Byte.parseByte((tokenizer.nextToken().trim())); if(genotype1 <0 || genotype1 > 4 || genotype2 <0 || genotype2 >4) {
public void parseLinkage(File inputFile) throws PedFileException, IOException { int colNum = -1; boolean withOptionalColumn = false; int numLines = 0; Individual ind; this.allIndividuals = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inputFile)); ...
ind.addMarker(markers);
ind.addMarker(genotype1,genotype2);
public void parseLinkage(File inputFile) throws PedFileException, IOException { int colNum = -1; boolean withOptionalColumn = false; int numLines = 0; Individual ind; this.allIndividuals = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(inputFile)); ...
tf = TransformerFactory.newInstance();
this.tf = (SAXTransformerFactory) TransformerFactory.newInstance();
public TransformTag() { super(); tf = TransformerFactory.newInstance(); }
log.info( "base: " + base + " href: " + href );
log.debug( "base: " + base + " href: " + href );
protected URIResolver createURIResolver() { return new URIResolver() { public Source resolve(String href, String base) throws TransformerException { if (log.isDebugEnabled() ) { log.info( "base: " + base + " href: " + href ); } ...
if (href == null)
if (null == href)
protected URIResolver createURIResolver() { return new URIResolver() { public Source resolve(String href, String base) throws TransformerException { if (log.isDebugEnabled() ) { log.info( "base: " + base + " href: " + href ); } ...
log.info( "base: " + base + " href: " + href );
log.debug( "base: " + base + " href: " + href );
public Source resolve(String href, String base) throws TransformerException { if (log.isDebugEnabled() ) { log.info( "base: " + base + " href: " + href ); } // pass if we don't have a syste...
if (href == null)
if (null == href)
public Source resolve(String href, String base) throws TransformerException { if (log.isDebugEnabled() ) { log.info( "base: " + base + " href: " + href ); } // pass if we don't have a syste...