Package com.clarkparsia.pellet.rules.model

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


    kb.addSubClass( TOP, min( r, 3, TOP ) );

    kb.addPropertyValue( p, i, d );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" );
    AtomDVariable z = new AtomDVariable( "z" );

    RuleAtom body1 = new IndividualPropertyAtom( r, x, y );
    RuleAtom body2 = new DatavaluedPropertyAtom( p, x, z );
    RuleAtom head = new DatavaluedPropertyAtom( p, y, z );
View Full Code Here


    kb.addSubClass( TOP, min( r, 3, TOP ) );
    kb.addSubClass( TOP, or( value( i ), value( j ), value( k ) ) );
    kb.addPropertyValue( p, i, d );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" );
    AtomDVariable z = new AtomDVariable( "z" );

    RuleAtom head = new DatavaluedPropertyAtom( p, x, z );
    RuleAtom body1 = new DatavaluedPropertyAtom( p, y, z );
    RuleAtom body2 = new IndividualPropertyAtom( r, x, y );
View Full Code Here

    ATermAppl t = TermFactory.literal("t");
    ATermAppl f = TermFactory.literal("f");

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

    List<RuleAtom> body = Arrays.<RuleAtom> asList(new ClassAtom(A, x),
            new DatavaluedPropertyAtom(p, new AtomIConstant(b), y),
            new BuiltInAtom(SWRLB + "equal", y, new AtomDConstant(TermFactory.literal(true))));
    List<RuleAtom> head = Arrays.<RuleAtom> asList(new DatavaluedPropertyAtom(q, x, new AtomDConstant(t)));
View Full Code Here

    kb.addPropertyValue(p, b, TermFactory.literal(5));
    kb.addPropertyValue(p, c, TermFactory.literal(10));
    kb.addPropertyValue(p, d, TermFactory.literal(15));

    AtomIVariable x = new AtomIVariable("x");
    AtomDVariable y = new AtomDVariable("y");
    AtomDVariable z = new AtomDVariable("z");
   
    List<RuleAtom> body = Arrays.<RuleAtom> asList(
            new DatavaluedPropertyAtom(p, x, y),
            new BuiltInAtom( SWRLB + "pow", z, y, new AtomDConstant(TermFactory.literal(2))),
            new BuiltInAtom( SWRLB + "lessThan", z, new AtomDConstant(TermFactory.literal(100)))
View Full Code Here

  @Test
  public void testTokenizeBinding() {
    KnowledgeBase kb = new KnowledgeBase();
    AtomDConstant data = new AtomDConstant( literal( "hi;bye;foo;bar" ) );
   
    AtomDVariable x = new AtomDVariable("x");
    AtomDConstant semicolan = new AtomDConstant( literal( ";" ) );
    Collection<AtomVariable> emptyCollection = Collections.emptySet();
    Collection<AtomVariable> xSingleton = Collections.singleton( (AtomVariable) x );
   
    BuiltInAtom oneVarAtom = new BuiltInAtom( Namespaces.SWRLB + "tokenize", x, data, semicolan );
View Full Code Here

  @Test
  public void testTokenizeBindingEmpty() {
    KnowledgeBase kb = new KnowledgeBase();
    AtomDConstant data = new AtomDConstant( literal( "hi;bye;foo;bar" ) );
   
    AtomDVariable x = new AtomDVariable("x");
    AtomDConstant comma = new AtomDConstant( literal( "," ) );
    Collection<AtomVariable> emptyCollection = Collections.emptySet();
    Collection<AtomVariable> xSingleton = Collections.singleton( (AtomVariable) x );
   
    BuiltInAtom oneVarAtom = new BuiltInAtom( Namespaces.SWRLB + "tokenize", x, data, comma );
View Full Code Here

  @Test
  public void testTokenizeSharedSuccess() {
    KnowledgeBase kb = new KnowledgeBase();
    AtomDConstant data = new AtomDConstant( literal( "hi;bye;foo;bar" ) );
   
    AtomDVariable x = new AtomDVariable("x");
    AtomDConstant comma = new AtomDConstant( literal( "," ) );
    Collection<AtomVariable> emptyCollection = Collections.emptySet();
    Collection<AtomVariable> xSingleton = Collections.singleton( (AtomVariable) x );
   
    BuiltInAtom sharedVarAtom = new BuiltInAtom( Namespaces.SWRLB + "tokenize", x, x, comma );
View Full Code Here

  @Test
  public void testTokenizeSharedFailure() {
    KnowledgeBase kb = new KnowledgeBase();
    AtomDConstant data = new AtomDConstant( literal( "hi;bye;foo;bar" ) );
   
    AtomDVariable x = new AtomDVariable("x");
    AtomDConstant semicolan = new AtomDConstant( literal( ";" ) );
    Collection<AtomVariable> emptyCollection = Collections.emptySet();
    Collection<AtomVariable> xSingleton = Collections.singleton( (AtomVariable) x );
   
    BuiltInAtom sharedVarAtom = new BuiltInAtom( Namespaces.SWRLB + "tokenize", x, x, semicolan );
View Full Code Here

TOP

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

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.