View Javadoc

1   
2   package org.catacomb.dataview.read;
3   
4   
5   
6   import org.catacomb.interlish.resource.ImportContext;
7   
8   import java.io.File;
9   import java.net.URL;
10  
11  
12  
13  public class FUImportContext implements ImportContext {
14  
15  
16  
17  
18      public static FUImportContext makeContext(Object obj) {
19          FUImportContext ret = null;
20          if (obj == null) {
21              ret = new FUImportContext();
22  
23          } else if (obj instanceof File) {
24              ret = new FileImportContext((File)obj);
25  
26  
27          } else if (obj instanceof URL) {
28              ret = new URLImportContext((URL)obj);
29          }
30  
31          return ret;
32      }
33  
34  
35  
36      public Object getRelative(String rp) {
37          return null;
38      }
39  
40  
41      public File getSourceFile() {
42          return null;
43      }
44  
45      public boolean hasRelative(String sr) {
46          return false;
47      }
48  
49      public ContentReader getRelativeReader(String sr) {
50          return null;
51      }
52      public File getRelativeFile(String sr) {
53          return null;
54      }
55  
56      public String getExtensionRelativeName(String ext) {
57          return null;
58      }
59  
60  
61      public String getReExtendedName(String orig, String ext) {
62          String ret = null;
63          String mnm = orig; // getMainName();
64          if (mnm != null) {
65              ret = mnm;
66              if (ret.indexOf(".") > 0) {
67                  ret = ret.substring(0, ret.lastIndexOf("."));
68              }
69              ret = ret + ext;
70          }
71          return ret;
72      }
73  
74  
75  }