public static AnnotationTag process( final Element element ) { final String type = element.getAttribute( "name" ); final String text = DOMUtil.getSimpleElementText( element ); return new AnnotationTag( type, text ); } }
public ExpressedInTag( final AnnotationTag annotation ) { if ( !Constants.EXPRESSED_IN.equalsIgnoreCase( annotation.getType() ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having " + Constants.EXPRESSED_IN + " as type." ); } String text = annotation.getText(); int index = text.indexOf( ':' ); String id = null; String shortlabel = null; if ( index == -1 ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>" ); } else { id = text.substring( 0, index ); if ( id == null || "".equals( id ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the id is missing." ); } shortlabel = text.substring( index + 1, text.length() ); if ( shortlabel == null || "".equals( shortlabel ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the shortlabel is missing" ); } } this.proteinInteractorID = id; this.bioSourceShortlabel = shortlabel; }
public static void check( final AnnotationTag annotation ) { final String type = annotation.getType(); if ( annotation.isExpressedIn() ) { } else if ( annotation.isDissociationConstant() ) { Float.parseFloat( annotation.getText() ); } catch ( NumberFormatException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "The given dissociation constant (Kd) " +
AnnotationTag annotationTag = (AnnotationTag) iterator1.next(); if ( annotationTag.isDissociationConstant() ) { Float kd = new Float( annotationTag.getText() ); interaction.setKD( kd ); for ( Iterator iterator2 = annotations.iterator(); iterator2.hasNext(); ) { final AnnotationTag annotationTag = (AnnotationTag) iterator2.next(); final CvTopic cvTopic = AnnotationChecker.getCvTopic( annotationTag.getType() ); annotation.setAnnotationText( annotationTag.getText() ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getAnnotationDao().persist( annotation );
for ( Iterator iterator = annotations.iterator(); iterator.hasNext(); ) { AnnotationTag annotation = (AnnotationTag) iterator.next(); if ( annotation.isDissociationConstant() ) { countKd++;
AnnotationTag annotation = AnnotationParser.process( (Element) entryNode ); if ( annotation.hasText() ) { annotations.add( annotation );
public static void check( final AnnotationTag annotation ) { final String type = annotation.getType(); if ( annotation.isExpressedIn() ) { } else if ( annotation.isDissociationConstant() ) { Float.parseFloat( annotation.getText() ); } catch ( NumberFormatException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "The given dissociation constant (Kd) " +
AnnotationTag annotationTag = (AnnotationTag) iterator1.next(); if ( annotationTag.isDissociationConstant() ) { Float kd = new Float( annotationTag.getText() ); interaction.setKD( kd ); for ( Iterator iterator2 = annotations.iterator(); iterator2.hasNext(); ) { final AnnotationTag annotationTag = (AnnotationTag) iterator2.next(); final CvTopic cvTopic = AnnotationChecker.getCvTopic( annotationTag.getType() ); annotation.setAnnotationText( annotationTag.getText() ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getAnnotationDao().persist( annotation );
for ( Iterator iterator = annotations.iterator(); iterator.hasNext(); ) { AnnotationTag annotation = (AnnotationTag) iterator.next(); if ( annotation.isDissociationConstant() ) { countKd++;
AnnotationTag annotation = AnnotationParser.process( (Element) entryNode ); if ( annotation.hasText() ) { annotations.add( annotation );
public ExpressedInTag( final AnnotationTag annotation ) { if ( !Constants.EXPRESSED_IN.equalsIgnoreCase( annotation.getType() ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having " + Constants.EXPRESSED_IN + " as type." ); } String text = annotation.getText(); int index = text.indexOf( ':' ); String id = null; String shortlabel = null; if ( index == -1 ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>" ); } else { id = text.substring( 0, index ); if ( id == null || "".equals( id ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the id is missing." ); } shortlabel = text.substring( index + 1, text.length() ); if ( shortlabel == null || "".equals( shortlabel ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the shortlabel is missing" ); } } this.proteinInteractorID = id; this.bioSourceShortlabel = shortlabel; }
public static void check( final AnnotationTag annotation ) { final String type = annotation.getType(); if ( annotation.isExpressedIn() ) { } else if ( annotation.isDissociationConstant() ) { Float.parseFloat( annotation.getText() ); } catch ( NumberFormatException e ) { MessageHolder.getInstance().addCheckerMessage( new Message( "The given dissociation constant (Kd) " +
AnnotationTag annotationTag = (AnnotationTag) iterator1.next(); if ( annotationTag.isDissociationConstant() ) { Float kd = new Float( annotationTag.getText() ); interaction.setKD( kd ); for ( Iterator iterator2 = annotations.iterator(); iterator2.hasNext(); ) { final AnnotationTag annotationTag = (AnnotationTag) iterator2.next(); final CvTopic cvTopic = AnnotationChecker.getCvTopic( annotationTag.getType() ); annotation.setAnnotationText( annotationTag.getText() ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getAnnotationDao().persist( annotation );
public static AnnotationTag process( final Element element ) { final String type = element.getAttribute( "name" ); final String text = DOMUtil.getSimpleElementText( element ); return new AnnotationTag( type, text ); } }
for ( Iterator iterator = annotations.iterator(); iterator.hasNext(); ) { AnnotationTag annotation = (AnnotationTag) iterator.next(); if ( annotation.isDissociationConstant() ) { countKd++;
AnnotationTag annotation = AnnotationParser.process( (Element) entryNode ); if ( annotation.hasText() ) { annotations.add( annotation );
public ExpressedInTag( final AnnotationTag annotation ) { if ( !Constants.EXPRESSED_IN.equalsIgnoreCase( annotation.getType() ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having " + Constants.EXPRESSED_IN + " as type." ); } String text = annotation.getText(); int index = text.indexOf( ':' ); String id = null; String shortlabel = null; if ( index == -1 ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>" ); } else { id = text.substring( 0, index ); if ( id == null || "".equals( id ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the id is missing." ); } shortlabel = text.substring( index + 1, text.length() ); if ( shortlabel == null || "".equals( shortlabel ) ) { throw new IllegalArgumentException( "You can only create an ExpressedInTag out of an AnnotationTag having its text formatted as follow:" + "<proteinInteractorID>:<biosourceShortlabel>. the shortlabel is missing" ); } } this.proteinInteractorID = id; this.bioSourceShortlabel = shortlabel; }