Markups
public final class SavotPullEngine extends java.lang.Object implements Markups
It has been tested with kXML Pull parser implementation
but it is possible to use other pull parsers
Designed to use with Pull parsers complient with Standard Pull Implementation v1
LBO: Note: equalsIgnoreCase() vs() equals as XML is case sensitive and VOTable specification says that clearlyModifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_STACK_CAPACITY |
default stack capacity = 4 slots
|
static int |
FULL |
FULL parsing mode: deprecated and replaced by FULLREAD
|
static int |
FULLREAD |
FULLREAD parsing mode all in memory
|
static int |
RESOURCEREAD |
RESOURCEREAD parsing mode: row per row reading
|
static int |
ROWREAD |
ROWREAD parsing mode: row per row reading
|
static int |
SEQUENTIAL |
SEQUENTIAL parsing mode: deprecated and replaced by RESOURCEREAD
|
ACTION, ACTUATE, ARRAYSIZE, BINARY, CONTENTROLE, CONTENTTYPE, COOSYS, DATA, DATATYPE, DEFINITIONS, DESCRIPTION, ENCODING, EPOCH, EQUINOX, EXPIRES, EXTNUM, FIELD, FIELDREF, FITS, GREF, GROUP, HREF, ID, INCLUSIVE, INFO, INVALID, LINK, MAX, MIN, NAME, NROWS, NULL, OPTION, PARAM, PARAMREF, PRECISION, REF, RESOURCE, RIGHTS, SAVOTPARSER, STREAM, SYSTEM, SYSTEM_ATTRIBUTE, TABLE, TABLEDATA, TD, TITLE, TR, TYPE, UCD, UNIT, UTYPE, VALUE, VALUES, VERSION, VOTABLE, WIDTH, XML, XMLNS, XMLNSXSI, XSI, XSI_NOSCHEMA, XSI_SCHEMA, XSINOSCHEMA, XSISCHEMA, XTYPE
Constructor | Description |
---|---|
SavotPullEngine(org.xmlpull.v1.XmlPullParser parser,
java.io.InputStream instream,
int mode,
java.lang.String enc,
boolean debug,
SavotStatistics stats) |
Constructor
|
SavotPullEngine(org.xmlpull.v1.XmlPullParser parser,
java.io.Reader reader,
int mode,
boolean debug,
SavotStatistics stats) |
Constructor
|
SavotPullEngine(org.xmlpull.v1.XmlPullParser parser,
java.lang.String file,
int mode,
boolean debug,
SavotStatistics stats) |
Constructor
|
SavotPullEngine(org.xmlpull.v1.XmlPullParser parser,
java.net.URL url,
int mode,
java.lang.String enc,
boolean debug,
SavotStatistics stats) |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Close the input stream if still opened and free the internal parser
|
void |
enableDebug(boolean debug) |
Enable debug mode
|
SavotVOTable |
getAllResources() |
Get current VOTable (all resources)
|
SavotCoosys |
getCoosysFromRef(java.lang.String ref) |
Search a COOSYS corresponding to an ID ref
|
int |
getDataCount() |
Get the number of DATA elements in the document (for statistics)
|
SavotField |
getFieldFromRef(java.lang.String ref) |
Search a FIELD corresponding to an ID ref
|
SavotFieldRef |
getFieldRefFromRef(java.lang.String ref) |
Search a FIELDref corresponding to an ID ref
|
SavotGroup |
getGroupFromRef(java.lang.String ref) |
Search a GROUP corresponding to an ID ref
|
java.util.Map<java.lang.String,java.lang.Object> |
getIdRefLinks() |
Get a reference on the Hashtable containing the link between ID and ref
|
SavotInfo |
getInfoFromRef(java.lang.String ref) |
Search a RESOURCE corresponding to an ID ref
|
SavotLink |
getLinkFromRef(java.lang.String ref) |
Search a LINK corresponding to an ID ref
|
SavotResource |
getNextResource() |
Get the next Resource (warning : RESOURCEREAD mode only)
|
SavotTR |
getNextTR() |
Get the next TR (warning : ROWREAD mode only)
|
SavotParam |
getParamFromRef(java.lang.String ref) |
Search a PARAM corresponding to an ID ref
|
SavotParamRef |
getParamRefFromRef(java.lang.String ref) |
Search a PARAMref corresponding to an ID ref
|
int |
getResourceCount() |
Get the number of RESOURCE elements in the document (for statistics)
|
SavotResource |
getResourceFromRef(java.lang.String ref) |
Search a RESOURCE corresponding to an ID ref
|
int |
getTableCount() |
Get the number of TABLE elements in the document (for statistics)
|
SavotTable |
getTableFromRef(java.lang.String ref) |
Search a TABLE corresponding to an ID ref
|
int |
getTRCount() |
Get the number of TR elements in the document (for statistics)
|
SavotValues |
getValuesFromRef(java.lang.String ref) |
Search a VALUES corresponding to an ID ref
|
SavotVOTable |
getVOTable() |
Get a reference to V0TABLE object
|
void |
parse(int parsingType) |
Parsing engine
|
void |
reset() |
Reset of the engine before another parsing
LBO: useless methods ?
|
public static final int FULL
public static final int FULLREAD
public static final int SEQUENTIAL
public static final int RESOURCEREAD
public static final int ROWREAD
public static final int DEFAULT_STACK_CAPACITY
public SavotPullEngine(org.xmlpull.v1.XmlPullParser parser, java.lang.String file, int mode, boolean debug, SavotStatistics stats)
parser
- file
- a file to parsemode
- FULLREAD (all in memory), RESOURCEREAD (per RESOURCE) or
ROWREAD (per ROW, for small memory size applications)debug
- stats
- public SavotPullEngine(org.xmlpull.v1.XmlPullParser parser, java.net.URL url, int mode, java.lang.String enc, boolean debug, SavotStatistics stats)
parser
- url
- url to parsemode
- FULLREAD (all in memory), RESOURCEREAD (per RESOURCE) or
ROWREAD (per ROW, for small memory size applications)enc
- encoding (example : UTF-8)debug
- stats
- public SavotPullEngine(org.xmlpull.v1.XmlPullParser parser, java.io.InputStream instream, int mode, java.lang.String enc, boolean debug, SavotStatistics stats)
parser
- instream
- stream to parsemode
- FULL (all in memory), RESOURCEREAD (per RESOURCE) or ROWREAD
(per TR for small memory size applications)enc
- encoding (example : UTF-8)debug
- stats
- public SavotPullEngine(org.xmlpull.v1.XmlPullParser parser, java.io.Reader reader, int mode, boolean debug, SavotStatistics stats)
parser
- reader
- reader to parsemode
- FULL (all in memory), RESOURCEREAD (per RESOURCE) or ROWREAD
(per TR for small memory size applications)debug
- stats
- public void close()
public void reset()
public void parse(int parsingType) throws java.io.IOException, java.lang.Exception
parsingType
- FULLREAD (all in memory), RESOURCEREAD (per RESOURCE) or
ROWREAD (per ROW, for small memory size applications)java.io.IOException
java.lang.Exception
public SavotResource getNextResource()
public SavotTR getNextTR()
public SavotVOTable getVOTable()
public int getResourceCount()
public int getTableCount()
public int getTRCount()
public int getDataCount()
public java.util.Map<java.lang.String,java.lang.Object> getIdRefLinks()
public SavotResource getResourceFromRef(java.lang.String ref)
ref
- public SavotField getFieldFromRef(java.lang.String ref)
ref
- public SavotFieldRef getFieldRefFromRef(java.lang.String ref)
ref
- public SavotParam getParamFromRef(java.lang.String ref)
ref
- public SavotParamRef getParamRefFromRef(java.lang.String ref)
ref
- public SavotTable getTableFromRef(java.lang.String ref)
ref
- public SavotGroup getGroupFromRef(java.lang.String ref)
ref
- public SavotInfo getInfoFromRef(java.lang.String ref)
ref
- public SavotValues getValuesFromRef(java.lang.String ref)
ref
- public SavotLink getLinkFromRef(java.lang.String ref)
ref
- public SavotCoosys getCoosysFromRef(java.lang.String ref)
ref
- public SavotVOTable getAllResources()
public void enableDebug(boolean debug)
debug
- boolean