public class SimpleUrlRepository extends AbstractRepository
SimpleUrlRepository is a Repository contains an archive file from a HTTP URL.Repositoryarguments, name, uri| Modifier and Type | Method and Description |
|---|---|
protected void |
download(java.nio.file.Path tmp,
java.net.URI baseUri,
Artifact.Item item,
ai.djl.util.Progress progress) |
java.util.List<MRL> |
getResources()
Returns a list of
MRLs in the repository. |
boolean |
isRemote()
Returns whether the repository is remote repository.
|
Metadata |
locate(MRL mrl)
Returns the metadata at a mrl.
|
Artifact |
resolve(MRL mrl,
java.util.Map<java.lang.String,java.lang.String> filter)
Returns the artifact matching a mrl, version, and property filter.
|
addResource, getBaseUri, getCacheDirectory, getFile, getName, listDirectory, md5hash, openStream, prepare, resolvePath, saveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdataset, dataset, getResourceDirectory, model, model, model, newInstance, newInstance, prepare, registerRepositoryFactorypublic boolean isRemote()
public Metadata locate(MRL mrl) throws java.io.IOException
mrl - the mrl of the metadata to retrievejava.io.IOException - if it failed to load the metadatapublic Artifact resolve(MRL mrl, java.util.Map<java.lang.String,java.lang.String> filter) throws java.io.IOException
mrl - the mrl to match the artifact againstfilter - the property filterjava.io.IOException - if it failed to load the artifactpublic java.util.List<MRL> getResources()
MRLs in the repository.
An empty list will be returned if underlying Repository implementation does not
support this feature.
MRLs in the repositoryprotected void download(java.nio.file.Path tmp,
java.net.URI baseUri,
Artifact.Item item,
ai.djl.util.Progress progress)
throws java.io.IOException
download in class AbstractRepositoryjava.io.IOException