Skip to content
Snippets Groups Projects
DatabaseDocument.java 91.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • tjc's avatar
    tjc committed
    
    
      /**
       * Return true if this looks like a single schema postgres
       * database
       * @return
       */
      public boolean isSingleSchema()
      {
        return singleSchema;
      }
    
    tjc's avatar
    tjc committed
      
      /**
       * Ensure exon featurelocs are in the correct order
       */
      class LocationComarator implements Comparator
      {
    
        public int compare(Object o1, Object o2)
        {
          int loc1 = ((FeatureLoc)o1).getFmin().intValue();
          int loc2 = ((FeatureLoc)o2).getFmin().intValue();
          
          if(loc2 == loc1)
            return 0;
          int strand = ((FeatureLoc)o1).getStrand().intValue();
          
          if(strand < 0)
          {
            if(loc2 > loc1)
              return 1;
            else
              return -1;
          }
          else
          {
            if(loc2 > loc1)
              return -1;
            else
              return 1;
          }
    
    tjc's avatar
    tjc committed
        } 
      }
      
      class CvTermThread extends Thread 
      {
        private GmodDAO dao;
        CvTermThread(final GmodDAO dao) 
        {
          this.dao = dao;
        }
    
        public void run() 
        {
          getCvterms(dao);
    
    tjc's avatar
    tjc committed
        }
      }
    
    tjc's avatar
    tjc committed
    
      public void setRange(Range range)
      {
        this.range = range;
      }
    
    tjc's avatar
    tjc committed
    
    
      public Hashtable getIdFeatureStore()
      {
        return idFeatureStore;
      }
    
    
      public boolean isLazyFeatureLoad()
      {
        return lazyFeatureLoad;
      }
    
    
      public void setLazyFeatureLoad(boolean lazyFeatureLoad)
      {
        this.lazyFeatureLoad = lazyFeatureLoad;
      }
    
    tjc's avatar
    tjc committed
    
      /**
       * Set the types that define what entries are created. Each is given an
       * entry name and the features within that entry.
       * @param types
       */
      public static void setTYPES(String[][][] types)
      {
        TYPES = types;
      }
    
      /**
       * Get the types that define what entries are created.
       * @return
       */
      public static String[][][] getTYPES()
      {
        return TYPES;
      }
    
    tjc's avatar
    tjc committed
    }