|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.weblab.service.exposer.LocalFileExposer
public class LocalFileExposer
This service is used in conjunction with an Apache Tomcat or Apache server. The purpose is to annotate documents in input with an "exposition URL" i.e. an URL that can be used in a web browser to access this document. This service only works when processed file are exposed using the server and have the same naming pattern than the read annotation on the document (in most of the case, we use DC:source). Some parameter can be set using a file name : local-file-exposer.config
http://purl.org/dc/elements/1.1/source.false.http://weblab-project.org/core/model/property/isExposedAs.0."".false.false.ISO-8859-1.%20.
| Field Summary | |
|---|---|
protected boolean |
annotateAsUri
Whether the URL shall be annotated as Resource. |
protected java.lang.String |
byString
The String to be added at the beginning of the String to replace; in most of the case it's protocol://host:port/exposition_pattern/ |
static java.lang.String |
CONFIG_FILE
The name of the configuration file. |
protected java.lang.String |
exposedAsUri
It's possible to change the URI of the predicate to be written with the exposition URL. |
protected int |
nbStartCharToReplace
The number of character to be remove at the beginning of the String to replace; in most of the case it's the path to the whole folder that will be exposed. |
protected java.lang.String |
replacementForSpace
The java method for URL encoding replaces spaces by '+'. |
protected boolean |
sourceIsResource
Sometimes the object of the statement containing the original source of the Document is a Resource (since an URL might be an URI); in this case this parameter has to be true. |
protected java.lang.String |
sourceUri
The predicate's URI of the statement that contains the original source of the Document to be modified. |
protected boolean |
urlEncodeBetweenSlashes
Whether or not to URL encode between the slashes (and backslashes). |
protected java.lang.String |
urlEncoding
When encoding a URL it's needed to use the encoding used by the server for URL encoding; otherwise some file might never be exposed (especially files containing accent in their name or other complex characters). |
| Constructor Summary | |
|---|---|
LocalFileExposer()
Constructors |
|
| Method Summary | |
|---|---|
org.weblab_project.services.analyser.types.ProcessReturn |
process(org.weblab_project.services.analyser.types.ProcessArgs args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String sourceUri
protected final boolean sourceIsResource
protected final java.lang.String exposedAsUri
protected final int nbStartCharToReplace
protected final java.lang.String byString
protected final boolean annotateAsUri
protected final boolean urlEncodeBetweenSlashes
protected final java.lang.String urlEncoding
protected final java.lang.String replacementForSpace
public static final java.lang.String CONFIG_FILE
| Constructor Detail |
|---|
public LocalFileExposer()
| Method Detail |
|---|
public org.weblab_project.services.analyser.types.ProcessReturn process(org.weblab_project.services.analyser.types.ProcessArgs args)
throws org.weblab_project.services.analyser.ProcessException
process in interface org.weblab_project.services.analyser.Analyserorg.weblab_project.services.analyser.ProcessException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||