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

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


    public void updateSharingSettings(HttpServletRequest request, ProjectSharingSettings projectSharingSettings) {

        MetaProjectManager mpm = MetaProjectManager.getManager();
        MetaProject metaProject = mpm.getMetaProject();
        ProjectId projectId = projectSharingSettings.getProjectId();
        ProjectInstance projectInstance = metaProject.getProject(projectId.getId());

        // TODO: Check we are allowed to manage projects permissions

        Map<SharingSetting, Set<User>> usersBySharingSetting = createUsersBySharingSettingMap(request, projectSharingSettings, metaProject);
View Full Code Here


    private NamedIndividualFrameEditor editor;

    @Override
    public EditorView<LabelledFrame<NamedIndividualFrame>> getView(OWLEntityDataContext context) {
        if (editor == null) {
            ProjectId projectId = context.getProjectId();
            editor = new NamedIndividualFrameEditor(projectId);
        }
        return editor;
    }
View Full Code Here

        User user = policy.getUserByName(userId.getUserName());
        List<ProjectDetails> result = new ArrayList<ProjectDetails>();
        for (ProjectInstance projectInstance : metaproject.getProjects()) {
            final String name = projectInstance.getName();
            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

        }
        return createProjectDetailsFromProjectInstance(pi);
    }

    private static ProjectDetails createProjectDetailsFromProjectInstance(ProjectInstance projectInstance) {
        final ProjectId projectId = ProjectId.get(projectInstance.getName());
        final String description = projectInstance.getDescription();
        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");
View Full Code Here

        webProtegeLogger.info("Loading project: " + action.getProjectId());
        OWLAPIProjectManager pm = OWLAPIProjectManager.getProjectManager();
        pm.getProject(action.getProjectId());
        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()));
        }
        return new LoadProjectResult(executionContext.getUserId(), builder.build(), projectDetails);
View Full Code Here

* Date: 09/04/2012
*/
public class ChAOServiceOWLAPIImpl extends WebProtegeRemoteServiceServlet implements ChAOService {

    private OWLAPIProject getProject(String projectName) {
        ProjectId projectId = ProjectId.get(projectName);
        return getProject(projectId);
    }
View Full Code Here

        } else {
            setTitle("Change history (nothing selected)");
        }


        ProjectId projectId = getProjectId();
        proxy.resetParams();
        proxy.setProjectId(projectId);
        proxy.setEntityName(entityName);

        PagingToolbar pToolbar = (PagingToolbar) changesGrid.getBottomToolbar();
View Full Code Here

    }


    @Test
    public void shouldParseOntologyId() {
        ProjectId projectId = ProjectId.get("00000000-0000-0000-0000-000000000000");
        when(servletRequest.getParameter(FileDownloadConstants.PROJECT_NAME_PARAMETER)).thenReturn(projectId.getId());
        assertThat(parameters.getProjectId(), is(equalTo(projectId)));
    }
View Full Code Here

    @Test
    public void convertShouldReturnSuppliedId() {
        ProjectIdWriteConverter converter = new ProjectIdWriteConverter();
        String suppliedId = UUID.randomUUID().toString();
        ProjectId projectId = ProjectId.get(suppliedId);
        String convertedId = converter.convert(projectId);
        assertEquals(suppliedId, convertedId);
    }
View Full Code Here

    @Test
    public void convertShouldReturnProjectIdWithSuppliedId() {
        ProjectIdReadConverter converter = new ProjectIdReadConverter();
        String suppliedId = UUID.randomUUID().toString();
        ProjectId projectId = converter.convert(suppliedId);
        assertEquals(suppliedId, projectId.getId());
    }
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.