public class RemoteRepository extends AbstractRepository
RemoteRepository
is a Repository
located on a remote web server.Repository
arguments, name, uri
Modifier | Constructor and Description |
---|---|
protected |
RemoteRepository(java.lang.String name,
java.net.URI uri)
(Internal) Constructs a remote repository.
|
Modifier and Type | Method and Description |
---|---|
void |
addResource(MRL mrl)
Adds resource to the repository.
|
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.util.Map<java.lang.String,java.lang.String> filter)
Returns the artifact matching a mrl, version, and property filter.
|
download, getBaseUri, getCacheDirectory, getFile, getName, listDirectory, md5hash, openStream, prepare, resolvePath, save
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataset, dataset, getResourceDirectory, model, model, model, newInstance, newInstance, prepare, registerRepositoryFactory
protected RemoteRepository(java.lang.String name, java.net.URI uri)
name
- the repository nameuri
- the repository locationpublic 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()
MRL
s in the repository.
An empty list will be returned if underlying Repository
implementation does not
support this feature.
MRL
s in the repositorypublic void addResource(MRL mrl)
addResource
in interface Repository
addResource
in class AbstractRepository
mrl
- the resource to add