1 6 7 package org.joseki.test; 8 9 import org.joseki.server.*; 10 11 16 17 public class TestServer 18 { 19 public int port = 9990 ; 20 String baseURI = "http://localhost:"+port+"/" ; 21 String testdata_URI = baseURI+"testdata" ; 22 String testdata2_URI = baseURI+"testdata2" ; 23 24 String noSuchModelURI = baseURI+"noSuchModel" ; 25 String scratchModelURI = baseURI+"scratch" ; 26 String emptyModelURI = baseURI+"empty" ; 27 String infModelURI = baseURI+"inf" ; 28 String fetchModelURI = baseURI+"fetch-1" ; 29 30 RDFServer server = null ; 31 32 void createServer() 33 { 34 try { 35 server = new RDFServer("etc/joseki-junit.n3", port) ; 36 server.start() ; 37 } catch (ConfigurationErrorException confEx) 38 { 39 System.err.println("Configuration error: "+confEx.getMessage()) ; 40 server = null ; 42 return ; 43 } 44 } 45 46 void destroyServer() 47 { 48 server.stop() ; 49 server = null ; 50 } 51 52 } 53 54 | Popular Tags |