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
1 change: 1 addition & 0 deletions src/main/java/entities/Ontology.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ private void completeMetadata(OWLAnnotation a) {
this.namespacePrefix = Utils.getValueAsLiteralOrURI(a.getValue());
this.supportedMetadata.add(Constants.FOOPS_NS_PREFIX);
break;
case Constants.PROP_VOID_URI_SPACE:
case Constants.PROP_VANN_URI:
value = Utils.getValueAsLiteralOrURI(a.getValue());
this.namespaceUri = value;
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/fair/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ public class Constants {
public static final String PREFIX_CC = "http://prefix.cc/";

//to do: ontobee (http://www.ontobee.org/sparql), bioportal,


/* FAIR Categories*/
public static final String FINDABLE = "Findable";
public static final String ACCESSIBLE = "Accessible";
Expand Down Expand Up @@ -371,6 +369,7 @@ public class Constants {
public static final String NS_DCTERMS = "http://purl.org/dc/terms/";
public static final String NS_OWL = "http://www.w3.org/2002/07/owl#";
public static final String NS_VANN = "http://purl.org/vocab/vann/";
public static final String NS_VOID = "http://rdfs.org/ns/void#";
// public static final String NS_VAEM =
// "http://www.linkedmodel.org/schema/vaem#";
public static final String NS_PROV = "http://www.w3.org/ns/prov#";
Expand Down Expand Up @@ -492,7 +491,7 @@ public class Constants {

public static final String PROP_VANN_PREFIX = NS_VANN + "preferredNamespacePrefix";
public static final String PROP_VANN_URI = NS_VANN + "preferredNamespaceUri";

public static final String PROP_VOID_URI_SPACE = NS_VOID + "uriSpace";
public static final String PROP_SKOS_NOTE = NS_SKOS + "note";

public static final String PROP_PAV_CREATED_BY = NS_PAV + "createdBy";
Expand Down
19 changes: 19 additions & 0 deletions src/test/java/fair/FOOPSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,4 +412,23 @@ public void testVersionInJsonLdResultSetOutput(){
}
}

/**
* This test verifies that void:uriSpace is recognized
* as an alternative to vann:preferredNamespaceUri for the namespace URI.
*/
@Test
public void testVoidUriSpaceRecognized(){
try {
ClassLoader classLoader = getClass().getClassLoader();
File is = new File(classLoader.getResource("test_void_urispace.ttl").getFile());
FOOPS f = new FOOPS(is.toString(), true);
assertEquals("http://example.org/test_void#", f.getOntology().getNamespaceUri());
assertTrue(f.getOntology().getSupportedMetadata().contains(Constants.FOOPS_NS_URI));
f.removeTemporaryFolders();
} catch (Exception e) {
logger.error("Could not load the resource file", e);
fail();
}
}

}
11 changes: 11 additions & 0 deletions src/test/resources/test_void_urispace.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<http://example.org/test_void>
a owl:Ontology ;
dc:title "Test void:uriSpace" ;
dc:description "Test ontology" ;
void:uriSpace "http://example.org/test_void#" ;
rdfs:comment "Void URI Space" .
Loading