|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.interlis.ilirepository.impl.RepositoryAccess
public class RepositoryAccess
Handles access to a file in a repository. Hides the caching, downloading of files.
Constructor Summary | |
---|---|
RepositoryAccess()
|
Method Summary | |
---|---|
static java.lang.String |
calcMD5(java.io.File file)
Calculates the digest of a local file. |
IliFiles |
getIliFiles(java.lang.String uri)
Gets the list of ili-files for a given repository. |
IliSite |
getIliSite(java.lang.String uri)
Gets the site metadata for a given repository. |
java.io.File |
getLocalFileLocation(java.lang.String uri,
java.lang.String filename,
long maxTTL,
java.lang.String md5)
Gets access to a file. |
void |
setCache(java.io.File localdir)
Sets the local folder to be used for caching remote files. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryAccess()
Method Detail |
---|
public void setCache(java.io.File localdir)
public IliFiles getIliFiles(java.lang.String uri)
uri
- local or remote repository
public IliSite getIliSite(java.lang.String uri)
uri
- local or remote repository
public java.io.File getLocalFileLocation(java.lang.String uri, java.lang.String filename, long maxTTL, java.lang.String md5) throws RepositoryAccessException
uri
- remote or local repositoryfilename
- file/path to download from repository. If null, uri includes the file name.maxTTL
- max age of file in cache before downloading it again.md5
- digest of remote file or null. If cached version has a different digest, download remote file again.
RepositoryAccessException
public static java.lang.String calcMD5(java.io.File file)
file
- local file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |