|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.repository.Provenance
public class Provenance
Utility class to manage provenance metadata on all objects. An instance is attached to a resource URI, typically either a named graph or eagle-i resource instance, which it describes. Methods that change the "last modified" date of anything also update the global last-modified timestamp, maintained by the DataRepository singleton.
| Field Summary | |
|---|---|
static org.openrdf.model.URI |
PROVENANCE_GRAPH
Graph where provenance metadata is stored. |
| Constructor Summary | |
|---|---|
Provenance(org.openrdf.model.URI uri)
Return the singleton instance. |
|
| Method Summary | |
|---|---|
static org.openrdf.model.Literal |
getDateTime(java.util.Date when)
Utility translation method, returns typed literal of specified moment |
java.lang.String |
getField(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI field)
commit - commit any changes made to this object (and any others) |
java.lang.String |
getLabel(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI field)
Labels for provenance value URIs are stored in the same map as fields |
static boolean |
isProvenancePredicate(org.openrdf.model.URI pp)
True if URI is a provenance predicate, this function is really a predicate predicate. |
void |
setCreated(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
Convenience method to set Created provenance values, upon creation. |
void |
setMediated(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
Convenience method to set provenance values for "mediated" creation, i.e. |
void |
setModified(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
Convenience method to set provenance values upon last modification. |
void |
setProvenance(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.URI term,
org.openrdf.model.Value value)
Set provenance values directly, bypass e.g. |
void |
setSource(javax.servlet.http.HttpServletRequest request,
java.lang.String source,
java.util.Date sourceModified)
Add/replace the Source provenance fields: dcterms:source -> bnode dcterms:identifier -> filename or URI it came from dcterms:modified -> last-mod date of source |
void |
setSource(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.Value source,
org.openrdf.model.Value sourceModified)
Convenience method to set source provenance: identifier and last-mod time of resource ingested into a graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static org.openrdf.model.URI PROVENANCE_GRAPH
| Constructor Detail |
|---|
public Provenance(org.openrdf.model.URI uri)
| Method Detail |
|---|
public static boolean isProvenancePredicate(org.openrdf.model.URI pp)
pp - a URI object.
public void setCreated(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
request - a HttpServletRequest object.when - time at which it was created
public void setMediated(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
request - a HttpServletRequest object.when - time at which it was created
public void setModified(javax.servlet.http.HttpServletRequest request,
java.util.Date when)
request - a HttpServletRequest object.when - time at which it was last modified
public void setProvenance(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.URI term,
org.openrdf.model.Value value)
rc - a RepositoryConnection object.term - provenance predicate, a URI object.value - a Value object.
public void setSource(javax.servlet.http.HttpServletRequest request,
java.lang.String source,
java.util.Date sourceModified)
request - a HttpServletRequest object.source - value of identifier, a String object.sourceModified - mod time for source or null if unknown.
public void setSource(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.Value source,
org.openrdf.model.Value sourceModified)
rc - a RepositoryConnection object.source - value of identifier, a String object.sourceModified - mod time for source or null if unknown.public static org.openrdf.model.Literal getDateTime(java.util.Date when)
when - a Date object.
Literal object.
public java.lang.String getField(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI field)
commit - commit any changes made to this object (and any others)
request - a HttpServletRequest object.field - the URI of the metadata field
javax.servlet.ServletException - if any.
public java.lang.String getLabel(javax.servlet.http.HttpServletRequest request,
org.openrdf.model.URI field)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||