Codota Logo
ExperimentListGeneratorDao.getSession
Code IndexAdd Codota to your IDE (free)

How to use
getSession
method
in
uk.ac.ebi.intact.application.dataConversion.dao.ExperimentListGeneratorDao

Best Java code snippets using uk.ac.ebi.intact.application.dataConversion.dao.ExperimentListGeneratorDao.getSession (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Query to obtain annotated objects by searching for an Annotation with the cvTopic label provided
 */
public static <T extends AnnotatedObjectImpl> List<T> getContainingAnnotation( Class<T> annObject, String cvshortLabel,
                                        String shortLabelLike ) {
  return getSession().createCriteria( annObject.getClass() )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Query to obtain annotated objects by searching for an Annotation with the cvTopic label provided
 */
public static <T extends AnnotatedObjectImpl> List<T> getContainingAnnotation( Class<T> annObject, String cvshortLabel,
                                        String shortLabelLike ) {
  return getSession().createCriteria( annObject.getClass() )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Query to obtain annotated objects by searching for an Annotation with the cvTopic label provided
 */
public static <T extends AnnotatedObjectImpl> List<T> getContainingAnnotation( Class<T> annObject, String cvshortLabel,
                                        String shortLabelLike ) {
  return getSession().createCriteria( annObject.getClass() )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Query to get at the Experiment ACs containing negative interaction annotations
 */
public static List<Experiment> getExpWithInteractionsContainingAnnotation( String cvshortLabel, String shortLabelLike ) {
  return getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "interactions" )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Query to get at the Experiment ACs containing negative interaction annotations
 */
public static List<Experiment> getExpWithInteractionsContainingAnnotation( String cvshortLabel, String shortLabelLike ) {
  return getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "interactions" )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Query to get at the Experiment ACs containing negative interaction annotations
 */
public static List<Experiment> getExpWithInteractionsContainingAnnotation( String cvshortLabel, String shortLabelLike ) {
  return getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createCriteria( "interactions" )
      .createCriteria( "annotations" )
      .createCriteria( "cvTopic" )
      .add( Restrictions.eq( "shortLabel", cvshortLabel ) ).list();
}
origin: uk.ac.ebi.intact.app/data-conversion

public static Map<String, List<String>> getExperimentAcAndTaxids( String shortLabelLike ) {
  List<Object[]> expsAndTaxidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.TARGET_SPECIES ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, List<String>> expAndTaxid = new HashMap<String, List<String>>();
  for ( Object[] expAndTaxidResult : expsAndTaxidResults ) {
    String expAc = (String) expAndTaxidResult[ 0 ];
    String taxId = (String) expAndTaxidResult[ 1 ];
    if ( expAndTaxid.containsKey( expAc ) ) {
      expAndTaxid.get( expAc ).add( taxId );
    } else {
      List<String> taxIds = new ArrayList<String>();
      taxIds.add( taxId );
      expAndTaxid.put( expAc, taxIds );
    }
  }
  return expAndTaxid;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static Map<String, List<String>> getExperimentAcAndTaxids( String shortLabelLike ) {
  List<Object[]> expsAndTaxidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.TARGET_SPECIES ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, List<String>> expAndTaxid = new HashMap<String, List<String>>();
  for ( Object[] expAndTaxidResult : expsAndTaxidResults ) {
    String expAc = (String) expAndTaxidResult[ 0 ];
    String taxId = (String) expAndTaxidResult[ 1 ];
    if ( expAndTaxid.containsKey( expAc ) ) {
      expAndTaxid.get( expAc ).add( taxId );
    } else {
      List<String> taxIds = new ArrayList<String>();
      taxIds.add( taxId );
      expAndTaxid.put( expAc, taxIds );
    }
  }
  return expAndTaxid;
}
origin: uk.ac.ebi.intact.util/data-conversion

public static Map<String, List<String>> getExperimentAcAndTaxids( String shortLabelLike ) {
  List<Object[]> expsAndTaxidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.TARGET_SPECIES ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, List<String>> expAndTaxid = new HashMap<String, List<String>>();
  for ( Object[] expAndTaxidResult : expsAndTaxidResults ) {
    String expAc = (String) expAndTaxidResult[ 0 ];
    String taxId = (String) expAndTaxidResult[ 1 ];
    if ( expAndTaxid.containsKey( expAc ) ) {
      expAndTaxid.get( expAc ).add( taxId );
    } else {
      List<String> taxIds = new ArrayList<String>();
      taxIds.add( taxId );
      expAndTaxid.put( expAc, taxIds );
    }
  }
  return expAndTaxid;
}
origin: uk.ac.ebi.intact.app/data-conversion

public static Map<String, String> getExperimentAcAndPmid( String shortLabelLike ) {
  List<Object[]> expsAndPmidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvDatabase", "cvDb" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvDb.shortLabel", CvDatabase.PUBMED ) )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.PRIMARY_REFERENCE ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, String> expAndPmids = new HashMap<String, String>();
  for ( Object[] expAndPmid : expsAndPmidResults ) {
    String pmid = (String) expAndPmid[ 1 ];
    if ( pmid != null ) {
      expAndPmids.put( (String) expAndPmid[ 0 ], pmid );
    }
  }
  return expAndPmids;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static Map<String, String> getExperimentAcAndPmid( String shortLabelLike ) {
  List<Object[]> expsAndPmidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvDatabase", "cvDb" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvDb.shortLabel", CvDatabase.PUBMED ) )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.PRIMARY_REFERENCE ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, String> expAndPmids = new HashMap<String, String>();
  for ( Object[] expAndPmid : expsAndPmidResults ) {
    String pmid = (String) expAndPmid[ 1 ];
    if ( pmid != null ) {
      expAndPmids.put( (String) expAndPmid[ 0 ], pmid );
    }
  }
  return expAndPmids;
}
origin: uk.ac.ebi.intact.util/data-conversion

public static Map<String, String> getExperimentAcAndPmid( String shortLabelLike ) {
  List<Object[]> expsAndPmidResults = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "xrefs", "xref" )
      .createAlias( "xref.cvDatabase", "cvDb" )
      .createAlias( "xref.cvXrefQualifier", "cvXrefQual" )
      .add( Restrictions.eq( "cvDb.shortLabel", CvDatabase.PUBMED ) )
      .add( Restrictions.eq( "cvXrefQual.shortLabel", CvXrefQualifier.PRIMARY_REFERENCE ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "xref.primaryId" ) ) ).list();
  Map<String, String> expAndPmids = new HashMap<String, String>();
  for ( Object[] expAndPmid : expsAndPmidResults ) {
    String pmid = (String) expAndPmid[ 1 ];
    if ( pmid != null ) {
      expAndPmids.put( (String) expAndPmid[ 0 ], pmid );
    }
  }
  return expAndPmids;
}
origin: uk.ac.ebi.intact.util/data-conversion

public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) {
  List<Object[]> allExps = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "shortLabel" ) ) ).list();
  Map<String, String> filteredExpsMap = new HashMap<String, String>();
  for ( Object[] exp : allExps ) {
    filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] );
  }
  Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike );
  for ( String expWithPmid : expsAndPmid.keySet() ) {
    filteredExpsMap.remove( expWithPmid );
  }
  return filteredExpsMap;
}
origin: uk.ac.ebi.intact.util/data-conversion

List<Object[]> expWithDataset = getSession().createCriteria( Experiment.class )
    .add( Restrictions.like( "shortLabel", shortLabelLike ) )
    .createAlias( "annotations", "annot" )
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) {
  List<Object[]> allExps = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "shortLabel" ) ) ).list();
  Map<String, String> filteredExpsMap = new HashMap<String, String>();
  for ( Object[] exp : allExps ) {
    filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] );
  }
  Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike );
  for ( String expWithPmid : expsAndPmid.keySet() ) {
    filteredExpsMap.remove( expWithPmid );
  }
  return filteredExpsMap;
}
origin: uk.ac.ebi.intact.util/data-conversion

public static Map<String, Integer> countInteractionCountsForExperiments( String shortLabelLike ) {
  List<Object[]> expWithInteractionsCount = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "interactions", "int" )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.count( "int.ac" ) )
          .add( Projections.groupProperty( "ac" ) ) ).list();
  Map<String, Integer> interactionCountByExpAc = new HashMap<String, Integer>();
  for ( Object[] expAndIntCount : expWithInteractionsCount ) {
    interactionCountByExpAc.put( (String) expAndIntCount[ 0 ], (Integer) expAndIntCount[ 1 ] );
  }
  return interactionCountByExpAc;
}
origin: uk.ac.ebi.intact.app/data-conversion

public static Map<String, String> getExperimentAcAndLabelWithoutPubmedId( String shortLabelLike ) {
  List<Object[]> allExps = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.property( "shortLabel" ) ) ).list();
  Map<String, String> filteredExpsMap = new HashMap<String, String>();
  for ( Object[] exp : allExps ) {
    filteredExpsMap.put( (String) exp[ 0 ], (String) exp[ 1 ] );
  }
  Map<String, String> expsAndPmid = getExperimentAcAndPmid( shortLabelLike );
  for ( String expWithPmid : expsAndPmid.keySet() ) {
    filteredExpsMap.remove( expWithPmid );
  }
  return filteredExpsMap;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

List<Object[]> expWithDataset = getSession().createCriteria( Experiment.class )
    .add( Restrictions.like( "shortLabel", shortLabelLike ) )
    .createAlias( "annotations", "annot" )
origin: uk.ac.ebi.intact.app/data-conversion

public static Map<String, Integer> countInteractionCountsForExperiments( String shortLabelLike ) {
  List<Object[]> expWithInteractionsCount = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "interactions", "int" )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.count( "int.ac" ) )
          .add( Projections.groupProperty( "ac" ) ) ).list();
  Map<String, Integer> interactionCountByExpAc = new HashMap<String, Integer>();
  for ( Object[] expAndIntCount : expWithInteractionsCount ) {
    interactionCountByExpAc.put( (String) expAndIntCount[ 0 ], (Integer) expAndIntCount[ 1 ] );
  }
  return interactionCountByExpAc;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static Map<String, Integer> countInteractionCountsForExperiments( String shortLabelLike ) {
  List<Object[]> expWithInteractionsCount = getSession().createCriteria( Experiment.class )
      .add( Restrictions.like( "shortLabel", shortLabelLike ) )
      .createAlias( "interactions", "int" )
      .setProjection( Projections.projectionList()
          .add( Projections.distinct( Projections.property( "ac" ) ) )
          .add( Projections.count( "int.ac" ) )
          .add( Projections.groupProperty( "ac" ) ) ).list();
  Map<String, Integer> interactionCountByExpAc = new HashMap<String, Integer>();
  for ( Object[] expAndIntCount : expWithInteractionsCount ) {
    interactionCountByExpAc.put( (String) expAndIntCount[ 0 ], (Integer) expAndIntCount[ 1 ] );
  }
  return interactionCountByExpAc;
}
uk.ac.ebi.intact.application.dataConversion.daoExperimentListGeneratorDaogetSession

Popular methods of ExperimentListGeneratorDao

  • countInteractionCountsForExperiments
  • datasetForExperiments
    Retreives experiment ahving assiciated dataset annotation.
  • getContainingAnnotation
    Query to obtain annotated objects by searching for an Annotation with the cvTopic label provided
  • getExpWithInteractionsContainingAnnotation
    Query to get at the Experiment ACs containing negative interaction annotations
  • getExperimentAcAndLabelWithoutPubmedId
  • getExperimentAcAndPmid
  • getExperimentAcAndTaxids

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JButton (javax.swing)
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