private void addUsedInClass(CvObject cv, CvTopic usedInClass, String classes) { final Annotation hiddenAnnotation = new Annotation(usedInClass, classes); cv.addAnnotation(hiddenAnnotation); corePersister.saveOrUpdate(cv); }
private void markAsHidden(CvObject cv, CvTopic hidden) { final Annotation hiddenAnnotation = new Annotation(hidden, null); cv.addAnnotation(hiddenAnnotation); corePersister.saveOrUpdate(cv); }
private void addUsedInClass(CvObject cv, CvTopic usedInClass, String classes) { final Annotation hiddenAnnotation = new Annotation(usedInClass, classes); cv.addAnnotation(hiddenAnnotation); corePersister.saveOrUpdate(cv); }
private void markAsHidden(CvObject cv, CvTopic hidden) { final Annotation hiddenAnnotation = new Annotation(hidden, null); cv.addAnnotation(hiddenAnnotation); corePersister.saveOrUpdate(cv); }
cvObject.addAnnotation( annot ); cvObject.addAnnotation( new Annotation( institution, definitionTopicDef, prefixString ) ); cvObject.addAnnotation( annot ); cvObject.addAnnotation( new Annotation( institution, definitionTopicDef, prefixString ) ); cvObject.addAnnotation( new Annotation( institution, definitionTopic, oboObj.getDefinition() ) ); cvObject.addAnnotation( new Annotation( institution, definitionTopic, oboObj.getDefinition() ) ); Annotation annot = toAnnotation( CvTopic.XREF_VALIDATION_REGEXP, annotationText ); if ( annot != null ) { cvObject.addAnnotation( annot ); cvObject.addAnnotation( annot ); cvObject.addAnnotation( annot );
existingCv.addAnnotation( annotation ); stats.addUpdatedCv( existingCv );
public static Annotation hideTerm(CvObject c, String message){ DaoFactory factory = IntactContext.getCurrentInstance().getDaoFactory(); CvTopic topicFromDb = factory.getCvObjectDao(CvTopic.class).getByShortLabel(CvTopic.HIDDEN); if (topicFromDb == null){ topicFromDb = CvObjectUtils.createCvObject(IntactContext.getCurrentInstance().getInstitution(), CvTopic.class, null, CvTopic.HIDDEN); IntactContext.getCurrentInstance().getCorePersister().saveOrUpdate(topicFromDb); } Annotation newAnnotation = new Annotation(topicFromDb, message); c.addAnnotation(newAnnotation); return newAnnotation; }