Package org.data2semantics.platform.core.data

Examples of org.data2semantics.platform.core.data.ReferenceInput


                Module  refModule = workflow.modules.get(referencedModule);
       
                Output refOutput = refModule.output(referencedOutput);
             
                ReferenceInput newInput = new ReferenceInput(this, inputName, description, inputType, refOutput, false);
               
                if(domain().typeMatches(refOutput, newInput))
                  newInput.setMultiValue(false);
                else
                if(isList(refOutput.dataType())){
                  newInput.setMultiValue(true);
              }
                multiInputRefs.add(newInput);
               
          } else {
           
View Full Code Here


       
        if(inputs.containsKey(inputName))
          throw new IllegalArgumentException("Module ("+name()+") already contains input with the given name ("+inputName+")");
           
        inputs.put(inputName,
            new ReferenceInput(this, inputName, description, type, referencedOutput, multiRef, print));
      }
View Full Code Here

               
                // Raw inputs can only be coupled with another reference input
                if(!(coupledMi.inputs().get(idx) instanceof ReferenceInput))
                  throw new IllegalStateException(" Reference can only be paired with another reference ");
           
                ReferenceInput ri = (ReferenceInput) coupledMi.inputs().get(idx);
                if(!(ri.reference().module().equals(curMultiRefInput.reference().module())))
                  throw new IllegalStateException(" Reference can only be paired with another reference from the same module");
           
                // We are selecting next avlue from the same module instance
                InstanceOutput refIO = curModuleInstance.output(ri.reference().name());
                nextValue = refIO.value();
                //System.out.println("Assigning "+ri.reference().module().name()+"."+ri.reference().name()+" into "+name()+"."+coupledMi.name());
                nextUniverse.put(coupledMi, new InstanceInput(this, coupledMi, nextValue, refIO));
              }
            }
View Full Code Here


  private void handleReferenceInput(Map<Input, InstanceInput> universe, int depth,
      Input curInput, Input origin) {
   
    ReferenceInput ri = (ReferenceInput) curInput;
    List<ModuleInstance> parentInstances = ri.reference().module().instances();
   
     
    for(ModuleInstance mi : parentInstances){
   
      if(mi.withinUniverse(universe) ){
       
          Map<Input, InstanceInput> nextUniverse = new LinkedHashMap<Input, InstanceInput>(universe);
          nextUniverse.putAll(mi.universe());
         
          InstanceOutput refInstanceOutput = mi.output(((ReferenceInput) curInput).reference().name());
          Object nextValue = refInstanceOutput.value();
         
         
         
          if(!ri.multiValue()){
         
            nextUniverse = new LinkedHashMap<Input, InstanceInput>(nextUniverse);
            nextUniverse.put(origin, new InstanceInput(this, origin, nextValue, refInstanceOutput));
           
            instantiateInputRec( nextUniverse,  depth+1);
View Full Code Here

      {
        for (Input inp : module.inputs())
        {
          if (inp instanceof ReferenceInput)
          {
            ReferenceInput ri = (ReferenceInput) inp;
            result.append("\""+ri.reference().module().name() + "\" -> \""
                + module.name() + "\" [label=\""
                + ri.reference().name() + "\"]");
          } else if (inp instanceof MultiInput)
          {
            for (Input i : ((MultiInput) inp).inputs())
            {
              if (i instanceof ReferenceInput)
              {
                ReferenceInput ri = (ReferenceInput) i;
                result.append("\""+ri.reference().module().name()
                    + "\" ->" + module.name() + "[label=\""
                    + ri.reference().name() + "\"]");
              }
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.data2semantics.platform.core.data.ReferenceInput

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.