KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > validator > MyModelSource


1 /*
2  * MyModelSource.java
3  *
4  * Created on February 7, 2007, 12:53 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.xml.wsdl.validator;
11
12 import java.io.File JavaDoc;
13 import java.net.URI JavaDoc;
14 import org.netbeans.modules.xml.xam.ModelSource;
15 import org.openide.util.Lookup;
16 import org.openide.util.lookup.AbstractLookup;
17 import org.openide.util.lookup.InstanceContent;
18 import org.openide.util.lookup.ProxyLookup;
19
20 /**
21  *
22  * @author radval
23  */

24 class MyModelSource extends ModelSource {
25          
26          private URI JavaDoc mURI;
27          
28          public MyModelSource(Lookup lookup, boolean editable, URI JavaDoc uri){
29             super(lookup, editable);
30             this.mURI = uri;
31         }
32          
33         public Lookup getLookup(){
34             Lookup l1 = super.getLookup();
35             InstanceContent ic = new InstanceContent();
36             ic.add(new File JavaDoc(mURI));
37             Lookup l2 = new AbstractLookup(ic);
38
39             
40             
41             ProxyLookup pl = new ProxyLookup(new Lookup[] {l1, l2});
42            
43             return pl;
44                 
45         }
46      }
Popular Tags