Package edu.stanford.bmir.protege.web.shared.notes

Examples of edu.stanford.bmir.protege.web.shared.notes.NoteHeader


    public Optional<NoteDetails> getValue() {
        if(!lastDetails.isPresent()) {
            return Optional.absent();
        }
        NoteDetails last = lastDetails.get();
        NoteHeader header = last.getNoteHeader();
        NoteContent.Builder contentBuilder = NoteContent.builder();
        contentBuilder.setNoteType(NoteType.COMMENT);
        contentBuilder.setBody(editorPanel.getBody());
        NoteContent content = contentBuilder.build();
        return Optional.of(new NoteDetails(header, content));
View Full Code Here


        initWidget(rootElement);
    }


    public void setValue(NotePostedEvent event) {
        final NoteHeader noteHeader = event.getNoteDetails().getNoteHeader();
        userNameLabel.setText(noteHeader.getAuthor().getUserName());
        final Optional<OWLEntityData> targetAsEntityData = event.getTargetAsEntityData();
        if(targetAsEntityData.isPresent()) {
            entityLabel.setEntity(targetAsEntityData.get());
            entityLabel.setVisible(true);
        }
        else {
            entityLabel.setVisible(false);
        }
        timeLabel.setBaseTime(noteHeader.getTimestamp());
        final SafeHtmlBuilder builder = new SafeHtmlBuilder();
        final NoteContent noteContent = event.getNoteDetails().getNoteContent();
        final Optional<String> subject = noteContent.getSubject();
        if (subject.isPresent()) {
            builder.appendHtmlConstant("<span style=\"font-weight: bold; padding-right: 4px;\">" + subject.or("") + ":</span>");
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.notes.NoteHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.