/** * @since 3.0.0 */ public String getTitle() { if (this.getDocPropsCorePart()==null) { return null; } JAXBElement<SimpleLiteral> sl = this.getDocPropsCorePart().getJaxbElement().getTitle(); if (sl == null) return null; StringWriter sw = new StringWriter(); try { TextUtils.extractText(sl, sw, Context.jcDocPropsCore); } catch (Exception e) { log.error(e.getMessage(), e); } return sw.toString(); }
/** * @since 3.0.0 */ public void setTitle(String title) { if (this.getDocPropsCorePart()==null) { DocPropsCorePart core; try { core = new DocPropsCorePart(); org.docx4j.docProps.core.ObjectFactory coreFactory = new org.docx4j.docProps.core.ObjectFactory(); core.setJaxbElement(coreFactory.createCoreProperties() ); this.addTargetPart(core); } catch (InvalidFormatException e) { log.error(e.getMessage(), e); } } org.docx4j.docProps.core.dc.elements.ObjectFactory of = new org.docx4j.docProps.core.dc.elements.ObjectFactory(); SimpleLiteral literal = of.createSimpleLiteral(); literal.getContent().add(title); this.getDocPropsCorePart().getJaxbElement().setTitle(of.createTitle(literal) ); }
if (pkg.getDocPropsCorePart()==null if (pkg.getDocPropsCorePart()!=null) { pkg.getDocPropsCorePart().getJaxbElement().setContentStatus("Final");
ret.setPartShortcut(opcPackage.getDocPropsCorePart(), Namespaces.PROPERTIES_CORE);
/** * @since 3.0.0 */ public String getTitle() { if (this.getDocPropsCorePart()==null) { return null; } JAXBElement<SimpleLiteral> sl = this.getDocPropsCorePart().getJaxbElement().getTitle(); if (sl == null) return null; StringWriter sw = new StringWriter(); try { TextUtils.extractText(sl, sw, Context.jcDocPropsCore); } catch (Exception e) { log.error(e.getMessage(), e); } return sw.toString(); }
/** * @since 3.0.0 */ public void setTitle(String title) { if (this.getDocPropsCorePart()==null) { DocPropsCorePart core; try { core = new DocPropsCorePart(); org.docx4j.docProps.core.ObjectFactory coreFactory = new org.docx4j.docProps.core.ObjectFactory(); core.setJaxbElement(coreFactory.createCoreProperties() ); this.addTargetPart(core); } catch (InvalidFormatException e) { log.error(e.getMessage(), e); } } org.docx4j.docProps.core.dc.elements.ObjectFactory of = new org.docx4j.docProps.core.dc.elements.ObjectFactory(); SimpleLiteral literal = of.createSimpleLiteral(); literal.getContent().add(title); this.getDocPropsCorePart().getJaxbElement().setTitle(of.createTitle(literal) ); }
if (pkg.getDocPropsCorePart()==null if (pkg.getDocPropsCorePart()!=null) { pkg.getDocPropsCorePart().getJaxbElement().setContentStatus("Final");
ret.setPartShortcut(opcPackage.getDocPropsCorePart(), Namespaces.PROPERTIES_CORE);