Examples of Lint


Examples of com.clarkparsia.pellint.model.Lint

  }
 
  @Test
  public void testSimple() throws OWLException {
    OWLAxiom axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression>asSet(OWL.Thing, m_Cls[0], m_Cls[1]));
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
   
    LintFixer fixer = lint.getLintFixer();
    assertTrue(fixer.getAxiomsToRemove().contains(axiom));
    assertTrue(fixer.getAxiomsToAdd().isEmpty());
   
    assertNull(lint.getSeverity());
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

 
  @Test
  public void testComplexEquivalence() throws OWLException {
    OWLAxiom axiom = OWL.equivalentClasses(CollectionUtil.<OWLClassExpression>asSet(m_Cls[0], m_P0AllC0, m_P0SomeC1));
   
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertTrue(lint.getParticipatingClasses().isEmpty());
    assertTrue(lint.getParticipatingAxioms().contains(axiom));
   
    assertNull(lint.getSeverity());
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

 
  @Test
  public void testGCI() throws OWLException {
    OWLAxiom axiom = OWL.subClassOf(m_P0AllC0, m_Cls[1]);
   
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertTrue(lint.getParticipatingClasses().isEmpty());
    assertTrue(lint.getParticipatingAxioms().contains(axiom));
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

  public void testSimple() throws OWLException {
    m_Pattern.setMaxAllowed(2);

    OWLClassExpression union = OWL.or(m_Cls[1], m_Cls[2], m_Cls[3]);
    OWLAxiom axiom = OWL.subClassOf(m_Cls[0], union);
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertSame(m_Pattern, lint.getPattern());
    assertEquals(1, lint.getParticipatingAxioms().size());
    assertNull(lint.getLintFixer());
    assertEquals(3.0, lint.getSeverity().doubleValue(), DOUBLE_DELTA);
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

 
  @Test
  public void testOne() throws OWLException {
    OWLAxiom axiom = OWL.equivalentClasses(m_Cls[0], m_P0AllC0);
   
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertTrue(lint.getParticipatingClasses().contains(m_Cls[0]));
   
    LintFixer fixer = lint.getLintFixer();
    assertTrue(fixer.getAxiomsToRemove().contains(axiom));
    OWLAxiom expectedAxiom = OWL.subClassOf(m_Cls[0], m_P0AllC0);
    assertTrue(fixer.getAxiomsToAdd().contains(expectedAxiom));
   
    assertNull(lint.getSeverity());
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

  public void testOneMax() throws OWLException {
    m_Pattern.setMaxAllowed(2);

    OWLClassExpression maxCard = OWL.max(m_Pro[0], 3);
    OWLAxiom axiom = OWL.disjointClasses(m_Cls[0], maxCard);
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertSame(m_Pattern, lint.getPattern());
    assertEquals(1, lint.getParticipatingAxioms().size());
    assertNull(lint.getLintFixer());
    assertEquals(3.0, lint.getSeverity().doubleValue(), DOUBLE_DELTA);
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

  public static OntologyLints lint(List<AxiomLintPattern> axiomLintPatterns,
      List<OntologyLintPattern> ontologyLintPatterns, OWLOntology ontology) {
    OntologyLints ontologyLints = new OntologyLints( ontology );
    for( OWLAxiom axiom : ontology.getAxioms() ) {
      for( AxiomLintPattern pattern : axiomLintPatterns ) {
        Lint lint = pattern.match( ontology, axiom );
        if( lint != null ) {
          ontologyLints.addLint( pattern, lint );
        }
      }
    }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

  @Test
  public void testComplementOfItself() throws OWLException {
    OWLClassExpression comp = OWL.not(m_Cls[0]);
    OWLAxiom axiom = OWL.equivalentClasses(m_Cls[0], comp);
   
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertTrue(lint.getParticipatingClasses().contains(m_Cls[0]));
   
    LintFixer fixer = lint.getLintFixer();
    assertTrue(fixer.getAxiomsToRemove().contains(axiom));
    OWLAxiom expectedAxiom = OWL.subClassOf(m_Cls[0], comp);
    assertTrue(fixer.getAxiomsToAdd().contains(expectedAxiom));

    assertNull(lint.getSeverity());
    assertSame(m_Ontology, lint.getParticipatingOntology());
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

 
  @Test
  public void testComplementOfOthers() throws OWLException {
    OWLClassExpression comp = OWL.not(OWL.or(m_Cls[1], m_Cls[2]));
    OWLAxiom axiom = OWL.equivalentClasses(m_Cls[0], comp);
    Lint lint = m_Pattern.match(m_Ontology, axiom);
    assertNotNull(lint);
    assertTrue(lint.getParticipatingClasses().contains(m_Cls[0]));
   
    LintFixer fixer = lint.getLintFixer();
    assertTrue(fixer.getAxiomsToRemove().contains(axiom));
    OWLAxiom expectedAxiom = OWL.subClassOf(m_Cls[0], comp);
    assertTrue(fixer.getAxiomsToAdd().contains(expectedAxiom));
  }
View Full Code Here

Examples of com.clarkparsia.pellint.model.Lint

    m_MockPattern = new MockLintPattern();
  }
 
  @Test
  public void testWithoutFixer() throws OWLOntologyChangeException {
    Lint lint = new Lint(m_MockPattern, m_Ontology);
    assertSame(m_MockPattern, lint.getPattern());
    assertSame(m_Ontology, lint.getParticipatingOntology());
    assertFalse(lint.applyFix(m_Manager));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.