Skip to content

Commit 78ed625

Browse files
author
Sebastian Bittrich
committed
should remove formatting issues for files which did not change
1 parent 0b59a10 commit 78ed625

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ public Structure getStructureForDomain(ScopDomain domain, ScopDatabase scopDatab
606606
}
607607
}
608608
boolean alreadyContains = newChain.getAtomGroups().contains(group); // we don't want to add duplicate
609-
// ligands
609+
// ligands
610610
if (shouldContain && !alreadyContains) {
611611

612612
newChain.addGroup(group);
@@ -951,4 +951,4 @@ protected Structure loadStructureFromPdbByPdbId(String pdbId) throws IOException
951951
return s;
952952
}
953953

954-
}
954+
}

biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -442,44 +442,44 @@ protected File downloadStructure(String pdbId) throws IOException{
442442
// decide whether download is required
443443
File existing = getLocalFile(pdbId);
444444
switch(fetchBehavior) {
445-
case LOCAL_ONLY:
446-
if( existing == null ) {
447-
throw new IOException(String.format("Structure %s not found in %s "
448-
+ "and configured not to download.",pdbId,getPath()));
445+
case LOCAL_ONLY:
446+
if( existing == null ) {
447+
throw new IOException(String.format("Structure %s not found in %s "
448+
+ "and configured not to download.",pdbId,getPath()));
449+
} else {
450+
return existing;
451+
}
452+
case FETCH_FILES:
453+
// Use existing if present
454+
if( existing != null) {
455+
return existing;
456+
}
457+
// existing is null, downloadStructure(String,String,boolean,File) will download it
458+
break;
459+
case FETCH_IF_OUTDATED:
460+
// here existing can be null or not:
461+
// existing == null : downloadStructure(String,String,boolean,File) will download it
462+
// existing != null : downloadStructure(String,String,boolean,File) will check its date and download if older
463+
break;
464+
case FETCH_REMEDIATED:
465+
// Use existing if present and recent enough
466+
if( existing != null) {
467+
long lastModified = existing.lastModified();
468+
469+
if (lastModified < LAST_REMEDIATION_DATE) {
470+
// the file is too old, replace with newer version
471+
logger.warn("Replacing file {} with latest remediated (remediation of {}) file from PDB.",
472+
existing, LAST_REMEDIATION_DATE_STRING);
473+
existing = null;
474+
break;
449475
} else {
450476
return existing;
451477
}
452-
case FETCH_FILES:
453-
// Use existing if present
454-
if( existing != null) {
455-
return existing;
456-
}
457-
// existing is null, downloadStructure(String,String,boolean,File) will download it
458-
break;
459-
case FETCH_IF_OUTDATED:
460-
// here existing can be null or not:
461-
// existing == null : downloadStructure(String,String,boolean,File) will download it
462-
// existing != null : downloadStructure(String,String,boolean,File) will check its date and download if older
463-
break;
464-
case FETCH_REMEDIATED:
465-
// Use existing if present and recent enough
466-
if( existing != null) {
467-
long lastModified = existing.lastModified();
468-
469-
if (lastModified < LAST_REMEDIATION_DATE) {
470-
// the file is too old, replace with newer version
471-
logger.warn("Replacing file {} with latest remediated (remediation of {}) file from PDB.",
472-
existing, LAST_REMEDIATION_DATE_STRING);
473-
existing = null;
474-
break;
475-
} else {
476-
return existing;
477-
}
478-
}
479-
case FORCE_DOWNLOAD:
480-
// discard the existing file to force redownload
481-
existing = null; // downloadStructure(String,String,boolean,File) will download it
482-
break;
478+
}
479+
case FORCE_DOWNLOAD:
480+
// discard the existing file to force redownload
481+
existing = null; // downloadStructure(String,String,boolean,File) will download it
482+
break;
483483
}
484484

485485
// Force the download now
@@ -521,7 +521,7 @@ private File downloadStructure(String pdbId, String pathOnServer, boolean obsole
521521
ftp = CodecUtils.getMmtfEntryUrl(pdbId, true, false);
522522
} else {
523523
ftp = String.format("%s%s/%s/%s",
524-
serverName, pathOnServer, pdbId.substring(1,3).toLowerCase(), getFilename(pdbId));
524+
serverName, pathOnServer, pdbId.substring(1,3).toLowerCase(), getFilename(pdbId));
525525
}
526526

527527
URL url = new URL(ftp);
@@ -771,4 +771,4 @@ protected void initPaths() {
771771
* @return A list of directories, relative to the /pub/pdb directory on the server
772772
*/
773773
protected abstract String[] getObsoleteDirPath();
774-
}
774+
}

biojava-structure/src/test/java/org/biojava/nbio/structure/io/mmcif/TestEntityNameAndType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ public void testEntityId() throws IOException, StructureException {
102102

103103

104104
}
105-
}
105+
}

0 commit comments

Comments
 (0)