@Test public void createProjectDoc() { Document doc = exporter.createProjectDoc(); assertThat(getNode(doc, "/plans"), notNullValue()); assertThat(getContent(doc, "/plans/@version"), is(PlanXMLConstants.PLATO_SCHEMA_VERSION)); }
public Document createProjectDoc() { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("plans"); root.add(XSI_NAMESPACE); root.add(PLATO_NAMESPACE); root.addAttribute(XSI_NAMESPACE.getPrefix() + ":schemaLocation", PlanXMLConstants.PLATO_NS + " " + PlanXMLConstants.PLATO_SCHEMA); root.add(new Namespace("fits", "http: root.addAttribute("version", PlanXMLConstants.PLATO_SCHEMA_VERSION); return doc; }
ProjectExporter implements Serializable { public Document createProjectDoc() { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("plans"); root.add(XSI_NAMESPACE); root.add(PLATO_NAMESPACE); root.addAttribute(XSI_NAMESPACE.getPrefix() + ":schemaLocation", PlanXMLConstants.PLATO_NS + " " + PlanXMLConstants.PLATO_SCHEMA); root.add(new Namespace("fits", "http: root.addAttribute("version", PlanXMLConstants.PLATO_SCHEMA_VERSION); return doc; } }
ProjectExporter implements Serializable { public Document createProjectDoc() { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("plans"); root.add(XSI_NAMESPACE); root.add(PLATO_NAMESPACE); root.addAttribute(XSI_NAMESPACE.getPrefix() + ":schemaLocation", PlanXMLConstants.PLATO_NS + " " + PlanXMLConstants.PLATO_SCHEMA); root.add(new Namespace("fits", "http: root.addAttribute("version", PlanXMLConstants.PLATO_SCHEMA_VERSION); return doc; } ProjectExporter(); }
ProjectExporter implements Serializable { public Document createProjectDoc() { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("plans"); root.add(XSI_NAMESPACE); root.add(PLATO_NAMESPACE); root.addAttribute(XSI_NAMESPACE.getPrefix() + ":schemaLocation", PlanXMLConstants.PLATO_NS + " " + PlanXMLConstants.PLATO_SCHEMA); root.add(new Namespace("fits", "http: root.addAttribute("version", PlanXMLConstants.PLATO_SCHEMA_VERSION); return doc; } ProjectExporter(); Document exportToXml(Plan p); Document createProjectDoc(); Document createTemplateDoc(); String getObjectiveTreeAsTemplate(Plan p, String templateLibrary, String name, String description); void exportToFile(Plan p, File target); Document exportTemplates(List<TemplateTree> trees); void addProject(Plan p, Document projectsDoc, boolean addDigitalObjectData); String exportTreeToFreemind(Plan plan); String exportTreeToFreemind(TreeNode treeRoot); }
ProjectExporter implements Serializable { public Document createProjectDoc() { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("plans"); root.add(XSI_NAMESPACE); root.add(PLATO_NAMESPACE); root.addAttribute(XSI_NAMESPACE.getPrefix() + ":schemaLocation", PlanXMLConstants.PLATO_NS + " " + PlanXMLConstants.PLATO_SCHEMA); root.add(new Namespace("fits", "http: root.addAttribute("version", PlanXMLConstants.PLATO_SCHEMA_VERSION); return doc; } ProjectExporter(); Document exportToXml(Plan p); Document createProjectDoc(); Document createTemplateDoc(); String getObjectiveTreeAsTemplate(Plan p, String templateLibrary, String name, String description); void exportToFile(Plan p, File target); Document exportTemplates(List<TemplateTree> trees); void addProject(Plan p, Document projectsDoc, boolean addDigitalObjectData); String exportTreeToFreemind(Plan plan); String exportTreeToFreemind(TreeNode treeRoot); static OutputFormat prettyFormat; static OutputFormat compactFormat; }