org.ow2.weblab.service.gate
Class GateHelper

java.lang.Object
  extended by org.ow2.weblab.service.gate.GateHelper

public class GateHelper
extends java.lang.Object

This class contains useful static methods for the gate-extraction project.

Author:
ymombrun
Date:
2008-05-06

Field Summary
static java.lang.String COMPLETE_PROCESSING_MODE
           
static java.lang.String EXCLUSION_PROPERTY
          Name of the property that contains the list of properties to be excluded from the conversion.
static java.lang.String FEATURE_EXCLUSION_PROPERTY
          Name of the property that contains the list of features to be excluded from the conversion.
static java.lang.String GATE_TEMP_ANNOTATION_META
          Deprecated. 
static java.lang.String GATE_TEMP_ANNOTATION_TYPE
          Deprecated. 
static java.lang.String GATE_TEMP_NS
          The namespace to be used by annotation created using gate annotations in case of a verbose mode.
static java.lang.String GATE_TEMP_NS_PREFIX
          To prevent from the creation of j.0 and prefixes.
static java.lang.String GATE_TYPE_BASE_URI
          The base URI of the created instances instances.
static java.lang.String MAX_ANNOTS_PROPERTY
          Name of the property that contains the URI of the service URI to be used if the created annotation shall contains a isProducedBy statement.
static java.lang.String OLD_PROCESSING_MODE
          Deprecated. 
static java.lang.String PROCESSING_MODE_PROPERTY
          Choose the processing mode to be used.
static java.lang.String PROPERTIES_FILE_NAME
          Name of the property file to be loaded.
static java.lang.String SERVICE_URI_PROPERTY
          Name of the property that contains the URI of the service URI to be used if the created annotation shall contains a isProducedBy statement.
static java.lang.String SIMPLE_PROCESSING_MODE
           
static java.lang.String VERBOSE_PROPERTY
          Name of the property that contains the boolean value to set whether or not to be verbose in annotation conversion.
 
Constructor Summary
GateHelper()
           
 
Method Summary
static void init()
          Use the file PROPERTIES_FILE_NAME to set: Which annotation types to exclude.
static void linkGateAnnotsToText(org.weblab_project.core.model.text.Text text, gate.AnnotationSet annots)
          Annotate text with each annotation in annotation set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GATE_TEMP_NS

public static final java.lang.String GATE_TEMP_NS
The namespace to be used by annotation created using gate annotations in case of a verbose mode.

See Also:
Constant Field Values

GATE_TEMP_NS_PREFIX

public static final java.lang.String GATE_TEMP_NS_PREFIX
To prevent from the creation of j.0 and prefixes. Not used in simple mode.

See Also:
Constant Field Values

GATE_TYPE_BASE_URI

public static final java.lang.String GATE_TYPE_BASE_URI
The base URI of the created instances instances. Not used in old mode.

See Also:
Constant Field Values

PROPERTIES_FILE_NAME

public static final java.lang.String PROPERTIES_FILE_NAME
Name of the property file to be loaded. I may contains: EXCLUSION_PROPERTY, FEATURE_EXCLUSION_PROPERTY, SERVICE_URI_PROPERTY, PROCESSING_MODE_PROPERTY, VERBOSE_PROPERTY

See Also:
Constant Field Values

EXCLUSION_PROPERTY

public static final java.lang.String EXCLUSION_PROPERTY
Name of the property that contains the list of properties to be excluded from the conversion. Typically it contains SpaceToken, Token... and every other Gate Annotation that will not be used further in WebLab document.

See Also:
Constant Field Values

FEATURE_EXCLUSION_PROPERTY

public static final java.lang.String FEATURE_EXCLUSION_PROPERTY
Name of the property that contains the list of features to be excluded from the conversion. Typically it contains rules, matches... and every other Gate Annotation that will not be used further in WebLab document.

See Also:
Constant Field Values

SERVICE_URI_PROPERTY

public static final java.lang.String SERVICE_URI_PROPERTY
Name of the property that contains the URI of the service URI to be used if the created annotation shall contains a isProducedBy statement.

See Also:
Constant Field Values

MAX_ANNOTS_PROPERTY

public static final java.lang.String MAX_ANNOTS_PROPERTY
Name of the property that contains the URI of the service URI to be used if the created annotation shall contains a isProducedBy statement.

See Also:
Constant Field Values

PROCESSING_MODE_PROPERTY

public static final java.lang.String PROCESSING_MODE_PROPERTY
Choose the processing mode to be used. Values may be: OLD_MODE, SIMPLE_MODE or COMPLETE_MODE

See Also:
Constant Field Values

OLD_PROCESSING_MODE

@Deprecated
public static final java.lang.String OLD_PROCESSING_MODE
Deprecated. 
See Also:
Constant Field Values

SIMPLE_PROCESSING_MODE

public static final java.lang.String SIMPLE_PROCESSING_MODE
See Also:
Constant Field Values

COMPLETE_PROCESSING_MODE

public static final java.lang.String COMPLETE_PROCESSING_MODE
See Also:
Constant Field Values

VERBOSE_PROPERTY

public static final java.lang.String VERBOSE_PROPERTY
Name of the property that contains the boolean value to set whether or not to be verbose in annotation conversion. Note that this is not used in case of simple mode. But in case of old or complete mode, it defines whether or not to include id's properties in output annotations.

See Also:
Constant Field Values

GATE_TEMP_ANNOTATION_TYPE

@Deprecated
public static final java.lang.String GATE_TEMP_ANNOTATION_TYPE
Deprecated. 
The URI of the predicate for types. Annotation are created on a temporary namespace. The reason is that Gate let you to write you own plugins, and rules, enabling the creation a your own Types. Since this service shall be working in various applications, having various business ontologies, the annotation format is a temporary one. Best practice is to write a service, that will be called after this to do the mapping between those temporary annotations and good annotation using the specified ontology.

See Also:
Constant Field Values

GATE_TEMP_ANNOTATION_META

@Deprecated
public static final java.lang.String GATE_TEMP_ANNOTATION_META
Deprecated. 
The URI of the predicate for meta data that refines types.

See Also:
Constant Field Values
Constructor Detail

GateHelper

public GateHelper()
Method Detail

linkGateAnnotsToText

public static void linkGateAnnotsToText(org.weblab_project.core.model.text.Text text,
                                        gate.AnnotationSet annots)
Annotate text with each annotation in annotation set. At the end, sorts the segments list to ease further process.

Parameters:
text - The WebLab Text to be annotated
annots - The Gate annotation set to be used to annotate text

init

public static void init()
Use the file PROPERTIES_FILE_NAME to set:



Copyright © 2004-2010. All Rights Reserved.