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

Examples of edu.stanford.bmir.protege.web.shared.user.UserId


    private void replaceUserAndBroadcastChanges(UserDetails newUserDetails, Set<GroupId> newUserGroups) {
        groups.clear();
        currentUserProperties.clear();

        UserId previousUserId = this.userId;
        this.userId = newUserDetails.getUserId();
        this.userDetails = newUserDetails;
        this.groups.addAll(newUserGroups);
        if(userId.isGuest()) {
            EventBusManager.getManager().postEvent(new UserLoggedOutEvent(previousUserId));
View Full Code Here


            changes.addAll(replaceStringAnnotationValue(projectId, iri, OBO_NAMESPACE_IRI, termId.getNamespace()));
            description.append("Set term namespace to ");
            description.append(termId.getNamespace());
        }
        if (!changes.isEmpty()) {
            UserId userId = getUserInSessionAndEnsureSignedIn();
            project.applyChanges(userId, changes, description.toString().trim());
        }
    }
View Full Code Here

        }
        if (changes.isEmpty()) {
            // New
            changes.add(new AddAxiom(ont, definitionAssertion));
        }
        UserId userId = getUserInSessionAndEnsureSignedIn();
        project.applyChanges(userId, changes, "Set term definition");
    }
View Full Code Here

            }
        }


        if (!changes.isEmpty()) {
            UserId userId = getUserInSessionAndEnsureSignedIn();
            project.applyChanges(userId, changes, "Edited relationship values: " + description.toString());
        }

    }
View Full Code Here

        OWLEquivalentClassesAxiom newXPAxiom = df.getOWLEquivalentClassesAxiom(owlClass, intersectionOf);

        OWLOntology rootOntology = project.getRootOntology();
        OWLEquivalentClassesAxiom existingXPAxiom = getCrossProductEquivalentClassesAxiom(rootOntology, owlClass);

        UserId userId = getUserInSessionAndEnsureSignedIn();
        List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>();
        changes.add(new AddAxiom(rootOntology, newXPAxiom));
        if (existingXPAxiom != null) {
            changes.add(new RemoveAxiom(rootOntology, existingXPAxiom));
        }
View Full Code Here

        return currentSubject.orNull();
    }


    private void updateState() {
        UserId userId = hasUserId.getUserId();
        boolean writePermission = permissionChecker.hasWritePermissionForProject(userId, projectId);
        setEnabled(writePermission);
    }
View Full Code Here

        pw.println(new Date());
        if (userId.isPresent()) {
            pw.println();
            pw.print("User: ");
            pw.println(userId.get().getUserName());
            final UserId id = userId.get();
            if(!id.isGuest()) {
                User user = MetaProjectManager.getManager().getMetaProject().getUser(id.getUserName());
                pw.println("email: " + user.getEmail());
                pw.println("groups: ");
                for(Group group : user.getGroups()) {
                    pw.println("        " + group.getName());
                }
View Full Code Here

        final EventTag startTag = project.getEventManager().getCurrentTag();
        if(from.equals(to)) {
            return createResponse(action.getTo(), project.getEventManager().getEventsFromTag(startTag));
        }

        UserId userId = executionContext.getUserId();

        FrameTranslator<F, S> translator = createTranslator();


        final FrameChangeGenerator<F, S> changeGenerator = new FrameChangeGenerator<F, S>(from.getFrame(), to.getFrame(), translator);
View Full Code Here

        fillInEmail(userData);
        return userData;
    }

    public static void fillInEmail(UserData userData) {
        final UserId userId = userData.getUserId();
        if (userId.isGuest()) {
            return;
        }
        User user = MetaProjectManager.getManager().getMetaProject().getUser(userId.getUserName());
        if (user == null) {
            return;
        }
        userData.setEmail(user.getEmail());
    }
View Full Code Here

    public <E extends OWLEntity> E getFreshEntity(String browserText, EntityType<E> type) {
        OWLEntity entity = entitiesTable.get(browserText, type);
        if(entity != null) {
            return (E) entity;
        }
        UserId userId = Application.get().getUserId();
        E freshEntity = DataFactory.getFreshOWLEntity(type, browserText);
        entitiesTable.put(browserText, type, freshEntity);
        return freshEntity;
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.user.UserId

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.