|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.creole.annic.Parser
public class Parser
This class provides utility methods to export the Hits to XML and read them back from XML to HIT objects.
| Field Summary | |
|---|---|
static String |
ANNOTATION_SET_NAME
ANNOTATION_SET_NAME XML Element |
static String |
DOC_ID
DOC_ID XML Element |
static String |
END
END XML Element |
static String |
END_OFFSET
END_OFFSET XML Element |
static String |
FEATURE
FEATURE XML Element |
static String |
FEATURES
FEATURES XML Element |
static String |
HIT
HIT XML Element |
static String |
HITS
HITS XML Element |
static String |
KEY
KEY XML Element |
static String |
LEFT_CONTEXT_START_OFFSET
LEFT_CONTEXT_START_OFFSET XML Element |
static String |
PATTERN_ANNOTATION
PATTERN_ANNOTATION XML Element |
static String |
PATTERN_ANNOTATIONS
PATTERN_ANNOTATIONS XML Element |
static String |
PATTERN_TEXT
PATTERN_TEXT XML Element |
static String |
POSITION
POSITION XML Element |
static String |
QUERY
QUERY XML Element |
static String |
RIGHT_CONTEXT_END_OFFSET
RIGHT_CONTEXT_END_OFFSET XML Element |
static String |
START
START XML Element |
static String |
START_OFFSET
START_OFFSET XML Element |
static String |
TEXT
TEXT XML Element |
static String |
TYPE
TYPE XML Element |
static String |
VALUE
VALUE XML Element |
| Constructor Summary | |
|---|---|
Parser()
|
|
| Method Summary | |
|---|---|
static Hit[] |
fromXML(String xml)
Given xml representation of HIT converts them into an array of hits |
static String |
replaceAmpChars(String s)
This method replaces all the special characters (invalid xml characters) with their respective legal sequences. |
static String |
toXML(Hit[] hits)
Given an array of instances of Hit, this method returns an xml representation of the Hit |
static String |
wrap(String elementText,
boolean startElement)
wraps the element into the following format |
static String |
wrap(String elementText,
int elementValue)
wraps the element into the following format |
static String |
wrap(String elementText,
String elementValue)
wraps the element into the following format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HITS
public static final String HIT
public static final String DOC_ID
public static final String ANNOTATION_SET_NAME
public static final String START_OFFSET
public static final String END_OFFSET
public static final String QUERY
public static final String LEFT_CONTEXT_START_OFFSET
public static final String RIGHT_CONTEXT_END_OFFSET
public static final String PATTERN_TEXT
public static final String PATTERN_ANNOTATIONS
public static final String PATTERN_ANNOTATION
public static final String START
public static final String END
public static final String TEXT
public static final String TYPE
public static final String POSITION
public static final String FEATURES
public static final String FEATURE
public static final String KEY
public static final String VALUE
| Constructor Detail |
|---|
public Parser()
| Method Detail |
|---|
public static String toXML(Hit[] hits)
hits -
public static String replaceAmpChars(String s)
s -
public static Hit[] fromXML(String xml)
throws IOException,
org.jdom.JDOMException
xml -
IOException
org.jdom.JDOMException
public static String wrap(String elementText,
String elementValue)
elementText - elementValue -
public static String wrap(String elementText,
int elementValue)
elementText - elementValue -
public static String wrap(String elementText,
boolean startElement)
elementText - startElement -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||