Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLDataCardinalityRestriction


    @Test
    public void testCreationDataExact() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataExactCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertNotNull(restA);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataExactCardinality(cardinality, prop, dataRange);
        assertNotNull(restB);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here


    @Test
    public void testEqualsPositiveDataExact() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataExactCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataExactCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertEquals(restA, restB);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restC = testSubject
                .getOWLDataExactCardinality(cardinality, prop, dataRange);
        OWLDataCardinalityRestriction restD = testSubject
                .getOWLDataExactCardinality(cardinality, prop, dataRange);
        assertEquals(restC, restD);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testEqualsNegativeDataExact() {
        OWLDataProperty prop = DP(IRI());
        // Different cardinality
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataExactCardinality(3, prop,
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataExactCardinality(4, prop,
                        testSubject.getTopDatatype());
        assertFalse(restA.equals(restB));
        // Different property
        OWLDataCardinalityRestriction restC = testSubject
                .getOWLDataExactCardinality(3, DP(IRI()),
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restD = testSubject
                .getOWLDataExactCardinality(3, DP(IRI()),
                        testSubject.getTopDatatype());
        assertFalse(restC.equals(restD));
        // Different filler
        OWLDataCardinalityRestriction restE = testSubject
                .getOWLDataExactCardinality(3, prop, D(IRI()));
        OWLDataCardinalityRestriction restF = testSubject
                .getOWLDataExactCardinality(3, prop, D(IRI()));
        assertFalse(restE.equals(restF));
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testHashCodeDataExact() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataExactCardinality(cardinality, prop, dataRange);
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataExactCardinality(cardinality, prop, dataRange);
        assertEquals(restA, restB);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testCreationDataMin() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMinCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertNotNull(restA);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMinCardinality(cardinality, prop, dataRange);
        assertNotNull(restB);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testEqualsPositiveDataMin() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMinCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMinCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertEquals(restA, restB);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restC = testSubject
                .getOWLDataMinCardinality(cardinality, prop, dataRange);
        OWLDataCardinalityRestriction restD = testSubject
                .getOWLDataMinCardinality(cardinality, prop, dataRange);
        assertEquals(restC, restD);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testEqualsNegativeDataMin() {
        OWLDataProperty prop = DP(IRI());
        // Different cardinality
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMinCardinality(3, prop, testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMinCardinality(4, prop, testSubject.getTopDatatype());
        assertFalse(restA.equals(restB));
        // Different property
        OWLDataCardinalityRestriction restC = testSubject
                .getOWLDataMinCardinality(3, DP(IRI()),
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restD = testSubject
                .getOWLDataMinCardinality(3, DP(IRI()),
                        testSubject.getTopDatatype());
        assertFalse(restC.equals(restD));
        // Different filler
        OWLDataCardinalityRestriction restE = testSubject
                .getOWLDataMinCardinality(3, prop, D(IRI()));
        OWLDataCardinalityRestriction restF = testSubject
                .getOWLDataMinCardinality(3, prop, D(IRI()));
        assertFalse(restE.equals(restF));
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testHashCodeDataMin() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMinCardinality(cardinality, prop, dataRange);
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMinCardinality(cardinality, prop, dataRange);
        assertEquals(restA, restB);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testCreationDataMax() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMaxCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertNotNull(restA);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMaxCardinality(cardinality, prop, dataRange);
        assertNotNull(restB);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

    @Test
    public void testEqualsPositiveDataMax() {
        OWLDataProperty prop = DP(IRI());
        int cardinality = 3;
        OWLDataCardinalityRestriction restA = testSubject
                .getOWLDataMaxCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        OWLDataCardinalityRestriction restB = testSubject
                .getOWLDataMaxCardinality(cardinality, prop,
                        testSubject.getTopDatatype());
        assertEquals(restA, restB);
        OWLDataRange dataRange = D(IRI());
        OWLDataCardinalityRestriction restC = testSubject
                .getOWLDataMaxCardinality(cardinality, prop, dataRange);
        OWLDataCardinalityRestriction restD = testSubject
                .getOWLDataMaxCardinality(cardinality, prop, dataRange);
        assertEquals(restC, restD);
        assertEquals(restA.getProperty(), prop);
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLDataCardinalityRestriction

Copyright © 2018 www.massapicom. 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.