public void runAsAdmin() { final Share share = iQuery.get(Share.class, shareId); CommentAnnotation comment = new CommentAnnotation(); comment.setTextValue(commentText); comment.setNs(NS_COMMENT); share.linkAnnotation(comment); iUpdate.flush(); rv[0] = iQuery.get(CommentAnnotation.class, comment.getId()); }});
protected void define(Session s, String uuid, String message, long started, CreationRequest req) { Long idle = req.timeToIdle == null ? defaultTimeToIdle : req.timeToIdle; Long live = req.timeToLive == null ? defaultTimeToLive : req.timeToLive; if (req.groupsLed != null) { CommentAnnotation ca = new CommentAnnotation(); ca.setNs(GROUP_SUDO_NS); StringBuilder sb = new StringBuilder(); for (int i = 0; i < req.groupsLed.size(); i++) { if (i > 0) { sb.append(","); } sb.append(req.groupsLed.get(i)); } ca.setTextValue(sb.toString()); s.linkAnnotation(ca); } define(s, uuid, message, started, idle, live, req.principal.getEventType(), req.agent, req.ip); }
ome.model.annotations.CommentAnnotation ca = (ome.model.annotations.CommentAnnotation) ann; if (ca.getId().longValue() > maxCAId) { maxCAId = ca.getId().longValue(); lastCA = ca; long id = settings.userSpecifiedTarget.getId().getValue(); log.error("User-specified template target '{}' AND {}:{}", lastCA.getTextValue(), kls, id); } else { String path = lastCA.getDescription(); File file = new File(path); for (int i = 0; i < location.omittedLevels; i++) { target.init(lastCA.getTextValue()); settings.userSpecifiedTarget = target.load(store, reader.isSPWReader());
public ome.model.annotations.CommentAnnotation newInstance() { return new ome.model.annotations.CommentAnnotation(); }
@Override public boolean acceptFilter(ome.util.Filter __filter){ try { return super.acceptFilter(__filter); } catch (RuntimeException re) { // ticket:1183 - Caused by Utils.trueClass(Annotation.class) if (re.getCause() instanceof InstantiationException) { this.unload(); return true; } else { throw re; } } }
fuzzy = new FuzzyTermEnum(reader, new Term("combined_fields", terms[0])); while (fuzzy.next()) { CommentAnnotation text = new CommentAnnotation(); text.setNs(terms[0]); text.setTextValue(fuzzy.term().text()); rv.add(text);
public ome.model.annotations.CommentAnnotation proxy() { return new ome.model.annotations.CommentAnnotation(this.id, false); }