Codota Logo
BioSourceDao
Code IndexAdd Codota to your IDE (free)

How to use
BioSourceDao
in
uk.ac.ebi.intact.core.persistence.dao

Best Java code snippets using uk.ac.ebi.intact.core.persistence.dao.BioSourceDao (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Prints the most counts in the database.
 * @param ps The printStream to use
 *
 * @since 1.9.0
 */
public static void printDatabaseCounts(PrintStream ps) {
  final DaoFactory daoFactory = IntactContext.getCurrentInstance().getDataContext().getDaoFactory();
  ps.println("Publications: "+ daoFactory.getPublicationDao().countAll());
  ps.println("\tXrefs: "+ daoFactory.getXrefDao(PublicationXref.class).countAll());
  ps.println("\tAliases: "+ daoFactory.getAliasDao(PublicationAlias.class).countAll());
  ps.println("Experiments: "+ daoFactory.getExperimentDao().countAll());
  ps.println("\tXrefs: "+ daoFactory.getXrefDao(ExperimentXref.class).countAll());
  ps.println("\tAliases: "+ daoFactory.getAliasDao(ExperimentAlias.class).countAll());
  ps.println("Interactors: "+ daoFactory.getInteractorDao().countAll());
  ps.println("\tInteractions: "+ daoFactory.getInteractionDao().countAll());
  ps.println("\tPolymers: " + daoFactory.getPolymerDao().countAll());
  ps.println("\t\tProteins: "+ daoFactory.getProteinDao().countAll());
  ps.println("\t\tNucleic Acids: "+ daoFactory.getInteractorDao(NucleicAcidImpl.class).countAll());
  ps.println("\tSmall molecules: " + daoFactory.getInteractorDao(SmallMoleculeImpl.class).countAll());
  ps.println("\tInteractor Xrefs: "+ daoFactory.getXrefDao(InteractorXref.class).countAll());
  ps.println("\tInteractor Aliases: "+ daoFactory.getAliasDao(InteractorAlias.class).countAll());
  ps.println("Components: "+ daoFactory.getComponentDao().countAll());
  ps.println("Features: "+ daoFactory.getFeatureDao().countAll());
  ps.println("\tRanges: "+ daoFactory.getRangeDao().countAll());
  ps.println("CvObjects: "+ daoFactory.getCvObjectDao().countAll());
  ps.println("BioSources: "+ daoFactory.getBioSourceDao().countAll());
  ps.println("Annotations: "+ daoFactory.getAnnotationDao().countAll());
  ps.println("Institutions: "+ daoFactory.getInstitutionDao().countAll());
}
origin: uk.ac.ebi.intact.dbupdate/intact-biosource-update

/**
 * Search the IntAct database and retreive a BioSource having the given taxid and no CvCellType or CvTissue.
 *
 * @param taxid a non null taxid.
 * @return a BioSource or null if none is found.
 */
private BioSource searchIntactByTaxid(String taxid) throws BioSourceServiceException {
  log.debug("Searching in the database for BioSource(" + taxid + ")");
  DataContext dataContext = IntactContext.getCurrentInstance().getDataContext();
  TransactionStatus transactionStatus = dataContext.beginTransaction();
  BioSourceDao bsDao = dataContext.getDaoFactory().getBioSourceDao();
  BioSource biosource = bsDao.getByTaxonIdUnique(taxid);
  try {
    dataContext.commitTransaction(transactionStatus);
  } catch (IntactTransactionException e) {
    throw new BioSourceServiceException("Problem committing", e);
  }
  if (log.isDebugEnabled()) {
    if (biosource == null) {
      log.debug("Could not find Biosource having taxid: " + taxid);
    } else {
      log.debug("Found 1 biosource: " + biosource.getShortLabel() + " [" + biosource.getAc() + "]");
    }
  }
  return biosource;
}
origin: uk.ac.ebi.intact.dbupdate/intact-biosource-update

sourceDao.saveOrUpdate(bioSource);
origin: uk.ac.ebi.intact.dbupdate/intact-biosource-update

final List<BioSource> bioSources = daoFactory.getBioSourceDao().getAll();
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * Prints the most counts in the database.
 * @param ps The printStream to use
 *
 * @since 1.9.0
 */
public static void printDatabaseCounts(PrintStream ps) {
  final DaoFactory daoFactory = IntactContext.getCurrentInstance().getDataContext().getDaoFactory();
  ps.println("Publications: "+ daoFactory.getPublicationDao().countAll());
  ps.println("\tXrefs: "+ daoFactory.getXrefDao(PublicationXref.class).countAll());
  ps.println("\tAliases: "+ daoFactory.getAliasDao(PublicationAlias.class).countAll());
  ps.println("Experiments: "+ daoFactory.getExperimentDao().countAll());
  ps.println("\tXrefs: "+ daoFactory.getXrefDao(ExperimentXref.class).countAll());
  ps.println("\tAliases: "+ daoFactory.getAliasDao(ExperimentAlias.class).countAll());
  ps.println("Interactors: "+ daoFactory.getInteractorDao().countAll());
  ps.println("\tInteractions: "+ daoFactory.getInteractionDao().countAll());
  ps.println("\tPolymers: " + daoFactory.getPolymerDao().countAll());
  ps.println("\t\tProteins: "+ daoFactory.getProteinDao().countAll());
  ps.println("\t\tNucleic Acids: "+ daoFactory.getInteractorDao(NucleicAcidImpl.class).countAll());
  ps.println("\tSmall molecules: " + daoFactory.getInteractorDao(SmallMoleculeImpl.class).countAll());
  ps.println("\tInteractor Xrefs: "+ daoFactory.getXrefDao(InteractorXref.class).countAll());
  ps.println("\tInteractor Aliases: "+ daoFactory.getAliasDao(InteractorAlias.class).countAll());
  ps.println("Components: "+ daoFactory.getComponentDao().countAll());
  ps.println("Features: "+ daoFactory.getFeatureDao().countAll());
  ps.println("\tRanges: "+ daoFactory.getRangeDao().countAll());
  ps.println("CvObjects: "+ daoFactory.getCvObjectDao().countAll());
  ps.println("BioSources: "+ daoFactory.getBioSourceDao().countAll());
  ps.println("Annotations: "+ daoFactory.getAnnotationDao().countAll());
  ps.println("Institutions: "+ daoFactory.getInstitutionDao().countAll());
}
uk.ac.ebi.intact.core.persistence.daoBioSourceDao

Javadoc

To access to biosources

Most used methods

  • countAll
  • getAll
  • getByTaxonIdUnique
    Searches for a BioSource having the given taxid and no CvTissue or CvCellType.
  • saveOrUpdate

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now