1 package org.apache.axis2.wsdl.codegen.writer; 2 3 import org.apache.axis2.wsdl.codegen.XSLTConstants; 4 5 import java.io.File ; 6 7 24 public class DatabindingSupportClassWriter extends ClassWriter { 25 26 private int databindingFramework=0; 27 28 public DatabindingSupportClassWriter(String outputFileLocation) { 29 this.outputFileLocation = new File (outputFileLocation); 30 } 31 32 public DatabindingSupportClassWriter(File outputFileLocation,int language,int databindingFramework) { 33 this.outputFileLocation = outputFileLocation; 34 this.language = language; 35 this.databindingFramework = databindingFramework; 36 } 37 38 public void setDatabindingFramework(int databindingFramework) { 39 this.databindingFramework = databindingFramework; 40 } 41 42 public void loadTemplate() { 43 if (this.databindingFramework==XSLTConstants.DataBindingTypes.XML_BEANS){ 44 Class clazz = this.getClass(); 45 switch (language){ 46 case XSLTConstants.LanguageTypes.JAVA: 47 this.xsltStream = clazz.getResourceAsStream(XSLTConstants.XSLTDatabindingSupporterTemplates.JAVA_TEMPLATE); 48 break; 49 case XSLTConstants.LanguageTypes.C_SHARP: 50 case XSLTConstants.LanguageTypes.C_PLUS_PLUS: 51 case XSLTConstants.LanguageTypes.VB_DOT_NET: 52 default: 53 throw new UnsupportedOperationException (); 54 } 55 }else{ 56 throw new UnsupportedOperationException ("Unsupported Data binding Framework!"); 57 } 58 } 59 } 60 | Popular Tags |