diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8b241f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/* \ No newline at end of file diff --git a/src/main/java/uk/ac/dotrural/prov/jena/ProvenanceBundle.java b/src/main/java/uk/ac/dotrural/prov/jena/ProvenanceBundle.java index 1d0cae5..b9ed7bd 100644 --- a/src/main/java/uk/ac/dotrural/prov/jena/ProvenanceBundle.java +++ b/src/main/java/uk/ac/dotrural/prov/jena/ProvenanceBundle.java @@ -332,6 +332,66 @@ public boolean addWasInformedBy(Resource activity1, Resource activity2) return false; } + + /** + * Add a statement describing an activity being started by an agent + * @author anitacao + * @param activity + * @param agent + * @return boolean indicating success + */ + public boolean addWasStartedBy(String activity, String agent) + { + return addWasStartedBy(prov.createResource(activity), prov.createResource(agent)); + } + + /** + * Add a statement describing an activity being started by an agent + * @author anitacao + * @param activity + * @param agent + * @return boolean indicating success + */ + public boolean addWasStartedBy(Resource activity, Resource agent) + { + if(checkType(activity, "Activity") && checkType(agent, "Agent")) + { + add(activity, prov.createProperty(PROV_NS + "wasStartedBy"), agent); + return true; + } + return false; + } + + /** + * Add a statement describing an entity being invalidating by an activity + * @author anitacao + * @param entity + * @param activity + * @return boolean indicating success + */ + public boolean addWasInvalidatedBy(String entity, String activity) + { + return addWasInvalidatedBy(prov.createResource(entity),prov.createResource(activity)); + } + + /** + * Add a statement describing an entity being invalidating by an activity + * @author anitacao + * @param entity + * @param activity + * @return boolean indicating success + */ + public boolean addWasInvalidatedBy(Resource entity, Resource activity) + { + if(checkType(entity, "Entity") && checkType(activity, "Activity")) + { + add(entity, prov.createProperty(PROV_NS + "wasInvalidatedBy"), activity); + return true; + } + return false; + } + + /** * Check the type of the given Resource * diff --git a/target/prov-api-0.0.1-SNAPSHOT.jar b/target/prov-api-0.0.1-SNAPSHOT.jar deleted file mode 100644 index 0907ba6..0000000 Binary files a/target/prov-api-0.0.1-SNAPSHOT.jar and /dev/null differ