Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lanceolav.jreftree
Class FileTools  view FileTools download FileTools.java

java.lang.Object
  extended bycom.lanceolav.jreftree.FileTools

public final class FileTools
extends java.lang.Object


Nested Class Summary
private static class FileTools.ImportChoiceDialog
           
 
Field Summary
static int ISI_format
           
private static java.lang.String OPEN
           
private static java.lang.String SAVE
           
static int XML_format
           
 
Constructor Summary
private FileTools()
           
 
Method Summary
private static org.w3c.dom.Element createListElement(org.w3c.dom.Document document, javax.swing.ListModel list)
           
private static org.w3c.dom.Element createTreeElement(org.w3c.dom.Document d, javax.swing.tree.TreeNode n)
           
static void exportListToBibTeX(javax.swing.ListModel list)
           
static void exportListToXML(javax.swing.ListModel list)
           
private static void extractList(java.util.Vector entries, org.w3c.dom.Element listElement)
           
private static void extractTree(org.w3c.dom.Element treeElement, RefTree tree, javax.swing.ListModel list)
           
private static java.io.File getFile(java.lang.String fileExtension, java.lang.String fileDescription, java.lang.String dialogTitle, java.lang.String dialogType)
           
private static java.io.File[] getFiles(java.lang.String fileExtension, java.lang.String fileDescription, java.lang.String dialogTitle)
           
private static java.lang.String getTextInElement(org.w3c.dom.Element e, java.lang.String tagName)
           
static void importFile(int format, java.util.Vector oldRefs, RefList paperList, RefTree paperTree)
           
private static void insertFolder(org.w3c.dom.Node parentElement, RefTree tree, javax.swing.ListModel list)
           
static java.io.File openProject(java.util.Vector allRefs, RefTree tree, javax.swing.JList list)
           
static java.util.Vector readBibteXMLfile(java.io.File file)
           
static java.lang.String[] readLines(java.io.File file)
           
static java.lang.String[] readLines(java.io.FileReader f, boolean includeNewline)
           
static java.io.File saveProject(javax.swing.tree.TreeModel tree, javax.swing.ListModel list, java.io.File file)
           
private static boolean shallOverwriteFile(java.io.File file, java.lang.String dialogTitle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPEN

private static final java.lang.String OPEN
See Also:
Constant Field Values

SAVE

private static final java.lang.String SAVE
See Also:
Constant Field Values

ISI_format

public static final int ISI_format
See Also:
Constant Field Values

XML_format

public static final int XML_format
See Also:
Constant Field Values
Constructor Detail

FileTools

private FileTools()
Method Detail

createTreeElement

private static org.w3c.dom.Element createTreeElement(org.w3c.dom.Document d,
                                                     javax.swing.tree.TreeNode n)

createListElement

private static org.w3c.dom.Element createListElement(org.w3c.dom.Document document,
                                                     javax.swing.ListModel list)

shallOverwriteFile

private static boolean shallOverwriteFile(java.io.File file,
                                          java.lang.String dialogTitle)

getFile

private static java.io.File getFile(java.lang.String fileExtension,
                                    java.lang.String fileDescription,
                                    java.lang.String dialogTitle,
                                    java.lang.String dialogType)

getFiles

private static java.io.File[] getFiles(java.lang.String fileExtension,
                                       java.lang.String fileDescription,
                                       java.lang.String dialogTitle)

readLines

public static java.lang.String[] readLines(java.io.FileReader f,
                                           boolean includeNewline)
                                    throws java.io.IOException

readLines

public static java.lang.String[] readLines(java.io.File file)

importFile

public static void importFile(int format,
                              java.util.Vector oldRefs,
                              RefList paperList,
                              RefTree paperTree)

readBibteXMLfile

public static java.util.Vector readBibteXMLfile(java.io.File file)

getTextInElement

private static java.lang.String getTextInElement(org.w3c.dom.Element e,
                                                 java.lang.String tagName)

extractList

private static void extractList(java.util.Vector entries,
                                org.w3c.dom.Element listElement)

insertFolder

private static void insertFolder(org.w3c.dom.Node parentElement,
                                 RefTree tree,
                                 javax.swing.ListModel list)
                          throws BadTreeException

extractTree

private static void extractTree(org.w3c.dom.Element treeElement,
                                RefTree tree,
                                javax.swing.ListModel list)
                         throws BadTreeException

openProject

public static java.io.File openProject(java.util.Vector allRefs,
                                       RefTree tree,
                                       javax.swing.JList list)

saveProject

public static java.io.File saveProject(javax.swing.tree.TreeModel tree,
                                       javax.swing.ListModel list,
                                       java.io.File file)

exportListToXML

public static void exportListToXML(javax.swing.ListModel list)

exportListToBibTeX

public static void exportListToBibTeX(javax.swing.ListModel list)