Examples of Argument


Examples of org.teiid.language.Argument

            //we can assume for now that all arguments will be literals, which may be multivalued
            Literal value = null;
            if (direction != Direction.OUT) {
              value = (Literal)translate(param.getExpression());
            }
            Argument arg = new Argument(direction, value, param.getClassType(), metadataParam);
            translatedParameters.add(arg);
        }
                       
        Call call = new Call(removeSchemaName(sp.getProcedureName()), translatedParameters, proc);
        call.setReturnType(returnType);
View Full Code Here

Examples of org.teiid.language.Argument

  public void execute(ProcedureExecutionParent procedureExecutionParent) throws TranslatorException {
    try {
      Call command = parent.getCommand();
      List<Argument> params = command.getArguments();
     
      Argument object = params.get(OBJECT);
      String objectName = (String) object.getArgumentValue().getValue();
     
      Argument start = params.get(STARTDATE);
      Timestamp startTime = (Timestamp) start.getArgumentValue().getValue();
      GregorianCalendar tempCalendar = (GregorianCalendar) GregorianCalendar.getInstance();
      tempCalendar.setTime(startTime);
      XMLGregorianCalendar startCalendar = factory.newXMLGregorianCalendar(tempCalendar);
     
      Argument end = params.get(ENDDATE);
      Timestamp endTime = (Timestamp) end.getArgumentValue().getValue();
      tempCalendar = (GregorianCalendar) GregorianCalendar.getInstance();
      tempCalendar.setTime(endTime);
      XMLGregorianCalendar endCalendar = factory.newXMLGregorianCalendar(tempCalendar);
     
      deletedResult = parent.getConnection().getDeleted(objectName, startCalendar, endCalendar);
View Full Code Here

Examples of org.teiid.language.Argument

  @Test public void testGetTextFiles() throws Exception {
    FileExecutionFactory fef = new FileExecutionFactory();
    FileConnection fc = Mockito.mock(FileConnection.class);
    Mockito.stub(fc.getFile("*.txt")).toReturn(new File(UnitTestUtil.getTestDataPath(), "*.txt"));
    Call call = fef.getLanguageFactory().createCall("getTextFiles", Arrays.asList(new Argument(Direction.IN, new Literal("*.txt", TypeFacility.RUNTIME_TYPES.STRING), TypeFacility.RUNTIME_TYPES.STRING, null)), null);
    ProcedureExecution pe = fef.createProcedureExecution(call, null, null, fc);
    pe.execute();
    int count = 0;
    while (true) {
      if (pe.next() == null) {
View Full Code Here

Examples of railo.runtime.type.scope.Argument

   
    private Object _call(PageContext pc,Collection.Key calledName, Object[] args, Struct values,boolean doIncludePath) throws PageException {
     
      //print.out(count++);
      PageContextImpl pci=(PageContextImpl) pc;
      Argument newArgs= pci.getScopeFactory().getArgumentInstance();
        newArgs.setFunctionArgumentNames(properties.argumentsSet);
        LocalImpl newLocal=pci.getScopeFactory().getLocalInstance();
       
    Undefined   undefined=pc.undefinedScope();
    Argument  oldArgs=pc.argumentsScope();
        Local    oldLocal=pc.localScope();
        Collection.Key oldCalledName=pci.getActiveUDFCalledName();
       
    pc.setFunctionScopes(newLocal,newArgs);
    pci.setActiveUDFCalledName(calledName);
View Full Code Here

Examples of railo.transformer.bytecode.expression.var.Argument

import railo.transformer.library.function.FunctionLibFunction;

public class IsDefined implements FunctionEvaluator{

  public void evaluate(BIF bif, FunctionLibFunction flf) throws TemplateException {
    Argument arg = bif.getArguments()[0];
    Expression value = arg.getValue();
    if(value instanceof LitString) {
      String str=((LitString)value).getString();
      StringList sl = VariableInterpreter.parse(str,false);
      if(sl!=null){
        // scope
        str=sl.next();
        int scope = VariableInterpreter.scopeString2Int(str);
        if(scope==Scope.SCOPE_UNDEFINED)sl.reset();
       
        // keys
        String[] arr=sl.toArray();
        ArrayUtil.trim(arr);
       
        // update first arg
        arg.setValue(LitDouble.toExprDouble(scope),"number");
       
        // add second argument
       
        if(arr.length==1){
          Expression expr = new CollectionKey(arr[0]);//LitString.toExprString(str);
          arg=new Argument(expr,Collection.Key.class.getName());
          bif.addArgument(arg)
        }
        else {
          CollectionKeyArray expr=new CollectionKeyArray(arr);
          //LiteralStringArray expr = new LiteralStringArray(arr);
          arg=new Argument(expr,Collection.Key[].class.getName());
          bif.addArgument(arg);
        }
       
      }
     
View Full Code Here

Examples of railo.transformer.bytecode.statement.Argument

      adapter.returnValue();
      return;
    }
     
    Iterator<Argument> it = args.iterator();
    Argument arg;
    ConditionVisitor cv=new ConditionVisitor();
    DecisionIntVisitor div;
    cv.visitBefore();
    int count=0;
    while(it.hasNext()) {
      arg=it.next();
      cv.visitWhenBeforeExpr();
        div=new DecisionIntVisitor();
        div.visitBegin();
          adapter.loadArg(2);
        div.visitEQ();
          adapter.push(count++);
        div.visitEnd(bc);
      cv.visitWhenAfterExprBeforeBody(bc);
        Expression defaultValue = arg.getDefaultValue();
        if(defaultValue!=null) {
          /*if(defaultValue instanceof Null) {
            adapter.invokeStatic(NULL, GET_INSTANCE);
          }
          else*/
View Full Code Here

Examples of ru.bmstu.datalog.data.Argument

   
    while(resultSet.next()) {
      ArrayList<Argument> args = new ArrayList<Argument>();
     
      for (int i = 0; i < predicate.size(); ++i)
        args.add(new Argument(resultSet.getString("f" + i)));
     
      answer.add(new Predicate(predicate.getName(), args));
    }   
   
    return answer;
View Full Code Here

Examples of unbbayes.prs.mebn.Argument

    protected void loadDomainResidentNode() throws IOMebnException {

      MFrag domainMFrag;
      ResidentNode domainResidentNode;
      InputNode generativeInputNode;
      Argument argument;
      MultiEntityNode multiEntityNode;

      RDFIndividual individualOne;
      RDFIndividual individualTwo;
      OWLObjectProperty objectProperty;

      OWLNamedClass domainResidentNodePr = this.getOwlModel().getOWLNamedClass(DOMAIN_RESIDENT);
      Collection instances = domainResidentNodePr.getInstances(true);
      MFrag mFragOfNode = null;

      for (Iterator it = instances.iterator(); it.hasNext();) {

        individualOne = (RDFIndividual) it.next();
        domainResidentNode = getMapDomainResidentNode().get(individualOne
            .getBrowserText());
        if (domainResidentNode == null) {
          throw new IOMebnException(
              getResource().getString("DomainResidentNotExistsInMTheory"),
              individualOne.getBrowserText());
        }

        Debug.println("Domain Resident loaded: "
            + individualOne.getBrowserText());

        domainResidentNode.setDescription(getDescription(individualOne));

        /* -> isResidentNodeIn */
        objectProperty = (OWLObjectProperty) getOwlModel()
            .getOWLObjectProperty("isResidentNodeIn");
        instances = individualOne.getPropertyValues(objectProperty);
        Iterator itAux = instances.iterator();
        individualTwo = (RDFIndividual) itAux.next();
        domainMFrag = getMapDomainMFrag().get(individualTwo.getBrowserText());
        if (domainMFrag.containsDomainResidentNode(domainResidentNode) == false) {
          throw new IOMebnException(
              getResource().getString("DomainResidentNotExistsInDomainMFrag"));
        }
        mFragOfNode = domainMFrag;
        Debug.println("-> " + individualOne.getBrowserText() + ": "
            + objectProperty.getBrowserText() + " = "
            + individualTwo.getBrowserText());

        /* -> hasArgument */
        objectProperty = (OWLObjectProperty) getOwlModel()
            .getOWLObjectProperty("hasArgument");
        instances = individualOne.getPropertyValues(objectProperty);
        for (Iterator itIn = instances.iterator(); itIn.hasNext();) {
          individualTwo = (RDFIndividual) itIn.next();
          argument = new Argument(individualTwo.getBrowserText(),
              domainResidentNode);
          domainResidentNode.addArgument(argument);
          getMapArgument().put(individualTwo.getBrowserText(), argument);
          Debug.println("-> " + individualOne.getBrowserText() + ": "
              + objectProperty.getBrowserText() + " = "
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.