/** * Make a copy of the reciever, setting the loadStrategy to null */ public Object clone() { return cloneWith(null); }
public ArchiveOptions cloneWith(LoadStrategy aLoadStrategy, String uri) { ArchiveOptions result = cloneWith(aLoadStrategy); result.setIsReadOnly(isReadOnly(uri)); return result; }
protected ArchiveOptions getOptionsForOpening(String aUri) throws IOException { LoadStrategy strategy = getCommonArchiveFactory().createChildLoadStrategy(aUri, getLoadStrategy()); return getOptions().cloneWith(strategy, aUri); }
/** * @see CommonarchiveFactory */ public Archive openNestedArchive(String uri, Archive parent) throws OpenFailureException { try { LoadStrategy childStrategy = createChildLoadStrategy(uri, parent.getLoadStrategy()); ArchiveOptions options = parent.getOptions().cloneWith(childStrategy, uri); if (options.shouldDiscriminateNestedArchives()) return openArchive(options, uri); return primOpenArchive(options, uri); } catch (IOException ex) { throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[]{uri, parent.getURI()})), ex); // = "Could not open the nested archive "{0}" in "{1}"" } }
protected ArchiveOptions getOptionsForOpening(LooseArchive loose) throws IOException, OpenFailureException{ if(loose.getBinariesPath() == null){ throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[] {loose.getUri(), getURI()})), null); // = "Could not open the nested archive "{0}" in "{1}"" } LoadStrategy strategy = getCommonArchiveFactory().createLoadStrategy(loose.getBinariesPath()); strategy.setLooseArchive(loose); return getOptions().cloneWith(strategy, loose.getUri()); }
public Archive openNestedArchive(LooseArchive loose, Archive parent) throws OpenFailureException { String uri = loose.getUri(); try { if(loose.getBinariesPath() == null){ throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[] {uri,parent.getURI()})), null); // = "Could not open the nested archive "{0}" in "{1}"" } LoadStrategy childStrategy = createLoadStrategy(loose.getBinariesPath()); childStrategy.setLooseArchive(loose); ArchiveOptions options = parent.getOptions().cloneWith(childStrategy, loose.getUri()); return primOpenArchive(options, uri); } catch (IOException ex) { throw new OpenFailureException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.open_nested_EXC_, (new Object[]{uri, parent.getURI()})), ex); // = "Could not open the nested archive "{0}" in "{1}"" } }