Search in sources :

Example 1 with ColorConverter

use of edu.stanford.bmir.protege.web.server.color.ColorConverter in project webprotege by protegeproject.

the class RebuildPermissions method run.

public void run() {
    System.out.println("Rebuilding permissions...");
    MongoClient mongoClient = new MongoClient();
    MorphiaProvider morphiaProvider = new MorphiaProvider(new UserIdConverter(), new OWLEntityConverter(new OWLDataFactoryImpl()), new ProjectIdConverter(), new ThreadIdConverter(), new CommentIdConverter(), new CollectionIdConverter(), new FormIdConverter(), new TagIdConverter(), new ColorConverter());
    Morphia morphia = morphiaProvider.get();
    Datastore datastore = morphia.createDatastore(mongoClient, "webprotege");
    AccessManager accessManager = new AccessManagerImpl(RoleOracleImpl.get(), datastore);
    accessManager.rebuild();
    mongoClient.close();
    System.out.println("Finished rebuilding permissions");
}
Also used : AccessManager(edu.stanford.bmir.protege.web.server.access.AccessManager) AccessManagerImpl(edu.stanford.bmir.protege.web.server.access.AccessManagerImpl) Morphia(org.mongodb.morphia.Morphia) FormIdConverter(edu.stanford.bmir.protege.web.server.form.FormIdConverter) OWLDataFactoryImpl(uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl) TagIdConverter(edu.stanford.bmir.protege.web.server.tag.TagIdConverter) CollectionIdConverter(edu.stanford.bmir.protege.web.server.collection.CollectionIdConverter) MongoClient(com.mongodb.MongoClient) Datastore(org.mongodb.morphia.Datastore) ColorConverter(edu.stanford.bmir.protege.web.server.color.ColorConverter)

Aggregations

MongoClient (com.mongodb.MongoClient)1 AccessManager (edu.stanford.bmir.protege.web.server.access.AccessManager)1 AccessManagerImpl (edu.stanford.bmir.protege.web.server.access.AccessManagerImpl)1 CollectionIdConverter (edu.stanford.bmir.protege.web.server.collection.CollectionIdConverter)1 ColorConverter (edu.stanford.bmir.protege.web.server.color.ColorConverter)1 FormIdConverter (edu.stanford.bmir.protege.web.server.form.FormIdConverter)1 TagIdConverter (edu.stanford.bmir.protege.web.server.tag.TagIdConverter)1 Datastore (org.mongodb.morphia.Datastore)1 Morphia (org.mongodb.morphia.Morphia)1 OWLDataFactoryImpl (uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl)1