public abstract class CDSParser extends Object
NameResolver.getResolver(java.lang.String) class.checkCache(java.util.List<java.lang.Object>) method will
not be called directly, but via a (private) method like
Vizier.checkArguments(java.lang.String, double, java.lang.String, java.lang.String).checkCache(java.util.List<java.lang.Object>).query(java.util.List<java.lang.Object>) method with the List of arguments supplied to the
checkCache(java.util.List<java.lang.Object>) method.query(java.util.List<java.lang.Object>) method. The daughter class calls the remote CDS service
and returns the result (which is in XML-format) to the CDS-parser class.dom parser reference.getParsed() method. Interpretation of the DOM is again transfered to
the daughter class, e.g. the NameResolver.getResolver(java.lang.String) returns the
CDSConstants.RESOLVERNAME attribute to the
CDSConstants.RESOLVER element.| Modifier and Type | Field and Description |
|---|---|
private static DocumentBuilder |
dom
The document builder for parsing the sesam output into a DOM.
|
private static boolean |
EXPAND
The entity-expanding flag.
|
private List<Object> |
lastquery
The last query performed, for simple caching.
|
private Document |
parsed
The dom parsed out of the last query.
|
private static boolean |
VALIDATE
The validating flag.
|
private static boolean |
WHITESPACE
The whitespace-ignoring flag.
|
| Constructor and Description |
|---|
CDSParser() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkCache(List<Object> target)
Checks, if the actual query was already processed.
|
protected Document |
getParsed()
Returns the parsed result.
|
protected abstract boolean |
isRetrievable()
Returns false if the remote service is not available.
|
protected abstract String |
query(List<Object> args)
This is the generic method to access a CDS service.
|
private static DocumentBuilder dom
private static final boolean VALIDATE
private static final boolean WHITESPACE
private static final boolean EXPAND
private Document parsed
protected abstract String query(List<Object> args)
protected abstract boolean isRetrievable()
protected Document getParsed()