Class RemoteRepository

java.lang.Object
ai.djl.repository.AbstractRepository
ai.djl.repository.RemoteRepository
All Implemented Interfaces:
Repository

public class RemoteRepository extends AbstractRepository
A RemoteRepository is a Repository located on a remote web server.
See Also:
  • Constructor Details

  • Method Details

    • isRemote

      public boolean isRemote()
      Returns whether the repository is remote repository.
      Returns:
      whether the repository is remote repository
    • locate

      public Metadata locate(MRL mrl) throws IOException
      Returns the metadata at a mrl.
      Parameters:
      mrl - the mrl of the metadata to retrieve
      Returns:
      the metadata
      Throws:
      IOException - if it failed to load the metadata
    • resolve

      public Artifact resolve(MRL mrl, Map<String,String> filter) throws IOException
      Returns the artifact matching a mrl, version, and property filter.
      Parameters:
      mrl - the mrl to match the artifact against
      filter - the property filter
      Returns:
      the matched artifact
      Throws:
      IOException - if it failed to load the artifact
    • getResources

      public List<MRL> getResources()
      Returns a list of MRLs in the repository.

      An empty list will be returned if underlying Repository implementation does not support this feature.

      Returns:
      a list of MRLs in the repository
    • addResource

      public void addResource(MRL mrl)
      Adds resource to the repository.
      Specified by:
      addResource in interface Repository
      Overrides:
      addResource in class AbstractRepository
      Parameters:
      mrl - the resource to add