Tabnine Logo
ExperimentListGeneratorDao.getSession
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now