Documentation of 'visad.data.Repository' Java class
Repository
visad.data

Class Repository

  • Direct Known Subclasses:
    DirectoryRepository


    public abstract class Repository
    extends java.lang.Object
    A repository of persistent data objects. This class implements the "abstract factory" design pattern. The concrete implementation of this class could either be "DirectoryRepository" (for accessing files residing on local disk) or "RemoteRepository" (for accessing remote files via a server) or something else. The concrete class of the "Form" objects will be determined by this class's concrete class (and, hence, so will the concrete class of any constructed "FileAccessor").
    • Constructor Summary

      Constructors 
      Constructor and Description
      Repository(java.lang.String name, java.lang.String location)
      Construct a data repository.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(java.lang.String id, Data data, boolean replace)
      Add a data object to an existing data object in the repository.
      abstract java.util.Enumeration getEnumeration()
      Return an enumeration of the data objects in this repository.
      FormNode getForms()
      Return the forms of data that are supported by this repository.
      FormNode getForms(Data data)
      Return the forms of data that are both supported by this repository and compatible with a data object.
      java.lang.String getLocation()
      Return the location of this repository.
      java.lang.String getName()
      Return the name of this repository.
      DataImpl open(java.lang.String id)
      Open an existing data object in the repository.
      DataImpl open(java.net.URL url)
      Open a data object specified as a URL.
      void save(java.lang.String id, Data data, boolean replace)
      Save a data object in the first compatible data form.
      void save(java.lang.String id, Data data, FormNode form, boolean replace)
      Save a data object in a particular form.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Repository

        public Repository(java.lang.String name,
                          java.lang.String location)
        Construct a data repository.
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of this repository.
      • getLocation

        public java.lang.String getLocation()
        Return the location of this repository.
      • getForms

        public FormNode getForms()
        Return the forms of data that are supported by this repository.
      • getForms

        public FormNode getForms(Data data)
                          throws VisADException,
                                 java.io.IOException,
                                 java.rmi.RemoteException
        Return the forms of data that are both supported by this repository and compatible with a data object.
        Throws:
        VisADException
        java.io.IOException
        java.rmi.RemoteException
      • getEnumeration

        public abstract java.util.Enumeration getEnumeration()
                                                      throws BadRepositoryException,
                                                             java.lang.SecurityException
        Return an enumeration of the data objects in this repository.
        Throws:
        BadRepositoryException
        java.lang.SecurityException
      • save

        public void save(java.lang.String id,
                         Data data,
                         boolean replace)
                  throws VisADException,
                         java.io.IOException,
                         java.rmi.RemoteException
        Save a data object in the first compatible data form.
        Throws:
        VisADException
        java.io.IOException
        java.rmi.RemoteException
      • save

        public void save(java.lang.String id,
                         Data data,
                         FormNode form,
                         boolean replace)
                  throws VisADException,
                         java.rmi.RemoteException,
                         java.io.IOException
        Save a data object in a particular form.
        Throws:
        VisADException
        java.rmi.RemoteException
        java.io.IOException
      • add

        public void add(java.lang.String id,
                        Data data,
                        boolean replace)
                 throws VisADException
        Add a data object to an existing data object in the repository.
        Throws:
        VisADException
      • open

        public DataImpl open(java.lang.String id)
                      throws VisADException,
                             java.io.IOException
        Open an existing data object in the repository.
        Throws:
        VisADException
        java.io.IOException
      • open

        public DataImpl open(java.net.URL url)
                      throws VisADException,
                             java.io.IOException
        Open a data object specified as a URL. Strictly speaking, this shouldn't be here because a URL can lie outside the domain of the repository. A repository, however, is characterized by the data forms that it handles as well as its "location". Consequently, we have this method.
        Throws:
        VisADException
        java.io.IOException

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.