Codota Logo
XrefTag
Code IndexAdd Codota to your IDE (free)

How to use
XrefTag
in
uk.ac.ebi.intact.application.dataConversion.psiUpload.model

Best Java code snippets using uk.ac.ebi.intact.application.dataConversion.psiUpload.model.XrefTag (Showing top 20 results out of 315)

  • Common ways to obtain XrefTag
private void myMethod () {
XrefTag x =
  • Codota IconIterator iterator;(XrefTag) iterator.next()
  • Codota IconConversion.psiUpload.parser.XrefParser XrefParser;Element root;XrefParser.processPrimaryRef(root)
  • Codota IconConversion.psiUpload.model.CellTypeTag cellTypeTag;cellTypeTag.getPsiDefinition()
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.util/data-conversion

public boolean equals( Object o ) {
  if ( this == o ) {
    return true;
  }
  if ( !( o instanceof FeatureDetectionTag ) ) {
    return false;
  }
  final FeatureDetectionTag featureDetectionTag = (FeatureDetectionTag) o;
  if ( psiDefinition != null ? !psiDefinition.equals( featureDetectionTag.psiDefinition ) : featureDetectionTag.psiDefinition != null ) {
    return false;
  }
  return true;
}
origin: uk.ac.ebi.intact.util/data-conversion

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;
}
origin: uk.ac.ebi.intact.app/data-conversion

public int hashCode() {
  return ( psiDefinition != null ? psiDefinition.hashCode() : 0 );
}
origin: uk.ac.ebi.intact.app/data-conversion

private static void createXref( Protein protein,
                XrefTag xrefTag,
                boolean identity ) throws IntactException {
  CvXrefQualifier qualifier = null;
  if ( identity ) {
    qualifier = ControlledVocabularyRepository.getIdentityQualifier();
  }
  CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() );
  if ( database == null ) {
    // failed to find the database, skip the Xref creation
  } else {
    InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(),
               database,
               xrefTag.getId(),
               xrefTag.getSecondary(),
               xrefTag.getVersion(),
               qualifier );
    protein.addXref( xref );
    IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref );
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

if ( Constants.UNIPROT_DB_SHORTLABEL.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
} else if ( CvDatabase.UNIPROT.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * 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;
}
origin: uk.ac.ebi.intact.util/data-conversion

  public String toString() {
    final StringBuffer buf = new StringBuffer();
    buf.append( "HostOrganismTag" );
    buf.append( "{taxId=" ).append( taxId );

    buf.append( ", tissue=" );
    if ( null == tissue || tissue.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( tissue.getPsiDefinition().getId() );
    }

    buf.append( ", cellType=" );
    if ( null == cellType || cellType.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( cellType.getPsiDefinition().getId() );
    }
    buf.append( '}' );
    return buf.toString();
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  private static XrefTag createXref( final Element xrefNode, final short type ) {

    XrefTag xref = null;
    try {
      String db = xrefNode.getAttribute( "db" );
      if ( db != null ) {
        db = db.toLowerCase();
      }

      xref = new XrefTag( type,
                xrefNode.getAttribute( "id" ),
                db,
                xrefNode.getAttribute( "secondary" ),
                xrefNode.getAttribute( "version" ) );

    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( xrefNode, e.getMessage() ) );
    }

    return xref;
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

private static void createXref( Protein protein,
                XrefTag xrefTag,
                boolean identity ) throws IntactException {
  CvXrefQualifier qualifier = null;
  if ( identity ) {
    qualifier = ControlledVocabularyRepository.getIdentityQualifier();
  }
  CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() );
  if ( database == null ) {
    // failed to find the database, skip the Xref creation
  } else {
    InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(),
               database,
               xrefTag.getId(),
               xrefTag.getSecondary(),
               xrefTag.getVersion(),
               qualifier );
    protein.addXref( xref );
    IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref );
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

if ( Constants.UNIPROT_DB_SHORTLABEL.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
} else if ( CvDatabase.UNIPROT.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * 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;
}
origin: uk.ac.ebi.intact.app/data-conversion

  public String toString() {
    final StringBuffer buf = new StringBuffer();
    buf.append( "HostOrganismTag" );
    buf.append( "{taxId=" ).append( taxId );

    buf.append( ", tissue=" );
    if ( null == tissue || tissue.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( tissue.getPsiDefinition().getId() );
    }

    buf.append( ", cellType=" );
    if ( null == cellType || cellType.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( cellType.getPsiDefinition().getId() );
    }
    buf.append( '}' );
    return buf.toString();
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  private static XrefTag createXref( final Element xrefNode, final short type ) {

    XrefTag xref = null;
    try {
      String db = xrefNode.getAttribute( "db" );
      if ( db != null ) {
        db = db.toLowerCase();
      }

      xref = new XrefTag( type,
                xrefNode.getAttribute( "id" ),
                db,
                xrefNode.getAttribute( "secondary" ),
                xrefNode.getAttribute( "version" ) );

    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( xrefNode, e.getMessage() ) );
    }

    return xref;
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

private static void createXref( Protein protein,
                XrefTag xrefTag,
                boolean identity ) throws IntactException {
  CvXrefQualifier qualifier = null;
  if ( identity ) {
    qualifier = ControlledVocabularyRepository.getIdentityQualifier();
  }
  CvDatabase database = XrefChecker.getCvDatabase( xrefTag.getDb() );
  if ( database == null ) {
    // failed to find the database, skip the Xref creation
  } else {
    InteractorXref xref = new InteractorXref( IntactContext.getCurrentInstance().getInstitution(),
               database,
               xrefTag.getId(),
               xrefTag.getSecondary(),
               xrefTag.getVersion(),
               qualifier );
    protein.addXref( xref );
    IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getXrefDao().persist( xref );
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

if ( Constants.UNIPROT_DB_SHORTLABEL.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
} else if ( CvDatabase.UNIPROT.equals( primaryXref.getDb() ) ) {
  this.primaryXref = new XrefTag( primaryXref.getType(),
                  primaryXref.getId(),
                  primaryXref.getSecondary(),
                  primaryXref.getVersion() );
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * 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;
}
origin: uk.ac.ebi.intact.util/data-conversion

public boolean equals( Object o ) {
  if ( this == o ) {
    return true;
  }
  if ( !( o instanceof FeatureTypeTag ) ) {
    return false;
  }
  final FeatureTypeTag featureTypeTag = (FeatureTypeTag) o;
  if ( psiDefinition != null ? !psiDefinition.equals( featureTypeTag.psiDefinition ) : featureTypeTag.psiDefinition != null ) {
    return false;
  }
  return true;
}
origin: uk.ac.ebi.intact.util/data-conversion

public int hashCode() {
  return psiDefinition.hashCode();
}
origin: uk.ac.ebi.intact.app/data-conversion

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;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  public String toString() {
    final StringBuffer buf = new StringBuffer();
    buf.append( "HostOrganismTag" );
    buf.append( "{taxId=" ).append( taxId );

    buf.append( ", tissue=" );
    if ( null == tissue || tissue.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( tissue.getPsiDefinition().getId() );
    }

    buf.append( ", cellType=" );
    if ( null == cellType || cellType.getPsiDefinition() == null) {
      buf.append( '-' );
    } else {
      buf.append( cellType.getPsiDefinition().getId() );
    }
    buf.append( '}' );
    return buf.toString();
  }
}
uk.ac.ebi.intact.application.dataConversion.psiUpload.modelXrefTag

Javadoc

That class reflects what is needed to create an IntAct Xref.

 
<primaryRef db="pubmed" id="11805826" secondary="" version=""/> 

- OR -

<secondaryRef db="pubmed" id="11805826" secondary="" version=""/>

Most used methods

  • <init>
  • equals
  • getDb
  • getId
  • getSecondary
  • getType
  • getVersion
  • hashCode
  • isPrimaryRef

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • findViewById (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • IsNull (org.hamcrest.core)
    Is the value null?
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