Examples of OWLRestriction


Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testHashCodeDataHas() {
        OWLDataProperty prop = DP(IRI());
        OWLLiteral filler = Literal();
        OWLRestriction restA = testSubject.getOWLDataHasValue(prop, filler);
        OWLRestriction restB = testSubject.getOWLDataHasValue(prop, filler);
        assertEquals(restA.hashCode(), restB.hashCode());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testEqualsPositiveDataSome() {
        OWLDataProperty prop = DP(IRI());
        OWLDataRange filler = D(IRI());
        OWLRestriction restA = testSubject.getOWLDataSomeValuesFrom(prop,
                filler);
        OWLRestriction restB = testSubject.getOWLDataSomeValuesFrom(prop,
                filler);
        assertEquals(restA, restB);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testEqualsNegativeDataSome() {
        // Different filler
        OWLDataProperty prop = DP(IRI());
        OWLRestriction restA = testSubject.getOWLDataSomeValuesFrom(prop,
                D(IRI()));
        OWLRestriction restB = testSubject.getOWLDataSomeValuesFrom(prop,
                D(IRI()));
        assertFalse(restA.equals(restB));
        // Different property
        OWLDataRange filler = D(IRI());
        OWLRestriction restC = testSubject.getOWLDataSomeValuesFrom(DP(IRI()),
                filler);
        OWLRestriction restD = testSubject.getOWLDataSomeValuesFrom(DP(IRI()),
                filler);
        assertFalse(restC.equals(restD));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testHashCodeDataSome() {
        OWLDataProperty prop = DP(IRI());
        OWLDataRange filler = D(IRI());
        OWLRestriction restA = testSubject.getOWLDataSomeValuesFrom(prop,
                filler);
        OWLRestriction restB = testSubject.getOWLDataSomeValuesFrom(prop,
                filler);
        assertEquals(restA.hashCode(), restB.hashCode());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testEqualsPositiveDataAll() {
        OWLDataProperty prop = DP(IRI());
        OWLDataRange filler = D(IRI());
        OWLRestriction restA = testSubject
                .getOWLDataAllValuesFrom(prop, filler);
        OWLRestriction restB = testSubject
                .getOWLDataAllValuesFrom(prop, filler);
        assertEquals(restA, restB);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testEqualsNegativeDataAll() {
        // Different filler
        OWLDataProperty prop = DP(IRI());
        OWLRestriction restA = testSubject.getOWLDataAllValuesFrom(prop,
                D(IRI()));
        OWLRestriction restB = testSubject.getOWLDataAllValuesFrom(prop,
                D(IRI()));
        assertFalse(restA.equals(restB));
        // Different property
        OWLDataRange filler = D(IRI());
        OWLRestriction restC = testSubject.getOWLDataAllValuesFrom(DP(IRI()),
                filler);
        OWLRestriction restD = testSubject.getOWLDataAllValuesFrom(DP(IRI()),
                filler);
        assertFalse(restC.equals(restD));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testHashCodeDataAll() {
        OWLDataProperty prop = DP(IRI());
        OWLDataRange filler = D(IRI());
        OWLRestriction restA = testSubject
                .getOWLDataAllValuesFrom(prop, filler);
        OWLRestriction restB = testSubject
                .getOWLDataAllValuesFrom(prop, filler);
        assertEquals(restA.hashCode(), restB.hashCode());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    @Test
    public void testEqualsPositiveObjectHas() {
        OWLObjectProperty prop = OP(IRI());
        OWLIndividual filler = I();
        OWLRestriction restA = testSubject.getOWLObjectHasValue(prop, filler);
        OWLRestriction restB = testSubject.getOWLObjectHasValue(prop, filler);
        assertEquals(restA, restB);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    addAxiom(getOWLDataFactory().getOWLSubClassOfAxiom(ch,cls));
    return (IClass) convertOWLObject(ch);
  }

  public void addNecessaryRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLRestriction

    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      addAxiom(ax);
  }
  public void removeNecessaryRestriction(IRestriction restriction) {
    OWLRestriction r = ((ORestriction)restriction).getOWLRestriction();
    OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(getOWLClass(),r);
      removeAxiom(ax);
   
  }
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.