Codota Logo
UserSessionDownload.createTextNode
Code IndexAdd Codota to your IDE (free)

How to use
createTextNode
method
in
uk.ac.ebi.intact.application.dataConversion.psiDownload.UserSessionDownload

Best Java code snippets using uk.ac.ebi.intact.application.dataConversion.psiDownload.UserSessionDownload.createTextNode (Showing top 20 results out of 315)

  • Common ways to obtain UserSessionDownload
private void myMethod () {
UserSessionDownload u =
  • Codota IconConversion.PsiVersion psiVersion;new UserSessionDownload(psiVersion)
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Create a shortlabel element containing the shortlabel of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the shortlabel, not null.
 */
protected void createShortlabel( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // shortlabel is mandatory in the IntAct API.
  Element shortlabel = session.createElement( "shortLabel" );
  Text shortlabelText = session.createTextNode( object.getShortLabel() );
  shortlabel.appendChild( shortlabelText );
  parent.appendChild( shortlabel );
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Create a shortlabel element containing the shortlabel of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the shortlabel, not null.
 */
protected void createShortlabel( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // shortlabel is mandatory in the IntAct API.
  Element shortlabel = session.createElement( "shortLabel" );
  Text shortlabelText = session.createTextNode( object.getShortLabel() );
  shortlabel.appendChild( shortlabelText );
  parent.appendChild( shortlabel );
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Create a shortlabel element containing the shortlabel of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the shortlabel, not null.
 */
protected void createShortlabel( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // shortlabel is mandatory in the IntAct API.
  Element shortlabel = session.createElement( "shortLabel" );
  Text shortlabelText = session.createTextNode( object.getShortLabel() );
  shortlabel.appendChild( shortlabelText );
  parent.appendChild( shortlabel );
}
origin: uk.ac.ebi.intact.util/data-conversion

Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) );
element.appendChild( refText );
origin: uk.ac.ebi.intact.app/data-conversion

Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) );
element.appendChild( refText );
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) );
element.appendChild( refText );
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

private Element createCertainStatus( UserSessionDownload session, Element parent, String tagName ) {
  Element element = session.createElement( tagName );
  // names
  Element nameElement = session.createElement( "names" );
  element.appendChild( nameElement );
  Element shortlabelElement = session.createElement( "shortLabel" );
  nameElement.appendChild( shortlabelElement );
  Text shortlabelTextElement = session.createTextNode( "certain" );
  shortlabelElement.appendChild( shortlabelTextElement );
  // xref
  Element xrefElement = session.createElement( "xref" );
  element.appendChild( xrefElement );
  Element primaryRefElement = session.createElement( "primaryRef" );
  xrefElement.appendChild( primaryRefElement );
  primaryRefElement.setAttribute( "db", CvDatabase.PSI_MI );
  primaryRefElement.setAttribute( "dbAc", CvDatabase.PSI_MI_MI_REF );
  primaryRefElement.setAttribute( "id", "MI:0335" ); // certain, cf. http://psidev.sourceforge.net/mi/rel25/data/psi-mi25.dag
  primaryRefElement.setAttribute( "refType", CvXrefQualifier.IDENTITY );
  primaryRefElement.setAttribute( "refTypeAc", CvXrefQualifier.IDENTITY_MI_REF );
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Generates an interactorRef out of an IntAct interactor.
 *
 * @param session
 * @param parent     the Element to which we will add the interactorRef.
 * @param interactor the IntAct interactor that we convert to PSI.
 *
 * @return the generated interactorRef Element.
 */
public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( interactor == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( INTERACTOR_REF_TAG_NAME );
  Text refText = session.createTextNode( getInteractorId( session, interactor ) );
  element.appendChild( refText );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Create a fullname element containing the fullname of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the fullname, not null.
 */
protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // fullname is NOT mandatory in the IntAct API.
  if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) {
    Element fullname = session.createElement( "fullName" );
    Text fullnameText = session.createTextNode( object.getFullName() );
    fullname.appendChild( fullnameText );
    parent.appendChild( fullname );
  }
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Generates an interactorRef out of an IntAct interactor.
 *
 * @param session
 * @param parent     the Element to which we will add the interactorRef.
 * @param interactor the IntAct interactor that we convert to PSI.
 *
 * @return the generated interactorRef Element.
 */
public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( interactor == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( INTERACTOR_REF_TAG_NAME );
  Text refText = session.createTextNode( getInteractorId( session, interactor ) );
  element.appendChild( refText );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Create a fullname element containing the fullname of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the fullname, not null.
 */
protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // fullname is NOT mandatory in the IntAct API.
  if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) {
    Element fullname = session.createElement( "fullName" );
    Text fullnameText = session.createTextNode( object.getFullName() );
    fullname.appendChild( fullnameText );
    parent.appendChild( fullname );
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Generates an interactorRef out of an IntAct interactor.
 *
 * @param session
 * @param parent     the Element to which we will add the interactorRef.
 * @param interactor the IntAct interactor that we convert to PSI.
 *
 * @return the generated interactorRef Element.
 */
public Element createInteractorReference( UserSessionDownload session, Element parent, Interactor interactor ) {
  // TODO test that.
  // 1. Checking...
  if ( session == null ) {
    throw new IllegalArgumentException( "You must give a non null UserSessionDownload." );
  }
  if ( parent == null ) {
    throw new IllegalArgumentException( "You must give a non null parent to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  if ( interactor == null ) {
    throw new IllegalArgumentException( "You must give a non null protein to build an " + INTERACTOR_REF_TAG_NAME + "." );
  }
  // 2. Initialising the element...
  Element element = session.createElement( INTERACTOR_REF_TAG_NAME );
  Text refText = session.createTextNode( getInteractorId( session, interactor ) );
  element.appendChild( refText );
  // 3. Attaching the newly created element to the parent...
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Generated a negative flag if there is one specified annotation in the Interaction or one of its Experiment.
 *
 * @param session     the user session.
 * @param parent      the parent to which we attach the attributeList, and then the attribute.
 * @param interaction the interaction from which we will get the dissociation constant.
 *
 * @return the created flag. May be null.
 *
 * @see uk.ac.ebi.intact.model.Annotation
 * @see uk.ac.ebi.intact.model.Interaction
 * @see uk.ac.ebi.intact.model.Experiment
 */
public Element createNegativeFlag( UserSessionDownload session, Element parent, Interaction interaction ) {
  // TODO test it
  Element element = null;
  if ( isNegative( interaction ) ) {
    element = session.createElement( "negative" );
    Text negativeText = session.createTextNode( "true" );
    // add the text to the node
    element.appendChild( negativeText );
    // add the node to the parent
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

/**
 * Create a fullname element containing the fullname of the given AnnotatatedObject.
 *
 * @param session
 * @param parent  the names element, not null.
 * @param object  the annotatedObject from which we get the fullname, not null.
 */
protected void createFullname( UserSessionDownload session, Element parent, AnnotatedObject object ) {
  // fullname is NOT mandatory in the IntAct API.
  if ( object.getFullName() != null && !"".equals( object.getFullName().trim() ) ) {
    Element fullname = session.createElement( "fullName" );
    Text fullnameText = session.createTextNode( object.getFullName() );
    fullname.appendChild( fullnameText );
    parent.appendChild( fullname );
  }
}
origin: uk.ac.ebi.intact.util/data-conversion

private Element createCertainStatus( UserSessionDownload session, Element parent, String tagName ) {
  Element element = session.createElement( tagName );
  // names
  Element nameElement = session.createElement( "names" );
  element.appendChild( nameElement );
  Element shortlabelElement = session.createElement( "shortLabel" );
  nameElement.appendChild( shortlabelElement );
  Text shortlabelTextElement = session.createTextNode( "certain" );
  shortlabelElement.appendChild( shortlabelTextElement );
  // xref
  Element xrefElement = session.createElement( "xref" );
  element.appendChild( xrefElement );
  Element primaryRefElement = session.createElement( "primaryRef" );
  xrefElement.appendChild( primaryRefElement );
  primaryRefElement.setAttribute( "db", CvDatabase.PSI_MI );
  primaryRefElement.setAttribute( "dbAc", CvDatabase.PSI_MI_MI_REF );
  primaryRefElement.setAttribute( "id", "MI:0335" ); // certain, cf. http://psidev.sourceforge.net/mi/rel25/data/psi-mi25.dag
  primaryRefElement.setAttribute( "refType", CvXrefQualifier.IDENTITY );
  primaryRefElement.setAttribute( "refTypeAc", CvXrefQualifier.IDENTITY_MI_REF );
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.app/data-conversion

private Element createCertainStatus( UserSessionDownload session, Element parent, String tagName ) {
  Element element = session.createElement( tagName );
  // names
  Element nameElement = session.createElement( "names" );
  element.appendChild( nameElement );
  Element shortlabelElement = session.createElement( "shortLabel" );
  nameElement.appendChild( shortlabelElement );
  Text shortlabelTextElement = session.createTextNode( "certain" );
  shortlabelElement.appendChild( shortlabelTextElement );
  // xref
  Element xrefElement = session.createElement( "xref" );
  element.appendChild( xrefElement );
  Element primaryRefElement = session.createElement( "primaryRef" );
  xrefElement.appendChild( primaryRefElement );
  primaryRefElement.setAttribute( "db", CvDatabase.PSI_MI );
  primaryRefElement.setAttribute( "dbAc", CvDatabase.PSI_MI_MI_REF );
  primaryRefElement.setAttribute( "id", "MI:0335" ); // certain, cf. http://psidev.sourceforge.net/mi/rel25/data/psi-mi25.dag
  primaryRefElement.setAttribute( "refType", CvXrefQualifier.IDENTITY );
  primaryRefElement.setAttribute( "refTypeAc", CvXrefQualifier.IDENTITY_MI_REF );
  parent.appendChild( element );
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

/**
 * Generated a negative flag if there is one specified annotation in the Interaction or one of its Experiment.
 *
 * @param session     the user session.
 * @param parent      the parent to which we attach the attributeList, and then the attribute.
 * @param interaction the interaction from which we will get the dissociation constant.
 *
 * @return the created flag. May be null.
 *
 * @see uk.ac.ebi.intact.model.Annotation
 * @see uk.ac.ebi.intact.model.Interaction
 * @see uk.ac.ebi.intact.model.Experiment
 */
public Element createNegativeFlag( UserSessionDownload session, Element parent, Interaction interaction ) {
  // TODO test it
  Element element = null;
  if ( isNegative( interaction ) ) {
    element = session.createElement( "negative" );
    Text negativeText = session.createTextNode( "true" );
    // add the text to the node
    element.appendChild( negativeText );
    // add the node to the parent
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.util/data-conversion

/**
 * Generated a negative flag if there is one specified annotation in the Interaction or one of its Experiment.
 *
 * @param session     the user session.
 * @param parent      the parent to which we attach the attributeList, and then the attribute.
 * @param interaction the interaction from which we will get the dissociation constant.
 *
 * @return the created flag. May be null.
 *
 * @see uk.ac.ebi.intact.model.Annotation
 * @see uk.ac.ebi.intact.model.Interaction
 * @see uk.ac.ebi.intact.model.Experiment
 */
public Element createNegativeFlag( UserSessionDownload session, Element parent, Interaction interaction ) {
  // TODO test it
  Element element = null;
  if ( isNegative( interaction ) ) {
    element = session.createElement( "negative" );
    Text negativeText = session.createTextNode( "true" );
    // add the text to the node
    element.appendChild( negativeText );
    // add the node to the parent
    parent.appendChild( element );
  }
  return element;
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

  private Element createConfidenceElement(UserSessionDownload session, CvObject unit, Object value) {
    Element confidenceElement = session.createElement(CONFIDENCE_TAG_NAME);

    // 2. Generating Unit...
    Element unitElement = session.createElement(CONFIDENCE_UNIT_TAG_NAME);
    createNames(session, unitElement, unit);
    confidenceElement.appendChild(unitElement);

    // TODO check if it has MI reference, if so export them as xref of the confidence.unit.

    // 3. Generating value...
    Element valueElement = session.createElement(CONFIDENCE_VALUE_TAG_NAME);
    Text valueTextElement = session.createTextNode((String)value);
    valueElement.appendChild(valueTextElement);
    confidenceElement.appendChild(valueElement);
    return confidenceElement;
  }
}
origin: uk.ac.ebi.intact.dataexchange.psimi.legacy/data-conversion

Text refText = session.createTextNode( getExperimentId( session, experiment ) );
element.appendChild( refText );
uk.ac.ebi.intact.application.dataConversion.psiDownloadUserSessionDownloadcreateTextNode

Popular methods of UserSessionDownload

  • <init>
  • addMessage
  • createElement
  • declareAlreadyDefined
    Declare in the session that the given protein has been already converted in XML.
  • filterObsoleteAnnotationTopic
    Load all CvTopic and check which one have been flagged 'obsolete'. Those CvTopic are automatically a
  • getAvailabilityListElement
    Return the availabilityList element under the entry of the PSI document. If the element doesn't exis
  • getCvObjectCache
  • getEntryElement
    Return the entry element of the PSI document. If the element doesn't exist, it is created.
  • getExperimentIdentifier
    Get a specific identifier for the given experiemnt. If an identifier had already been affected for t
  • getExperimentListElement
    Return the experimentList element under the entry of the PSI document. If the element doesn't exist,
  • getFeatureIdentifier
    Get a specific identifier for the given feature. If an identifier had already been affected for that
  • getHostOrganismCache
  • getFeatureIdentifier,
  • getHostOrganismCache,
  • getInteractionIdentifier,
  • getInteractionListElement,
  • getInteractorIdentifier,
  • getInteractorListElement,
  • getMessages,
  • getNextClusterIdSuffix,
  • getNextObjectIdentifier

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getSystemService (Context)
  • startActivity (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JLabel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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