Examples of Builtin


Examples of com.clarkparsia.pellet.rules.builtins.BuiltIn

    public List<BindingHelper> getHelpers() {
      return helpers;
    }
   
    public void visit(BuiltInAtom atom) {
      BuiltIn builtIn = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() );
      helpers.add( builtIn.createHelper( atom ) );
    }
View Full Code Here

Examples of com.clarkparsia.pellet.rules.builtins.BuiltIn

    public boolean isUsable() {
      return usable;
    }

    public void visit(BuiltInAtom atom) {
      BuiltIn builtin = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() );
      if( builtin.equals( NoSuchBuiltIn.instance ) ) {
        usable = false;
        usageMessage = "No builtin for " + atom.getPredicate();
      }
      else {
        usable = true;
View Full Code Here

Examples of com.clarkparsia.pellet.rules.builtins.BuiltIn

    }
  }

  private static class BodyAtomFilter extends UsableFilter {
    public void visit(BuiltInAtom atom) {
      BuiltIn builtin = BuiltInRegistry.instance.getBuiltIn( atom.getPredicate() );
      if( builtin.equals( NoSuchBuiltIn.instance ) ) {
        notUsableMessage = "No builtin for " + atom.getPredicate();
      }
    }
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.Builtin

                        }
                    }
              // }
            } else if (hClause instanceof Functor && isAdd) {
                Functor f = (Functor)hClause;
                Builtin imp = f.getImplementor();
                if (imp != null) {
                    imp.headAction(f.getBoundArgs(env), f.getArgLength(), context);
                } else {
                    throw new ReasonerException("Invoking undefined Functor " + f.getName() +" in " + rule.toShortString());
                }
            } else if (hClause instanceof Rule) {
                Rule r = (Rule)hClause;
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.Builtin

        java.util.List<Node> nodes = new ArrayList<Node>();

        nodes.add(arg1Node);
        nodes.add(arg2Node);

        Builtin f = BuiltinRegistry.theRegistry.getImplementation("greaterThan");
       
        System.out.println("Class: " + f.getClass().getCanonicalName());
        System.out.println("Arg1: " + arg1Node.getClass().getCanonicalName());
        System.out.println("Arg2: " + arg2Node.getClass().getCanonicalName());
       
        Functor functor = new Functor("greaterThan", nodes, BuiltinRegistry.theRegistry);
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.Builtin

                        }
                    }
              // }
            } else if (hClause instanceof Functor && isAdd) {
                Functor f = (Functor)hClause;
                Builtin imp = f.getImplementor();
                if (imp != null) {
                    imp.headAction(f.getBoundArgs(env), f.getArgLength(), context);
                } else {
                    throw new ReasonerException("Invoking undefined Functor " + f.getName() +" in " + rule.toShortString());
                }
            } else if (hClause instanceof Rule) {
                Rule r = (Rule)hClause;
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.Builtin

                        }
                    }
              // }
            } else if (hClause instanceof Functor && isAdd) {
                Functor f = (Functor)hClause;
                Builtin imp = f.getImplementor();
                if (imp != null) {
                    imp.headAction(f.getBoundArgs(env), f.getArgLength(), context);
                } else {
                    throw new ReasonerException("Invoking undefined Functor " + f.getName() +" in " + rule.toShortString());
                }
            } else if (hClause instanceof Rule) {
                Rule r = (Rule)hClause;
View Full Code Here

Examples of etch.compiler.ast.Builtin

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
       
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here

Examples of etch.compiler.ast.Builtin

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
       
        int i = cn.indexOf( '<' );
        if (i >= 0)
          cn = cn.substring( 0, i );
       
        return String.format( "Validator_custom.get( %s.class, %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here

Examples of etch.compiler.ast.Builtin

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
       
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.