at.tuwien.ifs.somtoolbox.apps.viewer.fileutils
Class LabelXmlUtils
java.lang.Object
at.tuwien.ifs.somtoolbox.apps.viewer.fileutils.LabelXmlUtils
public class LabelXmlUtils
- extends java.lang.Object
Provides functionality to save all labels into a XML file.
- Version:
- $Id: LabelXmlUtils.java 3877 2010-11-02 15:43:17Z frank $
- Author:
- Angela Roiger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ll
private static EditLabelEventListener ll
LabelXmlUtils
public LabelXmlUtils()
saveLabelsToFile
public static boolean saveLabelsToFile(MapPNode map,
java.io.File f)
- Saves the labels(cluster labels and manual labels) of the map to the file.
- Parameters:
map
- the MapPNode containing the labelsf
- the File to store the labels
- Returns:
- returns true if saving to File was successful, false otherwise
addLabelsToXml
private static void addLabelsToXml(java.util.Iterator<?> it,
org.w3c.dom.Node node,
org.w3c.dom.Document document)
createXmlDocument
private static org.w3c.dom.Document createXmlDocument(MapPNode map)
throws javax.xml.parsers.ParserConfigurationException
- Creates a XML Document containing all labels from the map
- Throws:
javax.xml.parsers.ParserConfigurationException
readXmlDocumentFromFile
public static org.w3c.dom.Document readXmlDocumentFromFile(java.io.File f)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
restoreLabelsFromFile
public static edu.umd.cs.piccolo.PNode restoreLabelsFromFile(java.io.File f)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
restoreLabelsByFontSizeLevel
public static java.util.ArrayList<LabelDescription>[] restoreLabelsByFontSizeLevel(java.io.File f)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
- Reads the labels from the given file, and groups them regarding their font size into arrays.
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException