@Override public String toString() { return "Annotation[type: " + ( cvTopic != null ? cvTopic.getShortLabel() : "" ) + ", text: " + annotationText + "]"; } }
@Override public String toString() { return "Annotation[type: " + ( cvTopic != null ? cvTopic.getShortLabel() : "" ) + ", text: " + annotationText + "]"; }
@Override public String toString() { return "Annotation[type: " + ( cvTopic != null ? cvTopic.getShortLabel() : "" ) + ", text: " + annotationText + "]"; } }
private Annotation getUsedInClassAnnotation(CvTopic cvTopic){ Collection<Annotation> annotations = cvTopic.getAnnotations(); for(Annotation annotation : annotations){ if(CvTopic.USED_IN_CLASS.equals(annotation.getCvTopic().getShortLabel())){ if(annotation.getAnnotationText() == null){ return null; } CACHE.put(cvTopic.getShortLabel(),annotation); return annotation; } } return null; } }
private boolean hasNoUniprotUpdateAnnotation( AnnotatedObject ao ) { for ( Annotation annot : ao.getAnnotations() ) { if( annot.getCvTopic().getShortLabel().equals( CvTopic.NON_UNIPROT ) ) { return true; } } return false; }
private boolean hasUniprotDrExportAnnotation(CvObject cvObject ) { Collection<Annotation> annotations = cvObject.getAnnotations(); for(Annotation annotation : annotations){ if(CvTopic.UNIPROT_DR_EXPORT.equals(annotation.getCvTopic().getShortLabel())){ return true; } } return false; } }
public static boolean isCvTopicPublic(CvTopic cvTopic) { for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvTopic)) { if(annotation.getCvTopic() != null){ if (annotation.getCvTopic().getShortLabel().equals(CvTopic.HIDDEN) || annotation.getCvTopic().getShortLabel().equals(CvTopic.NO_EXPORT)) { return false; } } else { return false; } } return true; }
public static boolean isCvTopicPublic(CvTopic cvTopic) { for (Annotation annotation : IntactCore.ensureInitializedAnnotations(cvTopic)) { if(annotation.getCvTopic() != null){ if (annotation.getCvTopic().getShortLabel().equals(CvTopic.HIDDEN) || annotation.getCvTopic().getShortLabel().equals(CvTopic.NO_EXPORT)) { return false; } } else { return false; } } return true; }
public static boolean isNoUniprotUpdate(Protein protein){ Collection<Annotation> annotations = protein.getAnnotations(); for(Annotation annotation : annotations){ if(CvTopic.NON_UNIPROT.equals(annotation.getCvTopic().getShortLabel())){ return true ; } } return false; } }
private static boolean isCuratedComplex(Experiment experiment) { for (Annotation annotation : experiment.getAnnotations()) { final CvTopic cvTopic = annotation.getCvTopic(); if (cvTopic == null) { continue; } if (CvTopic.CURATED_COMPLEX.equals(cvTopic.getShortLabel())) { return true; } } return false; }
private boolean hasNoUniprotUpdateAnnotation( AnnotatedObject ao ) { for ( Annotation annot : ao.getAnnotations() ) { if( annot.getCvTopic().getShortLabel().equals( CvTopic.NON_UNIPROT ) ) { return true; } } return false; }
public boolean isExcluded( CvTopic topic ) { if (topic != null && !topic.getAnnotations().isEmpty() && excludeHiddenTopics){ for (uk.ac.ebi.intact.model.Annotation ann : topic.getAnnotations()){ if (ann.getCvTopic() != null && (ann.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.HIDDEN) || ann.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.NO_EXPORT))){ return true; } } } return excludeAnnotationTopic.contains( topic ); }
private static String getAnnotationByShortLabel(InteractionImpl complex, String shortLabel) { for (Annotation annotation : complex.getAnnotations()) { if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel() != null && annotation.getCvTopic().getShortLabel().equalsIgnoreCase(shortLabel)) { return annotation.getAnnotationText(); } } return null; }
private static String getAnnotationByShortLabel(InteractionImpl complex, String shortLabel) { for (Annotation annotation : complex.getAnnotations()) { if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel() != null && annotation.getCvTopic().getShortLabel().equalsIgnoreCase(shortLabel)) { return annotation.getAnnotationText(); } } return null; }
public static boolean isNegative(Interaction interaction) { Collection<Annotation> annotations = fetchAnnotations(interaction); for (Annotation annotation : annotations) { if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel().equals(CvTopic.NEGATIVE)) { return true; } } return false; }
public static boolean isComplex(Interaction interaction) { for (Annotation annot : interaction.getAnnotations()) { if (annot.getCvTopic() != null && annot.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.CURATED_COMPLEX)) { return true; } } return false; } }
public static boolean isNegative(Interaction interaction) { Collection<Annotation> annotations = fetchAnnotations(interaction); for (Annotation annotation : annotations) { if (annotation.getCvTopic() != null && annotation.getCvTopic().getShortLabel().equals(CvTopic.NEGATIVE)) { return true; } } return false; }
public static boolean isComplex(Interaction interaction) { for (Annotation annot : interaction.getAnnotations()) { if (annot.getCvTopic() != null && annot.getCvTopic().getShortLabel().equalsIgnoreCase(CvTopic.CURATED_COMPLEX)) { return true; } } return false; } }
private Collection<String> convertAnnotToString(Collection<Annotation> annot){ Collection<String> annotations = new ArrayList<String>(annot.size()); for (Annotation a : annot){ if (a.getCvTopic() == null){ annotations.add(a.getAnnotationText() != null ? a.getAnnotationText() : ""); } else { annotations.add(a.getCvTopic().getShortLabel() + (a.getAnnotationText() != null ? a.getAnnotationText() : "")); } } return annotations; }
private Collection<String> convertAnnotToString(Collection<Annotation> annot){ Collection<String> annotations = new ArrayList<String>(annot.size()); for (Annotation a : annot){ if (a.getCvTopic() == null){ annotations.add(a.getAnnotationText() != null ? a.getAnnotationText() : ""); } else { annotations.add(a.getCvTopic().getShortLabel() + (a.getAnnotationText() != null ? a.getAnnotationText() : "")); } } return annotations; }