org.ow2.weblab.content.text
Class TextFolderContentManager

java.lang.Object
  extended by org.ow2.weblab.content.FolderContentManager
      extended by org.ow2.weblab.content.text.TextFolderContentManager

public class TextFolderContentManager
extends FolderContentManager


Field Summary
 
Fields inherited from class org.ow2.weblab.content.FolderContentManager
bufferSize, folder, propertyFileName, propertyKey, SIMPLE_RESOURCE_RDF_HELPER
 
Constructor Summary
protected TextFolderContentManager(java.lang.String folder)
           
 
Method Summary
 org.weblab_project.core.model.content.TextContent getContent(java.lang.String contentUri, int offset, int limit)
          Return a Content using the contentUri, an offset and a limit
static TextFolderContentManager getInstance()
           
static TextFolderContentManager getInstance(java.lang.String folderPath)
           
 void saveContent(org.weblab_project.core.model.content.Content content)
          Save the Content object as a part of a file.
 void saveString(java.lang.String toBeSaved, java.lang.String uri)
          Add new file to the content manager (copy it to the internal repository)
 
Methods inherited from class org.ow2.weblab.content.FolderContentManager
checkFolder, getFileFromResourceAndPredicate, getFileFromURI, getFileFromWLRi, getFolder, getFolderValue, getNativeFileFromResource, getNormalisedFileFromResource, setFolder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFolderContentManager

protected TextFolderContentManager(java.lang.String folder)
                            throws org.weblab_project.core.exception.WebLabUncheckedException
Throws:
org.weblab_project.core.exception.WebLabUncheckedException
Method Detail

getContent

public org.weblab_project.core.model.content.TextContent getContent(java.lang.String contentUri,
                                                                    int offset,
                                                                    int limit)
                                                             throws org.weblab_project.core.exception.WebLabCheckedException
Return a Content using the contentUri, an offset and a limit

Specified by:
getContent in class FolderContentManager
Parameters:
contentUri - a valid WLRI which identify a Content in this "repository"
offset - beginning part of the text
limit - maximum size of the text
Returns:
a Content object containing with the good text part
Throws:
org.weblab_project.core.exception.WebLabCheckedException - most of time an access problem

saveString

public void saveString(java.lang.String toBeSaved,
                       java.lang.String uri)
                throws org.weblab_project.core.exception.WebLabCheckedException
Add new file to the content manager (copy it to the internal repository)

Parameters:
toBeSaved - file to copy
uri - identify the future content
Throws:
org.weblab_project.core.exception.WebLabCheckedException

saveContent

public void saveContent(org.weblab_project.core.model.content.Content content)
                 throws org.weblab_project.core.exception.WebLabCheckedException
Save the Content object as a part of a file.

Specified by:
saveContent in class FolderContentManager
Parameters:
content - Content to be saved
Throws:
org.weblab_project.core.exception.WebLabCheckedException

getInstance

public static TextFolderContentManager getInstance(java.lang.String folderPath)
                                            throws org.weblab_project.core.exception.WebLabUncheckedException
Parameters:
folderPath - The path to the folder.
Returns:
The TextFolderContentManager
Throws:
org.weblab_project.core.exception.WebLabUncheckedException

getInstance

public static TextFolderContentManager getInstance()
                                            throws org.weblab_project.core.exception.WebLabUncheckedException
Returns:
The TextFolderContentManager
Throws:
org.weblab_project.core.exception.WebLabUncheckedException


Copyright © 2004-2011. All Rights Reserved.