Package com.clarkparsia.pellet.rules.model

Examples of com.clarkparsia.pellet.rules.model.ClassAtom


    kb.addPropertyValue( p, x, b );
    kb.addPropertyValue( p, x, c );

    {
      AtomIVariable v = new AtomIVariable( "v" );
      RuleAtom body = new ClassAtom( some( p, or( and( A, B ), or(
          and( A, C ), and( B, C ) ) ) ), v );
      RuleAtom head = new IndividualPropertyAtom( q, v, new AtomIConstant( y ) );
      Rule rule = new Rule( Collections.singleton( head ), Collections.singleton( body ) );
      kb.addRule( rule );
    }

    {
      AtomIVariable v = new AtomIVariable( "v" );
      RuleAtom body = new ClassAtom( G, v );
      RuleAtom head = new IndividualPropertyAtom( p, v, new AtomIConstant( y ) );
      Rule rule = new Rule( Collections.singleton( head ), Collections.singleton( body ) );
      kb.addRule( rule );
    }
View Full Code Here


    kb.addDifferent( b, c );

    {
      AtomIVariable x = new AtomIVariable( "x" );
      List<RuleAtom> body = new ArrayList<RuleAtom>();
      body.add( new ClassAtom( C, x ) );
      List<RuleAtom> head = new ArrayList<RuleAtom>();
      head.add( new ClassAtom( C, x ) );
      Rule rule = new Rule( head, body );
      kb.addRule( rule );
    }

    assertTrue( kb.isConsistent() );
View Full Code Here

    kb.addType( b, C );

    {
      AtomIVariable x = new AtomIVariable( "x" );
      List<RuleAtom> body = new ArrayList<RuleAtom>();
      body.add( new ClassAtom( C, x ) );
      List<RuleAtom> head = new ArrayList<RuleAtom>();
      head.add( new ClassAtom( D, x ) );
      Rule rule = new Rule( head, body );
      kb.addRule( rule );
    }

    assertTrue( kb.isConsistent() );
View Full Code Here

    kb.addType( i, C );

    List<RuleAtom> body = new ArrayList<RuleAtom>();
    List<RuleAtom> head = new ArrayList<RuleAtom>();

    body.add( new ClassAtom( C, x ) );

    kb.addRule( new Rule( head, body ) );

    assertFalse( kb.isConsistent() );
  }
View Full Code Here

    kb.addType( i, C );

    List<RuleAtom> body = new ArrayList<RuleAtom>();
    List<RuleAtom> head = new ArrayList<RuleAtom>();

    body.add( new ClassAtom( C, x ) );

    kb.addRule( new Rule( head, body ) );

    assertFalse( kb.isConsistent() );
  }
View Full Code Here

    kb.addType( i, D );

    List<RuleAtom> body = new ArrayList<RuleAtom>();
    List<RuleAtom> head = new ArrayList<RuleAtom>();

    body.add( new ClassAtom( D, x ) );

    kb.addRule( new Rule( head, body ) );

    assertFalse( kb.isConsistent() );
  }
View Full Code Here

    kb.addType( i, C );

    List<RuleAtom> body = new ArrayList<RuleAtom>();
    List<RuleAtom> head = new ArrayList<RuleAtom>();

    body.add( new ClassAtom( CuD, x ) );

    kb.addRule( new Rule( head, body ) );

    assertFalse( kb.isConsistent() );
  }
View Full Code Here

    kb.addEquivalentClass( C, some( p, TOP ) );
   
    AtomIVariable x = new AtomIVariable( "x" );
    AtomIVariable y = new AtomIVariable( "y" );
    List<RuleAtom> body = new ArrayList<RuleAtom>();
    body.add( new ClassAtom( C, x ) );
    List<RuleAtom> head = new ArrayList<RuleAtom>();
    head.add( new IndividualPropertyAtom( p, x, y ) );
    Rule rule = new Rule( head, body );
    kb.addRule( rule );
   
View Full Code Here

    kb.addPropertyValue( p, b, a );
    kb.addPropertyValue( p, b, c );
   
    AtomIVariable x = new AtomIVariable( "x" )
    List<RuleAtom> body = Arrays.<RuleAtom>asList( new IndividualPropertyAtom( p, x, x ) );
    List<RuleAtom> head = Arrays.<RuleAtom>asList( new ClassAtom( A, x ) );
 
    kb.addRule( new Rule( head, body ) );
 
    assertTrue( kb.isConsistent() );
   
View Full Code Here

    kb.addPropertyValue( p, b, c );
    kb.addPropertyValue( p, c, c );
   
    AtomIVariable x = new AtomIVariable( "x" )
    List<RuleAtom> body = Arrays.<RuleAtom>asList( new IndividualPropertyAtom( p, x, new AtomIConstant( c ) ) );
    List<RuleAtom> head = Arrays.<RuleAtom>asList( new ClassAtom( A, x ) );
 
    kb.addRule( new Rule( head, body ) );
 
    assertTrue( kb.isConsistent() );
   
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.rules.model.ClassAtom

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.