|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.repository.Lifecycle
public class Lifecycle
This is a singleton class that encompasses the application state. It is created and destroyed by Java Servlet Container webapp lifecycle events, through initialize() and destroy() hooks.
| Field Summary | |
|---|---|
static java.util.Date |
STARTUP
Mark the startup time for display in admin page, etc. |
| Constructor Summary | |
|---|---|
Lifecycle(javax.servlet.ServletContext sc)
Constructor for Lifecycle. |
|
| Method Summary | |
|---|---|
static void |
decacheAll()
Call the decache() method of all classes with the HasContentCache annotation. |
void |
destroy(javax.servlet.ServletContext sc)
destroy - shut down this application and release resources. |
void |
finishInitialize()
finishInitialize - setup at construct time |
static java.lang.String |
getGraphInitFile(org.openrdf.model.URI uri)
Get the init file (relative resource path) for given graph URI. |
static java.lang.String |
getInitFileVersion(org.openrdf.model.URI uri)
Gets the version that would be set by loading the RDF from given init file; this is the value of owl:versionInfo on the given URI, if any, in the serialized RDF fiel found on resourcePath. |
static Lifecycle |
getInstance()
Get the singleton instance. |
java.util.Date |
getLastModified()
Gets the most recent "last modified" timestamp applied to provenance metadata. |
org.openrdf.repository.Repository |
getSesameRepository()
getSesameRepository |
java.io.Reader |
getWebappResourceAsReader(java.lang.String path)
Read a resource file out of the webapp, path is relative to webapp root and MUST NOT begin with '/' -- e.g. |
static void |
initialize(javax.servlet.ServletContext sc)
Web app initialization hook that initiates the bootstrap process: 1. |
boolean |
isSessionStale(javax.servlet.http.HttpSession session)
Compare current webapp generation with value (if any) cached in session, also update session's generation to current. |
void |
loadEmptyGraphFromInit(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.URI graphURI,
boolean ifEmpty)
Initialize an empty named graph from its registered "initial contents" file (a webapp resource). |
void |
notifyDataReplaced()
Hook to signal to the application that all RDF data has been replaced, e.g. |
void |
updateLastModified(java.util.Date lm)
Update the repo's global "last modified" timestamp, changing it ONLY if the profferred value is later. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Date STARTUP
| Constructor Detail |
|---|
public Lifecycle(javax.servlet.ServletContext sc)
Constructor for Lifecycle.
sc - a ServletContext object.| Method Detail |
|---|
public static Lifecycle getInstance()
Lifecycle object.public static void initialize(javax.servlet.ServletContext sc)
sc - the ServletContext object.
public void finishInitialize()
throws java.io.IOException,
org.openrdf.OpenRDFException
finishInitialize - setup at construct time
java$io$IOException - if any.
org.openrdf.OpenRDFException - if any.
java.io.IOException
public void destroy(javax.servlet.ServletContext sc)
throws org.openrdf.repository.RepositoryException
destroy - shut down this application and release resources.
sc - a ServletContext object.
org.openrdf.repository.RepositoryException - if any.
public static java.lang.String getInitFileVersion(org.openrdf.model.URI uri)
throws java.io.IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
uri - the uri of the graph, subject of owl:versionInfo
java.io.IOException
org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFHandlerExceptionpublic static java.lang.String getGraphInitFile(org.openrdf.model.URI uri)
public void loadEmptyGraphFromInit(org.openrdf.repository.RepositoryConnection rc,
org.openrdf.model.URI graphURI,
boolean ifEmpty)
throws org.openrdf.repository.RepositoryException,
java.io.IOException,
org.openrdf.rio.RDFParseException
rc - the sesame repographURI - name of the graphifEmpty - when true only load an empty graph
org.openrdf.repository.RepositoryException
java.io.IOException
org.openrdf.rio.RDFParseException
public org.openrdf.repository.Repository getSesameRepository()
throws javax.servlet.ServletException
getSesameRepository
Repository object.
javax.servlet.ServletException - if any.public void notifyDataReplaced()
public boolean isSessionStale(javax.servlet.http.HttpSession session)
session - a HttpSession object.
public java.io.Reader getWebappResourceAsReader(java.lang.String path)
throws javax.servlet.ServletException
path - relative path to resource file, a String object.
Reader object open on the resource, or null if not available.
javax.servlet.ServletExceptionpublic void updateLastModified(java.util.Date lm)
lm - date of new most recent dcterms:modifiedpublic java.util.Date getLastModified()
public static void decacheAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||