Package edu.stanford.bmir.protege.web.server

Examples of edu.stanford.bmir.protege.web.server.MetaProjectManager


    }

    @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


    }

    @Override
    public GetAvailableProjectsResult execute(GetAvailableProjectsAction action, ExecutionContext executionContext) {
        UserId userId = executionContext.getUserId();
        MetaProjectManager mpm = MetaProjectManager.getManager();
        List<ProjectDetails> details = mpm.getListableReadableProjects(userId);
        Collections.sort(details);
        return new GetAvailableProjectsResult(details);
    }
View Full Code Here

     */
    protected boolean isUserAdmin(UserId userId) {
        if(userId.isGuest()) {
            return false;
        }
        MetaProjectManager mpm = MetaProjectManager.getManager();
        MetaProject metaProject = mpm.getMetaProject();
        User user = metaProject.getUser(userId.getUserName());
        if(user == null) {
            return false;
        }
        for(Group group : user.getGroups()) {
View Full Code Here

    private void save() {
        OWLAPIMetaProjectStore.getStore().saveMetaProject(MetaProjectManager.getManager());
    }

    private MetaProject getMetaProject() {
        MetaProjectManager mpm = MetaProjectManager.getManager();
        return mpm.getMetaProject();
    }
View Full Code Here

* Date: 07/03/2012
*/
public class Protege3MetaProjectDocumentIRIProvider implements DocumentIRIProvider {

    public IRI getDocumentIRI(ProjectId projectId) {
        MetaProjectManager mpm = MetaProjectManager.getManager();
        MetaProject metaProject = mpm.getMetaProject();
        ProjectInstance pi = metaProject.getProject(projectId.getId());
        String location = pi.getLocation();
        File fileSystemLocation = new File(location.substring(0, location.length() - ".pprj".length()));
        return IRI.create(fileSystemLocation);
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.server.MetaProjectManager

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.