public class Parser extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
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
|
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
public static String toXML(Hit[] hits)
public static String replaceAmpChars(String s)
public static Hit[] fromXML(String xml) throws IOException, org.jdom.JDOMException
IOException
org.jdom.JDOMException
public static String wrap(String elementText, String elementValue)
public static String wrap(String elementText, int elementValue)
Copyright © 2024 GATE. All rights reserved.