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

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


        ProjectId projectId = activeProject.get();
        Optional<Project> project = ProjectManager.get().getProject(projectId);
        if(!project.isPresent()) {
            return false;
        }
        ProjectDetails projectDetails = project.get().getProjectDetails();
        return projectDetails.getOwner().equals(getUserId());
    }
View Full Code Here


    public ProjectDetails getProjectDetails(ProjectId projectId) {
        String displayName = getDisplayName(projectId);
        String description = getDescription(projectId);
        UserId owner = getOwner(projectId);
        boolean inTrash = isInTrash(projectId);
        return new ProjectDetails(projectId, displayName, description, owner, inTrash);
    }
View Full Code Here

        Collections.sort(result);
        return result;
    }

    public Optional<ProjectDetails> getProjectDetails(ProjectId projectId) {
        ProjectDetails projectDetails = cache.get(projectId);
        return Optional.fromNullable(projectDetails);
    }
View Full Code Here

        ProjectDetails projectDetails = cache.get(projectId);
        return Optional.fromNullable(projectDetails);
    }

    public boolean setInTrash(ProjectId projectId, boolean inTrash) {
        ProjectDetails details = cache.get(projectId);
        if(details == null) {
            return false;
        }
        if(details.isInTrash() == inTrash) {
            return false;
        }
        ProjectDetails replacementDetails = details.builder().setInTrash(inTrash).build();
        cache.put(projectId, replacementDetails);
        return true;
    }
View Full Code Here

            if (name != null && ProjectId.isWelFormedProjectId(name)) {
                final ProjectId projectId = ProjectId.get(name);
                if (isAuthorisedToReadAndList(policy, user, projectInstance)) {
                    OWLAPIProjectDocumentStore ds = OWLAPIProjectDocumentStore.getProjectDocumentStore(projectId);
                    if (ds.exists()) {
                        final ProjectDetails projectDetails = createProjectDetailsFromProjectInstance(projectInstance);
                        result.add(projectDetails);
                    }
                }
            }
        }
View Full Code Here

        final User projectOwner = projectInstance.getOwner();
        final UserId ownerId = projectOwner != null ? UserId.getUserId(projectOwner.getName()) : UserId.getGuest();
        final boolean inTrash = isInTrash(projectInstance);
        final Slot displayNameSlot = projectInstance.getProtegeInstance().getKnowledgeBase().getSlot("displayName");
        final String displayName = (String) projectInstance.getProtegeInstance().getOwnSlotValue(displayNameSlot);
        return new ProjectDetails(projectId, displayName, description, ownerId, inTrash);
    }
View Full Code Here

        long t1 = System.currentTimeMillis();
        webProtegeLogger.info(".... loaded project in " + (t1 - t0) + " ms");
        final ProjectId projectId = action.getProjectId();//project.getProjectId();

        final OWLAPIProjectMetadataManager manager = OWLAPIProjectMetadataManager.getManager();
        ProjectDetails projectDetails = manager.getProjectDetails(projectId);

        Collection<Operation> ops = MetaProjectManager.getManager().getAllowedOperations(projectId.getId(), executionContext.getUserId().getUserName());
        PermissionsSet.Builder builder = PermissionsSet.builder();
        for (Operation op : ops) {
            builder.addPermission(Permission.getPermission(op.getName()));
View Full Code Here

TOP

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

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.