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 .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/*
60 changes: 60 additions & 0 deletions src/main/java/uk/ac/dotrural/prov/jena/ProvenanceBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
Binary file removed target/prov-api-0.0.1-SNAPSHOT.jar
Binary file not shown.