Package com.clarkparsia.pellet.rules.model

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


                }
                else if( argument2 == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument2 );
                }
                else {
                  atom = new SameIndividualAtom( argument1, argument2 );
                }
      }
      else if( hasObject( atomNode, RDF.type.asNode(), SWRL.DatavaluedPropertyAtom.asNode() ) ) {
        ATermAppl pred = null;
        AtomIObject argument1 = null;
View Full Code Here


      ATermAppl i1 = (ATermAppl) term.getArgument( 0 );
      ATermAppl i2 = (ATermAppl) term.getArgument( 1 );
      AtomIObject io1 = convertAtomIObject( i1 );
      AtomIObject io2 = convertAtomIObject( i2 );
     
      atom = new SameIndividualAtom( io1, io2 );     
    }
    else if( term.getAFun().equals( ATermUtils.DIFFERENTFUN ) ) {
      ATermAppl i1 = (ATermAppl) term.getArgument( 0 );
      ATermAppl i2 = (ATermAppl) term.getArgument( 1 );
      AtomIObject io1 = convertAtomIObject( i1 );
View Full Code Here

    AtomIObject subj = swrlIObject;

    atom.getSecondArgument().accept( this );
    AtomIObject obj = swrlIObject;

    swrlAtom = new SameIndividualAtom( subj, obj );
  }
View Full Code Here

    Collection<RuleAtom> body = CollectionUtils.makeSet();

    AtomIVariable x = new AtomIVariable( "x" );
    AtomIVariable y = new AtomIVariable( "y" );

    head.add( new SameIndividualAtom( x, y ) );

    // Process the body
    // First add the property atom pairs for each property
    for( ATermAppl property : properties ) {
      if( isObjectProperty( property ) ) {
View Full Code Here

    AtomIObject subj = swrlIObject;

    atom.getSecondArgument().accept( this );
    AtomIObject obj = swrlIObject;

    swrlAtom = new SameIndividualAtom( subj, obj );
  }
View Full Code Here

                }
                else if( argument2 == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument2 );
                }
                else {
                  atom = new SameIndividualAtom( argument1, argument2 );
                }
      }
      else if( hasObject( atomNode, RDF.type.asNode(), SWRL.DatavaluedPropertyAtom.asNode() ) ) {
        ATermAppl pred = null;
        AtomIObject argument1 = null;
View Full Code Here

        new Object[] { p2a, } );
  }

  public void testVariableUtils1() {
    AtomIVariable var1 = new AtomIVariable( "var1" ), var2 = new AtomIVariable( "var2" );
    RuleAtom atom = new SameIndividualAtom( var1, var2 );
    assertIteratorValues( VariableUtils.getVars( atom ).iterator(), new Object[] { var1, var2 } );
  }
View Full Code Here

  }

  @Test
  public void testSameIndividualAtom() {
    kb.addIndividual(a);
    SameIndividualAtom atom = new SameIndividualAtom(vx, ca);
    TermTuple triple = new TermTuple(DependencySet.INDEPENDENT, Compiler.SAME_AS, vrx, cra);
    assertEquals(triple, ruleTranslator.translateAtom(atom, DependencySet.INDEPENDENT));
  }
View Full Code Here

  public void testTranslateRule() {
    kb.addObjectProperty(pi);
    kb.addIndividual(a);
    IndividualPropertyAtom bodyAtom = new IndividualPropertyAtom(pi, vx, ca);
    TermTuple bodyTriple = new TermTuple(DependencySet.INDEPENDENT, pi, vrx, cra);
    SameIndividualAtom headAtom = new SameIndividualAtom(vx, ca);
    TermTuple headTriple = new TermTuple(DependencySet.INDEPENDENT, Compiler.SAME_AS, vrx, cra);

    Rule rule = new Rule(Collections.singletonList((RuleAtom) headAtom), Collections
                    .singletonList((RuleAtom) bodyAtom));
    com.clarkparsia.pellet.rules.rete.Rule reteRule = new com.clarkparsia.pellet.rules.rete.Rule(Collections
View Full Code Here

    Collection<RuleAtom> body = CollectionUtils.makeSet();

    AtomIVariable x = new AtomIVariable( "x" );
    AtomIVariable y = new AtomIVariable( "y" );

    head.add( new SameIndividualAtom( x, y ) );

    // Process the body
    // First add the property atom pairs for each property
    for( ATermAppl property : properties ) {
      if( isObjectProperty( property ) ) {
View Full Code Here

TOP

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

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.