rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public void setAttribute(String name, Object value) { super.setAttribute( name, value.toString() );
public void setAttribute(String name, Object value) { if ( value == null ) { super.setAttribute( name, "" ); } else { super.setAttribute( name, value.toString() ); }
public void setAttribute(String name, Object value) { super.setAttribute( name, value.toString() ); }
context.getVariable("usedDefaultNamespace").equals("tru"));
context.getVariable("usedDefaultNamespace").equals("true"));
public void testParserCache2() throws Exception { // no default namespace setUp("nsFilterTest.jelly"); Script script = jelly.compileScript(); script.run(context,xmlOutput); assertTrue("should have no var when default namspace is not set", context.getVariable("use...
void prepareHapsInput(File infile) throws IOException, HaploViewException{
public Vector prepareHapsInput(File infile) throws IOException, HaploViewException, PedFileException {
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]; ...
String currentLine;
isHaps = true;
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[] genos = new byte[0]; String ped, indiv;
Vector hapsFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(infile));
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(infile.length() < 1){ throw new HaploViewException("Genotype file is empty or does not exist: " + infile.getName()); } BufferedReader in = new BufferedReader(new FileReader(infile)); int lineCount = 0; int numTokens = 0; boolean even = true; while ((currentLine = in.readLine()) != null){ lineCount++; if (current...
String line; while((line = reader.readLine())!=null){ if (line.length() == 0){
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]; ...
even = !even; StringTokenizer st = new StringTokenizer(currentLine); if (st.countTokens() >2){ ped = st.nextToken(); indiv = st.nextToken(); }else{ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have fewer than 3 columns.");
if (line.startsWith("#")){ continue;
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]; ...
genos = new byte[st.countTokens()]; int q = 0; if (numTokens == 0){ numTokens = st.countTokens(); } if (numTokens != st.countTokens()){ throw new HaploViewException("Genotype file error:\nLine " + lineCount + " appears to have an incorrect number of entries"); } while (st.hasMoreTokens()){ String thisGenotype = (Strin...
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]; ...
return result;
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]; ...
invokeBody(output);
JellyContext newContext = new JellyContext( context ); getBody().run(newContext, output);
public void doTag(final XMLOutput output) throws Exception { String name = getName(); if ( name == null ) { name = toString(); } // #### we need to redirect the output to a TestListener // or something? TestCase testCase = new TestCase(name) { ...
invokeBody(output);
JellyContext newContext = new JellyContext( context ); getBody().run(newContext, output);
protected void runTest() throws Throwable { invokeBody(output); }
rootFolder.addPhotoCollectionChangeListener( this );
public void setRoot( PhotoFolder root ) { rootFolder = root; log.warn( "New root " + root.getName() + " - subfolderCount: " + getChildCount( root ) ); }
textData = new HaploData(0);
textData = new HaploData();
private void processFile(String fileName, int fileType, String infoFileName){ try { int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; if(!arg_quiet && fileName != null){ System.out.println("U...
new TextMethods().saveDprimeToText(theData.getFilteredTable(theData.dPrimeTable), fc.getSelectedFile(), infoKnown, new Vector());
theData.saveDprimeToText(theData.getFilteredTable(theData.dPrimeTable), fc.getSelectedFile(), infoKnown, new Vector());
void saveDprimeToText(){ fc.setSelectedFile(null); try{ fc.setSelectedFile(null); int returnVal = fc.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { new TextMethods().saveDprimeToText(theData.getFilteredTable(theData.dPrimeTable), f...
ResultSet rs = mResultSet; if (rs == null) { return 0; } mHasNext = true;
public int skipNext(int amount) throws FetchException { if (amount <= 0) { if (amount < 0) { throw new IllegalArgumentException("Cannot skip negative amount: " + amount); } return 0; } ResultSet rs = mResultSet; if (rs == null) { ...
try { if (rs.next()) { actual++; amount--; } else { mHasNext = false; close(); break; } } catch (SQLException e) { throw mStorage.getJDBCRepository().toFetchException(e);
if (hasNext()) { actual++; amount--; mHasNext = false;
public int skipNext(int amount) throws FetchException { if (amount <= 0) { if (amount < 0) { throw new IllegalArgumentException("Cannot skip negative amount: " + amount); } return 0; } ResultSet rs = mResultSet; if (rs == null) { ...
fc = new JFileChooser(System.getProperty("user.dir"));
public HaploView(){ //menu setup JMenuBar menuBar = new JMenuBar(); setJMenuBar(menuBar); JMenuItem menuItem; //file menu JMenu fileMenu = new JMenu("File"); menuBar.add(fileMenu); menuItem = new JMenuItem(READ_GENOTYPES); setAccelerator(menuItem, 'O', ...
double max() default Double.MAX_VALUE;
double max() default Double.POSITIVE_INFINITY;
double max() default Double.MAX_VALUE;
double min() default Double.MIN_VALUE;
double min() default Double.NEGATIVE_INFINITY;
double min() default Double.MIN_VALUE;
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) {
public static void initODMG( String user, String passwd, PVDatabase dbDesc ) throws PhotovaultException {
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) { getODMGImplementation(); // Find the connection repository info ConnectionRepository cr = MetadataManager.getInstance().connectionRepository(); PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" ); JdbcCo...
}
} try { PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(connKey); broker.beginTransaction(); Connection con = broker.serviceConnectionManager().getConnection(); broker.commitTransaction(); broker.close(); } catch (Exception ex) { Throwable rootCause = ex; while ( rootCause.getCause() != n...
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) { getODMGImplementation(); // Find the connection repository info ConnectionRepository cr = MetadataManager.getInstance().connectionRepository(); PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" ); JdbcCo...
} catch ( Throwable t ) {
} catch ( Exception t ) {
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) { getODMGImplementation(); // Find the connection repository info ConnectionRepository cr = MetadataManager.getInstance().connectionRepository(); PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" ); JdbcCo...
log.error( "Error closing database" ); }
log.error( "Error closing database" ); } throw new PhotovaultException( "Unknown error while starting database:\n" + t.getMessage(), t );
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) { getODMGImplementation(); // Find the connection repository info ConnectionRepository cr = MetadataManager.getInstance().connectionRepository(); PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" ); JdbcCo...
return ( success );
public static boolean initODMG( String user, String passwd, PVDatabase dbDesc ) { getODMGImplementation(); // Find the connection repository info ConnectionRepository cr = MetadataManager.getInstance().connectionRepository(); PBKey connKey = cr.getStandardPBKeyForJcdAlias( "pv" ); JdbcCo...
return endDate;
return endDate != null ? (java.util.Date) endDate.clone() : null;
public java.util.Date getEndDate() { return endDate; }
return startDate;
return startDate != null ? (java.util.Date)startDate.clone() : null;
public java.util.Date getStartDate() { return startDate; }
endDate = date;
endDate = (date != null) ? (java.util.Date) date.clone() : null;
public void setEndDate( java.util.Date date ) { endDate = date; modified(); }
startDate = date;
startDate = (date != null) ? (java.util.Date)date.clone() : null;
public void setStartDate( java.util.Date date ) { startDate = date; modified(); }
Dimension size = dPrimeDisplay.getSize();
dPrimeDisplay.computePreferredSize();
public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum...
Rectangle visRect = dPrimeDisplay.getVisibleRect(); if (size.width != pref.width && pref.width > visRect.width){ ((JViewport)dPrimeDisplay.getParent()).setViewSize(pref); }
((JViewport)dPrimeDisplay.getParent()).setViewSize(pref);
public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum...
dPrimeDisplay.computePreferredSize();
void readAnalysisFile(File inFile){ try{ theData.readAnalysisTrack(inFile); }catch (HaploViewException hve){ JOptionPane.showMessageDialog(this, hve.getMessage(), "File Error", JOptionPane.ERROR_MESSAGE); }catch (IOE...
if (dPrimeDisplay != null){ dPrimeDisplay.computePreferredSize(); }
void readMarkers(File inputFile, String[][] hminfo){ try { theData.prepareMarkerInput(inputFile, maxCompDist, hminfo); if (theData.infoKnown){ analysisItem.setEnabled(true); }else{ analysisItem.setEnabled(false); } if (check...
if(fullProbMap == null || superdata == null || realAffectedStatus == null) {
if(fullProbMap == null || superdata == null || realAffectedStatus == null || realKidAffectedStatus == null) {
public void doAssociationTests(Vector affStatus, Vector permuteInd, Vector kidAffStatus) { if(fullProbMap == null || superdata == null || realAffectedStatus == null) { return; } if(affStatus == null){ affStatus = realAffectedStatus; } if(permuteInd == null) {...
if (kidAffStatus == null){ kidAffStatus = realKidAffectedStatus; }
public void doAssociationTests(Vector affStatus, Vector permuteInd, Vector kidAffStatus) { if(fullProbMap == null || superdata == null || realAffectedStatus == null) { return; } if(affStatus == null){ affStatus = realAffectedStatus; } if(permuteInd == null) {...
realKidAffectedStatus = kidAffStatus;
private void full_em_breakup( byte[][] input_haplos, int[] block_size, Vector affStatus, Vector kidAffStatus, boolean[] haploid) throws HaploViewException{ int num_poss, iter; double total = 0; int block, start_locus, end_locus, biggest_block_size; int num_indivs = 0; int num_bloc...
getBody().run(context, output);
invokeBody( output);
public void doTag(XMLOutput output) throws Exception { String localName = null; int idx = name.indexOf(':'); if (idx >= 0) { localName = name.substring(idx + 1); } else { localName = name; } output.startElement(namespace, localName, name, attrib...
dbField.addItemListener( new ItemListener() { public void itemStateChanged(ItemEvent itemEvent) { if ( itemEvent.getStateChange() == ItemEvent.SELECTED ) { Object item = itemEvent.getItem(); String dbName = item.toString(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); PVDatabase db = settings.getDa...
protected void createUI() { GridBagConstraints labelConstraints = new GridBagConstraints(); labelConstraints.insets = new Insets( 2, 20, 2, 2 ); labelConstraints.anchor = GridBagConstraints.EAST; labelConstraints.gridwidth = GridBagConstraints.RELATIVE; //next-to-last labelConstraints.fill = GridBagConstrain...
returnReason = RETURN_REASON_APPROVE; setVisible( false ); }
returnReason = RETURN_REASON_NEWDB; setVisible( false ); }
public void actionPerformed( ActionEvent e ) { returnReason = RETURN_REASON_APPROVE; setVisible( false ); }
returnReason = RETURN_REASON_CANCEL;
returnReason = RETURN_REASON_APPROVE;
public void actionPerformed( ActionEvent e ) { returnReason = RETURN_REASON_CANCEL; setVisible( false ); }
popup = new JPopupMenu(); JMenuItem propsItem = new JMenuItem( "Properties" ); propsItem.addActionListener( this ); propsItem.setActionCommand( FOLDER_PROPS_CMD ); JMenuItem renameItem = new JMenuItem( "Rename" ); renameItem.addActionListener( this ); renameItem.setActionCommand( FOLDER_RENAME_CMD ); JMenuItem newFolde...
private void createUI() { setLayout( new BorderLayout() ); tree = new JTree( model ); scrollPane = new JScrollPane( tree ); scrollPane.setPreferredSize( new Dimension( 200, 500 ) ); add( scrollPane, BorderLayout.CENTER ); }
do{
if(args.length == 1){ password = args[0].toCharArray(); user = userManager.verifyUsernamePassword( AuthConstants.USER_ADMIN, password); if(user == null){ invalidAttempts ++; } } while(user == null){
public static void main(String[] args) throws Exception { UserManager userManager = UserManager.getInstance(); User user = null; char[] password = null; int invalidAttempts = 0; do{ if(invalidAttempts > 0){ System.out.println("Invalid Admin Pas...
}while(user == null);
}
public static void main(String[] args) throws Exception { UserManager userManager = UserManager.getInstance(); User user = null; char[] password = null; int invalidAttempts = 0; do{ if(invalidAttempts > 0){ System.out.println("Invalid Admin Pas...
rs = null;
static void addColumnsToTable(SQLTable addTo, String catalog, String schema, String tableName) throws SQLException, DuplicateColumnException, ArchitectException { Connection con = addTo.getParentDatabase().getConnection(); ResultSet rs = null; try { DatabaseMetaData dbmd = con.getM...
getVisibleRect().height/2 + infoHeight;
getVisibleRect().height/2;
public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && wmInteriorRect.contains(clickX,clickY)){ //convert a click on the ...
if (bigClickY > chartSize.height - getVisibleRect().height + infoHeight){ bigClickY = chartSize.height - getVisibleRect().height + infoHeight;
if (bigClickY > chartSize.height - getVisibleRect().height){ bigClickY = chartSize.height - getVisibleRect().height;
public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && wmInteriorRect.contains(clickX,clickY)){ //convert a click on the ...
final int WM_BD_GAP = 1; final int WM_BD_HEIGHT = 2; final int WM_BD_TOTAL = WM_BD_HEIGHT + 2*WM_BD_GAP;
final int WM_BD_GAP = 4; final int WM_BD_HEIGHT = 3;
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming ...
double prefBoxSize = boxSize/(scalefactor*((double)wmMaxWidth/(double)(wmMaxWidth-WM_BD_TOTAL)));
double prefBoxSize = boxSize/(scalefactor*((double)wmMaxWidth/(double)(wmMaxWidth)));
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming ...
(int)(chartSize.height/scalefactor)+wmBorder.getBorderInsets(this).top*2+WM_BD_TOTAL,
(int)(chartSize.height/scalefactor)+wmBorder.getBorderInsets(this).top*2,
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming ...
double yy = ((alignedPositions[y] - alignedPositions[x])/(scalefactor*2)) + wmBorder.getBorderInsets(this).top + WM_BD_TOTAL;
double yy = ((alignedPositions[y] - alignedPositions[x] + infoHeight*2)/(scalefactor*2)) + wmBorder.getBorderInsets(this).top;
public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming ...
String phaseChoice = info[5];
String phaseChoice; if (info[5].equals("I+II")){ phaseChoice = "II"; }else{ phaseChoice = info[5]; }
public void parsePhasedDownload(String[] info) throws IOException, PedFileException{ String targetChrom = "chr" + info[4]; Chromosome.setDataChrom(targetChrom); Chromosome.setDataBuild("ncbi_b35"); Vector legendMarkers = new Vector(); Vector legendPositions = new Vector(); ...
BufferedReader hmpBuffReader = new BufferedReader(new InputStreamReader(hmpCon.getInputStream()));
GZIPInputStream g = new GZIPInputStream(hmpCon.getInputStream()); BufferedReader hmpBuffReader = new BufferedReader(new InputStreamReader(g));
public void parsePhasedDownload(String[] info) throws IOException, PedFileException{ String targetChrom = "chr" + info[4]; Chromosome.setDataChrom(targetChrom); Chromosome.setDataBuild("ncbi_b35"); Vector legendMarkers = new Vector(); Vector legendPositions = new Vector(); ...
throw new IOException("Could not connect to HapMap database.");
throw new IOException("Could not connect to HapMap database: \n" + io.getMessage());
public void parsePhasedDownload(String[] info) throws IOException, PedFileException{ String targetChrom = "chr" + info[4]; Chromosome.setDataChrom(targetChrom); Chromosome.setDataBuild("ncbi_b35"); Vector legendMarkers = new Vector(); Vector legendPositions = new Vector(); ...
tempVect.add(new Double(currentResult.getObsHet())); tempVect.add(new Double(currentResult.getPredHet()));
tempVect.add(new Double(45)); tempVect.add(new Double(45));
public CheckDataPanel(File file) throws IOException{ //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while((line = reader.readLine())!=null){ ...
StringTokenizer checkSt = new StringTokenizer((String)hmpVector.get(i+1));
StringTokenizer checkSt = new StringTokenizer((String)hmpVector.get(i+1),":- \t");
public void parsePhasedDownload(String[] info) throws IOException, PedFileException{ String targetChrom = "chr" + info[4]; Chromosome.setDataChrom(targetChrom); Chromosome.setDataBuild("ncbi_b35"); Vector legendMarkers = new Vector(); Vector legendPositions = new Vector(); ...
try { ApplicationConfigManager.addApplication(config); } catch (ApplicationConfigManager.DuplicateApplicationNameException e) { throw new ServiceException(ErrorCodes.APPLICATION_NAME_ALREADY_EXISTS, e.getAppName()); } data.setApplicationId(appId); UserActivityLogger.getInstance().logActivity( context.getUser().getUs...
return addAppBasicDetails(context, data, config);
public ApplicationConfigData addApplication(ServiceContext context, ApplicationConfigData data){ AccessController.checkAccess(context, ACLConstants.ACL_ADD_APPLICATIONS); /* do the operation */ String appId = ApplicationConfig.getNextApplicationId(...
dashboardConfigs.add(config); saveConfig();
public static void addDashboard(DashboardConfig config){ assert config != null; dashboardConfigs.add(config); saveConfig(); }
for(Iterator it=dashboardConfigs.iterator(); it.hasNext();){ DashboardConfig config = (DashboardConfig)it.next(); if(config.getDashboardId().equals(dashboardId)){ return config; } }
public static DashboardConfig getDashboard(String dashboardId){ for(Iterator it=dashboardConfigs.iterator(); it.hasNext();){ DashboardConfig config = (DashboardConfig)it.next(); if(config.getDashboardId().equals(dashboardId)){ return config; } } r...
assert config != null: "application config is null"; synchronized(writeLock){ int index = dashboardConfigs.indexOf(config); assert index != -1; dashboardConfigs.remove(index); dashboardConfigs.add(index, config); saveConfig(); }
public static void updateDashboard(DashboardConfig config){ assert config != null: "application config is null"; synchronized(writeLock){ int index = dashboardConfigs.indexOf(config); assert index != -1; dashboardConfigs.remove(index); dashboardConfigs.add(i...
DBCS_OkAction okAction = new DBCS_OkAction(dbcsPanel, true);
public void showDbcsDialog() { final DBCSPanel dbcsPanel = new DBCSPanel(); dbcsPanel.setDbcs(db.getDataSource()); DBCS_OkAction okAction = new DBCS_OkAction(dbcsPanel, true); Action cancelAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { dbcsPanel.discardChanges(); } }; ...
}
log.error("Caught exception while closing statement: " + e, e); }
public void doTag(XMLOutput output) throws Exception { try { conn = getConnection(); } catch (SQLException e) { throw new JellyException(sql + ": " + e.getMessage(), e); } /* * Use the SQL statement specified by the sql attribute, if any, * ot...
log.error("Caught exception while closing connection: " + e, e);
public void doTag(XMLOutput output) throws Exception { try { conn = getConnection(); } catch (SQLException e) { throw new JellyException(sql + ": " + e.getMessage(), e); } /* * Use the SQL statement specified by the sql attribute, if any, * ot...
if ( log.isDebugEnabled() ) { log.debug( "Receiving message on destination: " + destination ); }
public void doTag(XMLOutput output) throws Exception { // evaluate body as it may contain a <destination> tag invokeBody(output); Destination destination = getDestination(); if ( destination == null ) { throw new JellyException( "No destination specified. Either specif...
try { final String objectNameString = request.getParameter(RequestParams.OBJECT_NAME); if(objectNameString != null){ return new ObjectName(objectNameString); }else{ return null; } } catch (MalformedObjectNameException e) { throw new RuntimeException(e); }
return getObjectName(request);
public ObjectName getObjectName() { try { final String objectNameString = request.getParameter(RequestParams.OBJECT_NAME); if(objectNameString != null){ return new ObjectName(objectNameString); }else{ return null; } ...
Utils.copyProperties(appConfigData, appForm);
CoreUtils.copyProperties(appConfigData, appForm);
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { ApplicationForm appForm = ...
initialHaplotypeDisplayThreshold = Options.getHaplotypeDisplayThreshold(); Vector colNames = new Vector(); colNames.add("Haplotype"); colNames.add("Freq."); if (Options.getAssocTest() == ASSOC_TRIO){ colNames.add("T:U"); }else{ colNames.add("Case, Control Ratios"); } colNames.add("Chi Squared"); colNames.add("p value"...
makeTable(haps);
public HaploAssocPanel(Haplotype[][] haps){ initialHaplotypeDisplayThreshold = Options.getHaplotypeDisplayThreshold(); Vector colNames = new Vector(); colNames.add("Haplotype"); colNames.add("Freq."); if (Options.getAssocTest() == ASSOC_TRIO){ colNames.add("T:U"); ...
if (stop >= Chromosome.getUnfilteredSize()){ stop = Chromosome.getUnfilteredSize()-1;
if (stop > Chromosome.getUnfilteredSize()){ stop = Chromosome.getUnfilteredSize();
public BufferedImage export(int start, int stop, boolean compress) throws HaploViewException { forExport = true; exportStart = -1; if (start < 0){ start = 0; } while (true){ //if the marker we want has been filtered walk up until we find a valid one ...
ty += ttp.getHeight();
ty += ttp.getHeight()+unrelatedSourcesGap;
private int drawSourceTargetCluster(Graphics2D g, Map<SQLTable, TablePane> panes, int maxSourceWidth, int maxTargetWidth, int sy, SQLTable st, Collection<SQLTable> targets) { int sx = 0; int tx = maxSourceWidth + sourceTargetGap; int ty = sy; for (SQLTable targetTable : targets) { ...
ty += unrelatedSourcesGap ; sy = Math.max(ty,sy+stp.getHeight()+unrelatedSourcesGap);
else { sy += unrelatedSourcesGap; } sy = Math.max(ty, sy);
private int drawSourceTargetCluster(Graphics2D g, Map<SQLTable, TablePane> panes, int maxSourceWidth, int maxTargetWidth, int sy, SQLTable st, Collection<SQLTable> targets) { int sx = 0; int tx = maxSourceWidth + sourceTargetGap; int ty = sy; for (SQLTable targetTable : targets) { ...
revalidate();
revalidate(); repaint();
public void fitToRect( double width, double height ) { // System.err.println( "Fitting to " + width + ", " + height ); fitSize = true; maxWidth = width; maxHeight = height; // Revalidate the geometry & image size xformImage = null; revalidate(); }
changeToolTip(pp.getSelectedItems());
setupAction(pp.getSelectedItems());
public void itemDeselected(SelectionEvent e) { changeToolTip(pp.getSelectedItems()); }
changeToolTip(pp.getSelectedItems());
setupAction(pp.getSelectedItems());
public void itemSelected(SelectionEvent e) { changeToolTip(pp.getSelectedItems()); }
repaint();
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...
project.init();
project.getBaseDir();
public static Project createProject() { Project project = new Project(); BuildLogger logger = new NoBannerLogger(); logger.setMessageOutputLevel( org.apache.tools.ant.Project.MSG_INFO ); logger.setOutputPrintStream( System.out ); logger.setErrorPrintStream( System.err); pro...
TaskTag tag = new TaskTag( project, taskName );
AntTag tag = new AntTag( project, taskName );
public TagScript createRuntimeTaskTagScript(String taskName, Attributes attributes) throws Exception { TaskTag tag = new TaskTag( project, taskName ); return TagScript.newInstance( tag ); }
suite.addTestSuite(TestBasicRelationshipUI.class); suite.addTestSuite(TestPlayPenComponent.class);
public static Test suite() { TestSuite suite = new TestSuite("Test for Architect's Swing GUI"); //$JUnit-BEGIN$ suite.addTestSuite(TestSwingUIProject.class); suite.addTestSuite(TestArchitectFrame.class); suite.addTestSuite(TestAutoLayoutAction.class); suite.addTestSuite(TestPlayPen.class); suite.addTestSuite(...
if (candidate == TEXT && a.toString().startsWith(TEXT_2)) { found = true; break; }
protected void validateIndexEntry(TestDef test, Class syntheticClass) { assertEquals(test.mClassName, syntheticClass.getName()); Map<String, String[]> expectedMethods = new HashMap<String, String[]>(); if (null != test.mMethods) { for (MethodDef m : test.mMethods) { ex...
File file = new File(fileName); available = file.exists();
try { InputStream is = url.openStream(); available = (is != null); is.close(); } catch (IOException ioe) { available = false; }
public void doTag(final XMLOutput output) throws Exception { boolean available = false; if (file != null) { available = file.exists(); } else if (uri != null) { URL url = context.getResource(uri); String fileName = url.getFile(); File file = new File(fileName); availabl...
public void addColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException;
public void addColumn(SQLColumn c);
public void addColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException;
public abstract void addPrimaryKey(SQLTable t, String primaryKeyName) throws ArchitectException;
public abstract void addPrimaryKey(SQLTable t) throws ArchitectException;
public abstract void addPrimaryKey(SQLTable t, String primaryKeyName) throws ArchitectException;
public void addRelationship(SQLRelationship r) throws ArchitectDiffException;
public void addRelationship(SQLRelationship r);
public void addRelationship(SQLRelationship r) throws ArchitectDiffException;
public void dropColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException;
public void dropColumn(SQLColumn c);
public void dropColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException;
public abstract void dropPrimaryKey(SQLTable t, String primaryKeyName);
public abstract void dropPrimaryKey(SQLTable t);
public abstract void dropPrimaryKey(SQLTable t, String primaryKeyName);
public abstract List generateDDLStatements(SQLDatabase source)
public abstract List<DDLStatement> generateDDLStatements(SQLDatabase source)
public abstract List generateDDLStatements(SQLDatabase source) throws SQLException, ArchitectException;
public abstract String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName);
public abstract String makeDropForeignKeySQL(String fkTable, String fkName);
public abstract String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName);
public abstract String makeDropTableSQL(String catalog, String schema, String table);
public abstract String makeDropTableSQL(String table);
public abstract String makeDropTableSQL(String catalog, String schema, String table);
public void modifyColumn(SQLColumn c) throws ArchitectDiffException ;
public void modifyColumn(SQLColumn c);
public void modifyColumn(SQLColumn c) throws ArchitectDiffException ;
user.getStatus() != null ? user.getStatus() : "A");
user.getStatus() != null ? user.getStatus() : User.STATUS_ACTIVE);
private void saveUser(){ try { Document doc = new Document(); Element rootElement = new Element(AuthConstants.JM_USERS); for(Iterator it=users.values().iterator(); it.hasNext();){ User user = (User)it.next(); /* create a user element */ ...
"A".equals(user.getStatus()) ? user : null;
User.STATUS_ACTIVE.equals(user.getStatus()) ? user : null;
public User verifyUsernamePassword(String username, char[] password){ User user = (User)users.get(username); if(user != null){ final String hashedPassword = Crypto.hash(password); user = hashedPassword.equals(user.getPassword()) && "A".equals(user.getStatus()) ...
superKey.put(property, new Tally(property));
if (!superKey.containsKey(property)) { superKey.put(property, new Tally(property)); }
private Result buildResult(Filter<S> filter, OrderingList<S> ordering) throws SupportException, RepositoryException { List<IndexedQueryAnalyzer<S>.Result> subResults; if (filter == null) { subResults = Collections.singletonList(mIndexAnalyzer.analyze(filter, ordering)); } e...
Set<ChainedProperty<S>> props = new HashSet<ChainedProperty<S>>(propCount);
Set<ChainedProperty<S>> props = new LinkedHashSet<ChainedProperty<S>>(propCount);
private List<Set<ChainedProperty<S>>> getKeys() throws SupportException, RepositoryException { StorableInfo<S> info = StorableIntrospector.examine(mIndexAnalyzer.getStorableType()); List<Set<ChainedProperty<S>>> keys = new ArrayList<Set<ChainedProperty<S>>>(); keys.add(stripOrdering(i...
Set<ChainedProperty<S>> props = new HashSet<ChainedProperty<S>>(orderedProps.size());
Set<ChainedProperty<S>> props = new LinkedHashSet<ChainedProperty<S>>(orderedProps.size());
private Set<ChainedProperty<S>> stripOrdering(Set<? extends OrderedProperty<S>> orderedProps) { Set<ChainedProperty<S>> props = new HashSet<ChainedProperty<S>>(orderedProps.size()); for (OrderedProperty<S> ordering : orderedProps) { props.add(ordering.getChainedProperty()); } ...
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ErrorCodes.CONNECTION_FAILED));
return mapping.findForward(Forwards.CONNECTION_FAILED);
public ActionForward execute(Exception exception, ExceptionConfig exConfig, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { Ac...
System.out.println("PlayPenTransferHandler: can I import "+Arrays.asList(flavors));
logger.debug("PlayPenTransferHandler: can I import "+Arrays.asList(flavors));
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { System.out.println("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); System.out.println("representation class =...
System.out.println("representation class = "+cls); System.out.println("mime type = "+flavors[i].getMimeType()); System.out.println("type = "+flavors[i].getPrimaryType()); System.out.println("subtype = "+flavors[i].getSubType()); System.out.println("class = "+flavors[i].getParameter("class")); System.out.println("isSeri...
logger.debug("representation class = "+cls); logger.debug("mime type = "+flavors[i].getMimeType()); logger.debug("type = "+flavors[i].getPrimaryType()); logger.debug("subtype = "+flavors[i].getSubType()); logger.debug("class = "+flavors[i].getParameter("class")); logger.debug("isSerializedObject = "+flavors[i].isFlavor...
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { System.out.println("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); System.out.println("representation class =...
System.out.println("YES");
logger.debug("YES");
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { System.out.println("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); System.out.println("representation class =...
System.out.println("NO!");
logger.debug("NO!");
public DataFlavor bestImportFlavor(JComponent c, DataFlavor[] flavors) { System.out.println("PlayPenTransferHandler: can I import "+Arrays.asList(flavors)); for (int i = 0; i < flavors.length; i++) { String cls = flavors[i].getDefaultRepresentationClassAsString(); System.out.println("representation class =...
System.out.println("PlayPenDropTarget.dragOver()");
public void dragOver(DropTargetDragEvent dtde) { System.out.println("PlayPenDropTarget.dragOver()"); dtde.acceptDrag(DnDConstants.ACTION_COPY); }
JComponent c = (JComponent) dtde.getDropTargetContext().getComponent();
PlayPen c = (PlayPen) dtde.getDropTargetContext().getComponent();
public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); JComponent c = (JComponent) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Obj...
System.out.println("MyJTreeTransferHandler.importData: got object of type "+someData.getClass().getName());
logger.debug("MyJTreeTransferHandler.importData: got object of type "+someData.getClass().getName());
public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); JComponent c = (JComponent) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Obj...
SQLTable table = (SQLTable) someData; TablePane tp = new TablePane(table); c.add(tp, dtde.getLocation()); tp.revalidate();
c.addTable((SQLTable) someData, dtde.getLocation()); dtde.dropComplete(true); return; } else if (someData instanceof SQLSchema) { dtde.acceptDrop(DnDConstants.ACTION_COPY); SQLSchema sourceSchema = (SQLSchema) someData; c.addSchema(sourceSchema, dtde.getLocation()); dtde.dropComplete(true); return; } else if (someData ...
public void drop(DropTargetDropEvent dtde) { Transferable t = dtde.getTransferable(); JComponent c = (JComponent) dtde.getDropTargetContext().getComponent(); DataFlavor importFlavor = bestImportFlavor(c, t.getTransferDataFlavors()); if (importFlavor == null) { dtde.rejectDrop(); } else { try { Obj...