Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLClass


        //System.out.println("Testing  Ontology" + ontology.toString());
        Set result = new HashSet();
      try {
        Set ontology_classes = ontology.getClasses();
        Iterator iter = classes.iterator();
        OWLClass clazz;
        while(iter.hasNext()) {
            clazz = (OWLClass) iter.next();
            if (classInSet(clazz,ontology_classes))
                result.add(clazz);                  
        }      
View Full Code Here


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

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

    OWLClass C = Class( ns + "C" );
    OWLClass D = Class( ns + "D" );
    OWLClass D1 = Class( ns + "D1" );
    OWLClass D2 = Class( ns + "D2" );
    OWLClass D3 = Class( ns + "D3" );

    OWLClass test1 = Class( ns + "test1" );
    OWLClass test2 = Class( ns + "test2" );
    OWLClass test3 = Class( ns + "test3" );

    OWLClass OlderThan10 = Class( ns + "OlderThan10" );
    OWLClass YoungerThan20 = Class( ns + "YoungerThan20" );
    OWLClass Teenager = Class( ns + "Teenager" );
    OWLClass Teen = Class( ns + "Teen" );

    OWLIndividual ind1 = Individual( ns + "ind1" );
    OWLIndividual ind3 = Individual( ns + "ind3" );
    OWLIndividual ind4 = Individual( ns + "ind4" );
    OWLIndividual ind5 = Individual( ns + "ind5" );
View Full Code Here

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

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

    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++ )
View Full Code Here

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

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

    OWLClass sub = Class( ns + "sub" );
    OWLClass sup = Class( ns + "sup" );

    assertTrue( reasoner.isConsistent() );

    assertTrue( reasoner.isSubClassOf( sub, sup ) );
    assertTrue( reasoner.getDescendantClasses( sup ).contains( SetUtils.singleton( sub ) ) );
View Full Code Here

    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" );
    OWLClass PersonWithAtLeastTwoChildren = Class( ns + "PersonWithAtLeastTwoChildren" );
    OWLClass PersonWithAtLeastFourChildren = Class( ns + "PersonWithAtLeastFourChildren" );
    OWLClass Teen = Class( ns + "Teen" );
    OWLClass Teenager = Class( ns + "Teenager" );
    OWLClass Male = Class( ns + "Male" );
    OWLClass Adult = Class( ns + "Adult" );
    OWLClass Female = Class( ns + "Female" );
    OWLClass Senior = Class( ns + "Senior" );
    OWLIndividual grandmother = Individual( ns + "grandmother" );
    OWLIndividual grandfather = Individual( ns + "grandfather" );
    OWLIndividual father = Individual( ns + "father" );
    OWLIndividual son = Individual( ns + "son" );
    OWLIndividual mother = Individual( ns + "mother" );
View Full Code Here

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

    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 );
View Full Code Here

    // 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" );
    OWLClass Grandchild = Class( ns + "Grandchild" );
    OWLClass Person = Class( ns + "Person" );

    OWLIndividual Abel = Individual( ns + "Abel" );
    OWLIndividual Cain = Individual( ns + "Cain" );
    OWLIndividual Oedipus = Individual( ns + "Oedipus" );
    OWLIndividual Remus = Individual( ns + "Remus" );
View Full Code Here

    OWLOntology ont = loadOntology( base + "dl-safe-constants.owl" );

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

    OWLClass DreamTeamMember = Class( ns + "DreamTeamMember" );
    OWLClass DreamTeamMember1 = Class( ns + "DreamTeamMember1" );
    OWLClass DreamTeamMember2 = Class( ns + "DreamTeamMember2" );

    OWLIndividual Alice = Individual( ns + "Alice" );
    OWLIndividual Bob = Individual( ns + "Bob" );
    OWLIndividual Charlie = Individual( ns + "Charlie" );
View Full Code Here

  @Test
  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" );
View Full Code Here

    OWLIndividual i1 = Individual( ns + "i1" );
    OWLIndividual i2 = Individual( ns + "i2" );
    OWLIndividual i3 = Individual( ns + "i3" );

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

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

    axioms.add( equivalentClasses( c, oneOf( i1, i2 ) ) );
View Full Code Here

TOP

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

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.