Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Public Member Functions | Static Public Attributes

org::apache::uima::cas::impl::LowLevelCAS Interface Reference

Inheritance diagram for org::apache::uima::cas::impl::LowLevelCAS:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int ll_copyCharBufferValue (int fsRef, int featureCode, char[] buffer, int start)
int ll_createArray (int typeCode, int arrayLength)
int ll_createArray (int typeCode, int arrayLength, boolean doChecks)
int ll_createBooleanArray (int arrayLength)
int ll_createByteArray (int arrayLength)
int ll_createDoubleArray (int arrayLength)
int ll_createFS (int typeCode)
int ll_createFS (int typeCode, boolean doTypeCheck)
int ll_createLongArray (int arrayLength)
int ll_createShortArray (int arrayLength)
int ll_getArraySize (int arrayFsRef)
boolean ll_getBooleanArrayValue (int fsRef, int position)
boolean ll_getBooleanArrayValue (int fsRef, int position, boolean doTypeChecks)
boolean ll_getBooleanValue (int fsRef, int featureCode)
boolean ll_getBooleanValue (int fsRef, int featureCode, boolean doTypeChecks)
byte ll_getByteArrayValue (int fsRef, int position)
byte ll_getByteArrayValue (int fsRef, int position, boolean doTypeChecks)
byte ll_getByteValue (int fsRef, int featureCode)
byte ll_getByteValue (int fsRef, int featureCode, boolean doTypeChecks)
int ll_getCharBufferValueSize (int fsRef, int featureCode)
double ll_getDoubleArrayValue (int fsRef, int position)
double ll_getDoubleArrayValue (int fsRef, int position, boolean doTypeChecks)
double ll_getDoubleValue (int fsRef, int featureCode, boolean doTypeChecks)
double ll_getDoubleValue (int fsRef, int featureCode)
float ll_getFloatArrayValue (int fsRef, int position)
float ll_getFloatArrayValue (int fsRef, int position, boolean doTypeChecks)
float ll_getFloatValue (int fsRef, int featureCode)
float ll_getFloatValue (int fsRef, int featureCode, boolean doTypeChecks)
FeatureStructure ll_getFSForRef (int fsRef)
int ll_getFSRef (FeatureStructure fsImpl)
int ll_getFSRefType (int fsRef)
int ll_getFSRefType (int fsRef, boolean doChecks)
LowLevelIndexRepository ll_getIndexRepository ()
int ll_getIntArrayValue (int fsRef, int position)
int ll_getIntArrayValue (int fsRef, int position, boolean doTypeChecks)
int ll_getIntValue (int fsRef, int featureCode, boolean doTypeChecks)
int ll_getIntValue (int fsRef, int featureCode)
long ll_getLongArrayValue (int fsRef, int position, boolean doTypeChecks)
long ll_getLongArrayValue (int fsRef, int position)
long ll_getLongValue (int fsRef, int featureCode)
long ll_getLongValue (int fsRef, int featureCode, boolean doTypeChecks)
int ll_getRefArrayValue (int fsRef, int position)
int ll_getRefArrayValue (int fsRef, int position, boolean doTypeChecks)
int ll_getRefValue (int fsRef, int featureCode)
int ll_getRefValue (int fsRef, int featureCode, boolean doTypeChecks)
short ll_getShortArrayValue (int fsRef, int position)
short ll_getShortArrayValue (int fsRef, int position, boolean doTypeChecks)
short ll_getShortValue (int fsRef, int featureCode)
short ll_getShortValue (int fsRef, int featureCode, boolean doTypeChecks)
CASImpl ll_getSofaCasView (int addr)
String ll_getStringArrayValue (int fsRef, int position)
String ll_getStringArrayValue (int fsRef, int position, boolean doTypeChecks)
String ll_getStringValue (int fsRef, int featureCode)
String ll_getStringValue (int fsRef, int featureCode, boolean doTypeChecks)
int ll_getTypeClass (int typeCode)
LowLevelTypeSystem ll_getTypeSystem ()
boolean ll_isRefType (int typeCode)
void ll_setBooleanArrayValue (int fsRef, int position, boolean b)
void ll_setBooleanArrayValue (int fsRef, int position, boolean b, boolean doTypeChecks)
void ll_setBooleanValue (int fsRef, int featureCode, boolean value)
void ll_setBooleanValue (int fsRef, int featureCode, boolean value, boolean doTypeChecks)
void ll_setByteArrayValue (int fsRef, int position, byte value)
void ll_setByteArrayValue (int fsRef, int position, byte value, boolean doTypeChecks)
void ll_setByteValue (int fsRef, int featureCode, byte value)
void ll_setByteValue (int fsRef, int featureCode, byte value, boolean doTypeChecks)
void ll_setCharBufferValue (int fsRef, int featureCode, char[] buffer, int start, int length)
void ll_setCharBufferValue (int fsRef, int featureCode, char[] buffer, int start, int length, boolean doChecks)
void ll_setDoubleArrayValue (int fsRef, int position, double d)
void ll_setDoubleArrayValue (int fsRef, int position, double d, boolean doTypeChecks)
void ll_setDoubleValue (int fsRef, int featureCode, double value)
void ll_setDoubleValue (int fsRef, int featureCode, double value, boolean doTypeChecks)
void ll_setFloatArrayValue (int fsRef, int position, float value, boolean doTypeChecks)
void ll_setFloatArrayValue (int fsRef, int position, float value)
void ll_setFloatValue (int fsRef, int featureCode, float value)
void ll_setFloatValue (int fsRef, int featureCode, float value, boolean doTypeChecks)
void ll_setIntArrayValue (int fsRef, int position, int value, boolean doTypeChecks)
void ll_setIntArrayValue (int fsRef, int position, int value)
void ll_setIntValue (int fsRef, int featureCode, int value)
void ll_setIntValue (int fsRef, int featureCode, int value, boolean doTypeChecks)
void ll_setLongArrayValue (int fsRef, int position, long value, boolean doTypeChecks)
void ll_setLongArrayValue (int fsRef, int position, long value)
void ll_setLongValue (int fsRef, int featureCode, long value, boolean doTypeChecks)
void ll_setLongValue (int fsRef, int featureCode, long value)
void ll_setRefArrayValue (int fsRef, int position, int value)
void ll_setRefArrayValue (int fsRef, int position, int value, boolean doTypeChecks)
void ll_setRefValue (int fsRef, int featureCode, int value)
void ll_setRefValue (int fsRef, int featureCode, int value, boolean doTypeChecks)
void ll_setShortArrayValue (int fsRef, int position, short value)
void ll_setShortArrayValue (int fsRef, int position, short value, boolean doTypeChecks)
void ll_setShortValue (int fsRef, int featureCode, short value, boolean doTypeChecks)
void ll_setShortValue (int fsRef, int featureCode, short value)
void ll_setStringArrayValue (int fsRef, int position, String value, boolean doTypeChecks)
void ll_setStringArrayValue (int fsRef, int position, String value)
void ll_setStringValue (int fsRef, int featureCode, String value, boolean doTypeChecks)
void ll_setStringValue (int fsRef, int featureCode, String value)

Static Public Attributes

static final int NULL_FS_REF = 0
static final int TYPE_CLASS_BOOLEAN = 9
static final int TYPE_CLASS_BOOLEANARRAY = 14
static final int TYPE_CLASS_BYTE = 10
static final int TYPE_CLASS_BYTEARRAY = 15
static final int TYPE_CLASS_DOUBLE = 13
static final int TYPE_CLASS_DOUBLEARRAY = 18
static final int TYPE_CLASS_FLOAT = 2
static final int TYPE_CLASS_FLOATARRAY = 5
static final int TYPE_CLASS_FS = 8
static final int TYPE_CLASS_FSARRAY = 7
static final int TYPE_CLASS_INT = 1
static final int TYPE_CLASS_INTARRAY = 4
static final int TYPE_CLASS_INVALID = 0
static final int TYPE_CLASS_LONG = 12
static final int TYPE_CLASS_LONGARRAY = 17
static final int TYPE_CLASS_SHORT = 11
static final int TYPE_CLASS_SHORTARRAY = 16
static final int TYPE_CLASS_STRING = 3
static final int TYPE_CLASS_STRINGARRAY = 6

Detailed Description

Defines the low-level CAS APIs. The low-level CAS APIs provide no access to feature structure objects. All access to CAS data is through integer IDs that represent handles to the CAS data.

The basic concepts of the low-level APIs is very simple. The CAS does not internally hold its data as Java objects, for performance reasons. The low-level APIs give you access to this data more or less directly. Instead of creating Java objects that you can manipulate in an OO fashion, you only obtain int values that are used as references to internal data. Thus, if you would like to change values on a particular piece of data, you need to hand the FS reference to the API, as opposed to calling methods on a FS object. The tricky part about the low-level APIs is that it's all just ints, and it is very easy to confuse an int that represents a type code with an int that represents a feature code or a FS reference. Particular care is therefore necessary when using the low-level APIs. Please follow the guidelines for turning on a minimum of checks below.

This API represents the supported access to low-level features of the UIMA framework CAS implementation. Other public APIs in the implementation are not supported and are subject to change without notice.

Please note that you really need to know what you're doing when using these APIs. Incorrect usage of these APIs can and will cause completely unpredictable results; likely your application will crash, and it will do so much later than where the incorrect usage occured. The low-level APIs are very hard to debug. You should only use the low-level APIs if you have carefully profiled your application and are sure that the high-level CAS APIs or the JCAS represent a performance bottleneck.

Note that most low-level APIs have versions that allow you to turn some form of parameter checking on. We strongly encourage you to use those versions during development, they may save you a lot of time. One way you can use the type checking switch is by having a constant

 static final boolean DO_TYPE_CHECK = true;
 

which you can use during development. For production level code, you can later change the constant to false. The performance difference to the non-parametrized versions of the getters and setters is probably negligible or may not even exist, depending on the Java runtime.

Please note that even with the check switches turned on, it is still possible to make mistakes that only show up much later in processing. The main problem is that it is simply impossible to determine for certain whether a given FS reference is valid or not. The implementation can only determine that it looks like a reference that points at a valid piece of data, but this could be accidental.

Definition at line 77 of file LowLevelCAS.java.


The documentation for this interface was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index