1 package fr.in2p3.jsaga.impl.job.staging;
2
3 import fr.in2p3.jsaga.Base;
4 import org.ogf.saga.url.URL;
5
6
7
8
9
10
11
12
13
14
15
16
17
18 public abstract class AbstractDataStaging {
19 protected static final String JSAGA_FACTORY = Base.getSagaFactory();
20 protected static final boolean INPUT = true;
21 protected static final boolean OUTPUT = false;
22
23 protected URL m_localURL;
24 protected boolean m_append;
25
26 protected AbstractDataStaging(URL localURL, boolean append) {
27 m_localURL = localURL;
28 m_append = append;
29 }
30
31 public boolean isSubdirOf(URL baseURL) {
32 return m_localURL.toString().startsWith(baseURL.toString()+"/");
33 }
34
35 public String getLocalProtocol() {
36 return m_localURL.getScheme();
37 }
38
39 public abstract String getWorkerProtocol();
40 public abstract boolean isInput();
41 }