@@ -41,7 +41,7 @@ public class FOOPSController {
4141
4242 Logger logger = LoggerFactory .getLogger (FOOPSController .class );
4343
44- @ ApiOperation (value = "Assess GET ontology" )
44+ @ ApiOperation (value = "Assess GET ontology" )
4545 @ CrossOrigin (origins = "*" )
4646 @ GetMapping ("/assessOntology" )
4747 public String assessGET () {
@@ -127,18 +127,62 @@ public String assessPOST(
127127 }
128128 }
129129
130- @ ApiOperation (value = "In construction: Get test by name" )
131- @ GetMapping (path = "/checkByName" , produces = "application/json" )
132- public String getCheckByName (
130+ @ ApiOperation (
131+ value = "IN CONSTRUCTION: Test by name" ,
132+ notes = "return JSON TEST obtained by FOOPS."
133+ )
134+ @ PostMapping (path = "/test" , consumes = "application/json" , produces = "application/json" )
135+ public String testByNamePOST (
133136 @ ApiParam (value = "Name of test" , required = true )
137+ @ RequestBody String body ) {
138+
139+ return "{ \" test\" : \" Not found\" }" ;
140+ }
141+
142+ @ ApiOperation (
143+ value = "IN CONSTRUCTION: Test by name" ,
144+ notes = "return JSON TEST obtained by FOOPS."
145+ )
146+ @ GetMapping (path = "/test" , produces = "application/json" )
147+ public String testByNameGET (
148+ @ ApiParam (value = "Name of test" , required = true )
149+ @ RequestParam String name ) {
150+
151+ FOOPS f = null ;
152+ Path ontologyPath = null ;
153+ ontologyPath = Path .of ("ontology" );
154+ f = new FOOPS (String .valueOf (ontologyPath ), true );
155+ Optional <Check > check = f .getTestByName (name );
156+ return "{ \" test\" : \" " + (check .isPresent () ? check .get ().toString () : "Not found" ) + "\" }" ;
157+ }
158+
159+ @ ApiOperation (
160+ value = "IN CONSTRUCTION: Benchmark by name" ,
161+ notes = "return JSON BENCHMARK obtained by FOOPS."
162+ )
163+ @ PostMapping (path = "/benchmark" , consumes = "application/json" , produces = "application/json" )
164+ public String benchmarkByNamePOST (
165+ @ ApiParam (value = "Name of benchmark" , required = true )
166+ @ RequestBody String body ) {
167+
168+ return "{ \" benchmark\" : \" Not found\" }" ;
169+ }
170+
171+ @ ApiOperation (
172+ value = "IN CONSTRUCTION: Benchmark by name" ,
173+ notes = "return JSON BENCHMARK obtained by FOOPS."
174+ )
175+ @ GetMapping (path = "/benchmark" , produces = "application/json" )
176+ public String benchmarkByNamePost (
177+ @ ApiParam (value = "Name of benchmark" , required = true )
134178 @ RequestParam String name ) {
135179
136180 FOOPS f = null ;
137181 Path ontologyPath = null ;
138182 ontologyPath = Path .of ("ontology" );
139- f = new FOOPS (String .valueOf (ontologyPath ), false ); // Ajustar los parámetros según tu necesidad
140- Optional <Check > check = f .getCheckByName (name );
141- return "{ \" check \" : \" " + (check .isPresent () ? check .get ().toString () : "Not found" ) + "\" }" ;
183+ f = new FOOPS (String .valueOf (ontologyPath ), true );
184+ Optional <Check > check = f .getBenchmarkByName (name );
185+ return "{ \" benchmark \" : \" " + (check .isPresent () ? check .get ().toString () : "Not found" ) + "\" }" ;
142186 }
143187 /**
144188 *
0 commit comments