1 19 20 package org.netbeans.modules.websvc.api.jaxws.project.config; 21 22 import java.io.IOException ; 23 import java.io.InputStream ; 24 import org.openide.filesystems.FileObject; 25 26 30 public class JaxWsModelProvider { 31 32 private static JaxWsModelProvider provider; 33 34 35 private JaxWsModelProvider() { 36 } 37 38 public static synchronized JaxWsModelProvider getDefault() { 39 if (provider==null) { 40 provider = new JaxWsModelProvider(); 41 } 42 return provider; 43 } 44 45 public JaxWsModel getJaxWsModel(InputStream is) throws IOException { 46 org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.JaxWs impl = 47 org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.JaxWs.createGraph(is); 48 return (impl==null?null:new JaxWsModel(impl)); 49 } 50 51 public JaxWsModel getJaxWsModel(FileObject fo) throws IOException { 52 org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.JaxWs impl = 53 org.netbeans.modules.websvc.jaxwsmodel.project_config1_0.JaxWs.createGraph(fo.getInputStream()); 54 return (impl==null?null:new JaxWsModel(impl,fo)); 55 } 56 } 57 | Popular Tags |