protected void createParts(WordprocessingMLPackage pkgOut) throws Exception {
// Add OpenDoPE parts to target
// .. conditions - not that we use this here
ConditionsPart conditionsPart = new ConditionsPart(new PartName("/customXml/item1.xml")); // name doesn't matter
pkgOut.getMainDocumentPart().addTargetPart(conditionsPart, AddPartBehaviour.RENAME_IF_NAME_EXISTS); // Word will silently drop the CXPs if they aren't added to the MDP!
addPropertiesPart(conditionsPart, "http://opendope.org/conditions");
conditionsPart.setJaxbElement(new Conditions());
// .. XPaths
xPathsPart = new XPathsPart(new PartName("/customXml/item1.xml"));
pkgOut.getMainDocumentPart().addTargetPart(xPathsPart, AddPartBehaviour.RENAME_IF_NAME_EXISTS);
addPropertiesPart(xPathsPart, "http://opendope.org/xpaths");
xPathsPart.setJaxbElement(new Xpaths());
// .. Questions
questionsPart = new QuestionsPart(new PartName("/customXml/item1.xml"));
pkgOut.getMainDocumentPart().addTargetPart(questionsPart, AddPartBehaviour.RENAME_IF_NAME_EXISTS);
addPropertiesPart(questionsPart,"http://opendope.org/questions");
questionsPart.setJaxbElement(new Questionnaire());
Questionnaire.Questions questions = new Questionnaire.Questions();
questionsPart.getJaxbElement().setQuestions(questions);
// .. Standardised Answer format
standardisedAnswersPart = new StandardisedAnswersPart(new PartName("/customXml/item1.xml"));
pkgOut.getMainDocumentPart().addTargetPart(standardisedAnswersPart, AddPartBehaviour.RENAME_IF_NAME_EXISTS);
storeItemID = addPropertiesPart(standardisedAnswersPart, "http://opendope.org/answers");
standardisedAnswersPart.setJaxbElement(new Answers());
}