/** * Compress all given file into a ZIP file. * * @param zipFile the output ZIP file. * @param includeFiles all File to be compressed */ public static void createZipFile( File zipFile, Collection includeFiles ) throws IOException { createZipFile( zipFile, includeFiles, false ); }
public static void main(String[] args) throws IntactException { AnnotationSection annotationSection = new AnnotationSection(); annotationSection.getAnnotationSection(); Set<String> keySet = annotationSection.annotationSection.keySet(); for (String editorPage : keySet) { System.out.println("editor page " + editorPage + " : "); List<String> usableTopics = annotationSection.annotationSection.get(editorPage); //System.out.println(editorPage + " : "); for (String cvTopicShortLabel : usableTopics) { System.out.println("\t" + cvTopicShortLabel + " "); } } List<String> bioSourceList = annotationSection.getUsableTopics(BioSource.class.getName()); for (String o : bioSourceList) { System.out.println("topic for bisource " + o); } }
public static String formatDate(Date date){ if(date != null){ Calendar calendar = Calendar.getInstance(); calendar.setTime(date); String day = Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)); String monthName = getMonth(calendar.get(Calendar.MONTH)); String year = Integer.toString(calendar.get(Calendar.YEAR)); String newDate = year + "-" + monthName + "-" + day; newDate = newDate.trim(); return newDate; }else{ return null; } }
ZipBuilder.createZipFile( zipFile, xmlFiles, VERBOSE ); } catch ( IOException e ) { e.printStackTrace();
ZipBuilder.createZipFile( zipFile, xmlFiles, VERBOSE ); } catch ( IOException e ) { e.printStackTrace();