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

Examples of edu.stanford.bmir.protege.web.shared.project.ProjectId


    }

    @SuppressWarnings("unchecked")
    public <A extends Action<R>, R extends Result> void execute(A action, final AsyncCallback<R> callback) {
        if(action instanceof HasProjectId) {
            ProjectId projectId = ((HasProjectId) action).getProjectId();
            ResultCache resultCache = getResultCache(projectId);
            Optional<R> result = resultCache.getCachedResult(action);
            if(result.isPresent()) {
                GWT.log("[DISPATCH] Using cached result (" + action + ")");
                callback.onSuccess(result.get());
View Full Code Here


    public void dispose() {
    }


    private void printBrowserTextReferenceWarningMessage(String referenceName) {
        ProjectId projectId = project.getProjectId();
        WebProtegeLoggerManager.get(RenderingManager.class).info(projectId, "Could not find entity by name \"%s\".  This name may be the browser text rather than an entity IRI.", referenceName);
    }
View Full Code Here

     */
    private OWLAPIProject getProject(String projectName) {
        if (projectName == null) {
            throw new NullPointerException("projectName must not be null");
        }
        ProjectId projectId = ProjectId.get(projectName);
        // TODO: Log
        return getProject(projectId);
    }
View Full Code Here

     * Gets the root ontology for a given project name.
     * @param projectName The name of the project.
     * @return The root ontology. Not <code>null</code>.
     */
    private OWLOntology getOntology(String projectName) {
        ProjectId projectId = ProjectId.get(projectName);
        OWLAPIProjectManager pm = OWLAPIProjectManager.getProjectManager();
        return pm.getProject(projectId).getRootOntology();
    }
View Full Code Here

    }



    private void doPost(NoteContent content) {
        ProjectId projectId = Application.get().getActiveProject().get();
        DispatchServiceManager.get().execute(new AddNoteToEntityAction(projectId, entity.get(), content), new AsyncCallback<AddNoteToEntityResult>() {
            @Override
            public void onFailure(Throwable caught) {
                GWT.log("Post failed", caught);
            }
View Full Code Here

    }



    private void setNoteResolved() {
        ProjectId projectId = Application.get().getActiveProject().get();
        NoteStatus status = currentNoteStatus == NoteStatus.OPEN ? NoteStatus.RESOLVED : NoteStatus.OPEN;
        DispatchServiceManager.get().execute(new                 SetNoteStatusAction(projectId, note.getNoteId(), status), new AsyncCallback<SetNoteStatusResult>() {
            @Override
            public void onFailure(Throwable caught) {
                GWT.log("Setting status failed", caught);
View Full Code Here

        this.noteId = noteId;
    }

    @Override
    public void handleDeleteNote() {
        ProjectId projectId = Application.get().getActiveProject().get();
        DispatchServiceManager.get().execute(new DeleteNoteAction(projectId, noteId), new AsyncCallback<DeleteNoteResult>() {
            @Override
            public void onFailure(Throwable caught) {
                GWT.log("There was a problem deleting the note", caught);
            }
View Full Code Here

*/
public class RenderingServiceImpl extends WebProtegeRemoteServiceServlet implements RenderingService  {

    @Override
    public GetRenderingResponse execute(GetRendering command) {
        ProjectId projectId = command.getProjectId();
        OWLAPIProject project = OWLAPIProjectManager.getProjectManager().getProject(projectId);
        RenderingManager rm = project.getRenderingManager();
        Map<OWLEntity, OWLEntityData> result = rm.getRendering(command.getEntities());
        return new GetRenderingResponse(result);
    }
View Full Code Here

    private boolean isEditingEnabled() {
        final Optional<ProjectId> activeProjectId = Application.get().getActiveProject();
        if(!activeProjectId.isPresent()) {
            return false;
        }
        ProjectId projectId = activeProjectId.get();
        final Optional<Project> activeProject = ProjectManager.get().getProject(projectId);
        if(!activeProject.isPresent()) {
            return false;
        }
        Project project = activeProject.get();
View Full Code Here

        controller.setMode(NoteContentEditorMode.REPLY);
        WebProtegeDialog.showDialog(controller);
    }

    private void doReply(NoteContent content) {
        ProjectId projectId = Application.get().getActiveProject().get();
        DispatchServiceManager.get().execute(new AddReplyToNoteAction(projectId, noteId, content), new AsyncCallback<AddReplyToNoteResult>() {
            @Override
            public void onFailure(Throwable caught) {
                GWT.log("Reply failed", caught);
            }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.project.ProjectId

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.