Ticket #422: WcpsTest.java

File WcpsTest.java, 836 bytes (added by Dirk Daems, 11 years ago)
Line 
1import petascope.ConfigManager;
2import petascope.core.DbMetadataSource;
3import petascope.util.ras.RasUtil;
4import petascope.wcps.server.core.Wcps;
5
6public class WcpsTest {
7
8 public static void main(String[] args){
9
10 try{
11
12 ConfigManager.getInstance("/usr/local/rasdaman-8.4.0/etc");
13
14 DbMetadataSource metaDataSource = new DbMetadataSource(ConfigManager.METADATA_DRIVER,
15 ConfigManager.METADATA_URL,
16 ConfigManager.METADATA_USER, ConfigManager.METADATA_PASS);
17
18 Wcps wcps = new Wcps(metaDataSource);
19
20
21 Object wcpsResult = RasUtil.executeWcpsQuery("for c in (mean_summer_airtemp) return crsSet(c)",
22 wcps);
23 /*
24 Object wcpsResult = RasUtil.executeWcpsQuery("for c in (GAUL_Africa_0) return encode(c,\"png\")",
25 wcps);
26 */
27
28 }
29 catch(Exception ex){
30 ex.printStackTrace();
31 }
32
33 }
34
35}