rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Iterator it = columnsFolder.children.iterator(); int colIdx = 0; while (it.hasNext()) { if (it.next() == col) { return colIdx; | Iterator it; try { it = getColumns().iterator(); int colIdx = 0; while (it.hasNext()) { if (it.next() == col) { return colIdx; } colIdx++; | public int getColumnIndex(SQLColumn col) { logger.debug("Looking for column index of: " + col); Iterator it = columnsFolder.children.iterator(); int colIdx = 0; while (it.hasNext()) { if (it.next() == col) { return colIdx; } colIdx++; } logger.debug("NOT FOUND"); return -1; } |
colIdx++; | } catch (ArchitectException e) { logger.warn("Unexpected ArchitectException in getColumnIndex on " +col.toString()); | public int getColumnIndex(SQLColumn col) { logger.debug("Looking for column index of: " + col); Iterator it = columnsFolder.children.iterator(); int colIdx = 0; while (it.hasNext()) { if (it.next() == col) { return colIdx; } colIdx++; } logger.debug("NOT FOUND"); return -1; } |
public List keysOfColumn(SQLColumn col) { | public List keysOfColumn(SQLColumn col) throws ArchitectException { | public List keysOfColumn(SQLColumn col) { LinkedList keys = new LinkedList(); Iterator it = exportedKeysFolder.children.iterator(); while (it.hasNext()) { SQLRelationship r = (SQLRelationship) it.next(); if (r.containsPkColumn(col)) { keys.add(r); } } it = importedKeysFolder.children.iterator(); while (... |
Iterator it = exportedKeysFolder.children.iterator(); | Iterator it = getExportedKeys().iterator(); | public List keysOfColumn(SQLColumn col) { LinkedList keys = new LinkedList(); Iterator it = exportedKeysFolder.children.iterator(); while (it.hasNext()) { SQLRelationship r = (SQLRelationship) it.next(); if (r.containsPkColumn(col)) { keys.add(r); } } it = importedKeysFolder.children.iterator(); while (... |
it = importedKeysFolder.children.iterator(); | it = getExportedKeys().iterator(); | public List keysOfColumn(SQLColumn col) { LinkedList keys = new LinkedList(); Iterator it = exportedKeysFolder.children.iterator(); while (it.hasNext()) { SQLRelationship r = (SQLRelationship) it.next(); if (r.containsPkColumn(col)) { keys.add(r); } } it = importedKeysFolder.children.iterator(); while (... |
if (columnsFolder.children.isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = columnsFolder.children.iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primaryKeySeq = new Integer(i); } else { col.primaryKeySeq... | try { if (getColumns().isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primaryKeySeq = new Integer(i); } else { col.primaryKeySeq = null; } i+... | public void normalizePrimaryKey() { if (columnsFolder.children.isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = columnsFolder.children.iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primary... |
i++; | } catch (ArchitectException e) { logger.warn("Unexpected ArchitectException in normalizePrimaryKey "+e); | public void normalizePrimaryKey() { if (columnsFolder.children.isEmpty()) return; boolean donePk = false; int i = 0; Iterator it = columnsFolder.children.iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) donePk = true; if (!donePk) { col.primary... |
protected synchronized void populateColumns() throws ArchitectException { | private synchronized void populateColumns() throws ArchitectException { | protected synchronized void populateColumns() throws ArchitectException { if (columnsFolder.isPopulated()) return; if (columnsFolder.children.size() > 0) throw new IllegalStateException("Can't populate table because it already contains columns"); try { SQLColumn.addColumnsToTable(this, getCatalogName(), ... |
public synchronized void populateRelationships() throws ArchitectException { | private synchronized void populateRelationships() throws ArchitectException { | public synchronized void populateRelationships() throws ArchitectException { if (!columnsFolder.isPopulated()) throw new IllegalStateException("Table must be populated before relationships are added"); if (importedKeysFolder.isPopulated()) return; int oldSize = importedKeysFolder.children.size(); /* this must come... |
if (plPanel.historyBox.getSelectedIndex() == 0) { | if (plPanel.getTargetDBCS() == null) { | public void actionPerformed(ActionEvent e) { final SQLDatabase souDB =playpen.getDatabase(); final PLExport plexp = new PLExport(); final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "PL Repository"); JPanel plp = new JPanel(new BorderLayout(12,12)); plp.setBorder(BorderFactory.createEmpt... |
plexp.setPlDBCS(plPanel.getDbcs()); | plexp.setPlDBCS(plPanel.getTargetDBCS()); | public void actionPerformed(ActionEvent e) { final SQLDatabase souDB =playpen.getDatabase(); final PLExport plexp = new PLExport(); final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "PL Repository"); JPanel plp = new JPanel(new BorderLayout(12,12)); plp.setBorder(BorderFactory.createEmpt... |
wcomm.append(" USER=").append((plPanel.getDbcs()).getUser()).append("/").append((plPanel.getDbcs()).getPass()); | wcomm.append(" USER=").append((plPanel.getTargetDBCS()).getUser()).append("/").append((plPanel.getTargetDBCS()).getPass()); | public void actionPerformed(ActionEvent e) { final SQLDatabase souDB =playpen.getDatabase(); final PLExport plexp = new PLExport(); final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "PL Repository"); JPanel plp = new JPanel(new BorderLayout(12,12)); plp.setBorder(BorderFactory.createEmpt... |
if (plPanel.historyBox.getSelectedIndex() == 0) { | if (plPanel.getTargetDBCS() == null) { | public void actionPerformed(ActionEvent evt) { if (plPanel.historyBox.getSelectedIndex() == 0) { JOptionPane.showMessageDialog(plPanel, "You have to select a target database from the list.", "Error", JOptionPane.ERROR_MESSAGE); return; } try { //plPanel.applyChanges(); plexp.setJobId... |
plexp.setPlDBCS(plPanel.getDbcs()); | plexp.setPlDBCS(plPanel.getTargetDBCS()); | public void actionPerformed(ActionEvent evt) { if (plPanel.historyBox.getSelectedIndex() == 0) { JOptionPane.showMessageDialog(plPanel, "You have to select a target database from the list.", "Error", JOptionPane.ERROR_MESSAGE); return; } try { //plPanel.applyChanges(); plexp.setJobId... |
wcomm.append(" USER=").append((plPanel.getDbcs()).getUser()).append("/").append((plPanel.getDbcs()).getPass()); | wcomm.append(" USER=").append((plPanel.getTargetDBCS()).getUser()).append("/").append((plPanel.getTargetDBCS()).getPass()); | public void actionPerformed(ActionEvent evt) { if (plPanel.historyBox.getSelectedIndex() == 0) { JOptionPane.showMessageDialog(plPanel, "You have to select a target database from the list.", "Error", JOptionPane.ERROR_MESSAGE); return; } try { //plPanel.applyChanges(); plexp.setJobId... |
db.addSQLObjectListener(this); | try { ArchitectUtils.listenToHierarchy(this, db); } catch (ArchitectException ex) { logger.error("Couldn't listen to database", ex); } | public PlayPen(SQLDatabase db) { super(); if (db == null) throw new NullPointerException("db must be non-null"); this.db = db; relationships = new LinkedList(); db.addSQLObjectListener(this); setLayout(new PlayPenLayout(this)); setName("Play Pen"); setMinimumSize(new Dimension(200,200)); setBackground(java.aw... |
if (c[i] instanceof SQLTable) { c[i].addSQLObjectListener(this); | try { ArchitectUtils.listenToHierarchy(this, c[i]); } catch (ArchitectException ex) { logger.error("Couldn't listen to added object", ex); } if (c[i] instanceof SQLTable || c[i] instanceof SQLRelationship) { fireEvent = true; | public void dbChildrenInserted(SQLObjectEvent e) { logger.debug("SQLObject children got inserted: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].addSQLObjectListener(this); } } firePropertyChange("model.child... |
firePropertyChange("model.children", null, null); revalidate(); | if (fireEvent) { firePropertyChange("model.children", null, null); revalidate(); } | public void dbChildrenInserted(SQLObjectEvent e) { logger.debug("SQLObject children got inserted: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].addSQLObjectListener(this); } } firePropertyChange("model.child... |
c[i].removeSQLObjectListener(this); | public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("SQLObject children got removed: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].removeSQLObjectListener(this); for (int j = 0; j < getComponentCou... | |
firePropertyChange("model.children", null, null); repaint(); | if (fireEvent) { firePropertyChange("model.children", null, null); repaint(); } | public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("SQLObject children got removed: "+e); SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof SQLTable) { c[i].removeSQLObjectListener(this); for (int j = 0; j < getComponentCou... |
if ( context.getTagLibrary(libraryURI) == null ) { | if ( ! context.isTagLibraryRegistered(libraryURI) ) { | protected void configure() { // load the properties file of libraries available InputStream in = null; URL url = getClassLoader().getResource("org/apache/commons/jelly/jelly.properties"); if (url != null) { log.debug("Loading Jelly default tag libraries from: " + ur... |
public ExpressionScript(Expression expression) { this.expression = expression; | public ExpressionScript() { | public ExpressionScript(Expression expression) { this.expression = expression; } |
public ConstantExpression(Object value) { this.value = value; | public ConstantExpression() { | public ConstantExpression(Object value) { this.value = value; } |
public StaticTagScript(TagFactory tagFactory) { super(tagFactory); | public StaticTagScript() { | public StaticTagScript(TagFactory tagFactory) { super(tagFactory); } |
if (this.counts[0][0] >= this.counts[0][1]){ | if (this.counts[0][0] > this.counts[0][1]){ | public String getOverTransmittedAllele(int type) { String[] alleleCodes = new String[5]; alleleCodes[0] = "X"; alleleCodes[1] = "A"; alleleCodes[2] = "C"; alleleCodes[3] = "G"; alleleCodes[4] = "T"; String retStr; if (this.counts[0][0] >= this.counts[0][1]){ ... |
if (this.counts[1][0] >= this.counts[1][1]){ | if (this.counts[1][0] > this.counts[1][1]){ | public String getOverTransmittedAllele(int type) { String[] alleleCodes = new String[5]; alleleCodes[0] = "X"; alleleCodes[1] = "A"; alleleCodes[2] = "C"; alleleCodes[3] = "G"; alleleCodes[4] = "T"; String retStr; if (this.counts[0][0] >= this.counts[0][1]){ ... |
}else if (this.counts[1][0] == this.counts[1][1]){ retStr += ", -"; | public String getOverTransmittedAllele(int type) { String[] alleleCodes = new String[5]; alleleCodes[0] = "X"; alleleCodes[1] = "A"; alleleCodes[2] = "C"; alleleCodes[3] = "G"; alleleCodes[4] = "T"; String retStr; if (this.counts[0][0] >= this.counts[0][1]){ ... | |
"-o <GAB,GAM,SPI,ALL> output type. Gabriel, 4 gamete, spine output or all 3. default is SFS.\n" + | "-o <GAB,GAM,SPI,ALL> output type. Gabriel, 4 gamete, spine output or all 3. default is Gabriel.\n" + | private void argHandler(String[] args){ //TODO: -specify values from HaplotypeDisplayController (min hap percentage etc) // -want to be able to output haps file from pedfile boolean nogui = false; String batchMode = ""; String hapsFileName = ""; String pedFileName = ""... |
if( outputType == -1 && ( !pedFileName.equals("") || !hapsFileName.equals("") || !batchMode.equals("")) && !outputDprime && !outputCheck) { | if( outputType == -1 && ( !pedFileName.equals("") || !hapsFileName.equals("") || !batchMode.equals("") || !hapmapFileName.equals("")) && !outputDprime && !outputCheck) { | private void argHandler(String[] args){ //TODO: -specify values from HaplotypeDisplayController (min hap percentage etc) // -want to be able to output haps file from pedfile boolean nogui = false; String batchMode = ""; String hapsFileName = ""; String pedFileName = ""... |
System.out.println(dPrimeTable.length); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); /* boxSize = ((clipRect.width-2*H_BORDER)/dPrimeTable.length-1); if (boxSize... | |
public void setModel( Object model ) { setModel( model, false ); | public void setModel( Object model, boolean preserveState ) { Object[] modelArr = new Object[1]; modelArr[0] = model; setModel( modelArr, preserveState ); | public void setModel( Object model ) { setModel( model, false ); } |
if(dataType.isAssignableFrom(attrInfoType)){ | if(attrInfoType != null && dataType.isAssignableFrom(attrInfoType)){ | private boolean checkAttributeDataType(ObjectAttributeInfo[] objAttrInfo, String[] dataTypes, ApplicationConfig appConfig, List attributesList){ boolean result = false; outerlo... |
throw new RuntimeException(e); | logger.fine("Error finding class of type=" + type + ", error=" + e.getMessage()); | private Class getClass(String type, ClassLoader classLoader){ if(type.equals("boolean")) return Boolean.class; if(type.equals("byte")) return Byte.TYPE; if(type.equals("char")) return Character.class; if(type.equals("double")) return Double... |
ObjectInfo objInfo = serverConnection.getObjectInfo(objName); ObjectAttributeInfo[] objAttrInfo = objInfo.getAttributes(); if(objAttrInfo!=null && objAttrInfo.length > 0){ if(dataTypes!=null && dataTypes.length > 0){ if(checkAttributeDataType(objAttrInfo, dataTypes, context.getApplicationConfig(), null)){ | try { ObjectInfo objInfo = serverConnection.getObjectInfo(objName); ObjectAttributeInfo[] objAttrInfo = objInfo.getAttributes(); if(objAttrInfo!=null && objAttrInfo.length > 0){ if(dataTypes!=null && dataTypes.length > 0){ if(checkAttributeDataType(objAttrInfo, dataTypes, context.getApplicationConfig(), null)){ mbeanTo... | private List queryMBeansWithAttributes(ServiceContext context, String filter, String[] dataTypes) throws ServiceException{ ServerConnection serverConnection = context.getServerConnection(); List mbeans = queryMBeans(context, filter); List mbea... |
}else{ mbeanToAttributesList.add(mbeanData); | private List queryMBeansWithAttributes(ServiceContext context, String filter, String[] dataTypes) throws ServiceException{ ServerConnection serverConnection = context.getServerConnection(); List mbeans = queryMBeans(context, filter); List mbea... | |
} catch (Exception e) { String errorMessage = "Error getting ObjectInfo for: " + objName + ", error=" + e.getMessage(); logger.log(Level.WARNING, errorMessage); logger.log(Level.FINE, errorMessage, e); | private List queryMBeansWithAttributes(ServiceContext context, String filter, String[] dataTypes) throws ServiceException{ ServerConnection serverConnection = context.getServerConnection(); List mbeans = queryMBeans(context, filter); List mbea... | |
ObjectInfo objInfo = serverConnection.getObjectInfo(objName); ObjectNotificationInfo[] notifications = objInfo.getNotifications(); if(notifications != null && notifications.length > 0){ mbeanToNoficationsMap.put(objName.getCanonicalName(), notifications); | try { ObjectInfo objInfo = serverConnection.getObjectInfo(objName); ObjectNotificationInfo[] notifications = objInfo.getNotifications(); if(notifications != null && notifications.length > 0){ mbeanToNoficationsMap.put(objName.getCanonicalName(), notifications); } } catch (Exception e) { String errorMessage = "Error ge... | public Map queryMBeansWithNotifications(ServiceContext context) throws ServiceException { ServerConnection serverConnection = context.getServerConnection(); Set mbeans = serverConnection.queryNames(DEFAULT_FILTER_OBJECT_NAME); Map mbeanToNoficationsMap = new TreeMap();... |
logger.warn("NOT Adding duplicate listener "+l+" to SQLObject "+this); | if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } | public void addSQLObjectListener(SQLObjectListener l) { if (getSQLObjectListeners().contains(l)) { logger.warn("NOT Adding duplicate listener "+l+" to SQLObject "+this); return; } getSQLObjectListeners().add(l); } |
public Object createNestedObject(String name) throws Exception { | public Object createNestedObject(Object object, String name) throws Exception { | public Object createNestedObject(String name) throws Exception { Object dataType = null; Object object = getObject(); if ( object != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( object.getClass() ); if ( ih != null ) { try { ... |
Object object = getObject(); | public Object createNestedObject(String name) throws Exception { Object dataType = null; Object object = getObject(); if ( object != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( object.getClass() ); if ( ih != null ) { try { ... | |
Object nested = null; Object parentObject = null; | public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); if ( project.getTaskDefinitions().containsKey( tagName ) ) { // the following algorithm follows the lifetime of a tag // http://jakarta.apac... | |
AntTag ancestor = (AntTag) findAncestorWithClass( AntTag.class ); Object nested = null; | TaskSource ancestor = (TaskSource) findAncestorWithClass( TaskSource.class ); | public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); if ( project.getTaskDefinitions().containsKey( tagName ) ) { // the following algorithm follows the lifetime of a tag // http://jakarta.apac... |
nested = ancestor.createNestedObject( tagName ); } else { AntTagSupport ancestorToo = (AntTagSupport) findAncestorWithClass( AntTagSupport.class ); if ( ancestorToo != null ) { nested = ancestorToo.createNestedObject( tagName ); } | parentObject = ancestor.getTaskObject(); nested = createNestedObject( parentObject, tagName ); | public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); if ( project.getTaskDefinitions().containsKey( tagName ) ) { // the following algorithm follows the lifetime of a tag // http://jakarta.apac... |
if ( ancestor != null ) { Object parentObj = ancestor.getObject(); if ( parentObj != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( parentObj.getClass() ); try { ih.storeElement( project, parentObj, nested, tagName ); } catch (Exception e) { } | if ( parentObject != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( parentObject.getClass() ); try { ih.storeElement( project, parentObject, nested, tagName ); } catch (Exception e) { | public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); if ( project.getTaskDefinitions().containsKey( tagName ) ) { // the following algorithm follows the lifetime of a tag // http://jakarta.apac... |
Object object = getObject(); | Object object = getTaskObject(); | public void setBeanProperties() throws Exception { Object object = getObject(); if ( object != null ) { Map map = getAttributes(); for ( Iterator iter = map.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.ge... |
if ( log.isDebugEnabled() ) { log.debug( "Setting bean property on: "+ object + " name: " + name + " value: " + value ); } | public void setBeanProperty(Object object, String name, Object value) throws Exception { // System.err.println( "Setting bean property on: "+ object + " name: " + name + " value: " + value ); IntrospectionHelper ih = IntrospectionHelper.getHelper( object.getClass() ); if ( value instan... | |
repaint(); | public void setRotation( double newRot ) { imgRot = newRot; xformImage = null; revalidate(); } | |
repaint(); | public void setScale( float newValue ) { imgScale = newValue; xformImage = null; fitSize = false; revalidate(); } | |
if (attributeName.equals( "value" ) || attributeName.equals( "items" ) || attributeName.equals( "test" ) ) { return factory.createExpression( attributeValue ); | ExpressionFactory myFactory = getExpressionFactory(); if ( myFactory == null ) { myFactory = factory; } if ( myFactory != null ) { if (attributeName.equals( "value" ) || attributeName.equals( "items" ) || attributeName.equals( "test" ) ) { return myFactory.createExpression( attributeValue ); } | public Expression createExpression(ExpressionFactory factory, String tagName, String attributeName, String attributeValue) throws Exception { if (attributeName.equals( "value" ) || attributeName.equals( "items" ) || attributeName.equals( "test" ) ) { return factory.createExpression( attributeValu... |
assert parameterTypes.length > 0 && (ServiceContext.class.isAssignableFrom(parameterTypes[0])) : "Invalid service method. First argument must be ServiceContext"; | private static Vector getClassNames(Method method){ Class[] parameterTypes = method.getParameterTypes(); Vector vector = new Vector(parameterTypes.length); for(int i=0; i<parameterTypes.length; i++){ vector.add(parameterTypes[i].getName()); } return vector; } | |
public static Object unmarshal(Class clazz, String str){ | public static Object unmarshal(String className, String str){ | public static Object unmarshal(Class clazz, String str){ try { return org.exolab.castor.xml.Unmarshaller.unmarshal(clazz, new StringReader(str)); } catch (Exception e) { throw new RuntimeException("Error while unmarshalling obj of type:" + cl... |
return org.exolab.castor.xml.Unmarshaller.unmarshal(clazz, new StringReader(str)); } catch (Exception e) { throw new RuntimeException("Error while unmarshalling obj of type:" + clazz.getName(), e); | return unmarshal(Class.forName(className), str); } catch (ClassNotFoundException e) { throw new RuntimeException(e); | public static Object unmarshal(Class clazz, String str){ try { return org.exolab.castor.xml.Unmarshaller.unmarshal(clazz, new StringReader(str)); } catch (Exception e) { throw new RuntimeException("Error while unmarshalling obj of type:" + cl... |
StringWriter writer = new StringWriter(); try { org.exolab.castor.xml.Marshaller marshaller = new org.exolab.castor.xml.Marshaller(writer); marshaller.setRootElement("marshalledObject"); marshaller.setMarshalAsDocument(false); marshaller.setSuppressXSIType(true); marshaller.marshal(obj); } catch (Exception e) { throw n... | String output; if(obj == null){ output = ""; }else if(obj.getClass().getName().startsWith("java.lang")){ output = obj.toString(); }else{ output = marshalToXml(obj); | public static String marshal(Object obj){ StringWriter writer = new StringWriter(); try { org.exolab.castor.xml.Marshaller marshaller = new org.exolab.castor.xml.Marshaller(writer); marshaller.setRootElement("marshalledObject"); marshaller.setMarshal... |
return writer.toString(); | logger.fine("Marshalled value: " + output); return output; | public static String marshal(Object obj){ StringWriter writer = new StringWriter(); try { org.exolab.castor.xml.Marshaller marshaller = new org.exolab.castor.xml.Marshaller(writer); marshaller.setRootElement("marshalledObject"); marshaller.setMarshal... |
logger.debug("MetaData class is: " + dbmd.getClass().getName()); | public synchronized void populate() throws ArchitectException { if (populated) return; int oldSize = children.size(); Connection con = null; ResultSet rs = null; try { con = getConnection(); DatabaseMetaData dbmd = con.getMetaData(); logger.debug("MetaData class is: " + dbmd.getClass().getName()); rs = ... | |
rs.close(); rs = null; | public synchronized void populate() throws ArchitectException { if (populated) return; int oldSize = children.size(); Connection con = null; ResultSet rs = null; try { con = getConnection(); DatabaseMetaData dbmd = con.getMetaData(); logger.debug("MetaData class is: " + dbmd.getClass().getName()); rs = ... | |
System.out.println(totalComps); | void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[Chromosome.getSize()][Chromosome.getSize()]; int doublehet; long negMaxdist = -1*maxdist; int[][] twoMark... | |
dPrimeTable[pos1][pos2] = null; | dPrimeTable[pos1][pos2] = new PairwiseLinkage(1,0,0,0,0,new double[0]); | void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[Chromosome.getSize()][Chromosome.getSize()]; int doublehet; long negMaxdist = -1*maxdist; int[][] twoMark... |
System.out.println("well, i made it this far"); | 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... | |
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Execute Operation"); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ fin... | |
return new ObjectName(objectNameString); | if(objectNameString != null){ return new ObjectName(objectNameString); }else{ return null; } | public ObjectName getObjectName() { try { final String objectNameString = request.getParameter(RequestParams.OBJECT_NAME); return new ObjectName(objectNameString); } catch (MalformedObjectNameException e) { throw new RuntimeException(e); } ... |
public Config(List<ApplicationConfig> applications, List<DashboardConfig> dashboards){ | public Config(List<ApplicationConfig> applications){ | public Config(List<ApplicationConfig> applications, List<DashboardConfig> dashboards){ this.applications = applications; this.dashboards = dashboards; } |
this.dashboards = dashboards; | public Config(List<ApplicationConfig> applications, List<DashboardConfig> dashboards){ this.applications = applications; this.dashboards = dashboards; } | |
Utils.csvToStringArray(clusterForm.getSelectedChildApplications()); | StringUtils.csvToStringArray(clusterForm.getSelectedChildApplications()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
finally { if ( ! context.isCacheTags() ) { clearTag(); } } | public void run(JellyContext context, XMLOutput output) throws Exception { try { Tag tag = getTag(); if ( tag == null ) { return; } tag.setContext(context); if ( tag instanceof DynaTag ) { DynaTag dynaTag = (Dyna... | |
public DBListClass(PropertyMetaClass wclass) { super("dblist", "DB List", wclass); | public DBListClass(String name, String prettyname, PropertyMetaClass wclass) { super(name, prettyname, wclass); | public DBListClass(PropertyMetaClass wclass) { super("dblist", "DB List", wclass); } |
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', ... | |
JFileChooser fc = new JFileChooser(System.getProperty("user.dir")); | 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_... | |
public Object evaluate(Context context) { | public Object evaluate(JellyContext context) { | public Object evaluate(Context context) { try { interpreter.setContext(context); if ( log.isDebugEnabled() ) { log.debug( "Evaluating EL: " + text ); } return interpreter.eval( text ); } catch (Exception e) { ... |
interpreter.setContext(context); | interpreter.setJellyContext(context); | public Object evaluate(Context context) { try { interpreter.setContext(context); if ( log.isDebugEnabled() ) { log.debug( "Evaluating EL: " + text ); } return interpreter.eval( text ); } catch (Exception e) { ... |
logger.info("DBTree: exporting single node"); | public void dragGestureRecognized(DragGestureEvent dge) { logger.info("Drag gesture event: "+dge); // we only start drags on left-click drags InputEvent ie = dge.getTriggerEvent(); if ( (ie.getModifiers() & InputEvent.BUTTON1_MASK) == 0) { return; } DBTree t = (DBTree) dge.getComponent(); TreePath[... | |
logger.info("DBTree: exporting single node "+data.getName()+"@"+data.hashCode()); | public void dragGestureRecognized(DragGestureEvent dge) { logger.info("Drag gesture event: "+dge); // we only start drags on left-click drags InputEvent ie = dge.getTriggerEvent(); if ( (ie.getModifiers() & InputEvent.BUTTON1_MASK) == 0) { return; } DBTree t = (DBTree) dge.getComponent(); TreePath[... | |
public DBTree(List initialDatabases) throws ArchitectException { super(new DBTreeModel(initialDatabases)); | public DBTree() { | public DBTree(List initialDatabases) throws ArchitectException { super(new DBTreeModel(initialDatabases)); setRootVisible(false); setShowsRootHandles(true); ds = new DragSource(); DragGestureRecognizer dgr = ds.createDefaultDragGestureRecognizer (this, DnDConstants.ACTION_COPY, new DBTreeDragGestureListener());... |
Options.setgBrowseLeft(0); Options.setgBrowseRight(0); Chromosome.setDataChrom(null); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals(RAW_DATA)){ load(PED); }else if (command.equals(PHASED_DATA)){ load(HAPS); }else if (command.equals(HAPMAP_DATA)){ load(HMP); }else if (command.e... | |
gBrowsePanel.add(new JLabel("Download and show HapMap gene track? (requires internet connection)")); | gBrowsePanel.add(new JLabel("Download and show HapMap info track? (requires internet connection)")); | 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... |
bw.write("#using " + getTagSNPs().size() + " SNPs in " + tags.size() + " tests."); | bw.write("#using " + getTagSNPs().size() + " Tag SNPs in " + tags.size() + " tests."); | public void saveResultToFile(File outFile) throws IOException { BufferedWriter bw = new BufferedWriter(new FileWriter(outFile)); bw.write("#tagging with r^2 cutoff: " + minRSquared); bw.newLine(); bw.write("#captured " + taggedSoFar + " of " + snps.size() +" alleles with mean r^2 of " + ... |
bw.write("Marker\tBest Test\tr^2 w/test"); | bw.write("Allele\tBest Test\tr^2 w/test"); | public void saveResultToFile(File outFile) throws IOException { BufferedWriter bw = new BufferedWriter(new FileWriter(outFile)); bw.write("#tagging with r^2 cutoff: " + minRSquared); bw.newLine(); bw.write("#captured " + taggedSoFar + " of " + snps.size() +" alleles with mean r^2 of " + ... |
FontMetrics boldfm = g.getFontMetrics(boldFont); | FontMetrics boldfm = g.getFontMetrics(boldFont); NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(2); nf.setMaximumFractionDigits(2); | public void dPrimeDraw(String[][] table, boolean info, Vector snps, Graphics g){ int scale = table.length*30; int activeOffset = 0; float d, l, blgr; Color myColor; int[] shifts; Font regFont = new Font("Lucida Sans Regular", Font.PLAIN, 10); FontMetrics regfm = g.getFontMetrics(regFont); Font boldFont = new Font("... |
d = Float.parseFloat(st.nextToken()); | d = Float.parseFloat(nf.format(Float.parseFloat(st.nextToken()))); | public void dPrimeDraw(String[][] table, boolean info, Vector snps, Graphics g){ int scale = table.length*30; int activeOffset = 0; float d, l, blgr; Color myColor; int[] shifts; Font regFont = new Font("Lucida Sans Regular", Font.PLAIN, 10); FontMetrics regfm = g.getFontMetrics(regFont); Font boldFont = new Font("... |
NumberFormat nf = NumberFormat.getInstance(); NumberFormat nfMulti = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.setMaximumFractionDigits(3); nfMulti.setMinimumFractionDigits(2); nfMulti.setMaximumFractionDigits(2); | public void haploDraw(Graphics gr, boolean myuseThickness, int mycolorThresh, int mycrossThinThresh, int mycrossThickThresh, double[] gapDPrime, Haplotype[][] hapsInBlocks){ NumberFormat nf = NumberFormat.getInstance(); NumberFormat nfMulti = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.se... | |
NumberFormat nf = NumberFormat.getInstance(); NumberFormat nfMulti = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.setMaximumFractionDigits(3); nfMulti.setMinimumFractionDigits(2); nfMulti.setMaximumFractionDigits(2); | public void haploDraw(Graphics gr, boolean myuseThickness, int mycolorThresh, int mycrossThinThresh, int mycrossThickThresh, double[] gapDPrime, Haplotype[][] hapsInBlocks){ NumberFormat nf = NumberFormat.getInstance(); NumberFormat nfMulti = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.se... | |
public static LocalizationContext getLocalizationContext(JellyContext jc, String basename) { LocalizationContext locCtxt = null; ResourceBundle bundle = null; if ((basename == null) || basename.equals("")) { return new LocalizationContext(); } Locale pref = null; { Object tmp = jc.getVariable(Config.FMT_LOCALE); if... | public LocalizationContext getLocalizationContext() { | public static LocalizationContext getLocalizationContext(JellyContext jc, String basename) { LocalizationContext locCtxt = null; ResourceBundle bundle = null; if ((basename == null) || basename.equals("")) { return new LocalizationContext(); } // Try preferred locales Locale pref = null; { Object tmp =... |
private String generateUniqueColumnName(SQLColumn column, SQLTable table) { | private static String generateUniqueColumnName(SQLColumn column, SQLTable table) { | private String generateUniqueColumnName(SQLColumn column, SQLTable table) { return column.getName() + "_1"; // XXX: fix this to be better } |
logger.debug("00000000000 object hash code: " + super.hashCode()); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... | |
logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 ACTIVE!!!."); } | if (!active) return; | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... |
if (!s.isSelected()) { logger.debug("333333333 not selected."); return; } | if (!s.isSelected()) return; | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... |
logger.debug("4444444444444 instance of TablePane."); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... | |
logger.debug("555555555555 Creating relationship: PK Table is "+pkTable); | logger.debug("Creating relationship: PK Table is "+pkTable); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... |
logger.debug("66666666666666 Creating relationship: FK Table is "+fkTable); doCreateRelationship(); | logger.debug("Creating relationship: FK Table is "+fkTable); doCreateRelationship(pkTable.getModel(),fkTable.getModel(),pp,identifying); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... |
logger.debug("66666666666666 setting active to FALSE!"); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... | |
logger.debug("777777777777 not instance of TablePane."); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } else { logger.debug("222222222 A... | |
if (theGeno == a1){ | if (theGeno == 0){ thisHap[j] = '0'; }else if (theGeno == a1){ | public void doEM(int[] theBlock) throws HaploViewException{ //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = the... |
thisHap[j] = '0'; | throw new HaploViewException("Marker with > 2 alleles: " + Chromosome.getMarker(theBlock[j]).getName()); | public void doEM(int[] theBlock) throws HaploViewException{ //break up large blocks if needed int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { //some base-8 arithmetic int ones = the... |
if (cur.getRating() > 0){ | int curRating = cur.getRating(); if (curRating > 0){ | public void redoRatings(){ try{ Vector result = pedfile.check(); for (int i = 0; i < table.getRowCount(); i++){ MarkerResult cur = (MarkerResult)result.get(i); if (cur.getRating() > 0){ table.setValueAt(new Boolean(true),i,STATUS_COL); ... |
for(int i=0;i<extraInds.size();i++){ this.chromosomes.add(extraInds.elementAt(i)); if(((Chromosome)this.chromosomes.lastElement()).isHaploid()){ | if(extraInds != null){ for(int i=0;i<extraInds.size();i++){ | EM(Vector chromosomes, int numTrios, Vector extraInds){ //we need to add extra copies of haploid chromosomes so we add a second copy this.chromosomes = new Vector(); for(int i=0;i<extraInds.size();i++){ this.chromosomes.add(extraInds.elementAt(i)); if(((Chromosome)this.chr... |
if(((Chromosome)this.chromosomes.lastElement()).isHaploid()){ this.chromosomes.add(extraInds.elementAt(i)); } | EM(Vector chromosomes, int numTrios, Vector extraInds){ //we need to add extra copies of haploid chromosomes so we add a second copy this.chromosomes = new Vector(); for(int i=0;i<extraInds.size();i++){ this.chromosomes.add(extraInds.elementAt(i)); if(((Chromosome)this.chr... | |
Process proc = Runtime.getRuntime().exec(commandLine.toString()); JDialog d = new JDialog(architectFrame, "Power*Loader Engine"); d.setContentPane(new EngineExecPanel(commandLine.toString(), proc)); | final Process proc = Runtime.getRuntime().exec(commandLine.toString()); final JDialog d = new JDialog(architectFrame, "Power*Loader Engine"); EngineExecPanel eep = new EngineExecPanel(commandLine.toString(), proc); d.setContentPane(eep); JButton abortButton = new JButton(eep.getAbortAction()); JButton closeButton = ... | public synchronized void setupDialog() { if (d != null) return; d = new JDialog(ArchitectFrame.getMainInstance(), "Export ETL Transactions to PL Repository"); // set export defaults if necessary if (plexp.getFolderName() == null || plexp.getFolderName().trim().length() == 0) { plexp.setFolderName(PLUtils.to... |
Process proc = Runtime.getRuntime().exec(commandLine.toString()); JDialog d = new JDialog(architectFrame, "Power*Loader Engine"); d.setContentPane(new EngineExecPanel(commandLine.toString(), proc)); | final Process proc = Runtime.getRuntime().exec(commandLine.toString()); final JDialog d = new JDialog(architectFrame, "Power*Loader Engine"); EngineExecPanel eep = new EngineExecPanel(commandLine.toString(), proc); d.setContentPane(eep); JButton abortButton = new JButton(eep.getAbortAction()); JButton closeButton = ... | public void actionPerformed(ActionEvent evt) { plPanel.applyChanges(); if (plexp.getPlDBCS() == null) { JOptionPane.showMessageDialog(plPanel, "You have to select a target database from the list.", "Error", JOptionPane.ERROR_MESSAGE); return; } if (plexp.getPlUsername().trim().length() == ... |
plPanel.discardChanges(); d.setVisible(false); } | d.setVisible(false); } | public void actionPerformed(ActionEvent evt) { plPanel.discardChanges(); d.setVisible(false); } |
a1 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos1]; a2 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos2]; b1 = ((Chromosome) chromosomes.elementAt(++i)).genotypes[pos1]; b2 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos2]; if (a1 == 0 || a2 == 0 || b1 == 0 || b2 == 0){ } else if (((a1 >= 5 ... | if(!((Chromosome)chromosomes.elementAt(i)).isHaploid()){ a1 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos1]; a2 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos2]; b1 = ((Chromosome) chromosomes.elementAt(++i)).genotypes[pos1]; b2 = ((Chromosome) chromosomes.elementAt(i)).genotypes[pos2]; if (a1 == 0... | public PairwiseLinkage computeDPrime(int pos1, int pos2){ int doublehet = 0; int[][] twoMarkerHaplos = new int[3][3]; for (int i = 0; i < twoMarkerHaplos.length; i++){ for (int j = 0; j < twoMarkerHaplos[i].length; j++){ twoMarkerHaplos[i][j] = 0; } }... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.