Tabnine Logo
MessageHolder.addCheckerMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
addCheckerMessage
method
in
uk.ac.ebi.intact.application.dataConversion.psiUpload.util.report.MessageHolder

Best Java code snippets using uk.ac.ebi.intact.application.dataConversion.psiUpload.util.report.MessageHolder.addCheckerMessage (Showing top 20 results out of 315)

origin: uk.ac.ebi.intact.util/data-conversion

  public static void check( final XrefTag xref ) {

    final String db = xref.getDb();

    if ( !cache.keySet().contains( db ) ) {
      CvDatabase cvDatabase = null;
      try {
        cvDatabase = IntactContext.getCurrentInstance().getCvContext().getByLabel(CvDatabase.class, db );

        if ( cvDatabase != null ) {
          System.out.println( "Found CvDatabase with shortlabel: " + db );
        } else {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvDatabase " +
                                        "by shortlabel: " + db ) );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching " +
                                      "for CvDatabase " +
                                      "having the shortlabel: " + db ) );
        e.printStackTrace();
      }

      cache.put( db, cvDatabase );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  public static void check( final XrefTag xref ) {

    final String db = xref.getDb();

    if ( !cache.keySet().contains( db ) ) {
      CvDatabase cvDatabase = null;
      try {
        cvDatabase = IntactContext.getCurrentInstance().getCvContext().getByLabel(CvDatabase.class, db );

        if ( cvDatabase != null ) {
          System.out.println( "Found CvDatabase with shortlabel: " + db );
        } else {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvDatabase " +
                                        "by shortlabel: " + db ) );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching " +
                                      "for CvDatabase " +
                                      "having the shortlabel: " + db ) );
        e.printStackTrace();
      }

      cache.put( db, cvDatabase );
    }
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  public static void check( final XrefTag xref ) {

    final String db = xref.getDb();

    if ( !cache.keySet().contains( db ) ) {
      CvDatabase cvDatabase = null;
      try {
        cvDatabase = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCvObjectDao(CvDatabase.class).getByShortLabel( db );

        if ( cvDatabase != null ) {
          System.out.println( "Found CvDatabase with shortlabel: " + db );
        } else {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvDatabase " +
                                        "by shortlabel: " + db ) );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching " +
                                      "for CvDatabase " +
                                      "having the shortlabel: " + db ) );
        e.printStackTrace();
      }

      cache.put( db, cvDatabase );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  public static void check( final ParticipantDetectionTag participantDetection ) {

    final XrefTag psiDef = participantDetection.getPsiDefinition();
    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !cache.keySet().contains( id ) ) {
      CvIdentification cvIdentification = null;

      try {
        cvIdentification = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvIdentification.class,id);

        if ( cvIdentification == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvIdentification for the PSI definition: " + id ) );
        } else {
          System.out.println( "Found ParticipantDetection " + id + " as " + cvIdentification.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvInteraction " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      cache.put( id, cvIdentification );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  public static void check( final ParticipantDetectionTag participantDetection ) {

    final XrefTag psiDef = participantDetection.getPsiDefinition();
    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !cache.keySet().contains( id ) ) {
      CvIdentification cvIdentification = null;

      try {
        cvIdentification = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvIdentification.class,id);

        if ( cvIdentification == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvIdentification for the PSI definition: " + id ) );
        } else {
          System.out.println( "Found ParticipantDetection " + id + " as " + cvIdentification.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvInteraction " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      cache.put( id, cvIdentification );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  public static void check( final InteractionDetectionTag interactionDetection ) {

    final XrefTag psiDef = interactionDetection.getPsiDefinition();
    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !cache.keySet().contains( id ) ) {
      CvInteraction cvInteraction = null;

      try {
        cvInteraction = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteraction.class,id);

        if ( cvInteraction == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteraction by PSI definition: " + id ) );
        } else {
          System.out.println( "Found CvInteraction " + id + " as " + cvInteraction.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvInteraction " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      cache.put( id, cvInteraction );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

private static void checkCvTypeIdentification( FeatureTag feature ) {
  XrefTag psiDef = feature.getFeatureType().getPsiDefinition();
  XrefChecker.check( psiDef );
  final String id = psiDef.getId();
  if ( !featureTypeCache.keySet().contains( id ) ) {
    CvFeatureType featureType = null;
    try {
      featureType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureType.class,id);
      if ( featureType == null ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureType by PSI definition: " + id ) );
      } else {
        System.out.println( "Found CvFeatureType " + id + " as " + featureType.getShortLabel() );
      }
    } catch ( IntactException e ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureType " +
                                    "having the PSI definition: " + id ) );
      e.printStackTrace();
    }
    featureTypeCache.put( id, featureType );
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  public static void check( final InteractionTypeTag interactionType ) {

    final XrefTag psiDef = interactionType.getPsiDefinition();
    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !cache.keySet().contains( id ) ) {
      CvInteractionType cvInteractionType = null;

      try {
        cvInteractionType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractionType.class, id);

        if ( cvInteractionType == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractionType " +
                                        "for the PSI definition: " + id ) );
        } else {
          System.out.println( "Found InteractionType " + id + " as " + cvInteractionType.getShortLabel() );
        }

      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvInteractionType " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      cache.put( id, cvInteractionType );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  private static void checkCvFeatureIdentification( FeatureTag feature ) {

    final XrefTag psiDef = feature.getFeatureDetection().getPsiDefinition();

    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !featureIdentificationCache.keySet().contains( id ) ) {
      CvFeatureIdentification cvFeatureIdentification = null;

      try {
        cvFeatureIdentification = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureIdentification.class,id);

        if ( cvFeatureIdentification == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureIdentification by PSI definition: " + id ) );
        } else {
          System.out.println( "Found CvFeatureIdentification " + id + " as " + cvFeatureIdentification.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureIdentification " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      featureIdentificationCache.put( id, cvFeatureIdentification );
    }
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

private static void checkCvTypeIdentification( FeatureTag feature ) {
  XrefTag psiDef = feature.getFeatureType().getPsiDefinition();
  XrefChecker.check( psiDef );
  final String id = psiDef.getId();
  if ( !featureTypeCache.keySet().contains( id ) ) {
    CvFeatureType featureType = null;
    try {
      featureType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvFeatureType.class,id);
      if ( featureType == null ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureType by PSI definition: " + id ) );
      } else {
        System.out.println( "Found CvFeatureType " + id + " as " + featureType.getShortLabel() );
      }
    } catch ( IntactException e ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureType " +
                                    "having the PSI definition: " + id ) );
      e.printStackTrace();
    }
    featureTypeCache.put( id, featureType );
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

  public static void check( final ProteinParticipantTag proteinParticipant,
               final UpdateProteinsI proteinFactory,
               final BioSourceFactory bioSourceFactory ) {

    final String role = proteinParticipant.getRole();
    RoleChecker.check( role );

    final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor();
    ProteinInteractorChecker.check( proteinInteractor, proteinFactory, bioSourceFactory );

    final Collection features = proteinParticipant.getFeatures();
    for ( Iterator iterator = features.iterator(); iterator.hasNext(); ) {
      FeatureTag feature = (FeatureTag) iterator.next();

      FeatureChecker.ckeck( feature );
    }

    // check feature clustering (specific to PSI version 1)
    try {
      proteinParticipant.getClusteredFeatures();
    } catch ( IllegalArgumentException iae ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while checking if the feature were clusterizable: " +
                                    iae.getMessage() ) );
    }

    // TODO check isOverExpressed
    // TODO check isTaggedProtein: as we have to create a Feature having CvFeatureType(tagged-protein) with undetermined range
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  public static void check( final ProteinParticipantTag proteinParticipant,
               final UpdateProteinsI proteinFactory,
               final BioSourceFactory bioSourceFactory ) {

    final String role = proteinParticipant.getRole();
    RoleChecker.check( role );

    final ProteinInteractorTag proteinInteractor = proteinParticipant.getProteinInteractor();
    ProteinInteractorChecker.check( proteinInteractor, proteinFactory, bioSourceFactory );

    final Collection features = proteinParticipant.getFeatures();
    for ( Iterator iterator = features.iterator(); iterator.hasNext(); ) {
      FeatureTag feature = (FeatureTag) iterator.next();

      FeatureChecker.ckeck( feature );
    }

    // check feature clustering (specific to PSI version 1)
    try {
      proteinParticipant.getClusteredFeatures();
    } catch ( IllegalArgumentException iae ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while checking if the feature were clusterizable: " +
                                    iae.getMessage() ) );
    }

    // TODO check isOverExpressed
    // TODO check isTaggedProtein: as we have to create a Feature having CvFeatureType(tagged-protein) with undetermined range
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  public static void check( final ParticipantDetectionTag participantDetection ) {

    final XrefTag psiDef = participantDetection.getPsiDefinition();
    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !cache.keySet().contains( id ) ) {
      CvIdentification cvIdentification = null;

      try {
        cvIdentification = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCvObjectDao(CvIdentification.class).getByXref(id);

        if ( cvIdentification == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvIdentification for the PSI definition: " + id ) );
        } else {
          System.out.println( "Found ParticipantDetection " + id + " as " + cvIdentification.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvInteraction " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      cache.put( id, cvIdentification );
    }
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  private static void checkCvFeatureIdentification( FeatureTag feature ) {

    final XrefTag psiDef = feature.getFeatureDetection().getPsiDefinition();

    XrefChecker.check( psiDef );

    final String id = psiDef.getId();

    if ( !featureIdentificationCache.keySet().contains( id ) ) {
      CvFeatureIdentification cvFeatureIdentification = null;

      try {
        cvFeatureIdentification = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCvObjectDao(CvFeatureIdentification.class).getByXref(id);

        if ( cvFeatureIdentification == null ) {
          MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvFeatureIdentification by PSI definition: " + id ) );
        } else {
          System.out.println( "Found CvFeatureIdentification " + id + " as " + cvFeatureIdentification.getShortLabel() );
        }
      } catch ( IntactException e ) {
        MessageHolder.getInstance().addCheckerMessage( new Message( "An error occured while searching for CvFeatureIdentification " +
                                      "having the PSI definition: " + id ) );
        e.printStackTrace();
      }

      featureIdentificationCache.put( id, cvFeatureIdentification );
    }
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvInteractionType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI());
    if ( cvInteractionType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvProteinType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI());
    if ( cvProteinType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvProteinType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI());
    if ( cvProteinType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvInteractionType = IntactContext.getCurrentInstance().getCvContext().getByMiRef(CvInteractorType.class, CvInteractorType.getInteractionMI());
    if ( cvInteractionType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvInteractionType = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCvObjectDao(CvInteractorType.class).getByXref(CvInteractorType.getInteractionMI());
    if ( cvInteractionType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

public static void checkCvInteractorType( ) {
  if ( false == interatorTypeChecked ) {
    // Load CvInteractorType( interaction / MI: )
    cvProteinType = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCvObjectDao(CvInteractorType.class).getByXref(CvInteractorType.getInteractionMI());
    if ( cvProteinType == null ) {
      MessageHolder.getInstance().addCheckerMessage( new Message( "Could not find CvInteractorType( interaction )." ) );
    }
    interatorTypeChecked = true;
  }
}
uk.ac.ebi.intact.application.dataConversion.psiUpload.util.reportMessageHolderaddCheckerMessage

Popular methods of MessageHolder

  • addParserMessage
  • checkerMessageExists
  • clearCheckerMessage
  • clearParserMessage
  • getInstance
  • parserMessageExists
  • printCheckerReport
  • printParserReport
  • printPersisterReport
  • printReport

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Notification (javax.management)
  • JLabel (javax.swing)
  • Top Vim plugins
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