コード例 #1
0
  private void initialize() {
    try {
      dataSetManager = new DataSetManager();
      dataSetManager.addDataSetFactory(
          new LuceneDataSetFactory<Object, Object, Object>(
              dataSetManager,
              null,
              new FileUtils(),
              new NullCytoscapeUtils<Object, Object, Object>(),
              null),
          Collections.emptyMap());
      data = dataSetManager.open(DirectorySettings.getGeneManiaDirectory());

      human = getHumanOrganism(data);
      networkUtils = new NetworkUtils();

      cache =
          new DataCache(
              new SynchronizedObjectCache(
                  new MemObjectCache(data.getObjectCache(NullProgressReporter.instance(), false))));
      mania = new Mania2(cache);
      setGeneLimit(DEFAULT_GENE_LIMIT);
      setCombiningMethod(DEFAULT_COMBINING_METHOD);
      setNetworks(new HashSet<String>(Arrays.asList(DEFAULT_NETWORKS)));
    } catch (Exception e) {
      LOG.error(e);
    }
  }
コード例 #2
0
 static DataSetManager createDataSetManager() {
   DataSetManager dataSetManager = new DataSetManager();
   dataSetManager.addDataSetFactory(
       new LuceneDataSetFactory<Object, Object, Object>(
           dataSetManager,
           null,
           new FileUtils(),
           new NullCytoscapeUtils<Object, Object, Object>(),
           null),
       Collections.emptyMap());
   return dataSetManager;
 }