1   /*
2    * TestValueProvider.java
3    *
4    * Created on 13 Май 2006 г., 0:31
5    */
6   
7   package org.weda.data;
8   
9   /**
10   *
11   * @author Mikhail Titov
12   */
13  public class TestDataProvider implements DataProvider{
14      private String id;
15      
16      public TestDataProvider(){
17          super();
18      }
19      
20      public TestDataProvider(String id){
21          this.id = id;
22      }
23      
24      public Object getData() throws org.weda.data.DataProviderException {
25          return "test data";
26      }
27  
28      public String getMimeType() {
29          return "some-mime-type";
30      }
31      
32      public boolean equals(Object o){
33          if (o instanceof TestDataProvider)
34              return id.equals(((TestDataProvider)o).getId());
35          else
36              return false;
37      }
38  
39      public String getId() {
40          return id;
41      }
42  
43      public void release() throws DataProviderException {
44      }
45      
46  }