- if (success && groovyscript.equals("STDIN"))
- {
- // delete temp file that we made - but only if it was successfully
- // executed
- tfile.delete();
- }
- }
-
- /**
- * Check commandline for any das server definitions or any fetchfrom switches
- *
- * @return vector of DAS source nicknames to retrieve from
- */
- private static Vector checkDasArguments(ArgsParser aparser)
- {
- Vector source = null;
- String data;
- String locsources = Cache.getProperty(Cache.DAS_LOCAL_SOURCE);
- while ((data = aparser.getValue("dasserver", true)) != null)
- {
- String nickname = null;
- String url = null;
- boolean seq = false, feat = true;
- int pos = data.indexOf('=');
- // determine capabilities
- if (pos > 0)
- {
- nickname = data.substring(0, pos);
- }
- url = data.substring(pos + 1);
- if (url != null
- && (url.startsWith("http:") || url
- .startsWith("sequence:http:")))
- {
- if (nickname == null)
- {
- nickname = url;
- }
- if (locsources == null)
- {
- locsources = "";
- }
- else
- {
- locsources += "\t";
- }
- locsources = locsources + nickname + "|" + url;
- System.err
- .println("NOTE! dasserver parameter not yet really supported (got args of "
- + nickname + "|" + url);
- if (source == null)
- {
- source = new Vector();
- }
- source.addElement(nickname);
- }
- } // loop until no more server entries are found.
- if (locsources != null && locsources.indexOf('|') > -1)
- {
- Cache.log.debug("Setting local source list in properties file to:\n"
- + locsources);
- Cache.setProperty(Cache.DAS_LOCAL_SOURCE, locsources);
- }
- while ((data = aparser.getValue("fetchfrom", true)) != null)
- {
- System.out.println("adding source '" + data + "'");
- if (source == null)
- {
- source = new Vector();
- }
- source.addElement(data);
- }
- return source;
- }
-
- /**
- * start a feature fetcher for every alignment frame
- *
- * @param dasSources
- */
- private static FeatureFetcher startFeatureFetching(final Vector dasSources)
- {
- FeatureFetcher ff = new FeatureFetcher();
- AlignFrame afs[] = Desktop.getAlignframes();
- if (afs == null || afs.length == 0)
- {
- return null;
- }
- for (int i = 0; i < afs.length; i++)
- {
- ff.addFetcher(afs[i], dasSources);
- }
- return ff;
- }
-}
-
-/**
- * Notes: this argParser does not distinguish between parameter switches,
- * parameter values and argument text. If an argument happens to be identical to
- * a parameter, it will be taken as such (even though it didn't have a '-'
- * prefixing it).
- *
- * @author Andrew Waterhouse and JBP documented.
- *
- */
-
-class rnabuttonlistener implements ActionListener
-{
- public void actionPerformed(ActionEvent arg0)
- {
- System.out.println("Good idea ! ");
-
- }
-}
-
-class pbuttonlistener implements ActionListener
-{
- public void actionPerformed(ActionEvent arg0)
- {
-