private Element createReference( UserSessionDownload session, Element parent, Feature feature, String type ) { // 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 a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." ); } else { if ( !"participant".equals( parent.getNodeName() ) ) { throw new IllegalArgumentException( "You must give a <participant> to build a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." + "." ); } } // 2. Initialising the element... Element element = session.createElement( type ); element.setAttribute( "ref", "" + session.getFeatureIdentifier( feature ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
private Element createReference( UserSessionDownload session, Element parent, Feature feature, String type ) { // 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 a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." ); } else { if ( !"participant".equals( parent.getNodeName() ) ) { throw new IllegalArgumentException( "You must give a <participant> to build a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." + "." ); } } // 2. Initialising the element... Element element = session.createElement( type ); element.setAttribute( "ref", "" + session.getFeatureIdentifier( feature ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
private Element createReference( UserSessionDownload session, Element parent, Feature feature, String type ) { // 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 a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." ); } else { if ( !"participant".equals( parent.getNodeName() ) ) { throw new IllegalArgumentException( "You must give a <participant> to build a " + PROTEIN_FEATURE_REF_TAG_NAME + " / " + DNA_FEATURE_REF_TAG_NAME + " / " + RNA_FEATURE_REF_TAG_NAME + "." + "." ); } } // 2. Initialising the element... Element element = session.createElement( type ); element.setAttribute( "ref", "" + session.getFeatureIdentifier( feature ) ); // 3. Attaching the newly created element to the parent... parent.appendChild( element ); return element; }
Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) ); element.appendChild( refText );
Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) ); element.appendChild( refText );
Text refText = session.createTextNode( "" + session.getFeatureIdentifier( feature ) ); element.appendChild( refText );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );
element.setAttribute( "id", "" + session.getFeatureIdentifier( feature ) );