|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mkdoc.store.AbstractFileStoreManager
Common methods for managing file system resources.
Field Summary | |
static java.lang.String |
ABSOLUTE
The absolute file path property name. |
static java.lang.String |
DOT
The default output folder. |
static java.lang.String |
FOLDER
The output file path property name. |
protected java.io.File |
outputDir
The current output directory. |
Constructor Summary | |
AbstractFileStoreManager()
|
Method Summary | |
protected java.lang.String |
configureOutput(ApplicationContext context)
Configure the output directory from the plugin property set. |
protected static void |
createDirectories(java.io.File outFile)
Create directories above a target output file. |
protected abstract java.lang.String |
getExtension()
Get the extension for storage files. |
java.io.OutputStream |
getOutputStream(java.net.URL subject)
Issue an output stream to which RDF statements can be passed directly. |
protected java.io.File |
getStorageFile(java.net.URL subject)
Get a storage file reference for management. |
protected boolean |
includesFile(java.net.URL url)
Check whether a URL includes a file part. |
protected void |
purgeDocumentFile(java.lang.String subjectUri)
Purge statements about a document by subject URI. |
protected java.lang.String |
trimExtension(java.net.URL url)
Trim any extension part from a URL. |
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 ABSOLUTE
public static final java.lang.String FOLDER
public static final java.lang.String DOT
protected java.io.File outputDir
Constructor Detail |
public AbstractFileStoreManager()
Method Detail |
protected final java.lang.String configureOutput(ApplicationContext context)
context
- The plugin application context.
public final java.io.OutputStream getOutputStream(java.net.URL subject) throws StoreException
Temporary measure to adapt plugin writeFile
methods.
subject
- The subject of the RDF statements.
StoreException
- If an error occurs with the triple store.protected final void purgeDocumentFile(java.lang.String subjectUri) throws StoreException
subjectUri
- The URI of the subject document to purge.
StoreException
- If an error occurs with the triple store.protected abstract java.lang.String getExtension()
protected final java.io.File getStorageFile(java.net.URL subject)
subject
- The URL of the subject resource.
protected static final void createDirectories(java.io.File outFile)
outFile
- The target output file reference.protected final boolean includesFile(java.net.URL url)
url
- The URL to check.
true
if the part after the
last directory separator includes a dot
prefixed extension.protected final java.lang.String trimExtension(java.net.URL url)
url
- The URL to process.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |