1   package eu.fbk.knowledgestore;
2   
3   import java.util.Map;
4   
5   import javax.annotation.Nullable;
6   
7   import com.google.common.collect.ForwardingObject;
8   
9   import org.openrdf.model.URI;
10  
11  import eu.fbk.knowledgestore.Operation.Count;
12  import eu.fbk.knowledgestore.Operation.Create;
13  import eu.fbk.knowledgestore.Operation.Delete;
14  import eu.fbk.knowledgestore.Operation.Download;
15  import eu.fbk.knowledgestore.Operation.Match;
16  import eu.fbk.knowledgestore.Operation.Merge;
17  import eu.fbk.knowledgestore.Operation.Retrieve;
18  import eu.fbk.knowledgestore.Operation.Sparql;
19  import eu.fbk.knowledgestore.Operation.Update;
20  import eu.fbk.knowledgestore.Operation.Upload;
21  
22  public abstract class ForwardingSession extends ForwardingObject implements Session {
23  
24      @Override
25      protected abstract Session delegate();
26  
27      @Override
28      @Nullable
29      public String getUsername() throws IllegalStateException {
30          return delegate().getUsername();
31      }
32  
33      @Override
34      @Nullable
35      public String getPassword() throws IllegalStateException {
36          return delegate().getPassword();
37      }
38  
39      @Override
40      public Map<String, String> getNamespaces() throws IllegalStateException {
41          return delegate().getNamespaces();
42      }
43  
44      @Override
45      public Download download(final URI resourceID) throws IllegalStateException {
46          return delegate().download(resourceID);
47      }
48  
49      @Override
50      public Upload upload(final URI resourceID) throws IllegalStateException {
51          return delegate().upload(resourceID);
52      }
53  
54      @Override
55      public Count count(final URI type) throws IllegalStateException {
56          return delegate().count(type);
57      }
58  
59      @Override
60      public Retrieve retrieve(final URI type) throws IllegalStateException {
61          return delegate().retrieve(type);
62      }
63  
64      @Override
65      public Create create(final URI type) throws IllegalStateException {
66          return delegate().create(type);
67      }
68  
69      @Override
70      public Merge merge(final URI type) throws IllegalStateException {
71          return delegate().merge(type);
72      }
73  
74      @Override
75      public Update update(final URI type) throws IllegalStateException {
76          return delegate().update(type);
77      }
78  
79      @Override
80      public Delete delete(final URI type) throws IllegalStateException {
81          return delegate().delete(type);
82      }
83  
84      @Override
85      public Match match() throws IllegalStateException {
86          return delegate().match();
87      }
88  
89      @Override
90      public Sparql sparql(final String expression, final Object... arguments)
91              throws IllegalStateException {
92          return delegate().sparql(expression, arguments);
93      }
94  
95      @Override
96      public boolean isClosed() {
97          return delegate().isClosed();
98      }
99  
100     @Override
101     public void close() {
102         delegate().close();
103     }
104 
105 }