public class LabelXmlUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static EditLabelEventListener |
ll |
Constructor and Description |
---|
LabelXmlUtils() |
Modifier and Type | Method and Description |
---|---|
private static void |
addLabelsToXml(java.util.Iterator<?> it,
org.w3c.dom.Node node,
org.w3c.dom.Document document) |
private static org.w3c.dom.Document |
createXmlDocument(MapPNode map)
Creates a XML Document containing all labels from the map
|
static org.w3c.dom.Document |
readXmlDocumentFromFile(java.io.File f) |
static java.util.ArrayList<LabelDescription>[] |
restoreLabelsByFontSizeLevel(java.io.File f)
Reads the labels from the given file, and groups them regarding their font size into arrays.
|
static edu.umd.cs.piccolo.PNode |
restoreLabelsFromFile(java.io.File f) |
static boolean |
saveLabelsToFile(MapPNode map,
java.io.File f)
Saves the labels(cluster labels and manual labels) of the map to the file.
|
private static EditLabelEventListener ll
public static boolean saveLabelsToFile(MapPNode map, java.io.File f)
map
- the MapPNode containing the labelsf
- the File to store the labelsprivate static void addLabelsToXml(java.util.Iterator<?> it, org.w3c.dom.Node node, org.w3c.dom.Document document)
private static org.w3c.dom.Document createXmlDocument(MapPNode map) throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public static org.w3c.dom.Document readXmlDocumentFromFile(java.io.File f) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public static edu.umd.cs.piccolo.PNode restoreLabelsFromFile(java.io.File f) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
public static java.util.ArrayList<LabelDescription>[] restoreLabelsByFontSizeLevel(java.io.File f) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException