Package com.webdeninteractive.xbotts.Mapping.compiler

Examples of com.webdeninteractive.xbotts.Mapping.compiler.LinkedPair


  public Object getValue() {
    ArrayList mappingContexts = new ArrayList();
   
     Iterator iter = mapToolPanel.getModel().getLinkedPairs();
     while(iter.hasNext()){
       LinkedPair linkedPair = (LinkedPair) iter.next();
       ParameterContext paramContext = null;
      
       if(linkedPair.getSource() instanceof TransformerArgument && linkedPair.getTarget() instanceof Record){
         TransformerArgument source = (TransformerArgument) linkedPair.getSource();
         Record target = (Record) linkedPair.getTarget();
        
         paramContext = new MappingElement();

         TextContext argumentText = TextContext.createInstance();
         argumentText.setText(target.getReferenceName());
         paramContext.setArgument(argumentText);
        
         ((MappingElement)paramContext).setKey(Record.KEY == target.getKeyType());
         //paramContext.setVariable(ProcessVariable.forName(source.getReferenceName()));
        
         if(target.getExtendedProperties()!=null && target.getExtendedProperties().containsKey("type")){
           paramContext.setType((Class)target.getExtendedProperties().get("type"));
         }
        
         source.getTransformer().beforeSerialization();
        
         TransformerMapping transformerMapping = new TransformerMapping();
         transformerMapping.setTransformer(source.getTransformer());
         transformerMapping.setLinkedArgumentName(source.getName());
        
         paramContext.setTransformerMapping(transformerMapping);
        
       }else if (linkedPair.getSource() instanceof Record && linkedPair.getTarget() instanceof Record){
      
        
         Record source = (Record) linkedPair.getSource();
         Record target = (Record) linkedPair.getTarget();
        
         paramContext = new MappingElement();
         TextContext argumentText = TextContext.createInstance();
         argumentText.setText(target.getReferenceName());
         paramContext.setArgument(argumentText);
View Full Code Here

TOP

Related Classes of com.webdeninteractive.xbotts.Mapping.compiler.LinkedPair

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.