|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.cds.CDSParser
public abstract class CDSParser
A base class for all xml-cds retrieval queries. Provides a common dom-parser and a simple caching mechansim. The interaction with the daughter classes is a little bit confusing, therefore here is the path of a query.
NameResolver.getResolver(java.lang.String) class.checkCache(java.util.List) 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) .query(java.util.List) method with the List of arguments supplied to the
checkCache(java.util.List) method.query(java.util.List) 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.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
CDSParser()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static DocumentBuilder dom
private static final boolean VALIDATE
private static final boolean WHITESPACE
private static final boolean EXPAND
private List<Object> lastquery
private Document parsed
| Constructor Detail |
|---|
public CDSParser()
| Method Detail |
|---|
protected abstract String query(List<Object> args)
protected abstract boolean isRetrievable()
protected Document getParsed()
protected boolean checkCache(List<Object> target)
parsed.
parsed is ready for retrieval.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||