com.sun.pkg.client
Class Catalog

java.lang.Object
  extended by com.sun.pkg.client.Catalog

public class Catalog
extends java.lang.Object

A Catalog is the list of packages (Fmris) that are available from an authority.

Author:
trm

Constructor Summary
Catalog(Image img, java.lang.String authname)
           
 
Method Summary
 java.util.List<Fmri> getFmris()
          Get the Fmris that are int his catalog.
 Fmri getMatchingFmri(Fmri p)
          Get the newest matching FMRI for the given package
 Fmri getMatchingFmri(java.lang.String p)
          Get the newest matching FMRI for the given package
 void refresh()
          Refresh the local content of the catalog by downloading it from the repository.
 int size()
          Get the size of the catalog, i.e., the number of FMRIs contained in it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Catalog

public Catalog(Image img,
               java.lang.String authname)
        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

refresh

public void refresh()
             throws java.io.IOException
Refresh the local content of the catalog by downloading it from the repository.

Throws:
java.io.IOException

getMatchingFmri

public Fmri getMatchingFmri(java.lang.String p)
Get the newest matching FMRI for the given package

Parameters:
p - the name of the desired package

getMatchingFmri

public Fmri getMatchingFmri(Fmri p)
Get the newest matching FMRI for the given package

Parameters:
p - the name of the desired package

size

public int size()
Get the size of the catalog, i.e., the number of FMRIs contained in it.

Returns:
the number of packages in this catalog

getFmris

public java.util.List<Fmri> getFmris()
Get the Fmris that are int his catalog.

Returns:
List of Fmris in this catalog