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; } }
private Element createStatus( UserSessionDownload session, Element parent, CvFuzzyType fuzzyType, String tagName ) { Element element = session.createElement( tagName ); // 1. Generating names... createNames( session, element, fuzzyType ); // 2. generating xref... Element xrefElement = session.createElement( "xref" ); createCvObjectXrefs( session, xrefElement, fuzzyType ); if ( xrefElement.hasChildNodes() ) { element.appendChild( xrefElement ); } parent.appendChild( element ); return element; }
private Element createStatus( UserSessionDownload session, Element parent, CvFuzzyType fuzzyType, String tagName ) { Element element = session.createElement( tagName ); // 1. Generating names... createNames( session, element, fuzzyType ); // 2. generating xref... Element xrefElement = session.createElement( "xref" ); createCvObjectXrefs( session, xrefElement, fuzzyType ); if ( xrefElement.hasChildNodes() ) { element.appendChild( xrefElement ); } parent.appendChild( element ); return element; }
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; }
private Element createStatus( UserSessionDownload session, Element parent, CvFuzzyType fuzzyType, String tagName ) { Element element = session.createElement( tagName ); // 1. Generating names... createNames( session, element, fuzzyType ); // 2. generating xref... Element xrefElement = session.createElement( "xref" ); createCvObjectXrefs( session, xrefElement, fuzzyType ); if ( xrefElement.hasChildNodes() ) { element.appendChild( xrefElement ); } parent.appendChild( element ); return element; }
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; }
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; }
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" ); Feature2xmlPSI25 f2xml = (Feature2xmlPSI25) Feature2xmlFactory.getInstance( session ); f2xml.createReference( session, participantElement, feature ); parent.appendChild( participantElement ); return participantElement; } }
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" ); Feature2xmlPSI25 f2xml = (Feature2xmlPSI25) Feature2xmlFactory.getInstance( session ); f2xml.createReference( session, participantElement, feature ); parent.appendChild( participantElement ); return participantElement; } }
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" ); Feature2xmlPSI25 f2xml = (Feature2xmlPSI25) Feature2xmlFactory.getInstance( session ); f2xml.createReference( session, participantElement, feature ); parent.appendChild( participantElement ); return participantElement; } }
/** * 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 ); }
/** * 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 ); }
/** * 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 ); }
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" );
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" );
private Element createParticipant( UserSessionDownload session, Element parent, Interactor interactor, Feature feature ) { Element participantElement = session.createElement( "participant" );
/** * 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 ); } }
/** * 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 ); } }
/** * 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; }
/** * 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 ); } }