UCFPackage extends ODFJaxb implements Cloneable { @SuppressWarnings("rawtypes") public void unsetRootFile(String path) { Container container = containerXml.getValue(); RootFiles rootFiles = getRootFiles(container); Iterator<Object> anyOrRootIt = rootFiles.getAnyOrRootFile().iterator(); while (anyOrRootIt.hasNext()) { Object anyOrRoot = anyOrRootIt.next(); if (anyOrRoot instanceof JAXBElement) anyOrRoot = ((JAXBElement) anyOrRoot).getValue(); if (!(anyOrRoot instanceof RootFile)) continue; RootFile rootFileElem = (RootFile) anyOrRoot; if (rootFileElem.getFullPath().equals(path)) anyOrRootIt.remove(); } } UCFPackage();  UCFPackage(File containerFile);  UCFPackage(InputStream inputStream); String getPackageMediaType(); void setPackageMediaType(String mediaType); void save(File packageFile); void addResource(String stringValue, String path, String mediaType); void addResource(byte[] bytesValue, String path, String mediaType); void addResource(Document document, String path, String mediaType); void addResource(InputStream inputStream, String path,
			String mediaType); void addResource(URI uri, String path, String mediaType); String getResourceAsString(String path); byte[] getResourceAsBytes(String path); InputStream getResourceAsInputStream(String path); Map<String, ResourceEntry> listResources(); Map<String, ResourceEntry> listResources(String folderPath); void removeResource(String path); Map<String, ResourceEntry> listAllResources(); void setRootFile(String path); @SuppressWarnings("rawtypes") void setRootFile(String path, String version); @SuppressWarnings("rawtypes") List<ResourceEntry> getRootFiles(); ResourceEntry getResourceEntry(String path); @SuppressWarnings("rawtypes") void unsetRootFile(String path); void save(OutputStream output); OutputStream addResourceUsingOutputStream(String path,
			String mediaType); @Override UCFPackage clone(); String getRootFileVersion(String rootFile); static final String MIME_BINARY; static final String MIME_TEXT_PLAIN; static final String MIME_TEXT_XML; static final String MIME_RDF; static final String MIME_EPUB; static final String MIME_WORKFLOW_BUNDLE; static final String MIME_DATA_BUNDLE; static final String MIME_WORKFLOW_RUN_BUNDLE; static final String MIME_SERVICE_BUNDLE; }
@Test public void unsetRootFile() throws Exception { UCFPackage container = new UCFPackage(); container.setPackageMediaType(UCFPackage.MIME_WORKFLOW_BUNDLE); container.addResource("Hello there", "helloworld.txt", "text/plain"); container.addResource("Soup for everyone", "soup.txt", "text/plain"); container.setRootFile("helloworld.txt"); assertEquals(1, container.getRootFiles().size()); container.unsetRootFile("helloworld.txt"); assertEquals(0, container.getRootFiles().size()); }