/** * Creates a valid Annotation instance. A valid instance must have at least * a non-null Institution specified. A side-effect of this constructor is to * set the <code>created</code> and <code>updated</code> fields of the instance * to the current time. * * @param topic Refers to the controlled vocabulary topic this Annotation relates * to. This should be non-null. * * @throws NullPointerException thrown if no Institution specified. */ public Annotation( CvTopic topic ) { //super call sets creation time data super( ); setCvTopic( topic ); }
/** * Creates a valid Annotation instance. A valid instance must have at least * a non-null Institution specified. A side-effect of this constructor is to * set the <code>created</code> and <code>updated</code> fields of the instance * to the current time. * * @param topic Refers to the controlled vocabulary topic this Annotation relates * to. This should be non-null. * * @throws NullPointerException thrown if no Institution specified. */ public Annotation( CvTopic topic ) { //super call sets creation time data super( ); setCvTopic( topic ); }
/** * Creates a valid Annotation instance. A valid instance must have at least * a non-null Institution specified. A side-effect of this constructor is to * set the <code>created</code> and <code>updated</code> fields of the instance * to the current time. * * @param owner The <code>Institution</code> which 'owns' this BioSource * @param topic Refers to the controlled vocabulary topic this Annotation relates * to. This should be non-null. * * @throws NullPointerException thrown if no Institution specified. */ public Annotation( Institution owner, CvTopic topic ) { //super call sets creation time data super( owner ); setCvTopic( topic ); }
@Deprecated public Annotation( Institution owner, CvTopic topic ) { //super call sets creation time data super( ); setCvTopic( topic ); setOwner(owner); }
@Deprecated public Annotation( Institution owner, CvTopic topic ) { //super call sets creation time data super( ); setCvTopic( topic ); setOwner(owner); }
@Override public void visitAnnotation( Annotation annotation ) { final CvTopic topic = annotation.getCvTopic(); final String mi = topic.getIdentifier(); if ( mi != null ) { final CvTopic oboTerm = ( CvTopic ) mi2cv.get( createCvKey( topic.getClass(), mi ) ); if ( oboTerm == null ) { log.warn( "Could not find topic " + topic.getClass().getSimpleName() + "( " + topic.getShortLabel() + " ) by MI: " + mi ); } else { annotation.setCvTopic( oboTerm ); } } } }
protected Annotation cloneAnnotation(Annotation annotation) throws IntactClonerException { if (annotation == null) return null; Annotation clone = new Annotation(); clonerManager.addClone(annotation, clone); clone.setCvTopic(clone(annotation.getCvTopic())); clone.setAnnotationText(annotation.getAnnotationText()); return clone; }
protected Annotation cloneAnnotation(Annotation annotation) throws IntactClonerException { if (annotation == null) return null; Annotation clone = new Annotation(); clonerManager.addClone(annotation, clone); clone.setCvTopic(clone(annotation.getCvTopic())); clone.setAnnotationText(annotation.getAnnotationText()); return clone; }
private Annotation synchronizeAnnotation( Annotation annotation, AnnotatedObject parent ) { if (annotation.getAc() != null) { return IntactContext.getCurrentInstance().getDataContext().getDaoFactory() .getAnnotationDao().getByAc(annotation.getAc()); } else { } annotation.setCvTopic( synchronize( annotation.getCvTopic() ) ); if (annotation.getAc() == null && parent.getAc() != null) { annotatedObjectsToPersist.put(keyBuilder.keyForAnnotation(annotation, parent), annotation); } return annotation; }
private Annotation synchronizeAnnotation( Annotation annotation, AnnotatedObject parent ) { if (annotation.getAc() != null) { return IntactContext.getCurrentInstance().getDataContext().getDaoFactory() .getAnnotationDao().getByAc(annotation.getAc()); } else { } annotation.setCvTopic( synchronize( annotation.getCvTopic() ) ); if (annotation.getAc() == null && parent.getAc() != null) { annotatedObjectsToPersist.put(keyBuilder.keyForAnnotation(annotation, parent), annotation); } return annotation; }
annotation.setCvTopic(cvTopic);