public class LabelXmlUtils extends 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(Iterator<?> it,
Node node,
Document document) |
private static Document |
createXmlDocument(MapPNode map)
Creates a XML Document containing all labels from the map
|
static Document |
readXmlDocumentFromFile(File f) |
static ArrayList<LabelDescription>[] |
restoreLabelsByFontSizeLevel(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(File f) |
static boolean |
saveLabelsToFile(MapPNode map,
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, File f)
map
- the MapPNode containing the labelsf
- the File to store the labelsprivate static Document createXmlDocument(MapPNode map) throws ParserConfigurationException
ParserConfigurationException
public static Document readXmlDocumentFromFile(File f) throws ParserConfigurationException, SAXException, IOException
public static edu.umd.cs.piccolo.PNode restoreLabelsFromFile(File f) throws ParserConfigurationException, SAXException, IOException
public static ArrayList<LabelDescription>[] restoreLabelsByFontSizeLevel(File f) throws ParserConfigurationException, SAXException, IOException