Search in sources :

Example 1 with BuiltInRole

use of edu.stanford.bmir.protege.web.shared.access.BuiltInRole in project webprotege by protegeproject.

the class RoleOracleImpl method get.

public static RoleOracleImpl get() {
    RoleOracleImpl impl = new RoleOracleImpl();
    for (BuiltInRole builtInRole : BuiltInRole.values()) {
        List<RoleId> parentRoles = builtInRole.getParents().stream().map(BuiltInRole::getRoleId).collect(toList());
        List<ActionId> actions = builtInRole.getActions().stream().map(BuiltInAction::getActionId).collect(toList());
        impl.addRole(new Role(builtInRole.getRoleId(), parentRoles, actions));
    }
    return impl;
}
Also used : BuiltInRole(edu.stanford.bmir.protege.web.shared.access.BuiltInRole) ActionId(edu.stanford.bmir.protege.web.shared.access.ActionId) BuiltInRole(edu.stanford.bmir.protege.web.shared.access.BuiltInRole) RoleId(edu.stanford.bmir.protege.web.shared.access.RoleId)

Aggregations

ActionId (edu.stanford.bmir.protege.web.shared.access.ActionId)1 BuiltInRole (edu.stanford.bmir.protege.web.shared.access.BuiltInRole)1 RoleId (edu.stanford.bmir.protege.web.shared.access.RoleId)1