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

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


     */
    public boolean isLoggedInUserOwnerOfActiveProject() {
        if(!activeProject.isPresent()) {
            return false;
        }
        ProjectId projectId = activeProject.get();
        Optional<Project> project = ProjectManager.get().getProject(projectId);
        if(!project.isPresent()) {
            return false;
        }
        ProjectDetails projectDetails = project.get().getProjectDetails();
View Full Code Here


        final String existingName = pi.getName();

        final Slot displayNameSlot = kb.getSlot(DISPLAY_NAME_SLOT_NAME);
        protegeInstance.setOwnSlotValue(displayNameSlot, existingName);

        final ProjectId newProjectId = ProjectIdFactory.getFreshProjectId();
        pi.setName(newProjectId.getId());
        moveProjectDirectoryOnDisk(existingName, newProjectId);
    }
View Full Code Here

                projectPanel.addListener(new PanelListenerAdapter() {
                    @Override
                    public boolean doBeforeDestroy(Component component) {
                        if (component instanceof ProjectDisplayImpl) {
                            ProjectDisplayImpl o = (ProjectDisplayImpl) component;
                            ProjectId projectId = o.getProjectId();
                            projectId2ProjectPanelMap.remove(projectId);
                            ProjectManager.get().unloadProject(projectId);
                            hideTabStripItem(o);
                            o.hide();
                            activate(0);
View Full Code Here

        return new ProjectExistsValidator<A>();
    }

    @Override
    public RequestValidationResult validateAction(A action, RequestContext requestContext) {
        ProjectId projectId = action.getProjectId();
        OWLAPIProjectDocumentStore ds = OWLAPIProjectDocumentStore.getProjectDocumentStore(projectId);
        if(ds.exists()) {
            return RequestValidationResult.getValid();
        }
        else {
View Full Code Here

        return new UserHasProjectReadPermissionValidator<A>();
    }

    @Override
    public RequestValidationResult validateAction(A action, RequestContext requestContext) {
        ProjectId projectId = action.getProjectId();
        MetaProjectManager mpm = MetaProjectManager.getManager();
        Collection<Operation> ops = mpm.getAllowedOperations(projectId.getId(), requestContext.getUserId().getUserName());
        for(Operation op : ops) {
            if(op.getName().equals(OntologyShareAccessConstants.PROJECT_READ_ONLY_ACCESS_OPERATION)) {
                return RequestValidationResult.getValid();
            }
        }
View Full Code Here

//        ontologyIdLabel = new Label();
//        form.addWidget("", ontologyIdLabel);


        ProjectId projectId = details.getProjectId();
        // TODO FIX ACRONYM
        ontologyAcroymnTextBox = form.addTextBox("Acronym", "Maximum 16 characters, no spaces, all upper case", details.getDisplayName(), new NonEmptyWebProtegeDialogTextFieldValidator("Please specify an acronym"));
        versionNumberTextBox = form.addTextBox("Version", "e.g. 1.0.3", "", new NonEmptyWebProtegeDialogTextFieldValidator("Please specify a version string"));

        form.addVerticalSpacer();
View Full Code Here

    @Override
    public GetProjectEventsResult execute(GetProjectEventsAction action, ExecutionContext executionContext) {
        OWLAPIProjectManager projectManager = OWLAPIProjectManager.getProjectManager();
        final EventTag sinceTag = action.getSinceTag();
        final ProjectId projectId = action.getProjectId();
        if(!projectManager.isActive(projectId)) {
            return getEmptyResult(projectId, sinceTag);
        }
        Optional<OWLAPIProject> project = projectManager.getProjectIfActive(projectId);
        if(!project.isPresent()) {
View Full Code Here

        unregisterProject(projectId);
    }


    private Project registerProject(final UserId userId, final PermissionsSet userPermissions, final ProjectDetails projectDetails) {
        final ProjectId projectId = projectDetails.getProjectId();
        if(map.containsKey(projectId)) {
            throw new RuntimeException("Double registration of project: " + projectId);
        }

        final Project project = new Project(projectDetails, userPermissions);
View Full Code Here

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        FileDownloadParameters downloadParameters = new FileDownloadParameters(req);
        if(downloadParameters.isProjectDownload()) {
            ProjectId projectId = downloadParameters.getProjectId();
            RevisionNumber revisionNumber = downloadParameters.getRequestedRevision();
            DownloadFormat format = downloadParameters.getFormat();
            OWLAPIProjectDownloader downloader = new OWLAPIProjectDownloader(projectId, revisionNumber, format);
            BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(resp.getOutputStream());
            downloader.writeProject(resp, bufferedOutputStream);
View Full Code Here

        Optional<ProjectId> activeProject = Application.get().getActiveProject();
        if(!activeProject.isPresent()) {
            GWT.log("Active project is not present");
            return;
        }
        ProjectId projectId = activeProject.get();
        DispatchServiceManager.get().execute(new SetEntityCrudKitSettingsAction(projectId, fromSettings, toSettings, iriPrefixUpdateStrategy), new AsyncCallback<SetEntityCrudKitSettingsResult>() {
            @Override
            public void onFailure(Throwable caught) {
                GWT.log("There was a problem setting the EntityCrudKitSettings", caught);
                MessageBox.showAlert("Error", "An error occurred whilst updating the fresh entity settings.  Please try again.");
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.