rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
schemaLabel.setText("");
public void cleanup() throws ArchitectException { logger.debug("SCHEMA POPULATOR IS ABOUT TO CLEAN UP..."); SQLCatalog populatedCat = (SQLCatalog) catalogDropdown .getSelectedItem(); if (populatedCat.isSchemaContainer()) { for (SQLObject item : (List<SQLObject>) populatedCat .getChildren()) {...
schemaLabel.setText(((SQLSchema)(populatedCat.getChild(0))).getNativeTerm());
public void cleanup() throws ArchitectException { logger.debug("SCHEMA POPULATOR IS ABOUT TO CLEAN UP..."); SQLCatalog populatedCat = (SQLCatalog) catalogDropdown .getSelectedItem(); if (populatedCat.isSchemaContainer()) { for (SQLObject item : (List<SQLObject>) populatedCat .getChildren()) {...
builder.append("Catalog"); builder.append("Schema");
builder.append(catalogLabel = new JLabel("Catalog")); builder.append(schemaLabel = new JLabel("Schema"));
private void buildPartialUI(DefaultFormBuilder builder, boolean defaultPlayPen) { String prefix; if (defaultPlayPen == true) { prefix = "source"; } else { prefix = "target"; } CellConstraints cc = new CellConstraints(); ArchitectFrame af = ArchitectFrame.getMainInstance(); SwingUIProject projec...
registerTag("if", IfTag.class);
public XMLTagLibrary() { registerTag("out", ExprTag.class); registerTag("forEach", ForEachTag.class); registerTag("parse", ParseTag.class); registerTag("set", SetTag.class); // extensions to JSTL registerTag("expr", ExprTag.class); }
String attributeValue) {
String attributeValue) throws JellyException {
public Expression createExpression( ExpressionFactory factory, String tagName, String attributeName, String attributeValue) { if (attributeName.equals("select")) { return new XPathExpression(attributeValue); } // will use the default expression instead ...
if (attributeName.equals("select")) { return new XPathExpression(attributeValue);
if (attributeName.equals("select")) { log.info( "Parsing XPath expression: " + attributeValue ); try { XPath xpath = new Dom4jXPath(attributeValue); return new XPathExpression(xpath); } catch (JaxenException e) { throw new JellyException( "Could not parse XPath expression: \"" + attributeValue + "\" reason: " + e, e )...
public Expression createExpression( ExpressionFactory factory, String tagName, String attributeName, String attributeValue) { if (attributeName.equals("select")) { return new XPathExpression(attributeValue); } // will use the default expression instead ...
String id = MailMatchingUtils.getMailIdHeader(message); try { mailProcessingRecord.setByteReceivedTotal(message.getSize()); mailProcessingRecord.setMailId(id); mailProcessingRecord.setSubject(message.getSubject()); mailProcessingRecord.setTimeFetchEnd(System.currentTimeMillis()); } catch (MessagingException e) { log...
String id = MailMatchingUtils.getMailIdHeader(message); try { mailProcessingRecord.setByteReceivedTotal(message.getSize());
public void handle() throws Exception { MailProcessingRecord mailProcessingRecord = prepareRecord(); MimeMessage message = loadMessage(); // do we _really_ have to handle this? if (!MailMatchingUtils.isMatchCandidate(message)) return; String id = MailMatchingUtils.getMailIdHeader(message);...
dismissMessage();
mailProcessingRecord.setMailId(id); mailProcessingRecord.setSubject(message.getSubject()); mailProcessingRecord.setTimeFetchEnd(System.currentTimeMillis()); } catch (MessagingException e) { log.info(queue + ": failed to process mail. remains on server"); return; } finally { MailProcessingRecord matchedAndMergedRecord...
public void handle() throws Exception { MailProcessingRecord mailProcessingRecord = prepareRecord(); MimeMessage message = loadMessage(); // do we _really_ have to handle this? if (!MailMatchingUtils.isMatchCandidate(message)) return; String id = MailMatchingUtils.getMailIdHeader(message);...
odmg = OJB.getInstance(); db = odmg.newDatabase(); try { db.open( "repository.xml", Database.OPEN_READ_WRITE ); } catch ( ODMGException e ) { db = null; }
PhotovaultSettings.setConfiguration( "pv_test" ); String sqldbName = PhotovaultSettings.getConfProperty( "dbname" ); ODMG.initODMG("harri", "r1t1rat1", sqldbName); odmg = ODMG.getODMGImplementation(); db = ODMG.getODMGDatabase();
public void setUp() { odmg = OJB.getInstance(); db = odmg.newDatabase(); try { db.open( "repository.xml", Database.OPEN_READ_WRITE ); } catch ( ODMGException e ) { // log.warn( "Could not open database: " + e.getMessage() ); db = null; }// tx = odmg.newTransaction();// tx.begin(); }
String body = getBodyText(); setBeanProperties(); if ( parentObject != null ) { IntrospectionHelper ih = IntrospectionHelper.getHelper( parentObject.getClass() ); try { ih.storeElement( project, parentObject, nested, tagName );
else { StaticTag tag = new StaticTag("", tagName, tagName); tag.setParent( getParent() ); tag.setBody( getBody() ); tag.setContext(context); for (Iterator iter = getAttributes().entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Object value = ...
public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); Object parentObject = null; // must be a datatype. TaskSource ancestor = (TaskSource) findAncestorWithClass( TaskSource.class ); if ( ancestor != null ) ...
catch (Exception e) { }
tag.doTag(output);
public void doTag(XMLOutput output) throws Exception { Project project = getAntProject(); String tagName = getTagName(); Object parentObject = null; // must be a datatype. TaskSource ancestor = (TaskSource) findAncestorWithClass( TaskSource.class ); if ( ancestor != null ) ...
public int getAvgLength() {
public double getAvgLength() {
public int getAvgLength() { return avgLength; }
public void setAvgLength(int avgLength) {
public void setAvgLength(double avgLength) {
public void setAvgLength(int avgLength) { this.avgLength = avgLength; }
for (int j = 0; j < theBlock.length-1; j++){
for (int j = 0; j < theBlock.length; j++){
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 < 12){boxSize=1...
g.drawLine (left + (2*theBlock[j]+1) * boxSize/2,
g.drawLine (left + (2*theBlock[j]) * boxSize/2 - boxRadius,
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 < 12){boxSize=1...
left + (2*theBlock[j]+1) * boxSize/2 +boxRadius,
left + (2*theBlock[j]) * boxSize/2,
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 < 12){boxSize=1...
JellyContext ctx = new JellyContext();
JellyContext ctx = new JellyServletContext(getServletContext());
protected JellyContext createContext( HttpServletRequest req, HttpServletResponse res) { JellyContext ctx = new JellyContext(); ctx.setVariable(REQUEST, req); ctx.setVariable(RESPONSE, res); return ctx; }
URL template = getTemplate(req);
protected void doRequest(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { JellyContext context = createContext(req, res); URL template = getTemplate(req); try { runScript(template, context, req, res); } catch (Exception e) { error(req, res, e); } }
runScript(template, context, req, res);
URL script = getScript(req); runScript(script, context, req, res);
protected void doRequest(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { JellyContext context = createContext(req, res); URL template = getTemplate(req); try { runScript(template, context, req, res); } catch (Exception e) { error(req, res, e); } }
html.append("<h2>JellyServlet : Error processing the template</h2>");
html.append("<h2>JellyServlet : Error processing the script</h2>");
protected void error( HttpServletRequest request, HttpServletResponse response, Exception cause) throws ServletException, IOException { StringBuffer html = new StringBuffer(); html.append("<html>"); html.append("<title>Error</title>"); html.append("<body bgcolor=\"#ffffff\">"); html.append("<h2>JellyServle...
String[] oldCommands = new String[consoleHistory .getHistoryList().size()]; consoleHistory.getHistoryList().toArray(oldCommands); consoleReader.addCompletor(new SimpleCompletor(oldCommands));
ArrayList oldCommandsAsList = useHistoryCompletor ? new ArrayList(consoleHistory.getHistoryList()) : new ArrayList(0); if (completor != null && !completor.isEmpty()) { oldCommandsAsList.addAll(completor); } String[] oldCommands = new String[oldCommandsAsList.size()]; oldCommandsAsList.toArray(oldCommands); consoleRead...
public void doTag(XMLOutput output) { if (question != null) { if (defaultInput != null) { System.out.println(question + " [" + defaultInput + "]"); } else { System.out.println(question); } // The prompt should be just before the user's...
JButton okButton = new JButton(okAction);
JDefaultButton okButton = new JDefaultButton(okAction);
public void actionPerformed(ActionEvent evt) { // This is one of the few JDIalogs that can not get replaced // with a call to ArchitectPanelBuilder, because an About // box must have only ONE button... final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "About the Power*Architect"); JPanel c...
fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.PROPERTY_CHANGE_GROUP_START,"Starting new compound edit event in table edit panel"));
public TableEditPanel(SQLTable t) { super(new FormLayout()); addUndoEventListener(ArchitectFrame.getMainInstance().getProject().getUndoManager().getEventAdapter()); add(new JLabel("Table Name")); add(name = new JTextField("", 30)); add(new JLabel("Primary Key Name")); add(pkName = new JTextField("", 30)); add(n...
fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.PROPERTY_CHANGE_GROUP_START,"Starting new compound edit event in table edit panel"));
public boolean applyChanges() { table.setPrimaryKeyName(pkName.getText()); table.setName(name.getText()); table.setRemarks(remarks.getText()); fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.PROPERTY_CHANGE_GROUP_END,"Ending new compound edit event in table edit panel")); return true; }
fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.PROPERTY_CHANGE_GROUP_END,"Ending new compound edit event in table edit panel"));
public void discardChanges() { fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.PROPERTY_CHANGE_GROUP_END,"Ending new compound edit event in table edit panel")); }
getBody().run( context, output);
invokeBody( output);
public void doTag(final XMLOutput output) throws Exception { getGoal(getName()).addPostGoalCallback( new PostGoalCallback() { public void firePostGoal(Goal goal) throws Exception { // lets run the body log.info( "Running post goal: " + g...
getBody().run( context, output);
invokeBody( output);
public void firePostGoal(Goal goal) throws Exception { // lets run the body log.info( "Running post goal: " + getName() ); getBody().run( context, output); }
ConnectorConfigRegistry.init(); ConnectorRegistry.load();
try{ ConnectorConfigRegistry.init(); }catch(Exception e){ logger.log(Level.SEVERE, "Error initializing connector config registry.", e); } try{ ConnectorRegistry.load(); }catch(Exception e){ logger.log(Level.SEVERE, "Error initializing connector registry.", e); }
public static void main(String[] args) throws Exception{ Runtime.getRuntime().addShutdownHook(new Thread(){ public void run(){ logger.info("jManage shutting down..."); DBUtils.shutdownDB(); } }); if (System.getSecurityManager() == null) { ...
if(infoFileName == null && hapmapFileName == null) { die("A marker info file must be specified when using -doTagging");
if(infoFileName == null && hapmapFileName == null && batchFileName == null) { die("A marker info file must be specified when tagging.");
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
die("-tagrSqCutoff, -excludeTags, -excludeTagsFile, -includeTags and -includeTagsFile cannot be used without -doTagging");
die("-tagrSqCutoff, -excludeTags, -excludeTagsFile, -includeTags and -includeTagsFile cannot be used without a tagging option");
private void argHandler(String[] args){ argHandlerMessages = new Vector(); int maxDistance = -1; //this means that user didn't specify any output type if it doesn't get changed below blockOutputType = -1; double hapThresh = -1; double minimumMAF=-1; double spacingThr...
if(logger.isLoggable(Level.FINE)) logger.fine("acl not configured:" + aclName);
public static boolean canAccess(ServiceContext context, String aclName, String targetName){ ACL acl = ACLStore.getInstance().getACL(aclName); if(acl == null){ /* if acl is not specified, user has access by default */ ...
final StatusComponent statusComponent = new StatusComponent("Test");
final StatusComponent statusComponent = new StatusComponent();
public static void main(String[] args) { final JFrame jx = new JFrame("Test"); jx.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final StatusComponent statusComponent = new StatusComponent("Test"); statusComponent.setText("Unknown error"); statusComponent.setResult(status); ...
public StatusComponent(String text) { super(text); setIcon(StatusIcon.getNullIcon());
public StatusComponent() { this("");
public StatusComponent(String text) { super(text); setIcon(StatusIcon.getNullIcon()); }
Stylesheet stylesheet = tag.getStylesheet();
Stylesheet stylesheet = tag.getStylesheet(); XMLOutput oldOutput = tag.getStylesheetOutput(); tag.setStylesheetOutput(output);
public void doTag(XMLOutput output) throws Exception { StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); if (tag == null) { throw new JellyException( "<applyTemplates> tag must be inside a <stylesheet> tag" ); } Styles...
tag.setStylesheetOutput(oldOutput);
public void doTag(XMLOutput output) throws Exception { StylesheetTag tag = (StylesheetTag) findAncestorWithClass( StylesheetTag.class ); if (tag == null) { throw new JellyException( "<applyTemplates> tag must be inside a <stylesheet> tag" ); } Styles...
String attributeName = list.getLocalName(i);
protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new Stati...
attributeValue, getExpressionFactory() ); script.addAttribute(attributeName, expression);
attributeValue, getExpressionFactory() ); String attrQName = list.getQName(i); script.addAttribute(attrQName, expression);
protected TagScript createStaticTag( final String namespaceURI, final String localName, final String qName, Attributes list) throws SAXException { try { StaticTag tag = new StaticTag( namespaceURI, localName, qName ); StaticTagScript script = new Stati...
taggedSoFar = countTagged;
public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagByVarSeq = new Hashtable(); PotentialTagComparator ptcomp = new Potential...
taggedSoFar = countTagged;
public Vector findTags() { tags = new Vector(); untagged = new Vector(); taggedSoFar = 0; //potentialTagsHash stores the PotentialTag objects keyed on the corresponding sequences Hashtable potentialTagByVarSeq = new Hashtable(); PotentialTagComparator ptcomp = new Potential...
uitr.remove();
uitr.remove(); taggedSoFar++;
private void peelBack(Vector tagsToBePeeled){ Hashtable blockTagsByAllele = new Hashtable(); HashSet snpsInBlockTags = new HashSet(); debugPrint("starting peelback. untagged.size() = " + untagged.size()); Vector availTagSNPs = new Vector(); for (int j = 0; j < tags.size(); j++){ ...
if ( target == null ) { throw new JellyTagException( "Either a 'var' or a 'target' attribute must be defined for this tag" ); } if ( property == null ) { throw new JellyTagException( "You must define a 'property' attribute if you specify a 'target'" ); }
public void doTag(XMLOutput output) throws JellyTagException { Object answer = null; if ( value != null ) { answer = value.evaluate(context); } else { answer = getBodyText(isEncode()); } if ( var != null ) { if ( scope != null ) { ...
attributes.put(name, expression);
attributes.put(name, new ExpressionAttribute(name,expression));
public void addAttribute(String name, Expression expression) { if (log.isDebugEnabled()) { log.debug("adding attribute name: " + name + " expression: " + expression); } attributes.put(name, expression); }
Expression expression = (Expression) entry.getValue();
Expression expression = ((ExpressionAttribute) entry.getValue()).exp;
public void run(JellyContext context, XMLOutput output) throws JellyTagException { URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try { Tag tag = getTag(context); if ( tag == null ) { return; } tag.setCont...
PrintStream demuxOut = new PrintStream(new DemuxOutputStream(antProject, false)); PrintStream demuxErr = new PrintStream(new DemuxOutputStream(antProject, true)); System.setOut( demuxOut ); System.setErr( demuxErr ); */
public void doTag(XMLOutput output) throws Exception { // force project to be lazily constructed getProject(); org.apache.tools.ant.Project antProject = AntTagLibrary.getProject( context ); // allow access to Ant methods via the project class context.setVar...
this.out = out;
this.out = out; this.debug = false;
public JellyBuildListener(XMLOutput out) { this.taskStack = new Stack(); this.out = out; }
getBody().run(context, output);
invokeBody(output);
public void doTag(XMLOutput output) throws Exception { if ((rawDataSource == null) && dataSourceSpecified) { throw new JellyException(Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, context); try { ...
logger.debug("about to show playpen tablepane popup...");
public void maybeShowPopup(MouseEvent evt) { if (evt.isPopupTrigger() && !evt.isConsumed()) { TablePane tp = (TablePane) evt.getComponent(); PlayPen pp = tp.getPlayPen(); // this allows the right-click menu to work on multiple tables simultaneously if (!tp.isSelected()) { pp.selectNone(); tp.setSelected...
try { reader = new InputStreamReader(in, encoding); } catch (UnsupportedEncodingException e) { throw new JellyTagException("unsupported encoding",e);
if (encoding != null) { try { reader = new InputStreamReader(in, encoding); } catch (UnsupportedEncodingException e) { throw new JellyTagException("unsupported encoding",e); } } else { reader = new InputStreamReader(in);
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { if (var == null) { throw new MissingAttributeException("var"); } if (file == null && uri == null) { throw new JellyTagException( "This tag must have a 'file' or 'uri' specified" ); ...
childContext.setVariable(var, childContext);
childContext.setVariable(var, message);
public void doTag(XMLOutput output) throws JellyTagException { ConsumerTag tag = (ConsumerTag) findAncestorWithClass(ConsumerTag.class); if (tag == null) { throw new JellyTagException("This tag must be nested within a ConsumerTag like the subscribe tag"); } final JellyContext childContext = context.newJell...
childContext.setVariable(var, childContext);
childContext.setVariable(var, message);
public void onMessage(Message message) { childContext.setVariable(var, childContext); try { script.run(childContext, childOutput); } catch (Exception e) { log.error("Caught exception processing message: " + message + ". Exception: " + e, e); } }
if (thisPair == null){ continue; }
Vector doMJD(){ // find blocks by searching for stretches between two markers A,B where // D prime is > 0.8 for all informative combinations of A, (A+1...B) // set coloring based on LOD and D' for (int i = 0; i < dPrime.length; i++){ for (int j = i+1; j < dPrime[i].length; j++...
if (((SNP)markerInfo.elementAt(x)).getMAF() < mafThresh){
if (Chromosome.getMarker(x).getMAF() < mafThresh){
Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double mafThresh = 0.10; double[] cutLowCIVar = {0,0,0.80,0.50,0.50}; double[] maxDist = {0,0,20000,30000,1000000}; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 0; ...
sep = ((SNP)markerInfo.elementAt(y)).getPosition() - ((SNP)markerInfo.elementAt(x)).getPosition();
sep = Chromosome.getMarker(y).getPosition() - Chromosome.getMarker(x).getPosition();
Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double mafThresh = 0.10; double[] cutLowCIVar = {0,0,0.80,0.50,0.50}; double[] maxDist = {0,0,20000,30000,1000000}; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 0; ...
double mafThresh = 0.10;
double mafThresh = 0.05;
static Vector doSFS(PairwiseLinkage[][] dPrime){ double cutHighCI = 0.98; double cutLowCI = 0.70; double mafThresh = 0.10; double[] cutLowCIVar = {0,0,0.80,0.50,0.50}; double[] maxDist = {0,0,20000,30000,1000000}; double recHighCI = 0.90; int numStrong = 0; int numRe...
validateAppName(config.getName());
validateAppName(config.getName(), null);
public static void addApplication(ApplicationConfig config) throws DuplicateApplicationNameException { synchronized(writeLock){ // validate the application name validateAppName(config.getName()); applicationConfigs.add(config); saveConfig(); } }
validateAppName(config.getName());
validateAppName(config.getName(), config.getApplicationId());
public static void updateApplication(ApplicationConfig config) throws DuplicateApplicationNameException { assert config != null: "application config is null"; synchronized(writeLock){ // validate the application name validateAppName(config.getName()); int index ...
private static void validateAppName(String appName)
private static void validateAppName(String appName, String applicationId)
private static void validateAppName(String appName) throws DuplicateApplicationNameException { for(Iterator it=getApplications().iterator(); it.hasNext(); ){ ApplicationConfig appConfig = (ApplicationConfig)it.next(); if((appConfig.getName().toUpperCase()).equals(appName.toUpperC...
if((appConfig.getName().toUpperCase()).equals(appName.toUpperCase())) {
if(!appConfig.getApplicationId().equals(applicationId) && (appConfig.getName().toUpperCase()).equals(appName.toUpperCase())) {
private static void validateAppName(String appName) throws DuplicateApplicationNameException { for(Iterator it=getApplications().iterator(); it.hasNext(); ){ ApplicationConfig appConfig = (ApplicationConfig)it.next(); if((appConfig.getName().toUpperCase()).equals(appName.toUpperC...
}
logger.debug("min:("+minx+","+miny+"),max:("+maxx+","+maxy+")"); }
public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ...
Dimension userDim = new Dimension(maxx-minx,maxy-miny); logger.debug("userDim is: " + userDim);
public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ...
if (vpSize.width > usedSpace.width ||
if (vpSize.width > usedSpace.width &&
public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ...
logger.debug("preferred size is usedSpace?: " + usedSpace);
public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ...
logger.debug("viewport size is NULL");
public Dimension getViewportSize() { Container c = SwingUtilities.getAncestorOfClass(JViewport.class, this); if (c != null) { JViewport jvp = (JViewport) c; return jvp.getSize(); } else { return null; } }
Integer suffix = (Integer) tableNames.get(key); if (suffix == null) { tableNames.put(key, new Integer(0)); } else { int newSuffix = suffix.intValue()+1; tableNames.put(key, new Integer(newSuffix));
logger.debug("before add: " + Arrays.toString(tableNames.toArray())); if (!tableNames.add(key)) { boolean done = false; int newSuffix = 0; while (!done) { newSuffix++; done = tableNames.add(key+"_"+newSuffix); }
public synchronized TablePane importTableCopy(SQLTable source, Point preferredLocation) throws ArchitectException { SQLTable newTable = SQLTable.getDerivedInstance(source, db); // adds newTable to db String key = source.getTableName().toLowerCase(); Integer suffix = (Integer) tableNames.get(key); if (suffix == nul...
logger.debug("after add: " + Arrays.toString(tableNames.toArray()));
public synchronized TablePane importTableCopy(SQLTable source, Point preferredLocation) throws ArchitectException { SQLTable newTable = SQLTable.getDerivedInstance(source, db); // adds newTable to db String key = source.getTableName().toLowerCase(); Integer suffix = (Integer) tableNames.get(key); if (suffix == nul...
tableNames = new HashMap();
tableNames = new HashSet();
public void setDatabase(SQLDatabase newdb) { if (newdb == null) throw new NullPointerException("db must be non-null"); this.db = newdb; db.setIgnoreReset(true); if (db.getConnectionSpec() == null) { DBConnectionSpec dbcs = new DBConnectionSpec(); dbcs.setName("Target Database"); dbcs.setDisplayName("Target D...
mi.setActionCommand(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN);
void setupTablePanePopup() { ArchitectFrame af = ArchitectFrame.getMainInstance(); tablePanePopup = new JPopupMenu(); JMenuItem mi; mi = new JMenuItem(); mi.setAction(af.editColumnAction); tablePanePopup.add(mi); mi = new JMenuItem(); mi.setAction(af.insertColumnAction); tablePanePopup.add(mi); tablePanePopu...
if (dbcsDialog == null) { final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "Target Database Connection"); JPanel cp = new JPanel(new BorderLayout(12,12)); cp.setBorder(BorderFactory.createEmptyBorder(12,12,12,12)); final DBCSPanel dbcsPanel = new DBCSPanel(); dbcsPanel.setDbcs(db.getConnectionSpec()); cp...
final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "Target Database Connection"); JPanel cp = new JPanel(new BorderLayout(12,12)); cp.setBorder(BorderFactory.createEmptyBorder(12,12,12,12)); final DBCSPanel dbcsPanel = new DBCSPanel(); dbcsPanel.setDbcs(db.getConnectionSpec()); cp.add(dbcsPanel, BorderLayo...
public void showDbcsDialog() { if (dbcsDialog == null) { final JDialog d = new JDialog(ArchitectFrame.getMainInstance(), "Target Database Connection"); JPanel cp = new JPanel(new BorderLayout(12,12)); cp.setBorder(BorderFactory.createEmptyBorder(12,12,12,12)); final DBCSPanel dbcsPanel = new DBCSPa...
parent.populateColumns();
public void populate() throws ArchitectException { try { if (type == COLUMNS) { parent.populateColumns(); } else if (type == IMPORTED_KEYS) { parent.populateRelationships(); } else if (type == EXPORTED_KEYS) { // XXX: not implemented yet } else { throw new IllegalArgumentException("Unkno...
populate();
populateColumns();
public synchronized List getColumns() throws ArchitectException { populate(); return columnsFolder.getChildren(); }
source.populate();
source.populateColumns(); source.populateRelationships();
public static SQLTable getDerivedInstance(SQLTable source, SQLDatabase parent) throws ArchitectException { source.populate(); SQLTable t = new SQLTable(parent); t.columnsFolder.populated = true; t.importedKeysFolder.populated = true; t.exportedKeysFolder.populated = true; t.tableName = source.tableName; t.rema...
if (columnsFolder == null || importedKeysFolder == null || exportedKeysFolder == null) { return false; } else { return columnsFolder.isPopulated() && importedKeysFolder.isPopulated() && exportedKeysFolder.isPopulated(); }
return true;
public boolean isPopulated() { if (columnsFolder == null || importedKeysFolder == null || exportedKeysFolder == null) { return false; } else { return columnsFolder.isPopulated() && importedKeysFolder.isPopulated() && exportedKeysFolder.isPopulated(); } }
populateColumns(); populateRelationships();
public void populate() throws ArchitectException { populateColumns(); populateRelationships(); }
SQLRelationship.addRelationshipsToTable(this);
SQLRelationship.addImportedRelationshipsToTable(this);
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(); try { SQLRelati...
importedKeysFolder.populated = true;
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(); try { SQLRelati...
fileMenu.setMnemonic(KeyEvent.VK_F);
menuItem = new JMenuItem("Check for update"); menuItem.addActionListener(this); fileMenu.add(menuItem); fileMenu.addSeparator();
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")); ...
fileMenu.setMnemonic(KeyEvent.VK_F);
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")); ...
} else if (command.equals("Quit")){
} else if(command.equals("Check for update")) { final SwingWorker worker = new SwingWorker(){ UpdateChecker uc; public Object construct() { uc = new UpdateChecker(); uc.checkForUpdate(); return null; } public void finished() { if(uc != null) { if(uc.isNewVersionAvailable()) { UpdateDisplayDialog udp = new UpdateDisplay...
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command.equals(READ_GENOTYPES)){ ReadDataDialog readDialog = new ReadDataDialog("Open new data", this); readDialog.pack(); readDialog.setVisible(true); } else if (command.equ...
public Object construct(){ dPrimeDisplay=null; changeKey(); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); blockMenuItems[0].setSelected(true); zoomMenuItems[0].setSelected(true); theData.blocksChanged = false; Container contents = getContentPane(); contents.removeAll(); int currentTab = VIEW_D_N...
public Object construct() { uc = new UpdateChecker(); uc.checkForUpdate();
public Object construct(){ dPrimeDisplay=null; changeKey(); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first ...
JLayeredPane jlp = window.getLayeredPane(); JLabel updateLabel = new JLabel("test"); updateLabel.setBounds(100,100,200,200); updateLabel.setOpaque(true); updateLabel.setBackground(Color.red); jlp.add(updateLabel, JLayeredPane.POPUP_LAYER); window.setLayeredPane(jlp);
final JLayeredPane jlp = window.getLayeredPane(); final JPanel udp = new JPanel(); udp.setLayout(new BoxLayout(udp, BoxLayout.Y_AXIS)); double version = uc.getNewVersion(); Font detailsFont = new Font("Default", Font.BOLD, 12); JLabel announceLabel = new JLabel("A newer version of Haploview (" +version+") is available...
public static void main(String[] args) { //set defaults Options.setMissingThreshold(1.0); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); Options.setHaplotypeDisplayThreshold(1); Options.setMaxDistance(500); Options.setLDColorScheme(STD_SCHEME); ...
window.setTitle(TITLE_STRING); window.setSize(800,600);
public static void main(String[] args) { //set defaults Options.setMissingThreshold(1.0); Options.setSpacingThreshold(0.0); Options.setAssocTest(ASSOC_NONE); Options.setHaplotypeDisplayThreshold(1); Options.setMaxDistance(500); Options.setLDColorScheme(STD_SCHEME); ...
assert getName() != null;
public boolean execute() { try { CommandHandler handler = CommandHandlerFactory.getHandler(getName()); return handler.execute(new HandlerContext(this)); } catch (InvalidCommandException e) { throw new RuntimeException(e); } }
Document document = null; if (xml == null) { document = parseBody(output); } else { document = parse(xml); }
Document document = getXmlDocument(output);
public void doTag(XMLOutput output) throws Exception { if (getVar() == null) { throw new IllegalArgumentException("The var attribute cannot be null"); } Document document = null; if (xml == null) { document = parseBody(output); } else { docu...
registerTag("transform", TransformTag.class);
public XMLTagLibrary() { registerTag("out", ExprTag.class); registerTag("if", IfTag.class); registerTag("forEach", ForEachTag.class); registerTag("parse", ParseTag.class); registerTag("set", SetTag.class); // extensions to JSTL registerTag("expr", ExprTag.cla...
nfMarker.setGroupingUsed(false);
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); ...
for(Iterator it=application.getApplications().iterator(); it.hasNext();){ ApplicationConfig appConfig = (ApplicationConfig)it.next();
for(ApplicationConfig appConfig : application.getApplications()){
private Element createApplicationClusterElement(ApplicationConfig application){ assert application.isCluster(); Element applicationElement = createApplicationElement(application); Element childApplicationsElement = new Element(ConfigConstants.APPLICATIONS); applicationElement.addContent(...
if(!application.isCluster()){ Element dashboardsElement = createDashboardsElement(application); applicationElement.addContent(dashboardsElement); }
private Element createApplicationElement(ApplicationConfig application){ Element applicationElement = null; if(application.isCluster()){ applicationElement = new Element(ConfigConstants.APPLICATION_CLUSTER); }else{ applicationElement = new Element(ConfigConstants.APPLICATI...
public java.util.List listMissingTargetTables() { logger.error("listMissingTargetTables is not implemented"); return java.util.Collections.EMPTY_LIST;
public List listMissingTargetTables() throws SQLException, ArchitectException { List missingTables = new LinkedList(); Iterator targetTableIt = playpen.getDatabase().getTables().iterator(); while (targetTableIt.hasNext()) { SQLTable t = (SQLTable) targetTableIt.next(); String tableStatus = checkTargetTable(t); if (tabl...
public java.util.List listMissingTargetTables() { logger.error("listMissingTargetTables is not implemented"); return java.util.Collections.EMPTY_LIST; }
logger.debug("run PL LOADER Engine");
logger.debug("Running PL Engine");
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...
logger.debug("run PL LOADER Engine");
logger.debug("Running PL Engine");
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() == ...
Relationship r = new Relationship(pp, pkTable, fkTable, identifying);
SQLRelationship model = new SQLRelationship(); model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identifying); model.setPkTable(pkTable.getModel()); model.setFkTable(fkTable.getModel()); pkTable.getModel().addExportedKey(model); fkTable.getModel().addImportedKey...
protected void doCreateRelationship() { try { Relationship r = new Relationship(pp, pkTable, fkTable, identifying); pp.add(r); r.repaint(); // XXX: shouldn't be necessary, but it is. } catch (ArchitectException ex) { logger.error("Couldn't create relationship", ex); JOptionPane.showMessageDialog(pp, "Coul...
tag.setAttributeValue( getName(), getBodyText( false ) );
tag.setAttributeValue(getName(), getBodyText(false), getURI());
public void doTag(XMLOutput output) throws JellyTagException { ElementTag tag = (ElementTag) findAncestorWithClass( ElementTag.class ); if ( tag == null ) { throw new JellyTagException( "<attribute> tag must be enclosed inside an <element> tag" ); } tag.setAttributeValue( getN...
} catch (ConnectionFailedException e){
} catch (Exception e){
public boolean isQualified(ApplicationConfig applicationConfig) { ServerConnection serverConnection = null; try { serverConnection = ServerConnector.getServerConnection(applicationConfig); ObjectInfo objectInfo = serverConnection.getObjectInfo(objectName); ...
public CheckDataException(String s){ super(s);
public CheckDataException() { super();
public CheckDataException(String s){ super(s); }
super("Ok"); this.dbcsPanel = dbcsPanel; this.isNew = isNew; if (!isNew) { oldName = dbcsPanel.getDbcs().getName(); } else { oldName = null; }
this(dbcsPanel, isNew, ArchitectFrame.getMainInstance().getUserSettings().getPlDotIni());
public DBCS_OkAction(DBCSPanel dbcsPanel, boolean isNew) { super("Ok"); this.dbcsPanel = dbcsPanel; this.isNew = isNew; if (!isNew) { oldName = dbcsPanel.getDbcs().getName(); } else { oldName = null; } }
PlDotIni plDotIni = ArchitectFrame.getMainInstance().getUserSettings().getPlDotIni();
public void actionPerformed(ActionEvent e) { logger.debug("DBCS Action invoked"); ArchitectDataSource newDS = dbcsPanel.getDbcs(); String curName = null; for (Component c : ((TextPanel)dbcsPanel.getComponents()[0]).getComponents()) { if ("dbNameField".equals(c.getName())){ curName = ((JTextField) c).getText(...
null,
appForm.getURL(),
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) { ApplicationForm appForm = ...
byte a1 = currentInd.getMarkerA(i); byte a2 = currentInd.getMarkerB(i);
byte a1 = a[0]; byte a2 = a[1];
private void buildCCSet(PedFile pf, Vector affectedStatus, TreeSet snpsToBeTested){ ArrayList results = new ArrayList(); int numMarkers = Chromosome.getUnfilteredSize(); Vector indList = pf.getUnrelatedIndividuals(); int numInds = indList.size(); if(affectedStatus == null || affec...
if(usedParents.contains(mom) || usedParents.contains(dad)) {
if(currentInd.getZeroed(i) || dad.getZeroed(i) || mom.getZeroed(i)) {
private void buildParenTDTTrioSet(PedFile pf, Vector permuteInd, TreeSet snpsToBeTested) throws PedFileException{ Vector results = new Vector(); Vector indList = pf.getAllIndividuals(); if(permuteInd == null || permuteInd.size() != indList.size()) { permuteInd = new Vector(); ...
if(currentInd.getZeroed(i) || dad.getZeroed(i) || mom.getZeroed(i)) { continue; } byte kid1 = currentInd.getMarkerA(i); byte kid2 = currentInd.getMarkerB(i); byte dad1 = dad.getMarkerA(i); byte dad2 = dad.getMarkerB(i); byte mom1 = mom.getMarkerA(i); byte mom2 = mom.getMarkerB(i);
byte[] thisMarker = currentInd.getMarker(i); byte kid1 = thisMarker[0]; byte kid2 = thisMarker[1]; thisMarker = dad.getMarker(i); byte dad1 = thisMarker[0]; byte dad2 = thisMarker[1]; thisMarker = mom.getMarker(i); byte mom1 = thisMarker[0]; byte mom2 = thisMarker[1];
private void buildParenTDTTrioSet(PedFile pf, Vector permuteInd, TreeSet snpsToBeTested) throws PedFileException{ Vector results = new Vector(); Vector indList = pf.getAllIndividuals(); if(permuteInd == null || permuteInd.size() != indList.size()) { permuteInd = new Vector(); ...