- /**
- * Check commandline for any das server definitions or any fetchfrom switches
- *
- * @return vector of DAS source nicknames to retrieve from
- */
- private static Vector<String> checkDasArguments(ArgsParser aparser)
- {
- Vector<String> 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;
- 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<String>();
- }
- source.addElement(nickname);
- }
- System.out.println("CMD [-dasserver " + data
- + "] executed successfully!");
- } // 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<String>();
- }
- source.addElement(data);
- }
- return source;
- }
-
- /**
- * start a feature fetcher for every alignment frame
- *
- * @param dasSources
- */
- private FeatureFetcher startFeatureFetching(
- final Vector<String> 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;
- }
-