public FeatureTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature type" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureType" ); } this.psiDefinition = psiDefinition; }
public FeatureDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature detection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureDetection" ); } this.psiDefinition = psiDefinition; }
public InteractionTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionType" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an InteractionType" ); } this.psiDefinition = psiDefinition; }
public FeatureTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature type" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureType" ); } this.psiDefinition = psiDefinition; }
public InteractionTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionType" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an InteractionType" ); } this.psiDefinition = psiDefinition; }
public FeatureTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature type" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureType" ); } this.psiDefinition = psiDefinition; }
public FeatureDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature detection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureDetection" ); } this.psiDefinition = psiDefinition; }
public InteractionDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a pubmed Xref, not " + psiDefinition.getDb() + " for an InteractionDetection" ); } this.psiDefinition = psiDefinition; }
public InteractionDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a pubmed Xref, not " + psiDefinition.getDb() + " for an InteractionDetection" ); } this.psiDefinition = psiDefinition; }
public ParticipantDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an participantDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an ParticipantDetection" ); } this.psiDefinition = psiDefinition; }
public ParticipantDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an participantDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an ParticipantDetection" ); } this.psiDefinition = psiDefinition; }
public ParticipantDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an participantDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an ParticipantDetection" ); } this.psiDefinition = psiDefinition; }
public FeatureDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an feature detection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for a FeatureDetection" ); } this.psiDefinition = psiDefinition; }
public InteractionDetectionTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionDetection" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a pubmed Xref, not " + psiDefinition.getDb() + " for an InteractionDetection" ); } this.psiDefinition = psiDefinition; }
public InteractionTypeTag( final XrefTag psiDefinition ) { if ( psiDefinition == null ) { throw new IllegalArgumentException( "You must give a non null psi definition for an interactionType" ); } if ( !CvDatabase.PSI_MI.equals( psiDefinition.getDb() ) ) { throw new IllegalArgumentException( "You must give a psi-mi Xref, not " + psiDefinition.getDb() + " for an InteractionType" ); } this.psiDefinition = psiDefinition; }
public ProteinInteractorTag( final XrefTag uniprotXref, final OrganismTag organism ) { if ( uniprotXref == null ) { throw new IllegalArgumentException( "You must give a non null uniprotXref for a proteinInteractor" ); } // as of june 2005 we can have proteins without UniProt Xrefs. if ( ! Constants.UNIPROT_DB_SHORTLABEL.equals( uniprotXref.getDb() ) && ! CvDatabase.UNIPROT.equals( uniprotXref.getDb() ) ) { throw new IllegalArgumentException( "You must give a uniprot Xref, not " + uniprotXref.getDb() + " for a ProteinInteractor" ); } this.organism = organism; this.primaryXref = uniprotXref; hasUniprotXref = true; }
public ProteinInteractorTag( final XrefTag uniprotXref, final OrganismTag organism ) { if ( uniprotXref == null ) { throw new IllegalArgumentException( "You must give a non null uniprotXref for a proteinInteractor" ); } // as of june 2005 we can have proteins without UniProt Xrefs. if ( ! Constants.UNIPROT_DB_SHORTLABEL.equals( uniprotXref.getDb() ) && ! CvDatabase.UNIPROT.equals( uniprotXref.getDb() ) ) { throw new IllegalArgumentException( "You must give a uniprot Xref, not " + uniprotXref.getDb() + " for a ProteinInteractor" ); } this.organism = organism; this.primaryXref = uniprotXref; hasUniprotXref = true; }
public ProteinInteractorTag( final XrefTag uniprotXref, final OrganismTag organism ) { if ( uniprotXref == null ) { throw new IllegalArgumentException( "You must give a non null uniprotXref for a proteinInteractor" ); } // as of june 2005 we can have proteins without UniProt Xrefs. if ( ! Constants.UNIPROT_DB_SHORTLABEL.equals( uniprotXref.getDb() ) && ! CvDatabase.UNIPROT.equals( uniprotXref.getDb() ) ) { throw new IllegalArgumentException( "You must give a uniprot Xref, not " + uniprotXref.getDb() + " for a ProteinInteractor" ); } this.organism = organism; this.primaryXref = uniprotXref; hasUniprotXref = true; }
/** * Get from a feature object the primaryId of an Xref having the given database. * * @param feature * @param database * * @return the primaryId of null if we can't find it. */ private String getFeatureId( FeatureTag feature, String database ) { for ( Iterator iterator = feature.getXrefs().iterator(); iterator.hasNext(); ) { XrefTag xref = (XrefTag) iterator.next(); if ( xref.getDb().equalsIgnoreCase( database ) ) { return xref.getId(); } } return null; }
/** * Get from a feature object the primaryId of an Xref having the given database. * * @param feature * @param database * * @return the primaryId of null if we can't find it. */ private String getFeatureId( FeatureTag feature, String database ) { for ( Iterator iterator = feature.getXrefs().iterator(); iterator.hasNext(); ) { XrefTag xref = (XrefTag) iterator.next(); if ( xref.getDb().equalsIgnoreCase( database ) ) { return xref.getId(); } } return null; }