Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLIndividual


    OWLDataProperty pInt = DataProperty( ns + "pInt" );
    OWLDataProperty pDouble = DataProperty( ns + "pDouble" );
    OWLDataProperty pBoolean = DataProperty( ns + "pBoolean" );

    OWLIndividual ind = Individual( ns + "ind1" );

    OWLConstant valDouble = ind.getDataPropertyValues( ont ).get(pDouble).iterator().next();
    OWLConstant valInt = ind.getDataPropertyValues( ont ).get(pInt).iterator().next();
    OWLConstant valBoolean = ind.getDataPropertyValues( ont ).get( pBoolean ).iterator().next();

    assertTrue( reasoner.isConsistent() );

    removeAxioms(ont, propertyAssertion( ind, pDouble, valDouble ) );
    reasoner.refresh();
View Full Code Here


    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" );
    OWLIndividual daughter = Individual( ns + "daughter" );
    OWLIndividual personX = Individual( ns + "personX" );
    OWLIndividual personY = Individual( ns + "personY" );
    OWLIndividual personZ = Individual( ns + "personZ" );

    assertTrue( reasoner.isConsistent() );

    KnowledgeBase kb = reasoner.getKB();
View Full Code Here

    // 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" );
    OWLIndividual Romulus = Individual( ns + "Romulus" );

    for( int test = 0; test < 2; test++ ) {
      if( test != 0 )
        reasoner.realise();
View Full Code Here

    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" );

    for( int test = 0; test < 1; test++ ) {
      if( test != 0 )
        reasoner.realise();
View Full Code Here

    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" );

    OWLOntology ont = getOntologyFromAxioms( transitive( p1 ),
        classAssertion( x, all( p1, C ) ), propertyAssertion( x, p1, y ),
        propertyAssertion( y, p1, z ) );
View Full Code Here

  public void testSameAs1() throws OWLException {
    String ns = "urn:test:";

    URI ontURI = URI.create( base + "invalidTransitivity.owl" );

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

  public void testSameAs3() throws OWLException {
    String ns = "urn:test:";

    URI ontURI = URI.create( base + "test.owl" );

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

    for( ATermAppl candidate : kb.getIndividuals() ) {
      List<ATermAppl> list = kb.getDataPropertyValues( p, candidate );
      if( list.isEmpty() )
        continue;

      OWLIndividual subj = IND_MAPPER.map( candidate );
      Set<OWLConstant> objects = toOWLEntitySet( list, LIT_MAPPER );

      map.put( subj, objects );
    }
View Full Code Here

    for( Map.Entry<ATermAppl, List<ATermAppl>> entry : values.entrySet() ) {
      ATermAppl subjTerm = entry.getKey();

      List<ATermAppl> objTerms = entry.getValue();

      OWLIndividual subj = IND_MAPPER.map( subjTerm );

      Set<OWLIndividual> objects = toOWLEntitySet( objTerms, IND_MAPPER );

      result.put( subj, objects );
    }
View Full Code Here

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

    ArrayList<OWLIndividual> list = new ArrayList<OWLIndividual>( axiom.getIndividuals() );
    for( int i = 0; i < list.size() - 1; i++ ) {
      OWLIndividual head = list.get( i );
      for( int j = i + 1; j < list.size(); j++ ) {
        OWLIndividual next = list.get( j );

        if( !reasoner.isDifferentFrom( head, next ) ) {
          isEntailed = false;
          return;
        }
View Full Code Here

TOP

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

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.