@Test public void exportToXml_basis() throws PlanningException { Plan p = generateBasicPlan(); p.setProjectBasis(generateBasis()); Document doc = exporter.exportToXml(p); Element basisElement = (Element) getNode(doc, "/plans/p:plan/p:basis"); assertThat(basisElement.attributeValue("identificationCode"), is("Identification code")); checkContentByName(basisElement, "p:documentTypes"); checkContentByName(basisElement, "p:applyingPolicies"); checkContentByName(basisElement, "p:designatedCommunity"); checkContentByName(basisElement, "p:mandate"); checkContentByName(basisElement, "p:organisationalProcedures"); checkContentByName(basisElement, "p:planningPurpose"); checkContentByName(basisElement, "p:planRelations"); checkContentByName(basisElement, "p:preservationRights"); checkContentByName(basisElement, "p:referenceToAgreements"); Element newTriggerElement = getElement(basisElement, "p:triggers/p:trigger[@type='NEW_COLLECTION']"); assertThat(newTriggerElement.attributeValue("active"), is("true")); assertThat(newTriggerElement.attributeValue("description"), is("New description")); Element periodicTriggerElement = getElement(basisElement, "p:triggers/p:trigger[@type='PERIODIC_REVIEW']"); assertThat(periodicTriggerElement.attributeValue("active"), is("false")); Element ceTriggerElement = getElement(basisElement, "p:triggers/p:trigger[@type='CHANGED_ENVIRONMENT']"); assertThat(ceTriggerElement.attributeValue("active"), is("false")); assertThat(ceTriggerElement.attributeValue("description"), is("Changed environment description")); Element coTriggerElement = getElement(basisElement, "p:triggers/p:trigger[@type='CHANGED_OBJECTIVE']"); assertThat(coTriggerElement.attributeValue("active"), is("false")); Element ccpTriggerElement = getElement(basisElement, "p:triggers/p:trigger[@type='CHANGED_COLLECTION_PROFILE']"); assertThat(ccpTriggerElement.attributeValue("active"), is("false")); }
public Document exportToXml(Plan p) throws PlanningException { Document doc = createProjectDoc(); addProject(p, doc, false); return doc; }
ProjectExporter implements Serializable { public Document exportToXml(Plan p) throws PlanningException { Document doc = createProjectDoc(); addProject(p, doc, false); return doc; } }
ProjectExporter implements Serializable { public Document exportToXml(Plan p) throws PlanningException { Document doc = createProjectDoc(); addProject(p, doc, false); return doc; } ProjectExporter(); }
ProjectExporter implements Serializable { public Document exportToXml(Plan p) throws PlanningException { Document doc = createProjectDoc(); addProject(p, doc, false); 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 exportToXml(Plan p) throws PlanningException { Document doc = createProjectDoc(); addProject(p, doc, false); 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; }