stsci.archive
Class HTTPwraper

java.lang.Object
  |
  +--stsci.archive.HTTPwraper
All Implemented Interfaces:
Archive, java.rmi.Remote
Direct Known Subclasses:
HTTPArchive, HTTPImageArchive

public abstract class HTTPwraper
extends java.lang.Object
implements Archive

Wrap a URL with a particular factory which can query it and produce an object or objects. This should work for any http feed if we always use a WebFactory (see factory package). The only tricky bit is figureing out which WebFactory to use. This is base class to HTTPArchive for sources and HTTPImageArchive for Images Should be able to run local versio as well as web version


Field Summary
protected  java.lang.Class factory
          The factory class we need.
protected  java.lang.String factoryName
           
protected  boolean local
           
protected  java.lang.String name
           
protected  java.lang.String url
           
 
Constructor Summary
HTTPwraper(ArchiveDescriptor d)
          Basically we need a factory which correspnds to the catalogue to parse the peculiarites of the web feed.
 
Method Summary
 java.lang.String name()
          The name of this archive - location also ?
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factoryName

protected java.lang.String factoryName

factory

protected java.lang.Class factory
The factory class we need.

url

protected java.lang.String url

name

protected java.lang.String name

local

protected boolean local
Constructor Detail

HTTPwraper

public HTTPwraper(ArchiveDescriptor d)
           throws java.rmi.RemoteException
Basically we need a factory which correspnds to the catalogue to parse the peculiarites of the web feed. This is done here by creating a class from a string which has the name of the catalogue prepended to the word factory and is in stsci.factory package - hence for the HIP archive there must exist at run time a class stsci.factory.HIPfactory. Case is important of course. The nice thing about this is ading new WEB archives only requires writting the corresponding factory and requires no change to this code.
Method Detail

name

public java.lang.String name()
                      throws ArchiveException,
                             java.rmi.RemoteException
Description copied from interface: Archive
The name of this archive - location also ?
Specified by:
name in interface Archive