uk.ac.ed.inf.ogsaconfig.garm.collections
Class Descriptor

java.lang.Object
  |
  +--uk.ac.ed.inf.ogsaconfig.garm.collections.Descriptor

public class Descriptor
extends java.lang.Object

This class represents a .garx descriptor of a remote archive. It provides constructors to create a new descriptor from an archive or to parse an existing descriptor into an object, as well as a way to save a descriptor object as a garx


Nested Class Summary
 class Descriptor.Entry
          An entry represents a file in the archive the descriptor describes
 
Constructor Summary
Descriptor(FileCollection collection, java.net.URL archive)
          creates a descriptor from a file collection and a url indicating where the archive will be accessible from (this is data included in the descriptor, it is not used for processing in this method)
Descriptor(java.net.URL location)
          creates a descriptor from a preexisting XML descriptor
 
Method Summary
 java.net.URL getArchiveLocation()
          Returns the archive URL
 Descriptor.Entry[] getEntries()
          Returns all the entries in the descriptor (each entry corresponds to a file in the archive)
 void save(java.io.File fp)
          Writes the descriptor to the file fp in XML format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Descriptor

public Descriptor(java.net.URL location)
creates a descriptor from a preexisting XML descriptor

Parameters:
location - is where the preexisting descriptor is

Descriptor

public Descriptor(FileCollection collection,
                  java.net.URL archive)
creates a descriptor from a file collection and a url indicating where the archive will be accessible from (this is data included in the descriptor, it is not used for processing in this method)

Method Detail

getEntries

public Descriptor.Entry[] getEntries()
Returns all the entries in the descriptor (each entry corresponds to a file in the archive)


getArchiveLocation

public java.net.URL getArchiveLocation()
Returns the archive URL


save

public void save(java.io.File fp)
Writes the descriptor to the file fp in XML format