gov.nasa.pds.harvest.pdap.registry.client
Class PsaRegistryClient

java.lang.Object
  extended by gov.nasa.pds.harvest.pdap.registry.client.PsaRegistryClient
All Implemented Interfaces:
PdapRegistryClient

public class PsaRegistryClient
extends Object
implements PdapRegistryClient

Client to the PSA Registry.

Author:
mcayanan

Constructor Summary
PsaRegistryClient(String baseUrl)
          Constructor.
 
Method Summary
 List<uk.ac.starlink.table.StarTable> getAllDataSets()
          Gets all the datasets.
 gov.nasa.pds.tools.label.Label getCatalogFile(String datasetId, String filename)
          Gets the catalog file from the PSA Registry.
 uk.ac.starlink.table.StarTable getDataSet(String datasetId)
          Gets a single dataset in VOTable format.
 URL getResourceLink(String datasetId)
          Gets the resource link associated with the given dataset identifier.
 gov.nasa.pds.tools.label.Label getVoldescFile(String datasetId)
          Gets the VOLDESC.CAT file.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsaRegistryClient

public PsaRegistryClient(String baseUrl)
Constructor.

Parameters:
baseUrl - The base url of the registry.
Method Detail

getAllDataSets

public List<uk.ac.starlink.table.StarTable> getAllDataSets()
                                                    throws PdapRegistryClientException
Gets all the datasets.

Specified by:
getAllDataSets in interface PdapRegistryClient
Returns:
List of datasets in VOTable format.
Throws:
PdapRegistryClientException

getDataSet

public uk.ac.starlink.table.StarTable getDataSet(String datasetId)
                                          throws PdapRegistryClientException
Gets a single dataset in VOTable format.

Specified by:
getDataSet in interface PdapRegistryClient
Parameters:
datasetId - The identifier of the dataset to get.
Returns:
The dataset in VOTable format.
Throws:
PdapRegistryClientException - If an error occurred while connecting to the PSA.

getResourceLink

public URL getResourceLink(String datasetId)
                    throws PdapRegistryClientException
Gets the resource link associated with the given dataset identifier.

Specified by:
getResourceLink in interface PdapRegistryClient
Parameters:
datasetId - The dataset identifier.
Returns:
A URL to the resource.
Throws:
PdapRegistryClientException - If an error occurred while getting the resource link.

getCatalogFile

public gov.nasa.pds.tools.label.Label getCatalogFile(String datasetId,
                                                     String filename)
                                              throws PdapRegistryClientException
Gets the catalog file from the PSA Registry.

Specified by:
getCatalogFile in interface PdapRegistryClient
Parameters:
datasetId - The dataset identifier.
filename - The catalog filename.
Returns:
The catalog file label.
Throws:
PdapRegistryClientException - If an error occurred while getting the catalog file.

getVoldescFile

public gov.nasa.pds.tools.label.Label getVoldescFile(String datasetId)
                                              throws PdapRegistryClientException
Gets the VOLDESC.CAT file.

Specified by:
getVoldescFile in interface PdapRegistryClient
Parameters:
datasetId - The dataset identifier.
Returns:
The VOLDESC.CAT label.
Throws:
PdapRegistryClientException - If an error occurred while getting the VOLDESC.CAT file.

main

public static void main(String[] args)


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.