Tabnine Logo
CvTerm
Code IndexAdd Tabnine to your IDE (free)

How to use
CvTerm
in
psidev.psi.mi.jami.model

Best Java code snippets using psidev.psi.mi.jami.model.CvTerm (Showing top 20 results out of 315)

origin: psidev.psi.mi.jami/jami-core

String mi1 = cvTerm1.getMIIdentifier();
String mi2 = cvTerm2.getMIIdentifier();
String mod1 = cvTerm1.getMODIdentifier();
String mod2 = cvTerm2.getMODIdentifier();
String par1 = cvTerm1.getPARIdentifier();
String par2 = cvTerm2.getPARIdentifier();
  return par1.equals(par2);
else if (!cvTerm1.getIdentifiers().isEmpty() && !cvTerm2.getIdentifiers().isEmpty()){
  Iterator<Xref> iterator1 = cvTerm1.getIdentifiers().iterator();
    Xref altid1 = iterator1.next();
    for (Xref altid2 : cvTerm2.getIdentifiers()){
      if (DefaultExternalIdentifierComparator.areEquals(altid1, altid2)){
        return true;
  String label1 = cvTerm1.getShortName();
  String label2 = cvTerm2.getShortName();
origin: psidev.psi.mi.jami.bridges/jami-obo

protected void configure(String filePath) {
  /**
   * ensure we get the right logger
   */
  logger = Logger.getLogger(AbstractOboLoader.class);
  try {
    parser = new OBO2FormatParser(filePath);
  } catch (Exception e) {
    logger.fatal("Parse failed: " + e.getMessage(), e);
  }
  ONTOLOGY_DEFINITION = ontologyDatabase.getShortName();
  FULL_NAME = ontologyDatabase.getFullName();
  SHORT_NAME = ontologyDatabase.getShortName();
}
origin: psidev.psi.mi.jami/jami-core

/***
 * This method will copy properties of cv term source in cv term target and will override all the other properties of Target cv term.
 * @param source : the cv term source to copy from
 * @param target : the cv term target to copy to
 */
public static void copyAndOverrideCvTermProperties(CvTerm source, CvTerm target){
  if (source != null && target != null){
    target.setShortName(source.getShortName());
    target.setFullName(source.getFullName());
    // copy collections
    target.getAnnotations().clear();
    target.getAnnotations().addAll(source.getAnnotations());
    target.getXrefs().clear();
    target.getXrefs().addAll(source.getXrefs());
    target.getIdentifiers().clear();
    target.getIdentifiers().addAll(source.getIdentifiers());
    target.getSynonyms().clear();
    target.getSynonyms().addAll(source.getSynonyms());
  }
}
origin: psidev.psi.mi.jami/jami-core

public static Xref getPsiModReference(CvTerm term){
  if (term == null){
    return null;
  }
  else if (term.getMODIdentifier() == null){
    return null;
  }
  else{
    return XrefUtils.collectFirstIdentifierWithDatabaseAndId(term.getIdentifiers(), CvTerm.PSI_MOD_MI, CvTerm.PSI_MOD, term.getMODIdentifier());
  }
}
origin: psidev.psi.mi.jami/jami-core

public static Xref getPsiMiReference(CvTerm term){
  if (term == null){
    return null;
  }
  else if (term.getMIIdentifier() == null){
    return null;
  }
  else{
    return XrefUtils.collectFirstIdentifierWithDatabaseAndId(term.getIdentifiers(), CvTerm.PSI_MI_MI, CvTerm.PSI_MI, term.getMIIdentifier());
  }
}
origin: psidev.psi.mi.jami/jami-core

public static Xref getPsiParReference(CvTerm term){
  if (term == null){
    return null;
  }
  else if (term.getPARIdentifier() == null){
    return null;
  }
  else{
    return XrefUtils.collectFirstIdentifierWithDatabaseAndId(term.getIdentifiers(), null, CvTerm.PSI_PAR, term.getPARIdentifier());
  }
}
origin: psidev.psi.mi/psimi-schema-validator

public static Term buildTerm( CvTerm cv ) {
  if (cv == null){
    return null;
  }
  final String id = cv.getMIIdentifier();
  if( id == null ) {
    return null;
  }
  return new Term( id, cv.getShortName() );
}
origin: psidev.psi.mi.jami.bridges/jami-obo

public T fetchByIdentifier(String termIdentifier, String ontologyDatabaseName) throws BridgeFailedException {
  if (ontologyDatabaseName != null && !this.ontologyDatabase.getShortName().equalsIgnoreCase(ontologyDatabaseName)){
    return null;
  }
  return id2Term.get(termIdentifier);
}
origin: psidev.psi.mi.jami/jami-core

/**
 * Check if the CvTerm natches the MI term and/or the name if no MI term exist
 * @param term : the term to check
 * @param mi : the mi id to compare
 * @param name : the name to compare
 * @return true if the CvTerm natches the MI term and/or the name
 */
public static boolean isCvTerm(CvTerm term, String mi, String name){
  if (term.getMIIdentifier() != null && mi != null){
    return term.getMIIdentifier().equals(mi);
  }
  else{
    if (term.getShortName().equalsIgnoreCase(name) || (term.getFullName() != null && term.getFullName().equalsIgnoreCase(name))){
      return true;
    }
    else {
      return false;
    }
  }
}
origin: psidev.psi.mi.jami/jami-interactionviewer-json

CvTerm type = feature.getType();
if (type.getMODIdentifier() != null){
  return "ptms";
else if (type.getMIIdentifier() != null){
  OntologyTerm term = null;
  try {
    term = fetcher.fetchByIdentifier(type.getMIIdentifier(), CvTerm.PSI_MI);
  } catch (BridgeFailedException e) {
    logger.log(Level.SEVERE, "Cannot fetch the ontology information for the term " + type.getMIIdentifier(), e);
  String name = type.getFullName() != null ? type.getFullName() : type.getShortName();
  try {
    term = fetcher.fetchByName(name, CvTerm.PSI_MI);
    logger.log(Level.SEVERE, "Cannot fetch the ontology information for the term " + (type.getFullName() != null ? type.getFullName() : type.getShortName()), e);
origin: psidev.psi.mi/psimi-schema-validator

CvTerm cellType = organism.getCellType();
if (!cellType.getIdentifiers().isEmpty() || !cellType.getXrefs().isEmpty()){
  Collection<psidev.psi.mi.jami.model.Xref> cabriReferences = XrefUtils.collectAllXrefsHavingDatabase(cellType.getIdentifiers(), RuleUtils.CABRI_MI_REF, RuleUtils.CABRI);
  Collection<psidev.psi.mi.jami.model.Xref> cellReferences = XrefUtils.collectAllXrefsHavingDatabase(cellType.getIdentifiers(), RuleUtils.CELL_ONTOLOGY_MI_REF, RuleUtils.CELL_ONTOLOGY);
  Collection<psidev.psi.mi.jami.model.Xref> allPubmeds = XrefUtils.collectAllXrefsHavingDatabaseAndQualifier(cellType.getXrefs(), psidev.psi.mi.jami.model.Xref.PUBMED_MI, psidev.psi.mi.jami.model.Xref.PUBMED, psidev.psi.mi.jami.model.Xref.PRIMARY_MI, psidev.psi.mi.jami.model.Xref.PRIMARY);
    messages=Collections.singleton( new ValidatorMessage( "The cellType " + cellType.getShortName() + " does not have a CABRI or Cell Ontology cross reference with a qualifier 'identity' and it is strongly recommended. " +
        "If the cell line cannot be identified but one of these databases, at least one pubmed primary reference is necessary.'",
        MessageLevel.WARN,
  MiContext context = RuleUtils.buildContext(cellType, "cell type");
  context.addAssociatedContext(RuleUtils.buildContext(organism, "organism"));
  messages=Collections.singleton( new ValidatorMessage( "The cellType " + cellType.getShortName() + " does not have any cross references and at least one cross reference to CABRI or Cell Ontology with " +
      "qualifier 'identity' is strongly recommended. If the cell line cannot be identified but one of these databases, at least one pubmed primary reference is necessary.'",
      MessageLevel.WARN,
origin: psidev.psi.mi.jami/jami-core

public void onMIIdentifierUpdate(CvTerm cv, String oldMI) {
  if (oldMI == null){
    cvChangeLogger.log(Level.INFO, "The MI identifier " + cv.getMIIdentifier() + " has been added to the cv term " + cv.toString());
  }
  else if (cv.getMIIdentifier() == null){
    cvChangeLogger.log(Level.INFO, "The MI identifier "+ oldMI+ " has been removed from the cv term " + cv.toString());
  }
  else {
    cvChangeLogger.log(Level.INFO, "The MI identifier "+oldMI+" has been updated with " + cv.getMIIdentifier() + " in the cv term " + cv.toString());
  }
}
origin: psidev.psi.mi.jami.bridges/jami-obo

protected void processShortLabel(Term term, T ontologyTerm) {
  if (ontologyTerm.getShortName().length() == 0){
    ontologyTerm.setShortName(term.getName());
  }
}
origin: psidev.psi.mi/psimi-schema-validator

if (!tissue.getIdentifiers().isEmpty()){
  Collection<psidev.psi.mi.jami.model.Xref> brendaRef = XrefUtils.collectAllXrefsHavingDatabase(tissue.getIdentifiers(), RuleUtils.BRENDA_MI_REF, RuleUtils.BRENDA);
  Collection<psidev.psi.mi.jami.model.Xref> tissueRef = XrefUtils.collectAllXrefsHavingDatabase(tissue.getIdentifiers(), RuleUtils.TISSUE_LIST_MI_REF, RuleUtils.TISSUE_LIST);
    return Collections.singletonList( new ValidatorMessage( "The tissue " + tissue.getShortName() + " has "+tissue.getIdentifiers().size()+" identifier(s) but none of them is a BRENDA or Tissue List cross reference with a qualifier 'identity' and it  is strongly recommended.'",
        MessageLevel.WARN,
        context,
  MiContext context = RuleUtils.buildContext(tissue, "tissue");
  context.addAssociatedContext(RuleUtils.buildContext(organism, "organism"));
  return Collections.singletonList( new ValidatorMessage( "The tissue " + tissue.getShortName() + " doesn't have any cross references and at least one cross reference to BRENDA or Tissue List " +
      "qualifier 'identity' is strongly recommended.'",
      MessageLevel.WARN,
origin: psidev.psi.mi.jami/jami-core

public void onMODIdentifierUpdate(CvTerm cv, String oldMOD) {
  if (oldMOD == null){
    cvChangeLogger.log(Level.INFO, "The MOD identifier " + cv.getMODIdentifier() + " has been added to the cv term " + cv.toString());
  }
  else if (cv.getMIIdentifier() == null){
    cvChangeLogger.log(Level.INFO, "The MOD identifier "+ oldMOD+ " has been removed from the cv term " + cv.toString());
  }
  else {
    cvChangeLogger.log(Level.INFO, "The MOD identifier "+oldMOD+" has been updated with " + cv.getMODIdentifier() + " in the cv term " + cv.toString());
  }
}
origin: uk.ac.ebi.intact.dataexchange/structured-abstract

String dbname = xref.getDatabase().getShortName();
      getDatabase().getAnnotations(), Annotation.SEARCH_URL_MI, Annotation.SEARCH_URL);
  if (searchUrlAnnot != null){
    searchUrl = searchUrlAnnot.getValue();
origin: psidev.psi.mi.jami/jami-core

public void onPARIdentifierUpdate(CvTerm cv, String oldPAR) {
  if (oldPAR == null){
    cvChangeLogger.log(Level.INFO, "The PAR identifier " + cv.getPARIdentifier() + " has been added to the cv term " + cv.toString());
  }
  else if (cv.getMIIdentifier() == null){
    cvChangeLogger.log(Level.INFO, "The PAR identifier "+ oldPAR+ " has been removed from the cv term " + cv.toString());
  }
  else {
    cvChangeLogger.log(Level.INFO, "The PAR identifier "+oldPAR+" has been updated with " + cv.getPARIdentifier() + " in the cv term " + cv.toString());
  }
}
origin: psidev.psi.mi.jami/jami-core

  public static CvTerm createIdentityQualifier(CvTerm psiMi){
    CvTerm identity = new DefaultCvTerm(Xref.IDENTITY);
    Xref psiMiXref = new DefaultXref(psiMi, Xref.IDENTITY_MI, identity);
    identity.getIdentifiers().add(psiMiXref);
    return identity;
  }
}
origin: psidev.psi.mi.jami.bridges/jami-obo

    ontologyTerm.getXrefs().add(primaryPubmedRef);
    ontologyTerm.getXrefs().add(pubmedRef);
  ontologyTerm.getXrefs().add(pubmedRef); // MI not MOD
} else if ( GO.equalsIgnoreCase(database) ) {
  Xref goRef = XrefUtils.createXrefWithQualifier(GO, GO_MI_REF, database + ":" + accession, Xref.SEE_ALSO, Xref.SEE_ALSO_MI);
  ontologyTerm.getXrefs().add(goRef); // MI not MOD
} else if ( RESID.equalsIgnoreCase(database) ) {
  Xref resXref = XrefUtils.createXrefWithQualifier(RESID, RESID_MI_REF, accession, Xref.SEE_ALSO, Xref.SEE_ALSO_MI);
  ontologyTerm.getXrefs().add(resXref);
} else if ( SO.equalsIgnoreCase(database) ) {
  Xref soRef = XrefUtils.createXrefWithQualifier(SO, SO_MI_REF, database + ":" + accession, Xref.SEE_ALSO, Xref.SEE_ALSO_MI);
  ontologyTerm.getXrefs().add(soRef);  // MI not MOD
}else if ( Xref.PUBMED.equalsIgnoreCase(database) ) {
  if (pubmedPrimary == null){
    ontologyTerm.getXrefs().add(primaryPubmedRef);
    ontologyTerm.getXrefs().add(pubmedRef);
  ontologyTerm.getXrefs().add(resXref);
}else if ( Xref.CHEBI.equalsIgnoreCase(database) ) {
  Xref chebiRef = XrefUtils.createXrefWithQualifier(Xref.CHEBI, Xref.CHEBI_MI, accession, Xref.SEE_ALSO, Xref.SEE_ALSO_MI);
  ontologyTerm.getXrefs().add(chebiRef);  // MOD xref
} else if ( Annotation.URL.equalsIgnoreCase(database) ) {
  ontologyTerm.getAnnotations().add(AnnotationUtils.createAnnotation(Annotation.URL, Annotation.URL_MI, accession));
origin: psidev.psi.mi.jami/jami-core

public void onFullNameUpdate(CvTerm cv, String oldFullName) {
  if (oldFullName == null){
    cvChangeLogger.log(Level.INFO, "The full name has been initialised for the cv term " + cv.toString());
  }
  else if (cv.getFullName() == null){
    cvChangeLogger.log(Level.INFO, "The full name has been reset for the cv term " + cv.toString());
  }
  else {
    cvChangeLogger.log(Level.INFO, "The full name "+oldFullName+" has been updated with " + cv.getFullName() + " in the cv term " + cv.toString());
  }
}
psidev.psi.mi.jami.modelCvTerm

Javadoc

A controlled vocabulary term defined by an ontology. If the term cannot be described in any ontologies, it should at least have a shortName, Ex: controlled vocabulary terms from the MI ontology (http://www.ebi.ac.uk/ontology-lookup/browse.do?ontName=MI)

Most used methods

  • getShortName
    Short label of a controlled vocabulary. It cannot be null or empty. Ex: electrophoresis, binding sit
  • getMIIdentifier
    The unique PSI-MI identifier which identifies the object in the PSI-MI ontology. It is a shortcut fo
  • getFullName
    Full name of the controlled vocabulary as it appears in the ontology. It can be null. Ex: electropho
  • getIdentifiers
    The collection of identifiers which identifies this CvTerm. It is aimed at returning all existing id
  • getMODIdentifier
    The unique PSI-MOD identifier which identifies the object in the PSI-MOD ontology. It is a shortcut
  • getAnnotations
    Collection of annotations describing the CvTerm. This method should never return null. It can return
  • getPARIdentifier
    The unique PSI-PAR identifier which identifies the object in the PSI-PAR ontology. It is a shortcut
  • getXrefs
    Collection of cross references describing the CvTerm. This method should never return null. It can r
  • getSynonyms
    Collection of synonyms for this CvTerm This method should never return null. It can return an empty
  • setShortName
    Set the short label
  • setFullName
    Set the full name
  • setFullName

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JTextField (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Github Copilot alternatives
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