Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLObjectProperty


    OWLIndividual ind3 = Individual( ns + "ind3" );
    OWLIndividual ind4 = Individual( ns + "ind4" );
    OWLIndividual ind5 = Individual( ns + "ind5" );
    OWLIndividual ind6 = Individual( ns + "ind6" );

    OWLObjectProperty p = ObjectProperty( ns + "p" );
    OWLObjectProperty r = ObjectProperty( ns + "r" );
    OWLObjectProperty invR = ObjectProperty( ns + "invR" );
    OWLObjectProperty ir = ObjectProperty( ns + "ir" );
    OWLObjectProperty as = ObjectProperty( ns + "as" );
    OWLObjectProperty d1 = ObjectProperty( ns + "d1" );
    OWLObjectProperty d2 = ObjectProperty( ns + "d2" );

    assertTrue( reasoner.isConsistent() );

    assertTrue( reasoner.isReflexive( r ) );
    assertTrue( reasoner.isReflexive( invR ) );
View Full Code Here


    reasoner.setOntology( ont );

    OWLIndividual Bob = Individual( ns + "Bob" );
    OWLIndividual Sam = Individual( ns + "Sam" );

    OWLObjectProperty uncleOf = ObjectProperty( ns + "uncleOf" );

    assertPropertyValues( reasoner, Bob, uncleOf, Sam );
  }
View Full Code Here

    OWLIndividual Bob = Individual( ns + "Bob" );
    OWLIndividual John = Individual( ns + "John" );
    OWLIndividual Jane = Individual( ns + "Jane" );

    OWLObjectProperty hasBrother = ObjectProperty( ns + "hasBrother" );
    OWLObjectProperty hasSister = ObjectProperty( ns + "hasSister" );

    assertPropertyValues( reasoner, Bob, hasBrother, John );
    assertPropertyValues( reasoner, Bob, hasSister, Jane );
  }
View Full Code Here

    OWLClass C = Class( ns + "C" );
    OWLClass S0 = Class( ns + "S0" );
    OWLClass R0 = Class( ns + "R0" );
    OWLClass R1 = Class( ns + "R1" );
    OWLObjectProperty r = ObjectProperty( ns + "r" );
    OWLObjectProperty s = ObjectProperty( ns + "s" );

    OWLIndividual[] a = new OWLIndividual[17];
    for( int i = 0; i < a.length; i++ )
      a[i] = Individual( ns + "a" + i );
View Full Code Here

    OWLOntology ont = loadOntology( base + "family.owl" );

    Reasoner reasoner = new Reasoner( OWL.manager );
    reasoner.setOntology( ont );

    OWLObjectProperty hasBrother = ObjectProperty( ns + "hasBrother" );
    OWLObjectProperty hasSon = ObjectProperty( ns + "hasSon" );
    OWLObjectProperty hasFather = ObjectProperty( ns + "hasFather" );
    OWLObjectProperty hasParent = ObjectProperty( ns + "hasParent" );
    OWLObjectProperty hasChild = ObjectProperty( ns + "hasChild" );
    OWLObjectProperty hasMother = ObjectProperty( ns + "hasMother" );
    OWLObjectProperty hasDaughter = ObjectProperty( ns + "hasDaughter" );
    OWLObjectProperty hasAncestor = ObjectProperty( ns + "hasAncestor" );
    OWLObjectProperty likes = ObjectProperty( ns + "likes" );
    OWLObjectProperty isMarriedTo = ObjectProperty( ns + "isMarriedTo" );
    OWLObjectProperty dislikes = ObjectProperty( ns + "dislikes" );
    OWLObjectProperty hasSister = ObjectProperty( ns + "hasSister" );
    OWLObjectProperty hasDescendant = ObjectProperty( ns + "hasDescendant" );
    OWLObjectProperty hasSibling = ObjectProperty( ns + "hasSibling" );
    OWLClass Child = Class( ns + "Child" );
    OWLClass Person = Class( ns + "Person" );
    OWLClass PersonWithAtLeastTwoMaleChildren = Class( ns + "PersonWithAtLeastTwoMaleChildren" );
    OWLClass PersonWithAtLeastTwoFemaleChildren = Class( ns
        + "PersonWithAtLeastTwoFemaleChildren" );
View Full Code Here

    OWLOntology ont = loadOntology( base + "anon_inverse.owl" );

    OWLClass C = Class( ns + "C" );
    OWLClass D = Class( ns + "D" );
    OWLObjectProperty r = ObjectProperty( ns + "r" );
    OWLDescription desc = some( inverse( r ), D );

    Reasoner reasoner = new Reasoner( OWL.manager );

    reasoner.loadOntologies( Collections.singleton( ont ) );

    assertEquals( Collections.singleton( Collections.singleton( C ) ), reasoner
        .getSubClasses( desc ) );

    assertTrue( reasoner.isInverseFunctional( ObjectProperty( ns + "functionalP" ) ) );

    assertTrue( reasoner.isFunctional( ObjectProperty( ns + "inverseFunctionalP" ) ) );

    assertTrue( reasoner.isTransitive( ObjectProperty( ns + "transitiveP" ) ) );

    assertTrue( reasoner.isSymmetric( ObjectProperty( ns + "symmetricP" ) ) );

    assertTrue( reasoner.isReflexive( ObjectProperty( ns + "reflexiveP" ) ) );

    assertTrue( reasoner.isIrreflexive( ObjectProperty( ns + "irreflexiveP" ) ) );

    assertTrue( reasoner.isAntiSymmetric( ObjectProperty( ns + "asymmetricP" ) ) );

    OWLObjectProperty p1 = ObjectProperty( ns + "p1" );
    OWLObjectProperty p2 = ObjectProperty( ns + "p2" );
    OWLObjectProperty p3 = ObjectProperty( ns + "p3" );
    assertTrue( reasoner.isEquivalentProperty( p1, p2 ) );
    assertTrue( reasoner.isEquivalentProperty( p1, p3 ) );
    assertTrue( reasoner.isEquivalentProperty( p2, p3 ) );
  }
View Full Code Here

    Reasoner reasoner = new Reasoner( OWL.manager );
    reasoner.setOntology( ont );

    // OWLObjectProperty father = factory.getOWLObjectProperty( URI.create(
    // ns + "father" ) );
    OWLObjectProperty hates = ObjectProperty( ns + "hates" );
    OWLObjectProperty sibling = ObjectProperty( ns + "sibling" );

    OWLClass BadChild = Class( ns + "BadChild" );
    OWLClass Child = Class( ns + "Child" );
    // OWLClass GoodChild = Class( ns +
    // "GoodChild" );
View Full Code Here

  public void testInvalidTransitivity() throws Exception {
    String ns = "http://www.example.org/test#";

    OWLClass C = Class( ns + "C" );

    OWLObjectProperty p1 = ObjectProperty( ns + "p1" );
    OWLObjectProperty p2 = ObjectProperty( ns + "p2" );

    OWLIndividual x = Individual( ns + "x" );
    OWLIndividual y = Individual( ns + "y" );
    OWLIndividual z = Individual( ns + "z" );
View Full Code Here

    OWLIndividual a = Individual( ns + "a" );
    OWLIndividual b = Individual( ns + "b" );
    OWLIndividual c = Individual( ns + "c" );

    OWLObjectProperty p = ObjectProperty( ns + "p" );
    OWLObjectProperty q = ObjectProperty( ns + "q" );

    Set<OWLAxiom> axioms = new HashSet<OWLAxiom>();

    axioms.add( propertyAssertion( a, p, c ) );
View Full Code Here

  public void visit(OWLEquivalentObjectPropertiesAxiom axiom) {
    isEntailed = true;

    Iterator<OWLObjectPropertyExpression> i = axiom.getProperties().iterator();
    if( i.hasNext() ) {
      OWLObjectProperty head = (OWLObjectProperty) i.next();

      while( i.hasNext() && isEntailed ) {
        OWLObjectProperty next = (OWLObjectProperty) i.next();

        isEntailed = reasoner.isEquivalentProperty( head, next );
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.semanticweb.owl.model.OWLObjectProperty

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.