public SearchableDao getDao() { if (searchableDao == null) { searchableDao = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getSearchableDao(); } return searchableDao; }
public Collection<String> getNucleicAcidMIs() { final CvObjectDao<CvInteractorType> itdao = IntactContext.getCurrentInstance().getDataContext() .getDaoFactory().getCvObjectDao( CvInteractorType.class); // 1. load the root term CvInteractorType root = itdao.getByPsiMiRef( CvInteractorType.NUCLEIC_ACID_MI_REF ); Collection<String> collectedMIs = new ArrayList<String>( ); if( root != null ) { // 2. traverse children and collect their MIs CvObjectUtils.getChildrenMIs( root, collectedMIs ); } return collectedMIs; }
public GeneratedEntry addInteractorWithUniprotId(String uniprotId) { List<ProteinImpl> interactors = intactContext.getDataContext().getDaoFactory() .getProteinDao().getByUniprotId(uniprotId); if (interactors.isEmpty()) { throw new IntactException("No interactors found with uniprot ID: " + uniprotId); } for (Interactor interactor : interactors) { addInteractor(interactor); } return this; }
public GeneratedEntry addInteractorWithUniprotId(String uniprotId) { List<ProteinImpl> interactors = intactContext.getDataContext().getDaoFactory() .getProteinDao().getByUniprotId(uniprotId); if (interactors.isEmpty()) { throw new IntactException("No interactors found with uniprot ID: " + uniprotId); } for (Interactor interactor : interactors) { addInteractor(interactor); } return this; }
public Collection<String> getNucleicAcidMIs() { final CvObjectDao<CvInteractorType> itdao = IntactContext.getCurrentInstance().getDataContext() .getDaoFactory().getCvObjectDao( CvInteractorType.class); // 1. load the root term CvInteractorType root = itdao.getByPsiMiRef( CvInteractorType.NUCLEIC_ACID_MI_REF ); Collection<String> collectedMIs = new ArrayList<String>( ); if( root != null ) { // 2. traverse children and collect their MIs CvObjectUtils.getChildrenMIs( root, collectedMIs ); } return collectedMIs; }
public GeneratedEntry addPublicationId(String pubId) { Publication publication = intactContext.getDataContext().getDaoFactory() .getPublicationDao().getByShortLabel(pubId); addPublication(publication); return this; }
public GeneratedEntry addPublicationWithAc(String pubAc) { Publication publication = intactContext.getDataContext().getDaoFactory() .getPublicationDao().getByAc(pubAc); addPublication(publication); return this; }
public GeneratedEntry addPublicationWithAc(String pubAc) { Publication publication = intactContext.getDataContext().getDaoFactory() .getPublicationDao().getByAc(pubAc); addPublication(publication); return this; }
public GeneratedEntry addPublicationId(String pubId) { Publication publication = intactContext.getDataContext().getDaoFactory() .getPublicationDao().getByShortLabel(pubId); addPublication(publication); return this; }
private Collection<ComponentConfidence> synchronizeComponentConfidences( Collection<ComponentConfidence> confidencesToSynchronize, Component parentComponent ) { List<ComponentConfidence> confidences = new ArrayList<ComponentConfidence>(confidencesToSynchronize.size()); for ( ComponentConfidence confidence : confidencesToSynchronize ) { if (confidence.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().isTransient(confidence)) { confidence = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().getByAc(confidence.getAc()); } confidence.setCvConfidenceType( synchronize (confidence.getCvConfidenceType())); confidence.setComponent(parentComponent); confidences.add(confidence); } return confidences; }
private Collection<ComponentConfidence> synchronizeComponentConfidences( Collection<ComponentConfidence> confidencesToSynchronize, Component parentComponent ) { List<ComponentConfidence> confidences = new ArrayList<ComponentConfidence>(confidencesToSynchronize.size()); for ( ComponentConfidence confidence : confidencesToSynchronize ) { if (confidence.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().isTransient(confidence)) { confidence = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentConfidenceDao().getByAc(confidence.getAc()); } confidence.setCvConfidenceType( synchronize (confidence.getCvConfidenceType())); confidence.setComponent(parentComponent); confidences.add(confidence); } return confidences; }
public GeneratedEntry addInteractionWithAc(String ac) { Interaction interaction = intactContext.getDataContext().getDaoFactory() .getInteractionDao().getByAc(ac); checkResult(interaction, ac, "interaction"); return addInteraction(interaction); }
public GeneratedEntry addExperimentWithShortLabel(String shortLabel) { Experiment experiment = intactContext.getDataContext().getDaoFactory() .getExperimentDao().getByShortLabel(shortLabel); checkResult(experiment, shortLabel, "experiment"); return addExperiment(experiment); }
public GeneratedEntry addExperimentWithAc(String ac) { Experiment experiment = intactContext.getDataContext().getDaoFactory() .getExperimentDao().getByAc(ac); checkResult(experiment, ac, "experiment"); return addExperiment(experiment); }
public GeneratedEntry addInteractorWithAc(String ac) { Interactor interactor = intactContext.getDataContext().getDaoFactory() .getInteractorDao().getByAc(ac); checkResult(interactor, ac, "interactor"); return addInteractor(interactor); }
public GeneratedEntry addInteractionWithShortLabel(String shortLabel) { Interaction interaction = intactContext.getDataContext().getDaoFactory() .getInteractionDao().getByShortLabel(shortLabel); checkResult(interaction, shortLabel, "interaction"); return addInteraction(interaction); }
public GeneratedEntry addInteractionWithAc(String ac) { Interaction interaction = intactContext.getDataContext().getDaoFactory() .getInteractionDao().getByAc(ac); checkResult(interaction, ac, "interaction"); return addInteraction(interaction); }
public GeneratedEntry addInteractionWithShortLabel(String shortLabel) { Interaction interaction = intactContext.getDataContext().getDaoFactory() .getInteractionDao().getByShortLabel(shortLabel); checkResult(interaction, shortLabel, "interaction"); return addInteraction(interaction); }
public GeneratedEntry addInteractorWithShortLabel(String shortLabel) { Interactor interactor = intactContext.getDataContext().getDaoFactory() .getInteractorDao().getByShortLabel(shortLabel); checkResult(interactor, shortLabel, "interactor"); return addInteractor(interactor); }
private Alias synchronizeAlias( Alias alias, AnnotatedObject parent ) { if (alias.getAc() != null) { return IntactContext.getCurrentInstance().getDataContext().getDaoFactory() .getAliasDao().getByAc(alias.getAc()); } alias.setCvAliasType( synchronize( alias.getCvAliasType() ) ); alias.setParent(parent); if (alias.getAc() == null && parent.getAc() != null) { annotatedObjectsToPersist.put(keyBuilder.keyForAlias(alias), alias); } return alias; }