Codota Logo
MessageHolder.addParserMessage
Code IndexAdd Codota to your IDE (free)

How to use
addParserMessage
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.addParserMessage (Showing top 20 results out of 315)

  • Common ways to obtain MessageHolder
private void myMethod () {
MessageHolder m =
  • Codota IconConversion.psiUpload.util.report.MessageHolder messageHolder;messageHolder.getInstance()
  • Smart code suggestions by Codota
}
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.app/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 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.app/data-conversion

  /**
   * Take <featureList> in parameter.
   *
   * @param element
   */
  public static Collection process( final Element element ) {

    Collection features = new ArrayList( 2 );

    final String name = element.getNodeName();
    if ( false == "featureList".equals( name ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in a " +
                                        "featureList tag." ) );
      // TODO should we carry on here ? If the tag is not right ... the parsing can only fail !
    }

    final NodeList someFeatures = element.getElementsByTagName( "feature" );
    final int count = someFeatures.getLength();

    for ( int i = 0; i < count; i++ ) {
      final Node featureNode = someFeatures.item( i );

      final FeatureTag feature = FeatureParser.process( (Element) featureNode );

      features.add( feature );
    } // features

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

  /**
   * Take &lt;featureList&gt; in parameter.
   *
   * @param element
   */
  public static Collection process( final Element element ) {

    Collection features = new ArrayList( 2 );

    final String name = element.getNodeName();
    if ( false == "featureList".equals( name ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in a " +
                                        "featureList tag." ) );
      // TODO should we carry on here ? If the tag is not right ... the parsing can only fail !
    }

    final NodeList someFeatures = element.getElementsByTagName( "feature" );
    final int count = someFeatures.getLength();

    for ( int i = 0; i < count; i++ ) {
      final Node featureNode = someFeatures.item( i );

      final FeatureTag feature = FeatureParser.process( (Element) featureNode );

      features.add( feature );
    } // features

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

  /**
   * Take &lt;featureList&gt; in parameter.
   *
   * @param element
   */
  public static Collection process( final Element element ) {

    Collection features = new ArrayList( 2 );

    final String name = element.getNodeName();
    if ( false == "featureList".equals( name ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in a " +
                                        "featureList tag." ) );
      // TODO should we carry on here ? If the tag is not right ... the parsing can only fail !
    }

    final NodeList someFeatures = element.getElementsByTagName( "feature" );
    final int count = someFeatures.getLength();

    for ( int i = 0; i < count; i++ ) {
      final Node featureNode = someFeatures.item( i );

      final FeatureTag feature = FeatureParser.process( (Element) featureNode );

      features.add( feature );
    } // features

    return features;
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

MessageHolder.getInstance().addParserMessage( new Message( entrySet, "ERROR - We should be in entrySet tag." ) );
origin: uk.ac.ebi.intact.util/data-conversion

MessageHolder.getInstance().addParserMessage( new Message( entrySet, "ERROR - We should be in entrySet tag." ) );
origin: uk.ac.ebi.intact.util/data-conversion

  /**
   * Process a &lt;cellType&gt; in an organism. <br> In order to map it to the IntAct data, we look for the psi-mi
   * <code>primaryRef</code>, and look-up in intact using its <code>id</code>.
   *
   * @param element &lt;cellType&gt;.
   *
   * @return a <code>CellTypeTag</code> if the XML contains a walid psi-mi descriptor.
   *
   * @see uk.ac.ebi.intact.application.dataConversion.psiUpload.model.CellTypeTag
   */
  public static ConfidenceTag process( final Element element ) {

    if ( false == "confidence".equals( element.getNodeName() ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in confidence tag." ) );
    }

    String unit = element.getAttribute( "unit" );
    String value = element.getAttribute( "value" );

    ConfidenceTag confidenceTag = null;
    try {
      confidenceTag = new ConfidenceTag( unit, value );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, e.getMessage() ) );
    }

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

MessageHolder.getInstance().addParserMessage( new Message( entrySet, "ERROR - We should be in entrySet tag." ) );
origin: uk.ac.ebi.intact.app/data-conversion

  /**
   * Process a &lt;cellType&gt; in an organism. <br> In order to map it to the IntAct data, we look for the psi-mi
   * <code>primaryRef</code>, and look-up in intact using its <code>id</code>.
   *
   * @param element &lt;cellType&gt;.
   *
   * @return a <code>CellTypeTag</code> if the XML contains a walid psi-mi descriptor.
   *
   * @see uk.ac.ebi.intact.application.dataConversion.psiUpload.model.CellTypeTag
   */
  public static ConfidenceTag process( final Element element ) {

    if ( false == "confidence".equals( element.getNodeName() ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in confidence tag." ) );
    }

    String unit = element.getAttribute( "unit" );
    String value = element.getAttribute( "value" );

    ConfidenceTag confidenceTag = null;
    try {
      confidenceTag = new ConfidenceTag( unit, value );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, e.getMessage() ) );
    }

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

  /**
   * Process a &lt;cellType&gt; in an organism. <br> In order to map it to the IntAct data, we look for the psi-mi
   * <code>primaryRef</code>, and look-up in intact using its <code>id</code>.
   *
   * @param element &lt;cellType&gt;.
   *
   * @return a <code>CellTypeTag</code> if the XML contains a walid psi-mi descriptor.
   *
   * @see uk.ac.ebi.intact.application.dataConversion.psiUpload.model.CellTypeTag
   */
  public static ConfidenceTag process( final Element element ) {

    if ( false == "confidence".equals( element.getNodeName() ) ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in confidence tag." ) );
    }

    String unit = element.getAttribute( "unit" );
    String value = element.getAttribute( "value" );

    ConfidenceTag confidenceTag = null;
    try {
      confidenceTag = new ConfidenceTag( unit, value );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( element, e.getMessage() ) );
    }

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

/**
 * Extract Primary Xref.
 * <p/>
 * <pre>
 *   <xref>
 *       <primaryRef db="Swiss-Prot" id="P10912"/>
 *   </xref>
 * </pre>
 *
 * @return an intact Xref or null if something goes wrong.
 */
public static XrefTag processPrimaryRef( final Element root ) {
  XrefTag xref = null;
  final String nodeName = root.getNodeName();
  if ( false == "xref".equals( nodeName ) ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, "ERROR - We should be in xref tag, <" + root.getNodeName() + "> instead." ) );
  }
  final Element xrefNode = DOMUtil.getFirstElement( root, "primaryRef" ); // and the secondary ?!
  try {
    xref = createXref( xrefNode, XrefTag.PRIMARY_REF );
  } catch ( IllegalArgumentException e ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, e.getMessage() ) );
  }
  return xref;
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Extract Primary Xref.
 * <p/>
 * <pre>
 *   <xref>
 *       <primaryRef db="Swiss-Prot" id="P10912"/>
 *   </xref>
 * </pre>
 *
 * @return an intact Xref or null if something goes wrong.
 */
public static XrefTag processPrimaryRef( final Element root ) {
  XrefTag xref = null;
  final String nodeName = root.getNodeName();
  if ( false == "xref".equals( nodeName ) ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, "ERROR - We should be in xref tag, <" + root.getNodeName() + "> instead." ) );
  }
  final Element xrefNode = DOMUtil.getFirstElement( root, "primaryRef" ); // and the secondary ?!
  try {
    xref = createXref( xrefNode, XrefTag.PRIMARY_REF );
  } catch ( IllegalArgumentException e ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, e.getMessage() ) );
  }
  return xref;
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Extract Primary Xref.
 * <p/>
 * <pre>
 *   <xref>
 *       <primaryRef db="Swiss-Prot" id="P10912"/>
 *   </xref>
 * </pre>
 *
 * @return an intact Xref or null if something goes wrong.
 */
public static XrefTag processPrimaryRef( final Element root ) {
  XrefTag xref = null;
  final String nodeName = root.getNodeName();
  if ( false == "xref".equals( nodeName ) ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, "ERROR - We should be in xref tag, <" + root.getNodeName() + "> instead." ) );
  }
  final Element xrefNode = DOMUtil.getFirstElement( root, "primaryRef" ); // and the secondary ?!
  try {
    xref = createXref( xrefNode, XrefTag.PRIMARY_REF );
  } catch ( IllegalArgumentException e ) {
    MessageHolder.getInstance().addParserMessage( new Message( root, e.getMessage() ) );
  }
  return xref;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in interactionType tag." ) );
  interactionType = new InteractionTypeTag( xref );
} catch ( IllegalArgumentException e ) {
  MessageHolder.getInstance().addParserMessage( new Message( element, e.getMessage() ) );
origin: uk.ac.ebi.intact.util/data-conversion

  MessageHolder.getInstance().addParserMessage( new Message( element, "ERROR - We should be in interactionType tag." ) );
  interactionType = new InteractionTypeTag( xref );
} catch ( IllegalArgumentException e ) {
  MessageHolder.getInstance().addParserMessage( new Message( element, e.getMessage() ) );
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  public static EntryTag process( Element entry ) {

    loadGlobalContext( entry );

    // process all interactions
    InteractionListParser interactionList = new InteractionListParser( globalExperiments, globalParticipants );
    Collection interactions = interactionList.process( entry );


    EntryTag entryTag = null;
    try {
      entryTag = new EntryTag( globalExperiments.getExperiments(),
                   globalParticipants.getInteractors(),
                   interactions );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( entry, e.getMessage() ) );
    }

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

  public static EntryTag process( Element entry ) {

    loadGlobalContext( entry );

    // process all interactions
    InteractionListParser interactionList = new InteractionListParser( globalExperiments, globalParticipants );
    Collection interactions = interactionList.process( entry );


    EntryTag entryTag = null;
    try {
      entryTag = new EntryTag( globalExperiments.getExperiments(),
                   globalParticipants.getInteractors(),
                   interactions );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( entry, e.getMessage() ) );
    }

    return entryTag;
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

  public static EntryTag process( Element entry ) {

    loadGlobalContext( entry );

    // process all interactions
    InteractionListParser interactionList = new InteractionListParser( globalExperiments, globalParticipants );
    Collection interactions = interactionList.process( entry );


    EntryTag entryTag = null;
    try {
      entryTag = new EntryTag( globalExperiments.getExperiments(),
                   globalParticipants.getInteractors(),
                   interactions );
    } catch ( IllegalArgumentException e ) {
      MessageHolder.getInstance().addParserMessage( new Message( entry, e.getMessage() ) );
    }

    return entryTag;
  }
}
uk.ac.ebi.intact.application.dataConversion.psiUpload.util.reportMessageHolderaddParserMessage

Popular methods of MessageHolder

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

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
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