at.tuwien.ifs.somtoolbox.apps.viewer.fileutils
Class LabelXmlUtils
java.lang.Object
at.tuwien.ifs.somtoolbox.apps.viewer.fileutils.LabelXmlUtils
public class LabelXmlUtils
- extends 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,
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(Iterator<?> it,
Node node,
Document document)
createXmlDocument
private static Document createXmlDocument(MapPNode map)
throws ParserConfigurationException
- Creates a XML Document containing all labels from the map
- Throws:
ParserConfigurationException
readXmlDocumentFromFile
public static Document readXmlDocumentFromFile(File f)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
restoreLabelsFromFile
public static edu.umd.cs.piccolo.PNode restoreLabelsFromFile(File f)
throws ParserConfigurationException,
SAXException,
IOException
- Throws:
ParserConfigurationException
SAXException
IOException
restoreLabelsByFontSizeLevel
public static ArrayList<LabelDescription>[] restoreLabelsByFontSizeLevel(File f)
throws ParserConfigurationException,
SAXException,
IOException
- Reads the labels from the given file, and groups them regarding their font size into arrays.
- Throws:
ParserConfigurationException
SAXException
IOException