Search in sources :

Example 1 with OWLEntityComparator

use of org.semanticweb.owlapi.util.OWLEntityComparator in project webprotege by protegeproject.

the class ProjectChangesManager_IT method setUp.

@Before
public void setUp() throws Exception {
    changeHistoryFile = temporaryFolder.newFile();
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    OWLOntology rootOntology = manager.createOntology(IRI.create("http://stuff.com/ont"));
    OWLDataFactory dataFactory = manager.getOWLDataFactory();
    RevisionManager revisionManager = new RevisionManagerImpl(new RevisionStoreImpl(projectId, changeHistoryFile, dataFactory));
    WebProtegeIRIShortFormProvider iriShortFormProvider = new WebProtegeIRIShortFormProvider(DefaultShortFormAnnotationPropertyIRIs.asImmutableList(), new HasAnnotationAssertionAxiomsImpl(rootOntology), () -> "", new LocalNameExtractor());
    WebProtegeShortFormProvider webProtegeShortFormProvider = new WebProtegeShortFormProvider(iriShortFormProvider);
    WebProtegeOntologyIRIShortFormProvider ontologyIRIShortFormProvider = new WebProtegeOntologyIRIShortFormProvider(rootOntology);
    OWLEntityComparator entityComparator = new OWLEntityComparator(webProtegeShortFormProvider);
    OWLClassExpressionSelector classExpressionSelector = new OWLClassExpressionSelector(entityComparator);
    OWLObjectPropertyExpressionSelector objectPropertyExpressionSelector = new OWLObjectPropertyExpressionSelector(entityComparator);
    OWLDataPropertyExpressionSelector dataPropertyExpressionSelector = new OWLDataPropertyExpressionSelector(entityComparator);
    OWLIndividualSelector individualSelector = new OWLIndividualSelector(entityComparator);
    SWRLAtomSelector atomSelector = new SWRLAtomSelector((o1, o2) -> 0);
    EntitiesByRevisionCache entitiesByRevisionCache = new EntitiesByRevisionCache(new AxiomSubjectProvider(classExpressionSelector, objectPropertyExpressionSelector, dataPropertyExpressionSelector, individualSelector, atomSelector), rootOntology, dataFactory);
    RenderingManager renderingManager = new RenderingManager(rootOntology, dataFactory, new EntityIRICheckerImpl(rootOntology), new DeprecatedEntityCheckerImpl(rootOntology), new WebProtegeBidirectionalShortFormProvider(projectId, rootOntology, webProtegeShortFormProvider), ontologyIRIShortFormProvider, new NullHighlightedEntityChecker());
    AxiomComparatorImpl axiomComparator = new AxiomComparatorImpl(new AxiomBySubjectComparator(new AxiomSubjectProvider(classExpressionSelector, objectPropertyExpressionSelector, dataPropertyExpressionSelector, individualSelector, atomSelector), new OWLObjectComparatorImpl(renderingManager)), new AxiomByTypeComparator(DefaultAxiomTypeOrdering.get()), new AxiomByRenderingComparator(new OWLObjectRendererImpl(renderingManager)));
    changesManager = new ProjectChangesManager(revisionManager, entitiesByRevisionCache, renderingManager, new ChangeRecordComparator(axiomComparator, (o1, o2) -> 0), ontologyIRIShortFormProvider);
    createChanges(manager, rootOntology, dataFactory, revisionManager);
}
Also used : EntityIRICheckerImpl(edu.stanford.bmir.protege.web.server.mansyntax.render.EntityIRICheckerImpl) OWLObjectRendererImpl(edu.stanford.bmir.protege.web.server.renderer.OWLObjectRendererImpl) ChangeRecordComparator(edu.stanford.bmir.protege.web.server.change.ChangeRecordComparator) OWLObjectComparatorImpl(edu.stanford.bmir.protege.web.server.object.OWLObjectComparatorImpl) OWLEntityComparator(org.semanticweb.owlapi.util.OWLEntityComparator) DeprecatedEntityCheckerImpl(edu.stanford.bmir.protege.web.server.mansyntax.render.DeprecatedEntityCheckerImpl) HasAnnotationAssertionAxiomsImpl(edu.stanford.bmir.protege.web.server.owlapi.HasAnnotationAssertionAxiomsImpl) RenderingManager(edu.stanford.bmir.protege.web.server.renderer.RenderingManager) NullHighlightedEntityChecker(edu.stanford.bmir.protege.web.server.mansyntax.render.NullHighlightedEntityChecker) Before(org.junit.Before)

Aggregations

ChangeRecordComparator (edu.stanford.bmir.protege.web.server.change.ChangeRecordComparator)1 DeprecatedEntityCheckerImpl (edu.stanford.bmir.protege.web.server.mansyntax.render.DeprecatedEntityCheckerImpl)1 EntityIRICheckerImpl (edu.stanford.bmir.protege.web.server.mansyntax.render.EntityIRICheckerImpl)1 NullHighlightedEntityChecker (edu.stanford.bmir.protege.web.server.mansyntax.render.NullHighlightedEntityChecker)1 OWLObjectComparatorImpl (edu.stanford.bmir.protege.web.server.object.OWLObjectComparatorImpl)1 HasAnnotationAssertionAxiomsImpl (edu.stanford.bmir.protege.web.server.owlapi.HasAnnotationAssertionAxiomsImpl)1 OWLObjectRendererImpl (edu.stanford.bmir.protege.web.server.renderer.OWLObjectRendererImpl)1 RenderingManager (edu.stanford.bmir.protege.web.server.renderer.RenderingManager)1 Before (org.junit.Before)1 OWLEntityComparator (org.semanticweb.owlapi.util.OWLEntityComparator)1