private static void initServerName() { if (serverName==null) { serverName = LocalPDBDirectory.getServerName(); } }
/** * Subclasses should provide default and single-string constructors. * They should use {@link #addExtension(String)} to add one or more extensions. * * <p>If path is null, initialize using the system property/environment variable * {@link UserConfiguration#PDB_DIR}. * @param path Path to the PDB file directory */ public LocalPDBDirectory(String path) { extensions = new ArrayList<String>(); params = new FileParsingParameters(); if( path == null) { UserConfiguration config = new UserConfiguration(); path = config.getPdbFilePath(); logger.debug("Initialising from system property/environment variable to path: {}", path); } else { path = FileDownloadUtils.expandUserHome(path); logger.debug("Initialising with path {}", path); } this.path = new File(path); this.serverName = getServerName(); // Initialize splitDirURL,obsoleteDirURL,splitDirPath,obsoleteDirPath initPaths(); fetchBehavior = FetchBehavior.DEFAULT; obsoleteBehavior = ObsoleteBehavior.DEFAULT; }