Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/test/OM4.1/OM4.1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Otherwise, the test will fail (i.e., no license or rights are declared).
dcterms:identifier "https://w3id.org/foops/test/OM4.1" ;
dcat:keyword "License"@en , "Test"@en , "Reusable"@en ;
dcat:endpointDescription <https://w3id.org/foops/api> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/OM1> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/OM4.1> ;
dpv:isApplicableFor <https://schema.org/DefinedTermSet> ;
ftr:supportedBy <https://w3id.org/foops/> ;
<http://semanticscience.org/resource/SIO_000233> <https://w3id.org/foops/metric/OM4.1> ;
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI1/URI1.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h4 class="miClase text-left text-separation">Test information</h4>
</div>
<div class="row row-equal">
<div class="col-md-3 well tag_div"> <strong>Endpoint URL</strong></div>
<div class="col-md-9 well"> <a href="https://foops.linkeddata.es/assess/test/URL1" target="_blank"> https://foops.linkeddata.es/assess/test/URL1 </a> </div>
<div class="col-md-9 well"> <a href="https://foops.linkeddata.es/assess/test/URI1" target="_blank"> https://foops.linkeddata.es/assess/test/URI1 </a> </div>
</div>
<div class="row row-equal">
<div class="col-md-3 well tag_div"> <strong>Applicable for</strong></div>
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI1/URI1.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
],
"http://www.w3.org/ns/dcat#endpointURL": [
{
"@id": "https://foops.linkeddata.es/assess/test/URL1"
"@id": "https://foops.linkeddata.es/assess/test/URI1"
}
],
"http://www.w3.org/ns/dcat#keyword": [
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI1/URI1.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The test will pass if the vocabulary is resolvable in any of the following RDF s
dcterms:identifier "https://w3id.org/foops/test/URI1" ;
dcat:keyword "URI resolvable"@en , "Test"@en , "Resolvable"@en;
dcat:endpointDescription <https://w3id.org/foops/api> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/URL1> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/URI1> ;
dpv:isApplicableFor <https://schema.org/DefinedTermSet> ;
ftr:supportedBy <https://w3id.org/foops/> ;
<http://semanticscience.org/resource/SIO_000233> <https://w3id.org/foops/metric/URI1> ;
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI2/URI2.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h4 class="miClase text-left text-separation">Test information</h4>
</div>
<div class="row row-equal">
<div class="col-md-3 well tag_div"> <strong>Endpoint URL</strong></div>
<div class="col-md-9 well"> <a href="https://foops.linkeddata.es/assess/test/URL2" target="_blank"> https://foops.linkeddata.es/assess/test/URL2 </a> </div>
<div class="col-md-9 well"> <a href="https://foops.linkeddata.es/assess/test/URI2" target="_blank"> https://foops.linkeddata.es/assess/test/URI2 </a> </div>
</div>
<div class="row row-equal">
<div class="col-md-3 well tag_div"> <strong>Applicable for</strong></div>
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI2/URI2.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
],
"http://www.w3.org/ns/dcat#endpointURL": [
{
"@id": "https://foops.linkeddata.es/assess/test/URL2"
"@id": "https://foops.linkeddata.es/assess/test/URI2"
}
],
"http://www.w3.org/ns/dcat#keyword": [
Expand Down
2 changes: 1 addition & 1 deletion doc/test/URI2/URI2.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This check verifies if the ontology URI is equal to the ontology ID. The test pa
dcterms:identifier "https://w3id.org/foops/test/URI2" ;
dcat:keyword "Consistent ontology ID"@en , "Test"@en , "Findable"@en ;
dcat:endpointDescription <https://w3id.org/foops/api> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/URL2> ;
dcat:endpointURL <https://foops.linkeddata.es/assess/test/URI2> ;
dpv:isApplicableFor <https://schema.org/DefinedTermSet> ;
ftr:supportedBy <https://w3id.org/foops/> ;
<http://semanticscience.org/resource/SIO_000233> <https://w3id.org/foops/metric/URI2> ;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fair/Benchmarks/CustomBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@ public CustomBenchmark(Ontology ontology,String ontologyOriginalUri, ArrayList<S
}
}
this.setChecks(checks);
this.setName(Constants.BENCHMARK_ALL_NAME);
this.setDescription(Constants.BENCHMARK_ALL_DESCRIPTION);
}
}
8 changes: 4 additions & 4 deletions src/main/java/fair/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,29 +139,29 @@ public class Constants {
public static final String OM3_EXPLANATION = OM1_EXPLANATION_ERROR;

//license
public static final String OM4_1 = "OM4_1";
public static final String OM4_1 = "OM4.1";
public static String OM4_1_TITLE; // = "License availability";
public static String OM4_1_DESC; // = "This check verifies if a license associated with the ontology";
public static final String OM4_1_EXPLANATION_OK = "A license was found";
public static final String OM4_1_EXPLANATION_OK_RIGHTS = "A license was not found, but we found a rights statement: ";
public static final String OM4_1_EXPLANATION_ERROR = "License or rights not found";

//license_resolvable
public static final String OM4_2 = "OM4_2";
public static final String OM4_2 = "OM4.2";
public static String OM4_2_TITLE; // = "License is resolvable";
public static String OM4_2_DESC; // = "This check verifies if the ontology license is resolvable";
public static final String OM4_2_EXPLANATION_OK = "License could be resolved";
public static final String OM4_2_EXPLANATION_ERROR = "The license used could not be resolved";

//provenance
public static final String OM5_1 = "OM5_1";
public static final String OM5_1 = "OM5.1";
public static String OM5_1_TITLE; // = "Basic provenance metadata";
public static String OM5_1_DESC; // = "This check verifies if basic provenance is available for the ontology: " +
// "[author, creation date]. This check also verifies whether [contributor, previous version] are present" +
// ", but with no penalty (as no all ontologies may have a previous version or a contributor)";
public static final String OM5_1_EXPLANATION = "The following provenance information was not found: ";

public static final String OM5_2 = "OM5_2";
public static final String OM5_2 = "OM5.2";
public static String OM5_2_TITLE; // = "Detailed provenance metadata";
public static String OM5_2_DESC; // = "This check verifies if detailed provenance information is available " +
// "for the ontology: [issued date, publisher]";
Expand Down
27 changes: 26 additions & 1 deletion src/test/java/fair/FOOPSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import java.nio.file.Path;
import java.util.ArrayList;
import static org.junit.Assert.*;

public class FOOPSTest {
Expand Down Expand Up @@ -412,4 +413,28 @@ public void testVersionInJsonLdResultSetOutput(){
}
}

/**
* This test verifies that FIND_3_BIS produces valid JSON-LD with a non-null benchmark name,
* fixing the Ostrails "Result parsing failed" error caused by CustomBenchmark not setting
* its name and description.
*/
@Test
public void testFind3BisBenchmarkNameNotNull(){
try {
ClassLoader classLoader = getClass().getClassLoader();
File is = new File(classLoader.getResource("ontology_included_in_catalog.ttl").getFile());
ArrayList<String> testIDs = new ArrayList<>();
testIDs.add(Constants.FIND3_BIS);
FOOPS f = new FOOPS(is.toString(), testIDs);
f.fairTest();
String jsonld = f.exportJSONLD();
assertTrue("FIND_3_BIS JSON-LD must contain the benchmark name (was null before fix)",
jsonld.contains(Constants.BENCHMARK_ALL_NAME));
f.removeTemporaryFolders();
} catch (Exception e) {
logger.error("Could not run FIND_3_BIS benchmark name test", e);
fail();
}
}

}
Loading