Package org.data2semantics.platform.core.data

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


        if(curModuleInstance.withinUniverse(universe) ){
         
          Map<Input, InstanceInput> nextUniverse = new LinkedHashMap<Input, InstanceInput>(universe);
          nextUniverse.putAll(curModuleInstance.universe());
         
          InstanceOutput refInstanceOutput= curModuleInstance.output(curMultiRefInput.reference().name());
          Object nextValue = refInstanceOutput.value();
         
          if(!curMultiRefInput.multiValue()){
         
            nextUniverse = new LinkedHashMap<Input, InstanceInput>(nextUniverse);
           
            if(!coupledInputs){
           
              nextUniverse.put(originInput, new InstanceInput(this, originInput, nextValue, refInstanceOutput));
             
            } else {
              for(String ciName : coupledInputsFor(originInput.name())){
               
                // we are only coupling multi inputs
                if(!(input(ciName) instanceof MultiInput))
                  throw new IllegalStateException(" can't couple non multiple inputs");
             
                MultiInput coupledMi = (MultiInput) input(ciName);
               
                if(coupledMi.inputs().size() != ((MultiInput)originInput).inputs().size())
                  throw new IllegalStateException("These multiple inputs have different length and can't be coupled");
               
                // 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


      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()){
         
View Full Code Here

                ii.setInstance(this);
                this.inputs.put(ii.name(), ii);
      }
     
      for(Output original : module().outputs()){
        InstanceOutput instanceOutput = new InstanceOutput( module(), original, this);
        outputs.put(instanceOutput.name(), instanceOutput);
      }
      creationTime = System.currentTimeMillis();
    }
View Full Code Here

TOP

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

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.