com.basistech.rlp
Class RLPContext

java.lang.Object
  extended by com.basistech.rlp.RLPContext

public abstract class RLPContext
extends Object

The RLP Context class, which analyzes data using RLP processors. An RLP context is an object that processes input data and produces analyzed results. The input data can be bytes in memory, String data in memory, or a file. The application uses one of the process methods to read data and process it. The results are stored in memory. Use the RLPResultAccess class to access the result data.


Method Summary
 void close()
          Free resources used by this environment.
abstract  String getProcessorReport()
          Obtain a string describing all the processors defined in this context.
abstract  String getProperty(String propName)
          Gets a named property for the context.
 void process(byte[] data, int position, int limit, String encoding, int language_id)
          Deprecated. 5.4
 void process(byte[] data, int position, int limit, String encoding, int language_id, String mime_type)
          Deprecated. 5.4
abstract  void process(byte[] data, int position, int limit, String encoding, LanguageCode language)
          Read data from a buffer and process it according to the current configuration of the context.
abstract  void process(byte[] data, int position, int limit, String encoding, LanguageCode language, String mime_type)
          Read data from a buffer and process it according to the current configuration of the context.
 void process(ByteBuffer data, String encoding, int language_id)
          Deprecated. 5.4
 void process(ByteBuffer data, String encoding, int language_id, String mime_type)
          Deprecated. 5.4
abstract  void process(ByteBuffer data, String encoding, LanguageCode language)
          Read data from a buffer and process it according to the current configuration of the context.
abstract  void process(ByteBuffer data, String encoding, LanguageCode language_id, String mime_type)
          Read data from a buffer and process it according to the current configuration of the context.
 void process(char[] data, int position, int limit, int language_id)
          Deprecated. 5.4
abstract  void process(char[] data, int position, int limit, LanguageCode language_id)
          Process character data with the language processors of the context.
 void process(CharBuffer data, int language_id)
          Deprecated. 5.4
abstract  void process(CharBuffer data, LanguageCode language)
          Process character data with the language processors of the context.
 void process(String data, int language_id)
          Deprecated. 5.4
abstract  void process(String data, LanguageCode language)
          Process character data with the language processors of the context.
 void process(String pathname, String encoding, int language_id)
          Deprecated. 5.4
 void process(String pathname, String encoding, int language_id, String mime_type)
          Deprecated. 5.4
abstract  void process(String pathname, String encoding, LanguageCode language)
          Read data from a file and process it according to the current configuration of the context.
abstract  void process(String pathname, String encoding, LanguageCode language, String mime_type)
          Read data from a file and process it according to the current configuration of the context.
abstract  void setProperty(String propName, String propValue)
          Sets a named property for the context, read by processors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

process

public void process(String pathname,
                    String encoding,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Read data from a file and process it according to the current configuration of the context.

Parameters:
pathname - the pathname of the file containing the data.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(String pathname,
                             String encoding,
                             LanguageCode language)
                      throws RLPException
Read data from a file and process it according to the current configuration of the context.

Parameters:
pathname - the pathname of the file containing the data.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide must detect it before subsequent processors can perform language-dependent operations. Note that RLI requires an additional license.
Throws:
RLPException - for any errors encountered.

process

public void process(String pathname,
                    String encoding,
                    int language_id,
                    String mime_type)
             throws RLPException
Deprecated. 5.4

Read data from a file and process it according to the current configuration of the context.

Parameters:
pathname - the pathname of the file containing the data.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(String pathname,
                             String encoding,
                             LanguageCode language,
                             String mime_type)
                      throws RLPException
Read data from a file and process it according to the current configuration of the context.

Parameters:
pathname - the pathname of the file containing the data.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCodes.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public void process(ByteBuffer data,
                    String encoding,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - a Buffer containing the data to process. This data is treated as raw bytes according to the context's configuration.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(ByteBuffer data,
                             String encoding,
                             LanguageCode language)
                      throws RLPException
Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - a Buffer containing the data to process. This data is treated as raw bytes according to the context's configuration.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCodes.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public void process(ByteBuffer data,
                    String encoding,
                    int language_id,
                    String mime_type)
             throws RLPException
Deprecated. 5.4

Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - a Buffer containing the data to process. This data is treated as raw bytes according to the context's configuration.
encoding - character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(ByteBuffer data,
                             String encoding,
                             LanguageCode language_id,
                             String mime_type)
                      throws RLPException
Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - a Buffer containing the data to process. This data is treated as raw bytes according to the context's configuration.
encoding - character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public void process(byte[] data,
                    int position,
                    int limit,
                    String encoding,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - contains the data to process. This data is treated as raw bytes according to the context's configuration.
position - the index of the first byte to process.
limit - the number of bytes to process.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(byte[] data,
                             int position,
                             int limit,
                             String encoding,
                             LanguageCode language)
                      throws RLPException
Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - contains the data to process. This data is treated as raw bytes according to the context's configuration.
position - the index of the first byte to process.
limit - the number of bytes to process.
encoding - character encoding for the data; null if not known. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public void process(byte[] data,
                    int position,
                    int limit,
                    String encoding,
                    int language_id,
                    String mime_type)
             throws RLPException
Deprecated. 5.4

Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - contains the data to process. This data is treated as raw bytes according to the context's configuration.
position - the index of the first byte to process.
limit - the number of bytes to process.
encoding - character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(byte[] data,
                             int position,
                             int limit,
                             String encoding,
                             LanguageCode language,
                             String mime_type)
                      throws RLPException
Read data from a buffer and process it according to the current configuration of the context.

Parameters:
data - contains the data to process. This data is treated as raw bytes according to the context's configuration.
position - the index of the first byte to process.
limit - the number of bytes to process.
encoding - character encoding for the data. If it is not supplied, RLI can be used to detect the encoding and RCLU to convert the input to UTF-16, or Unicode Converter if the encoding is known to be Unicode. For acceptable encodings, see RCLU Encodings and Unicode Converter in RLP Application Developer's Guide.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI must detect it before subsequent processors can perform language-dependent operations.
mime_type - the MIMETYPE of the data; null if not known. If it is not supplied and is required by a subsequent processor, mime_detector can detect the MIMETYPE. For a list of the MIMETYPEs that RLP can handle, see mime_detector in RLP Application Developer's Guide.
Throws:
RLPException - for any errors encountered.

process

public void process(char[] data,
                    int position,
                    int limit,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
position - the index of the first character to process.
limit - the number of characters to process.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(char[] data,
                             int position,
                             int limit,
                             LanguageCode language_id)
                      throws RLPException
Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
position - the index of the first character to process.
limit - the number of characters to process.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public void process(CharBuffer data,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(CharBuffer data,
                             LanguageCode language)
                      throws RLPException
Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public void process(String data,
                    int language_id)
             throws RLPException
Deprecated. 5.4

Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
language_id - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

process

public abstract void process(String data,
                             LanguageCode language)
                      throws RLPException
Process character data with the language processors of the context.

Parameters:
data - contains the data to process.
language - the language of the input data; LanguageCode supplies symbolic constants for the language values. If the language is unknown (use LanguageCode.UNKNOWN), RLI (RLP Application Developer's Guide) must detect it before subsequent processors can perform language-dependent operations.
Throws:
RLPException - for any errors encountered.

setProperty

public abstract void setProperty(String propName,
                                 String propValue)
                          throws RLPException
Sets a named property for the context, read by processors.

Parameters:
propName - the name of the property.
propValue - the value.
Throws:
RLPException - for any errors encountered.

getProperty

public abstract String getProperty(String propName)
                            throws RLPException
Gets a named property for the context.

Parameters:
propName - the name of the property.
Returns:
the property value.
Throws:
RLPException - for any errors encountered.

close

public void close()
Free resources used by this environment. Call this explicitly before calling RLPEnvironment.close for the environment that created this context.


getProcessorReport

public abstract String getProcessorReport()
Obtain a string describing all the processors defined in this context. The string is delimited with | characters, in the format ProcName0|ProcDescription0|ProcName1|ProcDescription1|...||.

Returns:
String description string.


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.