Package com.clarkparsia.pellet.rules.model

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


  }
 
  @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 );
    BindingHelper sharedVarHelper = StringOperators.tokenize.createHelper( oneVarAtom );
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 );
    BindingHelper sharedVarHelper = StringOperators.tokenize.createHelper( sharedVarAtom );
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 );
    BindingHelper sharedVarHelper = StringOperators.tokenize.createHelper( sharedVarAtom );
View Full Code Here

TOP

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

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.