public class AnnotatedEventProperty
extends org.eclipse.hyades.test.common.event.EventProperty
implements com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyWriter, com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyReader
Modifier and Type | Field and Description |
---|---|
static String |
ENCODING |
static String |
SEPERATOR |
static String |
TYPE |
Constructor and Description |
---|
AnnotatedEventProperty()
This constructor can be used by either the execution side or the workbench side, however it
is better to use one of the other constructors.
|
AnnotatedEventProperty(IAnnotation annotation)
This constructor should only be used on the execution side in order to create
a new AnnotatedEventProperty.
|
AnnotatedEventProperty(String name,
String type,
String value)
This constructor should only be used on the workbench side in order to
convert a TPTP EventProperty into an AnnotatedEventProperty.
|
Modifier and Type | Method and Description |
---|---|
void |
annotate(byte[] data)
write data to the annotation file and set the offset and length attributes.
|
void |
annotate(String value)
write a string value to the annotation file and set the offset and length attributes
Before writing the string the file any values resulting from encrypted datapool access will be filtered from the string.
|
void |
annotate(String value,
String encoding)
write a string value to the annotation file and set the offset and length attributes
Before writing the string the file any values resulting from encrypted datapool access will be filtered from the string.
|
void |
doPending(com.ibm.rational.test.lt.kernel.util.EncryptedValueFilter filter)
internal use only
|
int |
getFileNumber()
get the number of the annotation file where this value can be found
|
int |
getLength()
get the length of the value in the annotation file
|
int |
getOffset()
get the offset into the annotation file where this value can be found
|
void |
parseValue(String value)
This parses the value and extracts the fileNumber, offset and length.
|
void |
setAnnotation(IAnnotation annotation)
provides the annotation infrastructure required for creating and writing AnnotatedEventPropery's
|
void |
setType(String type)
DO NOT change the type of an annotated event property unless you have code in the
workbench to handle the specified type.
|
void |
setValue(String value)
DO NOT set the value of an AnnotatedEventProperty directly.
|
getName, getType, getValue, setName
public static String ENCODING
public static String TYPE
public static String SEPERATOR
public AnnotatedEventProperty()
public AnnotatedEventProperty(IAnnotation annotation)
public AnnotatedEventProperty(String name, String type, String value) throws NoSuchElementException
This parses the value attribute and extracts the fileNumber, offset and length.
name
- Stringtype
- Stringvalue
- StringNoSuchElementException
public void setAnnotation(IAnnotation annotation)
annotation
- public void parseValue(String value) throws NoSuchElementException
parseValue
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyReader
value
- NoSuchElementException
public void setValue(String value)
setValue
in class org.eclipse.hyades.test.common.event.EventProperty
public void setType(String type)
setType
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyWriter
setType
in class org.eclipse.hyades.test.common.event.EventProperty
public int getFileNumber()
getFileNumber
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyReader
public int getOffset()
getOffset
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyReader
public int getLength()
getLength
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyReader
public void doPending(com.ibm.rational.test.lt.kernel.util.EncryptedValueFilter filter)
public void annotate(byte[] data)
annotate
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyWriter
data
- public void annotate(String value, String encoding) throws UnsupportedEncodingException
annotate
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyWriter
value
- The string value for the event propertyencoding
- The encoding to use before writing to the fileUnsupportedEncodingException
- if the encoding is unsupported.public void annotate(String value)
annotate
in interface com.ibm.rational.test.lt.kernel.util.IAnnotatedEventPropertyWriter
value
- The string value for the event property© Copyright IBM Corp. 2013. All rights reserved.