Пример #1
0
 public void onMissingProtein1Column(int lineNumber) {
   if (parserListener != null) {
     parserListener.onMissingProtein1Column(lineNumber);
   } else if (defaultParserListener != null) {
     defaultParserListener.onSyntaxWarning(
         new DefaultFileSourceContext(new CsvSourceLocator(lineNumber, -1, -1)),
         "The protein1 column is missing or empty and it is required.");
   }
 }
Пример #2
0
 public void onMismatchBetweenRangePositionsAndProteins(
     List<CsvRange> rangePositions, List<CsvProtein> proteins) {
   if (parserListener != null) {
     parserListener.onMismatchBetweenRangePositionsAndProteins(rangePositions, proteins);
   } else if (defaultParserListener != null) {
     defaultParserListener.onSyntaxWarning(
         !rangePositions.isEmpty() ? rangePositions.iterator().next() : proteins.iterator().next(),
         "The number of range/linked positions does not match the number of protein identifiers and therefore, will be ignored");
   }
 }
Пример #3
0
 public void onInvalidProteinIdentifierSyntax(
     String[] identifiers, int lineNumber, int columnNumber) {
   if (parserListener != null) {
     parserListener.onInvalidProteinIdentifierSyntax(identifiers, lineNumber, columnNumber);
   } else if (defaultParserListener != null) {
     defaultParserListener.onSyntaxWarning(
         new DefaultFileSourceContext(new CsvSourceLocator(lineNumber, -1, columnNumber)),
         "The protein1/protein2 columns syntax should be sp|uniprotId|name and if several proteins are provided, the identifiers "
             + "should be separeted by ';'");
   }
 }
Пример #4
0
 public void onMismatchBetweenPeptideAndLinkedPositions(
     List<CsvRange> peptidePositions, List<CsvRange> linkedPositions) {
   if (parserListener != null) {
     parserListener.onMismatchBetweenPeptideAndLinkedPositions(peptidePositions, linkedPositions);
   } else if (defaultParserListener != null) {
     defaultParserListener.onSyntaxWarning(
         !peptidePositions.isEmpty()
             ? peptidePositions.iterator().next()
             : linkedPositions.iterator().next(),
         "The number of peptide positions does not match the number of linked positions and therefore, will be ignored");
   }
 }