rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
System.out.println("Usage: Jelly scriptFile [outputFile]"); | System.out.println("Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]"); | public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); // later we m... |
jelly.setScript(args[0]); final XMLOutput output = (args.length > 1) ? XMLOutput.createXMLOutput(new FileWriter(args[1])) : XMLOutput.createXMLOutput(System.out); | jelly.setScript(scriptFile); | public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); // later we m... |
context.setVariable("commandLine", cmdLine); | public static void main(String[] args) throws Exception { try { if (args.length <= 0) { System.out.println("Usage: Jelly scriptFile [outputFile]"); return; } Jelly jelly = new Jelly(); jelly.setScript(args[0]); // later we m... | |
setModified(true); | public void componentMoveEnd(PlayPenComponentEvent e) { // TODO Auto-generated method stub } | |
setModified(false); | public void load(InputStream in) throws IOException, ArchitectException { dbcsIdMap = new HashMap(); objectIdMap = new HashMap(); // use digester to read from file try { setupDigester().parse(in); } catch (SAXException ex) { logger.error("SAX Exception in config file parse!", ex); throw new ArchitectExcep... | |
SQLDatabase mydb = new SQLDatabase(db.getDataSource()); Connection con = mydb.getConnection(); Statement stmt = con.createStatement(); try { stmt.executeUpdate("DROP TABLE REGRESSION_TEST1"); stmt.executeUpdate("DROP TABLE REGRESSION_TEST2"); } catch (SQLException sqle ){ System.out.println("+++ TestSQLDatabase excep... | protected void setUp() throws Exception { super.setUp(); SQLDatabase mydb = new SQLDatabase(db.getDataSource()); Connection con = mydb.getConnection(); /* * Setting up a clean db for each of the tests */ Statement stmt = con.createStatement(); try { stmt.executeUpdate("DROP TABLE REGRESSION_TEST1"); ... | |
orderings.add(OrderedProperty.get(prop, null)); | orderings.add(OrderedProperty.get(prop, Direction.ASCENDING)); | protected QueryExecutor<UserAddress> addressExecutor() throws Exception { Storage<UserAddress> addressStorage = mRepository.storageFor(UserAddress.class); QueryExecutor<UserAddress> addressExecutor = new ScanQueryExecutor<UserAddress>(addressStorage.query()); addressExecutor = new Fi... |
assertEquals("address.country", userExecutor.getOrdering().get(0).toString()); | assertEquals("+address.country", userExecutor.getOrdering().get(0).toString()); | public void testJoin() throws Exception { QueryExecutor<UserAddress> addressExecutor = addressExecutor(); QueryExecutor<UserInfo> userExecutor = new JoinedQueryExecutor<UserAddress, UserInfo> (mRepository, UserInfo.class, "address", addressExecutor); assertEquals("address.state = ?",... |
assertEquals("address.neighbor.country", userExecutor.getOrdering().get(0).toString()); | assertEquals("+address.neighbor.country", userExecutor.getOrdering().get(0).toString()); | public void testJoin() throws Exception { QueryExecutor<UserAddress> addressExecutor = addressExecutor(); QueryExecutor<UserInfo> userExecutor = new JoinedQueryExecutor<UserAddress, UserInfo> (mRepository, UserInfo.class, "address", addressExecutor); assertEquals("address.state = ?",... |
public void run(Context context, XMLOutput output) throws Exception { if ( value != null ) { String text = value.evaluateAsString( context ); if ( text != null ) { output.write( text ); } } } | public void run(JellyContext context, XMLOutput output) throws Exception { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { output.write(text); } } } | public void run(Context context, XMLOutput output) throws Exception { if ( value != null ) { String text = value.evaluateAsString( context ); if ( text != null ) { output.write( text ); } } } |
ham.setCountsOrRatios(SHOW_COUNTS); | ham.setCountsOrRatios(SHOW_HAP_COUNTS); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if(command.equals("Show CC counts")) { HaplotypeAssociationModel ham = (HaplotypeAssociationModel)jtt.getTree().getModel(); ham.setCountsOrRatios(SHOW_COUNTS); jtt.repaint(); } ... |
else if (command.equals("Show CC ratios")) { | else if (command.equals("Show CC frequencies")) { | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if(command.equals("Show CC counts")) { HaplotypeAssociationModel ham = (HaplotypeAssociationModel)jtt.getTree().getModel(); ham.setCountsOrRatios(SHOW_COUNTS); jtt.repaint(); } ... |
ham.setCountsOrRatios(SHOW_RATIOS); | ham.setCountsOrRatios(SHOW_HAP_RATIOS); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if(command.equals("Show CC counts")) { HaplotypeAssociationModel ham = (HaplotypeAssociationModel)jtt.getTree().getModel(); ham.setCountsOrRatios(SHOW_COUNTS); jtt.repaint(); } ... |
saveDprimeWriter.write(i + "\t" + j + "\t" + dPrimeTable[i][j] + "\t" + dist + "\n"); | saveDprimeWriter.write((i+1) + "\t" + (j+1) + "\t" + dPrimeTable[i][j] + "\t" + dist + "\n"); | public void saveDprimeToText(String[][] dPrimeTable, File dumpDprimeFile, boolean info, Vector markerinfo) throws IOException{ FileWriter saveDprimeWriter = new FileWriter(dumpDprimeFile); if (info){ saveDprimeWriter.write("L1\tL2\tD'\tLOD\tr^2\tCIlow\tCIhi\tDist\n"); long dist; for (int i = 0; i ... |
saveDprimeWriter.write(i + "\t" + j + "\t" + dPrimeTable[i][j] + "\n"); | saveDprimeWriter.write((i+1) + "\t" + (j+1) + "\t" + dPrimeTable[i][j] + "\n"); | public void saveDprimeToText(String[][] dPrimeTable, File dumpDprimeFile, boolean info, Vector markerinfo) throws IOException{ FileWriter saveDprimeWriter = new FileWriter(dumpDprimeFile); if (info){ saveDprimeWriter.write("L1\tL2\tD'\tLOD\tr^2\tCIlow\tCIhi\tDist\n"); long dist; for (int i = 0; i ... |
String[] inputs = {null,null,fullName}; | String[] inputs = {null,null,fullName,null}; | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals("Filter")){ doFilters(); }else if (command.equals("top filter")){ numResults = Integer.parseInt(topField.getText()); doTopFilter(); }else if (command.eq... |
registerTag("subscribe", SubscribeTag.class); | public JMSTagLibrary() { registerTag("connection", ConnectionTag.class); registerTag("destination", DestinationTag.class); registerTag("mapEntry", MapEntryTag.class); registerTag("mapMessage", MapMessageTag.class); registerTag("message", MessageTag.class); registerTag("obje... | |
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { connection = MessengerManager.get( name ); if ( var != null ) { context.setVariable( var, connection ); } getBody().run(context, output); } |
System.out.println(TITLE_STRING); | public HaploText(String[] args) { this.argHandler(args); if(!this.arg_batchMode.equals("")) { this.doBatch(); } if(!(this.arg_pedfile.equals("")) || !(this.arg_hapsfile.equals("")) || !(this.arg_hapmapfile.equals(""))){ if(arg_nogui){ processTextOnly(... | |
&& !outputDprime && !outputCheck) { | && !outputDprime && !outputCheck && !outputPNG && !outputSmallPNG) { | 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 = ""... |
arg_png = outputPNG; arg_smallpng = outputSmallPNG; | 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 = ""... | |
private void processFile(String fileName,int fileType,String infoFileName){ System.out.println(TITLE_STRING); | private void processFile(String fileName, int fileType, String infoFileName){ | private void processFile(String fileName,int fileType,String infoFileName){ System.out.println(TITLE_STRING); try { int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
textData.infoKnown = true; | private void processFile(String fileName,int fileType,String infoFileName){ System.out.println(TITLE_STRING); try { int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... | |
if (this.arg_png || this.arg_smallpng){ OutputFile = new File(fileName + ".LD.PNG"); if (textData.filteredDPrimeTable == null){ textData.generateDPrimeTable(); textData.guessBlocks(BLOX_CUSTOM, new Vector()); } if (this.arg_trackName != null){ textData.readAnalysisTrack(new File(arg_trackName)); } DPrimeDisplay dpd = n... | private void processFile(String fileName,int fileType,String infoFileName){ System.out.println(TITLE_STRING); try { int outputType; long maxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... | |
}else{ g.setColor(dullBlue); | public void paintComponent(Graphics graphics) { if (filteredHaplos == null){ super.paintComponent(graphics); return; } Graphics2D g = (Graphics2D) graphics; g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ... | |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { if ( trim && ! hasTrimmed ) { trimBody(); hasTrimmed = true; } if ( log.isDebugEnabled() ) { log.debug( "Running body: " + getBody() ); } getBody().run( context, output ); } |
try { | log.error( t.getMessage() ); t.printStackTrace(); try { | public static boolean initODMG( String user, String passwd, String dbName ) { getODMGImplementation(); db = odmg.newDatabase(); boolean success = false; try { log.debug( "Opening database" ); db.open( dbName + "#" + user + "#" + passwd, Database.OPEN_READ_WRITE ); log.debug( "Success!!!" ); } catch ( Ex... |
registerTag("replaceNamespace", ReplaceNamespaceTag.class); | public XMLTagLibrary() { registerTag("out", ExprTag.class); registerTag("if", IfTag.class); registerTag("forEach", ForEachTag.class); registerTag("parse", ParseTag.class); registerTag("set", SetTag.class); registerTag("transform", TransformTag.class); registerTag("pa... | |
dadTb[i] = 0; dadUb[i] = 0; | dadTb[i] = (byte)(4+dad1); dadUb[i] = (byte)(4+dad2); | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(ne... |
momTb[i] = 0; momUb[i] = 0; | momTb[i] = (byte)(4+mom1); momUb[i] = (byte)(4+mom2); | public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(ne... |
getBody().run( context, output); | invokeBody( output); | public void doTag(final XMLOutput output) throws Exception { getGoal(getName()).addPreActionCallback( new PreActionCallback() { public void firePreAction(Goal goal) throws Exception { // lets run the body log.debug( "Running pre action: ... |
getBody().run( context, output); | invokeBody( output); | public void firePreAction(Goal goal) throws Exception { // lets run the body log.debug( "Running pre action: " + getName() ); getBody().run( context, output); } |
System.out.println("No output type specified. Default of SFS will be used"); | System.out.println("No output type specified. Default of Gabriel will be used"); | 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 = ""... |
exportMenuItems[2].setEnabled(true); | public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ... | |
if (format == PNG_MODE){ | if (format == PNG_MODE || format == COMPRESSED_PNG_MODE){ | void export(int tabNum, int format, int start, int stop){ fc.setSelectedFile(new File("")); if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION){ File outfile = fc.getSelectedFile(); if (format == PNG_MODE){ BufferedImage image; if (tabNum == ... |
image = dPrimeDisplay.export(start, stop); | if (format == PNG_MODE){ image = dPrimeDisplay.export(start, stop, false); }else{ image = dPrimeDisplay.export(start, stop, true); } | void export(int tabNum, int format, int start, int stop){ fc.setSelectedFile(new File("")); if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION){ File outfile = fc.getSelectedFile(); if (format == PNG_MODE){ BufferedImage image; if (tabNum == ... |
exportMenuItems[2].setEnabled(true); | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file ("" if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eithe... | |
exportMenuItems[2].setEnabled(true); | public void actionPerformed(ActionEvent evt){ if (theData.finished){ timer.stop(); for (int i = 0; i < blockMenuItems.length; i++){ blockMenuItems[i].setEnabled(true); } ... | |
return genotypes[i]; | return genotypes[realIndex[i]]; | public byte elementAt(int i){ return genotypes[i]; } |
public int size(){ return genotypes.length; | public static int size(){ return realIndex.length; | public int size(){ return genotypes.length; } |
private void deleteReplica(S replica) throws PersistException { | void deleteReplica(Storable replica) throws PersistException { | private void deleteReplica(S replica) throws PersistException { // Disable replication to prevent trigger from being invoked by // deleting replica. setReplicationDisabled(true); try { replica.tryDelete(); } finally { setReplicationDisabled(false); } ... |
replica.tryDelete(); | replica.delete(); | private void deleteReplica(S replica) throws PersistException { // Disable replication to prevent trigger from being invoked by // deleting replica. setReplicationDisabled(true); try { replica.tryDelete(); } finally { setReplicationDisabled(false); } ... |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { if ( select != null ) { Iterator iter = select.selectNodes(null).iterator(); while ( iter.hasNext() ) { Object value = iter.next(); if (var != null) { context.setVaria... |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { for ( int i = 0, size = whenTags.length; i < size; i++ ) { TagScript script = whenTags[i]; script.run( context, output ); WhenTag tag = (WhenTag) script.getTag(); if ( tag.getValue() ) { ... |
int index = attribute.indexOf('.'); | final int index = attribute.indexOf(COMPOSITE_ATTR_SEPARATOR); | private String getAttributeType(ServerConnection connection, ObjectAttributeInfo[] objAttributes, String attribute, ObjectName objectName){ String itemName = null; int index = attribute.indexOf('.'... |
} for(int i=0; i<objAttributes.length; i++){ if(objAttributes[i].getName().equals(attribute)){ if(itemName != null){ | for(int i=0; i<objAttributes.length; i++){ if(objAttributes[i].getName().equals(attribute)){ | private String getAttributeType(ServerConnection connection, ObjectAttributeInfo[] objAttributes, String attribute, ObjectName objectName){ String itemName = null; int index = attribute.indexOf('.'... |
return objAttributes[i].getType(); | private String getAttributeType(ServerConnection connection, ObjectAttributeInfo[] objAttributes, String attribute, ObjectName objectName){ String itemName = null; int index = attribute.indexOf('.'... | |
String itemName = null; int index = attribute.indexOf("."); String attributeName = attribute; if(index != -1){ attributeName = attribute.substring(0, index); itemName = attribute.substring(index + 1); | List attrList = connection.getAttributes(context.getObjectName(), new String[]{attribute}); ObjectAttribute attrValue = (ObjectAttribute)attrList.get(0); if(attrValue.getStatus() != ObjectAttribute.STATUS_NOT_FOUND){ return attrValue; | public ObjectAttribute getObjectAttribute(ServiceContext context, String attribute) throws ServiceException{ assert context.getObjectName() != null; assert context.getApplicationConfig() != null; canAccessThisMBean(context); AccessC... |
List attrList = | String attributeName = null; String itemName = null; int index = attribute.indexOf(COMPOSITE_ATTR_SEPARATOR); if(index == -1) return attrValue; itemName = attribute.substring(index + 1); attributeName = attribute.substring(0, index); attrList = | public ObjectAttribute getObjectAttribute(ServiceContext context, String attribute) throws ServiceException{ assert context.getObjectName() != null; assert context.getApplicationConfig() != null; canAccessThisMBean(context); AccessC... |
ObjectAttribute attrValue = (ObjectAttribute)attrList.get(0); if(itemName != null){ | attrValue = (ObjectAttribute)attrList.get(0); if(attrValue.getStatus() == ObjectAttribute.STATUS_OK){ | public ObjectAttribute getObjectAttribute(ServiceContext context, String attribute) throws ServiceException{ assert context.getObjectName() != null; assert context.getApplicationConfig() != null; canAccessThisMBean(context); AccessC... |
new ObjectAttributeInfo(attrInfo.getName() + "." + itemName, | new ObjectAttributeInfo( attrInfo.getName() + COMPOSITE_ATTR_SEPARATOR + itemName, | private void handleCompositeData(ServerConnection connection, ObjectName objectName, ObjectAttributeInfo attrInfo, String[] dataTypes, List attributesList){ Composit... |
int id = Integer.parseInt(let.toString()); | int id = let.getIdentifier().intValue(); | public PresentationObject getLettersHeads() { Table T = new Table(); if (letters != null && letters.size() > 0) { Iterator iter = letters.iterator(); EmailLetter let; int row = 1; //T.add(getStyleText(iwrb.getLocalizedString("from","From"),SN_TITLE),1,row); //T.add(getStyleText(iwrb.getLocalizedString("sub... |
link.addParameter(prmLetter, String.valueOf(let.toString())); | link.addParameter(prmLetter, String.valueOf(let.getIdentifier().toString())); | public PresentationObject getLettersHeads() { Table T = new Table(); if (letters != null && letters.size() > 0) { Iterator iter = letters.iterator(); EmailLetter let; int row = 1; //T.add(getStyleText(iwrb.getLocalizedString("from","From"),SN_TITLE),1,row); //T.add(getStyleText(iwrb.getLocalizedString("sub... |
int id = Integer.parseInt(tpc.toString()); | int id = tpc.getIdentifier().intValue(); | private PresentationObject getTopics() { Table T = new Table(); //T.add(getStyleText(iwrb.getLocalizedString("topic","Topic"),SN_TITLE),1,1); //T.add(getStyleText(iwrb.getLocalizedString("issue","Issue"),SN_TITLE),2,1); if (topics != null && topics.size() > 0) { Iterator iter = topics.iterator(); EmailTopic tp... |
link.addParameter(prmTopic, tpc.toString()); | link.addParameter(prmTopic, tpc.getIdentifier().toString()); | private PresentationObject getTopics() { Table T = new Table(); //T.add(getStyleText(iwrb.getLocalizedString("topic","Topic"),SN_TITLE),1,1); //T.add(getStyleText(iwrb.getLocalizedString("issue","Issue"),SN_TITLE),2,1); if (topics != null && topics.size() > 0) { Iterator iter = topics.iterator(); EmailTopic tp... |
int lid = Integer.parseInt(let.toString()); | int lid = let.getIdentifier().intValue(); | private PresentationObject getTopics() { Table T = new Table(); //T.add(getStyleText(iwrb.getLocalizedString("topic","Topic"),SN_TITLE),1,1); //T.add(getStyleText(iwrb.getLocalizedString("issue","Issue"),SN_TITLE),2,1); if (topics != null && topics.size() > 0) { Iterator iter = topics.iterator(); EmailTopic tp... |
subject.addParameter(prmLetter, String.valueOf(let.toString())); | subject.addParameter(prmLetter, let.getIdentifier().toString()); | private PresentationObject getTopics() { Table T = new Table(); //T.add(getStyleText(iwrb.getLocalizedString("topic","Topic"),SN_TITLE),1,1); //T.add(getStyleText(iwrb.getLocalizedString("issue","Issue"),SN_TITLE),2,1); if (topics != null && topics.size() > 0) { Iterator iter = topics.iterator(); EmailTopic tp... |
topic = Integer.parseInt(((EmailTopic) topics.iterator().next()).toString()); | topic =(((EmailTopic) topics.iterator().next()).getIdentifier().intValue()); | public void main(IWContext iwc) { iwb = getBundle(iwc); core = iwc.getApplication().getCoreBundle(); iwrb = getResourceBundle(iwc); Table T = new Table(); int row = 1; df = DateFormat.getDateInstance(DateFormat.LONG, iwc.getCurrentLocale()); if (iwc.isParameterSet(prmTopic)) { topic = Integer.parseInt(iwc.get... |
Chromosome.setDataChrom("none"); | private void doBatch() { Vector files; File batchFile; File dataFile; String line; StringTokenizer tok; String infoMaybe =null; files = new Vector(); if(batchFileName == null) { return; } batchFile = new File(this.batchFileName); ... | |
throw new RuntimeException("Notifications not supported"); | NotificationListener notifListener = (NotificationListener)notifications.remove(listener); NotificationFilter notifFilter = (NotificationFilter)notifFilters.remove(filter); assert notifListener != null; assert notifFilter != null; Class[] methodSignature = new Class[]{javax.management.ObjectName.class, NotificationLis... | public void removeNotificationListener(ObjectName objectName, ObjectNotificationListener listener, ObjectNotificationFilter filter, Object handback){ throw new RuntimeException("Notif... |
resultData.setOutput(result.toString()); | resultData.setOutput(result != null?result.toString():"null"); | private static OperationResultData executeMBeanOperation( ServiceContext context, ApplicationConfig appConfig, ObjectName objectName, String operationName, String[] params, String[] signature){ OperationResultData resultData = n... |
filter = Filter.filterFor(Shipment.class, "orderID > ?"); filter = filter.bind(); result = iqa.analyze(filter, null); assertTrue(result.handlesAnything()); assertTrue(result.getCompositeScore().getFilteringScore().hasRangeStart()); assertFalse(result.getCompositeScore().getFilteringScore().hasRangeEnd()); List<Propert... | public void testBasic() throws Exception { IndexedQueryAnalyzer iqa = new IndexedQueryAnalyzer(Shipment.class, IxProvider.INSTANCE); Filter<Shipment> filter = Filter.filterFor(Shipment.class, "shipmentID = ?"); filter = filter.bind(); IndexedQueryAnalyzer.Result result = iqa.analyze(filt... | |
public void doTag(XMLOutput output) throws Exception { | public void doTag(XMLOutput output) throws JellyTagException { | public void doTag(XMLOutput output) throws Exception { suite = createSuite(); TestSuite parent = (TestSuite) context.getVariable("org.apache.commons.jelly.junit.suite"); if ( parent == null ) { context.setVariable("org.apache.commons.jelly.junit.suite", suite ); ... |
if (skip == 5){ Chromosome.setDataBuild(s); } | public void parseHapMap(Vector lines, Vector hapsData) throws PedFileException { int colNum = -1; int numLines = lines.size(); if (numLines < 2){ throw new PedFileException("Hapmap data format error: empty file"); } if (hapsData != null){ String indName; ... | |
Writer writer = new FileWriter(name); | String encoding = (this.encoding != null) ? this.encoding : "UTF-8"; Writer writer = new OutputStreamWriter( new FileOutputStream( name ), encoding ); | public void doTag(final XMLOutput output) throws Exception { if ( name != null ) { Writer writer = new FileWriter(name); writeBody(writer); } else if (var != null) { StringWriter writer = new StringWriter(); writeBody(writer); context.setVa... |
if (inputOptions[1].equals("")){ | if (inputOptions[1] == null){ | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file ("" if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eithe... |
printQualified(t.getPhysicalName()); | print( DDLUtils.toQualifiedName(t.getCatalogName(),t.getSchemaName(),t.getPhysicalName()) ); | public void addColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException { Map colNameMap = new HashMap(); print("\n ALTER TABLE "); printQualified(t.getPhysicalName()); print(" ADD COLUMN "); print(columnDefinition(c,colNameMap)); endStatement(DDLStatement.StatementType.CREATE, c); } |
printQualified(r.getFkTable().getPhysicalName()); | print( DDLUtils.toQualifiedName(r.getFkTable().getCatalogName(),r.getFkTable().getSchemaName(),r.getFkTable().getPhysicalName()) ); | public void addRelationship(SQLRelationship r) throws ArchitectDiffException { print("\n ALTER TABLE "); printQualified(r.getFkTable().getPhysicalName()); print(" ADD CONSTRAINT "); print(r.getName()); print(" FOREIGN KEY ( "); Map<String, SQLColumn> colNameMap = new HashMap<String, SQLColumn> (); boolean fi... |
printQualified(r.getPkTable().getPhysicalName()); | print( DDLUtils.toQualifiedName(r.getPkTable().getCatalogName(),r.getPkTable().getSchemaName(),r.getPkTable().getPhysicalName()) ); | public void addRelationship(SQLRelationship r) throws ArchitectDiffException { print("\n ALTER TABLE "); printQualified(r.getFkTable().getPhysicalName()); print(" ADD CONSTRAINT "); print(r.getName()); print(" FOREIGN KEY ( "); Map<String, SQLColumn> colNameMap = new HashMap<String, SQLColumn> (); boolean fi... |
printQualified(t.getPhysicalName()); | print( DDLUtils.toQualifiedName(t.getCatalogName(),t.getSchemaName(),t.getPhysicalName()) ); | public void dropColumn(SQLColumn c, SQLTable t) throws ArchitectDiffException { Map colNameMap = new HashMap(); print("\n ALTER TABLE "); printQualified(t.getPhysicalName()); print(" DROP COLUMN "); print(getPhysicalName(colNameMap,c)); endStatement(DDLStatement.StatementType.DROP, c); } |
printQualified(r.getFkTable().getPhysicalName()); | print( DDLUtils.toQualifiedName(r.getFkTable().getCatalogName(),r.getFkTable().getSchemaName(),r.getFkTable().getPhysicalName()) ); | public void dropRelationship(SQLRelationship r) { print("\n ALTER TABLE "); printQualified(r.getFkTable().getPhysicalName()); print(" DROP CONSTRAINT "); print(r.getName()); endStatement(DDLStatement.StatementType.DROP, r); } |
printQualified(rel.getFkTable().getPhysicalName()); | print( DDLUtils.toQualifiedName(rel.getFkTable().getCatalogName(),rel.getFkTable().getSchemaName(),rel.getFkTable().getPhysicalName()) ); | protected void writeExportedRelationships(SQLTable t) throws ArchitectException { Iterator it = t.getExportedKeys().iterator(); while (it.hasNext()) { SQLRelationship rel = (SQLRelationship) it.next(); // geneate a physical name for this relationship getPhysicalName(topLevelNames,rel); // println(""); p... |
printQualified(rel.getPkTable().getPhysicalName()); | print( DDLUtils.toQualifiedName(rel.getPkTable().getCatalogName(),rel.getPkTable().getSchemaName(),rel.getPkTable().getPhysicalName()) ); | protected void writeExportedRelationships(SQLTable t) throws ArchitectException { Iterator it = t.getExportedKeys().iterator(); while (it.hasNext()) { SQLRelationship rel = (SQLRelationship) it.next(); // geneate a physical name for this relationship getPhysicalName(topLevelNames,rel); // println(""); p... |
printQualified(t.getPhysicalName()); | print( DDLUtils.toQualifiedName(t.getCatalogName(),t.getSchemaName(),t.getPhysicalName()) ); | protected void writePrimaryKey(SQLTable t) throws ArchitectException { boolean firstCol = true; Iterator it = t.getColumns().iterator(); while (it.hasNext()) { SQLColumn col = (SQLColumn) it.next(); if (col.getPrimaryKeySeq() == null) break; if (firstCol) { // generate a unique primary key name ... |
printQualified(t.getPhysicalName()); | print( DDLUtils.toQualifiedName(t.getCatalogName(),t.getSchemaName(),t.getPhysicalName()) ); | public void writeTable(SQLTable t) throws SQLException, ArchitectException { Map colNameMap = new HashMap(); // for detecting duplicate column names // generate a new physical name if necessary getPhysicalName(topLevelNames,t); // also adds generated physical name to the map print("\nCREATE TABLE "); printQualif... |
public boolean evaluateAsBoolean(Context context) { | public boolean evaluateAsBoolean(JellyContext context) { | public boolean evaluateAsBoolean(Context context) { Object value = evaluate(context); if ( value instanceof Boolean ) { Boolean b = (Boolean) value; return b.booleanValue(); } else if ( value instanceof String ) { return Boolean.getBoolean( (String) value... |
public Iterator evaluateAsIterator(Context context) { | public Iterator evaluateAsIterator(JellyContext context) { | public Iterator evaluateAsIterator(Context context) { Object value = evaluate(context); if ( value == null ) { return EMPTY_ITERATOR; } else if ( value instanceof Iterator ) { return (Iterator) value; } else if ( value instanceof List ) { ... |
public String evaluateAsString(Context context) { | public String evaluateAsString(JellyContext context) { | public String evaluateAsString(Context context) { Object value = evaluate(context); if ( value != null ) { return value.toString(); } return null; } |
if ( project == null ) { | if ( project == null && context != null ) { | public Project getProject() { if ( project == null ) { // we may be invoked inside a child script, so lets try find the parent project project = (Project) context.findVariable( "org.apache.commons.jelly.werkz.Project" ); if ( project == null ) { project = new Project(); ... |
System.out.println(col.getName()+ " Unknown DataType:(" + | logger.debug(col.getName()+ " Unknown DataType:(" + | 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... |
suite.addTestSuite(TestTablePane.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(... | |
g2.setStroke(oldStroke); | public void paint(Graphics g, JComponent c) { logger.debug("BasicRelationshipUI is painting"); Relationship r = (Relationship) c; Graphics2D g2 = (Graphics2D) g; g2.translate(c.getX() * -1, c.getY() * -1); // playpen coordinate space try { Point pktloc = r.getPkConnectionPoint(); Point start = new Point(pk... | |
RelationshipUI ui = (RelationshipUI) BasicRelationshipUI.createUI(this); | RelationshipUI ui = (RelationshipUI) IERelationshipUI.createUI(this); | public void updateUI() { RelationshipUI ui = (RelationshipUI) BasicRelationshipUI.createUI(this); ui.installUI(this); setUI(ui); revalidate(); } |
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(nf.format(Float.parseFloat(st.nextToken()))); | d = 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("... |
if (logger.isDebugEnabled()) { logger.debug("TablePane got object changed event." + " Source="+e.getSource()+" Property="+e.getPropertyName()+ " oldVal="+e.getOldValue()+" newVal="+e.getNewValue()); } | public void dbObjectChanged(SQLObjectEvent e) { firePropertyChange("model."+e.getPropertyName(), null, null); //repaint(); } | |
logger.debug("TablePane got db structure change event. source="+e.getSource()); | public void dbStructureChanged(SQLObjectEvent e) { if (e.getSource() == model.getColumnsFolder()) { int numCols = e.getChildren().length; columnSelection = new ArrayList<Boolean>(numCols); for (int i = 0; i < numCols; i++) { columnSelection.add(Boolean.FALSE); } columnHighlight = new ArrayList<Color>(num... | |
messages[1] = new JLabel(cr.toConflictTree()); | JTextArea conflictsPane = new JTextArea(cr.toConflictTree()); conflictsPane.setRows(15); conflictsPane.setEditable(false); messages[1] = new JScrollPane(conflictsPane); | private void runFinished() { if (!SwingUtilities.isEventDispatchThread()) { logger.error("runFinished is running on the wrong thread!"); } if (errorMessage != null) { JOptionPane.showMessageDialog(parentDialog, errorMessage, "Error", JOptionPane.ERROR_MESSAGE); } else if (!cr.isEmpty()) { Object[] me... |
"-ha <hapsfile> specify an input file in .haps format\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 = ""... | |
"-d outputs dprime to <inputfile>.DPRIME\n" + " note: -d defaults to no blocks output. use -o to also output blocks\n" + | "-d outputs dprime to <inputfile>.DPRIME\n" + "-c outputs marker checks to <inputfile>.CHECK\n" + " note: -d and -c default to no blocks output. use -o to also output blocks\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 = ""... |
else if(args[i].equals("-ha")) { | else if(args[i].equals("-ha") || args[i].equals("-l")) { | 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 ) { | if( outputType == -1 && ( !pedFileName.equals("") || !hapsFileName.equals("") || !batchMode.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 = ""... |
arg_check = 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 = ""... | |
textData.linkageToChrom(inputFile, 3, arg_skipCheck); | result = textData.linkageToChrom(inputFile, 3, arg_skipCheck); | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
textData.linkageToChrom(inputFile,4,arg_skipCheck); } String name = fileName; String baseName = fileName.substring(0,name.length()-5); | result = textData.linkageToChrom(inputFile,4,arg_skipCheck); } | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
else { File maybeInfo = new File(baseName + ".info"); if (maybeInfo.exists()){ textData.prepareMarkerInput(maybeInfo,maxDistance,null); if(!arg_quiet){ System.out.println("Using marker file " + maybeInfo.getName()); } textData.infoKnown = true; } } | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... | |
"Name\t\tObsHET\tPredHET\tHWpval\t%Geno\tFamTrio\tMendErr"); | "Name\tObsHET\tPredHET\tHWpval\t%Geno\tFamTrio\tMendErr"); | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... |
if(this.arg_check && result != null){ OutputFile = new File (fileName + ".CHECK"); FileWriter saveCheckWriter = new FileWriter(OutputFile); saveCheckWriter.write("Name\tObsHET\tPredHET\tHWpval\t%Geno\tFamTrio\tMendErr\n"); for(int i=0;i<result.size();i++){ MarkerResult currentResult = (MarkerResult)result.get(i); saveC... | private void processFile(String fileName,int fileType,String infoFileName){ try { int outputType; long maxDistance; long negMaxDistance; HaploData textData; File OutputFile; File inputFile; inputFile = new File(fileName); ... | |
typeMap.put(new Integer(Types.VARBINARY), new GenericTypeDescriptor("LONG RAW", Types.VARBINARY, 2000000000L, null, null, DatabaseMetaData.columnNullable, true, false)); | typeMap.put(new Integer(Types.LONGVARCHAR), new GenericTypeDescriptor("LONG", Types.LONGVARCHAR, 2000000000L, null, null, DatabaseMetaData.columnNullable, true, false)); typeMap.put(new Integer(Types.VARBINARY), new GenericTypeDescriptor("LONG RAW", Types.VARBINARY, 2000000000L, null, null, DatabaseMetaData.columnNulla... | protected void createTypeMap() throws SQLException { typeMap = new HashMap(); typeMap.put(new Integer(Types.BIGINT), new GenericTypeDescriptor("NUMBER", Types.BIGINT, 38, null, null, DatabaseMetaData.columnNullable, true, false)); typeMap.put(new Integer(Types.BINARY), new GenericTypeDescriptor("RAW", Types.BINAR... |
if (connection != null) return; connection = (Connection) dbConnections.get(connectionSpec); if (connection != null) return; | public synchronized void connect() throws ArchitectException { if (connection != null) return; connection = (Connection) dbConnections.get(connectionSpec); if (connection != null) return; try { Class.forName(connectionSpec.getDriverClass()); logger.info("Driver Class "+connectionSpec.getDriverClass()+" loaded ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.