Add utils for fetching WoN-specific linked data
@@ -58,6 +58,20 @@ public class WonLinkedDataUtils
return RdfUtils.getURIPropertyForPropertyPath(dataset, connectionURI, propertyPath);
}
+ public static URI getEventContainerURIforConnectionURI(URI connectionURI, LinkedDataSource linkedDataSource) {
+ assert linkedDataSource != null : "linkedDataSource must not be null";
+ Dataset dataset = getDatalForResource(connectionURI, linkedDataSource);
+ Path propertyPath = PathParser.parse("<" + WON.HAS_EVENT_CONTAINER+ ">", PrefixMapping.Standard);
+ return RdfUtils.getURIPropertyForPropertyPath(dataset, connectionURI, propertyPath);
+ }
+
+ public static URI getEventContainerURIforNeedURI(URI needURI, LinkedDataSource linkedDataSource) {
+ assert linkedDataSource != null : "linkedDataSource must not be null";
+ Dataset dataset = getDatalForResource(needURI, linkedDataSource);
+ Path propertyPath = PathParser.parse("<" + WON.HAS_EVENT_CONTAINER+ ">", PrefixMapping.Standard);
+ return RdfUtils.getURIPropertyForPropertyPath(dataset, needURI, propertyPath);
+}
+
public static Dataset getDatalForResource(final URI connectionURI, final LinkedDataSource linkedDataSource) {
assert linkedDataSource != null : "linkedDataSource must not be null";
assert connectionURI != null : "connection URI must not be null";
