|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.content.FolderContentManager
public abstract class FolderContentManager
| Field Summary | |
|---|---|
protected int |
bufferSize
|
protected java.io.File |
folder
|
protected java.lang.String |
propertyFileName
|
protected java.lang.String |
propertyKey
|
static java.lang.String |
SIMPLE_RESOURCE_RDF_HELPER
The implementation of ResourceHelper to be used. |
| Constructor Summary | |
|---|---|
protected |
FolderContentManager(java.lang.String folderPath)
Constructor |
| Method Summary | |
|---|---|
protected static boolean |
checkFolder(java.io.File folder)
Checks if a folder is right configured. |
abstract org.weblab_project.core.model.content.Content |
getContent(java.lang.String contentUri,
int offset,
int limit)
Return a Content using the contentUri, an offset and a limit. |
java.io.File |
getFileFromResourceAndPredicate(org.weblab_project.core.model.Resource res,
java.lang.String pred)
Extract the pred object of res to get the file
in the FolderContentManager. |
protected java.io.File |
getFileFromURI(org.weblab_project.core.uri.WebLabRI uri)
Uses to get a file from a WebLabRI from a content manager. |
java.io.File |
getFileFromWLRi(java.lang.String uri)
Returns the native file corresponding to the WLRI. |
java.io.File |
getFolder()
|
protected static java.lang.String |
getFolderValue(java.lang.String propertyPath,
java.lang.String propertyValue,
java.lang.String defaultValue)
Uses this to automatically get a folder path. |
java.io.File |
getNativeFileFromResource(org.weblab_project.core.model.Resource res)
Extract the WebLab.HAS_NATIVE_CONTENT object of res
to get the file in the FolderContentManager. |
java.io.File |
getNormalisedFileFromResource(org.weblab_project.core.model.Resource res)
Extract the WebLab.HAS_NORMALISED_CONTENT object of
res to get the file in the FolderContentManager
. |
abstract void |
saveContent(org.weblab_project.core.model.content.Content content)
Save the content. |
void |
setFolder(java.io.File folder)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String propertyKey
protected java.lang.String propertyFileName
protected int bufferSize
protected java.io.File folder
public static final java.lang.String SIMPLE_RESOURCE_RDF_HELPER
ResourceHelper to be used.
| Constructor Detail |
|---|
protected FolderContentManager(java.lang.String folderPath)
throws org.weblab_project.core.exception.WebLabUncheckedException
folderPath - The path to the content folder.
org.weblab_project.core.exception.WebLabUncheckedException| Method Detail |
|---|
protected static boolean checkFolder(java.io.File folder)
folder is right configured.
folder - The file to check existence.
folder is not configured.protected java.io.File getFileFromURI(org.weblab_project.core.uri.WebLabRI uri)
uri - a valid WLRI.
public java.io.File getFileFromWLRi(java.lang.String uri)
uri - WLRI which identify the native file.
public java.io.File getNativeFileFromResource(org.weblab_project.core.model.Resource res)
throws org.weblab_project.core.exception.WebLabCheckedException
WebLab.HAS_NATIVE_CONTENT object of res
to get the file in the FolderContentManager.
res - The resource to extract native content.
org.weblab_project.core.exception.WebLabCheckedException
public java.io.File getNormalisedFileFromResource(org.weblab_project.core.model.Resource res)
throws org.weblab_project.core.exception.WebLabCheckedException
WebLab.HAS_NORMALISED_CONTENT object of
res to get the file in the FolderContentManager
.
res - The resource to extract normalised content.
org.weblab_project.core.exception.WebLabCheckedException
public java.io.File getFileFromResourceAndPredicate(org.weblab_project.core.model.Resource res,
java.lang.String pred)
throws org.weblab_project.core.exception.WebLabCheckedException
pred object of res to get the file
in the FolderContentManager.
res - The resource to extract content.pred - The predicate used to find content URI in res annotations.
org.weblab_project.core.exception.WebLabCheckedException
protected static java.lang.String getFolderValue(java.lang.String propertyPath,
java.lang.String propertyValue,
java.lang.String defaultValue)
propertyPath - path to the property file.propertyValue - name of the key in the property file.defaultValue - value returned if unable to get one.
public abstract org.weblab_project.core.model.content.Content getContent(java.lang.String contentUri,
int offset,
int limit)
throws org.weblab_project.core.exception.WebLabCheckedException
contentUri - a valid WLRI which identify a Content in this "repository".offset - beginning part of the data.limit - maximum size of the data.
org.weblab_project.core.exception.WebLabCheckedException - most of time an access problem.
public abstract void saveContent(org.weblab_project.core.model.content.Content content)
throws org.weblab_project.core.exception.WebLabCheckedException
content - The content to be saved.
org.weblab_project.core.exception.WebLabCheckedException - most of time an access problem.public java.io.File getFolder()
public void setFolder(java.io.File folder)
folder - The folder to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||