public byte[] marshallToXML(final ApplicationNodeContainer applicationNodeContainer) throws JAXBException, IOException, SAXException { return IOUtils.marshallObjectToXML(applicationNodeContainer, ApplicationNodeContainer.class.getResource(APPLICATION_XSD)); }
public byte[] marshallToXML(final ApplicationNodeContainer applicationNodeContainer) throws JAXBException, IOException, SAXException { return IOUtils.marshallObjectToXML(applicationNodeContainer, ApplicationNodeContainer.class.getResource(APPLICATION_XSD)); }
public byte[] export(final ApplicationNodeContainer applicationNodeContainer) throws ExportException { final URL resource = ApplicationNodeContainer.class.getResource("/application.xsd"); try { return IOUtils.marshallObjectToXML(applicationNodeContainer, resource); } catch (final Exception e) { throw new ExportException(e); } }
private void addBOMFile(final File directory, final BusinessObjectModel bom) throws CodeGenerationException { Path file = new File(directory, "bom.xml").toPath(); try { final URL resource = BusinessObjectModel.class.getResource("/bom.xsd"); final byte[] bomXML = IOUtils.marshallObjectToXML(bom, resource); Files.write(file, bomXML); } catch (Exception e) { throw new CodeGenerationException("Error when adding business object model metadata to server jar", e); } }
private void addBOMFile(final File directory, final BusinessObjectModel bom) throws CodeGenerationException { Path file = new File(directory, "bom.xml").toPath(); try { final URL resource = BusinessObjectModel.class.getResource("/bom.xsd"); final byte[] bomXML = IOUtils.marshallObjectToXML(bom, resource); Files.write(file, bomXML); } catch (Exception e) { throw new CodeGenerationException("Error when adding business object model metadata to server jar", e); } }
public byte[] export(final ApplicationNodeContainer applicationNodeContainer) throws ExportException { final URL resource = ApplicationNodeContainer.class.getResource("/application.xsd"); try { return IOUtils.marshallObjectToXML(applicationNodeContainer, resource); } catch (final Exception e) { throw new ExportException(e); } }
public byte[] marshall(final BusinessObjectModel bom) throws JAXBException, IOException, SAXException { final String modelVersion = bom.getModelVersion(); if (modelVersion == null || modelVersion.isEmpty()) { bom.setModelVersion(BusinessObjectModel.CURRENT_MODEL_VERSION); } final String productVersion = bom.getProductVersion(); if (productVersion == null || productVersion.isEmpty()) { bom.setProductVersion(BusinessObjectModel.CURRENT_PRODUCT_VERSION); } return IOUtils.marshallObjectToXML(bom, xsdUrl); }
public byte[] marshall(final BusinessObjectModel bom) throws JAXBException, IOException, SAXException { final String modelVersion = bom.getModelVersion(); if (modelVersion == null || modelVersion.isEmpty()) { bom.setModelVersion(BusinessObjectModel.CURRENT_MODEL_VERSION); } final String productVersion = bom.getProductVersion(); if (productVersion == null || productVersion.isEmpty()) { bom.setProductVersion(BusinessObjectModel.CURRENT_PRODUCT_VERSION); } return IOUtils.marshallObjectToXML(bom, xsdUrl); }