net.cds
Class CDSParser

java.lang.Object
  extended by net.cds.CDSParser
Direct Known Subclasses:
NameResolver, Vizier

public abstract class CDSParser
extends Object

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.

This software uses source code created at the Centre de Donn�es astronomiques de Strasbourg, France.


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

dom

private static DocumentBuilder dom
The document builder for parsing the sesam output into a DOM.


VALIDATE

private static final boolean VALIDATE
The validating flag.

See Also:
Constant Field Values

WHITESPACE

private static final boolean WHITESPACE
The whitespace-ignoring flag.

See Also:
Constant Field Values

EXPAND

private static final boolean EXPAND
The entity-expanding flag.

See Also:
Constant Field Values

lastquery

private List<Object> lastquery
The last query performed, for simple caching.


parsed

private Document parsed
The dom parsed out of the last query.

Constructor Detail

CDSParser

public CDSParser()
Method Detail

query

protected abstract String query(List<Object> args)
This is the generic method to access a CDS service. The implementing class must know how to convert the argument list to the specific AXIS call.
Note that this implementation only work with single query calls.


isRetrievable

protected abstract boolean isRetrievable()
Returns false if the remote service is not available.


getParsed

protected Document getParsed()
Returns the parsed result.


checkCache

protected boolean checkCache(List<Object> target)
Checks, if the actual query was already processed. If not, the newly returned DOM is parsed into parsed.

Returns:
True, if parsed is ready for retrieval.