use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.
the class Catalogue method createPdriDescr.
private PDRIDescr createPdriDescr(File key) throws IOException {
PDRIDescr pDRIDescr = new PDRIDescr();
pDRIDescr.setCashe(true);
pDRIDescr.setEncrypt(false);
// file:/home/alogo/servers/apache-tomcat-6.0.36/temp/uploads/LOBCDER-REPLICA-vTEST
String localDir = key.getParentFile().toURI().toString().replaceAll(Util.getWorkingFolderName() + "/", "");
pDRIDescr.setResourceUrl(localDir);
pDRIDescr.setName(key.getName());
pDRIDescr.setPassword("fake");
pDRIDescr.setUsername("fake");
return pDRIDescr;
}
use of nl.uva.cs.lobcder.resources.PDRIDescr in project lobcder by skoulouzis.
the class Catalogue method isCacheInPdriList.
private boolean isCacheInPdriList(File cacheFile, LogicalDataWrapped logicalData) {
String resourceURI = "file:///" + cacheFile.getAbsoluteFile().getParentFile().getParent();
List<PDRIDescr> pdris = logicalData.getPdriList();
if (pdris != null) {
for (PDRIDescr p : pdris) {
if (p.getResourceUrl().equals(resourceURI)) {
return true;
}
}
}
return false;
}
Aggregations