|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eaglei.repository.DataRepository
public class DataRepository
This is a singleton class that encompasses the application state. It is created and destroyed by Java Servlet Container webapp lifecycle events. Important configuration variables: - Sesame repository object (not the connection, but what makes connections) - Default namespace - Title (in configuration)
| Field Summary | |
|---|---|
static java.lang.String |
AUTH_DB_NAME
XXX this needs to move |
static java.lang.String |
CONFIG_INSTANCE_CSS
CSS stylesheet for HTML dissemination output, if any |
static java.lang.String |
CONFIG_INSTANCE_XSLT
stylesheet for transforming HTML dissemination output, if any |
static java.lang.String |
CONFIG_TITLE
title of repository for UI labels |
| Constructor Summary | |
|---|---|
DataRepository(javax.servlet.ServletContext sc)
Constructor for DataRepository. |
|
| Method Summary | |
|---|---|
void |
destroy(javax.servlet.ServletContext sc)
destroy - shut down this application and release resources. |
void |
finishInitialize()
finishInitialize - setup at construct time |
java.io.File |
getBackupDirectory()
getBackupDirectory- get configured repository backup directory |
java.lang.String |
getBranch()
Get the source SCM branch, if any. |
java.lang.String |
getConfigurationProperty(java.lang.String key)
getConfigurationProperty |
java.lang.String |
getConfigurationProperty(java.lang.String key,
java.lang.String dflt)
return default if there is no value for the indicated property. |
java.lang.String[] |
getConfigurationPropertyArray(java.lang.String key)
Gets a configuration property with multiple values. |
java.lang.String |
getDefaultNamespace()
Get value of default namespace prefix for URIs created by the repository. |
java.io.File |
getHomeDirectory()
getHomeDirectory - get configured repository home directory. |
static DataRepository |
getInstance()
Get the singleton instance. |
java.util.Date |
getLastModified()
Gets the most recent "last modified" timestamp applied to provenance metadata. |
java.lang.String |
getProjectVersion()
Get the Maven project version |
java.lang.String |
getRevision()
Get the source revision, e.g. |
org.openrdf.repository.Repository |
getSesameRepository()
getSesameRepository |
java.lang.String |
getTimestamp()
Get the time when this software version was built |
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. |
void |
incrementGeneration()
Bump the generation counter to signal that RDF database contents have been replaced (i.e. |
static void |
initialize(javax.servlet.ServletContext sc)
Web app initialization hook: 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 |
setLastModified(java.util.Date lm)
Update the most recent "last modified" timestamp if profferred value is newer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String AUTH_DB_NAME
public static final java.lang.String CONFIG_TITLE
public static final java.lang.String CONFIG_INSTANCE_XSLT
public static final java.lang.String CONFIG_INSTANCE_CSS
| Constructor Detail |
|---|
public DataRepository(javax.servlet.ServletContext sc)
Constructor for DataRepository.
sc - a ServletContext object.| Method Detail |
|---|
public static DataRepository getInstance()
DataRepository 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 org.openrdf.repository.Repository getSesameRepository()
throws javax.servlet.ServletException
getSesameRepository
Repository object.
javax.servlet.ServletException - if any.public java.lang.String getDefaultNamespace()
String object.public java.lang.String getConfigurationProperty(java.lang.String key)
getConfigurationProperty
key - a String object.
public java.lang.String getConfigurationProperty(java.lang.String key,
java.lang.String dflt)
key - a String object.dflt - default value to return if not set a String object.
public java.lang.String[] getConfigurationPropertyArray(java.lang.String key)
key - a String object.
String objects, or null if not set.public void incrementGeneration()
public boolean isSessionStale(javax.servlet.http.HttpSession session)
session - a HttpSession object.
public java.io.Reader getWebappResourceAsReader(java.lang.String path)
path - relative path to resource file, a String object.
Reader object open on the resource, or null if not available.public java.lang.String getProjectVersion()
String object.public java.lang.String getRevision()
String object.public java.lang.String getBranch()
public java.lang.String getTimestamp()
String object.
public java.io.File getHomeDirectory()
throws java.io.IOException
getHomeDirectory - get configured repository home directory.
File object.
java$io$IOException - if any.
java.io.IOException
public java.io.File getBackupDirectory()
throws java.io.IOException
getBackupDirectory- get configured repository backup directory
File object.
java$io$IOException - if any.
java.io.IOExceptionpublic void setLastModified(java.util.Date lm)
lm - date of new most recent dcterms:modifiedpublic java.util.Date getLastModified()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||