@@ -0,0 +1,1990 @@
+package v1.rest;%0D%0A%0D%0Aimport exceptions.ConfigException;%0D%0Aimport exceptions.Logging;%0D%0Aimport java.io.IOException;%0D%0Aimport javax.ws.rs.POST;%0D%0Aimport javax.ws.rs.Path;%0D%0Aimport javax.ws.rs.core.Response;%0D%0Aimport javax.xml.parsers.ParserConfigurationException;%0D%0Aimport javax.xml.transform.TransformerException;%0D%0Aimport org.jdom.JDOMException;%0D%0Aimport rdf.RDF;%0D%0Aimport rdf.RDF4J_20;%0D%0Aimport v1.utils.config.ConfigProperties;%0D%0A%0D%0A@Path(%22/tests%22)%0D%0Apublic class TestsResource %7B%0D%0A%0D%0A%09@POST%0D%0A%09@Path(%22/init%22)%0D%0A    public Response initTest() throws IOException, JDOMException, ConfigException, ParserConfigurationException, TransformerException %7B%0D%0A        try %7B%0D%0A            // delete %22test%22 user's vocabs and labels%0D%0A%09%09%09RDF rdf = new RDF(ConfigProperties.getPropertyParam(%22host%22));%0D%0A%09%09%09String prefixes = rdf.getPREFIXSPARQL();%0D%0A%09%09%09String update = prefixes%0D%0A                + %22DELETE %7B ?vocab ?p1 ?o1. ?label ?p2 ?o2. ?o3 ?p3 ?vocab. ?o4 ?p4 ?label. %7D %22%0D%0A                + %22WHERE %7B %22%0D%0A                + %22?o3 ?p3 ?vocab. %22%0D%0A%09%09%09%09+ %22?vocab ?p1 ?o1. %22%0D%0A%09%09%09%09+ %22?vocab dc:creator %5C%22test%5C%22. %22%0D%0A%09%09%09%09+ %22?o4 ?p4 ?label. %22%0D%0A%09%09%09%09+ %22?label ?p2 ?o2. %22%0D%0A%09%09%09%09+ %22?label dc:creator %5C%22test%5C%22. %22%0D%0A                + %22%7D%22;%0D%0A%09%09%09RDF4J_20.SPARQLupdate(ConfigProperties.getPropertyParam(%22repository%22), ConfigProperties.getPropertyParam(%22ts_server%22), update);%0D%0A%09%09%09// load rdf%0D%0A            String fileURL = ConfigProperties.getPropertyParam(%22http_protocol%22) + %22://%22 + ConfigProperties.getPropertyParam(%22host%22) + %22/tests/test.rdf%22;%0D%0A%09%09%09RDF4J_20.SPARQLupdate(ConfigProperties.getPropertyParam(%22repository%22),ConfigProperties.getPropertyParam(%22ts_server%22), %22LOAD %3C%22 + fileURL + %22%3E%22);%0D%0A%09%09%09// output%0D%0A%09%09%09return Response.status(Response.Status.NO_CONTENT).build();%0D%0A        %7D catch (Exception e) %7B%0D%0A            return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(Logging.getMessageJSON(e, %22v1.rest.TestsResource%22))%0D%0A                    .header(%22Content-Type%22, %22application/json;charset=UTF-8%22).build();%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

add tests init resource