public class JarRepository extends AbstractRepository
JarRepository
is a Repository
contains an archive file from classpath.Repository
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.net.URI |
getBaseUri()
Returns the URI to the base of the repository.
|
java.lang.String |
getName()
Returns the repository name.
|
java.util.List<MRL> |
getResources()
Returns a list of
MRL s 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.lang.String version,
java.util.Map<java.lang.String,java.lang.String> filter)
Returns the artifact matching a mrl, version, and property filter.
|
getCacheDirectory, getFile, listDirectory, md5hash, openStream, prepare, resolvePath, save
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceDirectory, newInstance, newInstance, prepare, registerRepositoryFactory
public boolean isRemote()
public java.lang.String getName()
public java.net.URI getBaseUri()
public Metadata locate(MRL mrl)
mrl
- the mrl of the metadata to retrievepublic Artifact resolve(MRL mrl, java.lang.String version, java.util.Map<java.lang.String,java.lang.String> filter)
mrl
- the mrl to match the artifact againstversion
- the version of the artifactfilter
- the property filterpublic java.util.List<MRL> getResources()
MRL
s in the repository.
An empty list will be returned if underlying Repository
implementation does not
support this feature.
getResources
in interface Repository
getResources
in class AbstractRepository
MRL
s 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 AbstractRepository
java.io.IOException