本文整理了Java中uk.ac.ebi.intact.model.Interaction.getXrefs()
方法的一些代码示例,展示了Interaction.getXrefs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interaction.getXrefs()
方法的具体详情如下:
包路径:uk.ac.ebi.intact.model.Interaction
类名称:Interaction
方法名:getXrefs
暂无
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core
/**
* Retreives Imex identifier stored in the Xrefs.
*
* @param interaction the interaction to search on.
* @return an imex id or null if not found.
*/
public static String getImexIdentifier(Interaction interaction) {
if (interaction == null) {
throw new IllegalArgumentException("You must give a non null interaction");
}
for (InteractorXref xref : interaction.getXrefs()) {
if (CvDatabase.IMEX_MI_REF.equals(xref.getCvDatabase().getIdentifier())) {
return xref.getPrimaryId();
}
}
// Could not find an IMEx id
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.core/intact-core-readonly
/**
* Retreives Imex identifier stored in the Xrefs.
*
* @param interaction the interaction to search on.
* @return an imex id or null if not found.
*/
public static String getImexIdentifier(Interaction interaction) {
if (interaction == null) {
throw new IllegalArgumentException("You must give a non null interaction");
}
for (InteractorXref xref : interaction.getXrefs()) {
if (CvDatabase.IMEX_MI_REF.equals(xref.getCvDatabase().getIdentifier())) {
return xref.getPrimaryId();
}
}
// Could not find an IMEx id
return null;
}
代码示例来源:origin: uk.ac.ebi.intact/intact-core
/**
* Retreives Imex identifier stored in the Xrefs.
*
* @param interaction the interaction to search on.
* @return an imex id or null if not found.
*/
public static String getImexIdentifier( Interaction interaction ) {
if ( interaction == null ) {
throw new IllegalArgumentException( "You must give a non null interaction" );
}
for ( InteractorXref xref : interaction.getXrefs() ) {
CvObjectXref idCvDatabase = CvObjectUtils.getPsiMiIdentityXref( xref.getCvDatabase() );
if ( idCvDatabase.getPrimaryId().equals( CvDatabase.IMEX_MI_REF ) ) {
return xref.getPrimaryId();
}
}
// Could not find an IMEx id
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext(); ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext(); ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.util/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext(); ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-solr-core
/****************************/
// enrich fields in the SolrDocument passed as parameter
public void enrich (
Interaction interaction,
SolrInputDocument solrDocument )
throws Exception {
// check parameters and information
if ( interaction == null ) { return ; }
// Enrich interaction type
enrichInteractionType(interaction.getCvInteractionType(), solrDocument) ;
// Enrich Complex Organism fields
enrichOrganism(interaction, solrDocument) ;
// Enrich Complex Xref fields
enrichInteractionXref(interaction.getXrefs(), solrDocument) ;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters
protected Xref getImexXref(Interaction interaction) {
Collection<? extends Xref> refs;
if (isCheckInitializedCollections()){
refs = IntactCore.ensureInitializedXrefs(interaction);
}
else {
refs = interaction.getXrefs();
}
for (Xref xref : refs) {
if (CvDatabase.IMEX_MI_REF.equals(xref.getCvDatabase().getIdentifier())
&& xref.getCvXrefQualifier() != null
&& CvXrefQualifier.IMEX_PRIMARY_MI_REF.equals(xref.getCvXrefQualifier().getIdentifier())) {
return xref;
}
}
return null;
}
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-converters
protected void fixSourceReferenceXrefsIfNecessary(Interaction interaction) {
InteractorXref xrefToFix = null;
if( ConverterContext.getInstance().isAutoFixInteractionSourceReference() ) {
// Look up source reference xref and only try to fix identity if there is no source ref present.
// if the qualifier is identity, we will check if the owner identity MI is the same as the database MI
for (InteractorXref xref : interaction.getXrefs()) {
if (xref.getCvXrefQualifier() != null &&
getInstitutionPrimaryId() != null &&
getInstitutionPrimaryId().equals( xref.getPrimaryId() ) &&
!CvXrefQualifier.SOURCE_REFERENCE_MI_REF.equals(xref.getCvXrefQualifier().getIdentifier())) {
xrefToFix = xref;
break;
}
}
if ( xrefToFix != null ) {
log.warn("Interaction identity xref found pointing to the source database. It should be of type 'source-reference'. Will be fixed automatically: "+xrefToFix);
CvXrefQualifier sourceReference = CvObjectUtils.createCvObject(interaction.getOwner(), CvXrefQualifier.class, CvXrefQualifier.SOURCE_REFERENCE_MI_REF, CvXrefQualifier.SOURCE_REFERENCE);
xrefToFix.setCvXrefQualifier(sourceReference);
addMessageToContext(MessageLevel.WARN, "Interaction identity xref found pointing to the source database. It should be of type 'source-reference'. Fixed.", true);
}
}
}
代码示例来源:origin: uk.ac.ebi.intact/intact-ebi-search-engine-export
boolean hasXrefs = !interaction.getXrefs().isEmpty();
boolean hasLinks = !interaction.getComponents().isEmpty();
for ( Xref xref : interaction.getXrefs() ) {
String db = xref.getCvDatabase().getShortLabel();
String id = xref.getPrimaryId();
代码示例来源:origin: uk.ac.ebi.intact.app/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext() && imexId == null; ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.util/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext() && imexId == null; ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion
for ( Iterator iterator = interaction.getXrefs().iterator(); iterator.hasNext() && imexId == null; ) {
Xref xref = (Xref) iterator.next();
代码示例来源:origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psimitab-converters
Collection<InteractorXref> interactionRefs = interaction.getXrefs();
内容来源于网络,如有侵权,请联系作者删除!