/** * Serializes the type definition to XML, using the format defined in the * CMIS specification. * * The XML is UTF-8 encoded and the stream is not closed. */ public static void writeToXML(TypeDefinition type, OutputStream stream) throws XMLStreamException { if (type == null) { throw new IllegalArgumentException("Type must be set!"); } if (stream == null) { throw new IllegalArgumentException("Output stream must be set!"); } XMLStreamWriter writer = XMLUtils.createWriter(stream); XMLUtils.startXmlDocument(writer); XMLConverter.writeTypeDefinition(writer, CmisVersion.CMIS_1_1, XMLConstants.NAMESPACE_CMIS, type); XMLUtils.endXmlDocument(writer); writer.close(); }
@Override public void write(OutputStream out) throws Exception { XMLStreamWriter writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer); XMLConverter.writeQuery(writer, cmisVersion, query); XMLUtils.endXmlDocument(writer); } });
protected void writeAclXML(Acl acl, CmisVersion cmisVersion, OutputStream out) throws XMLStreamException { XMLStreamWriter writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer); XMLConverter.writeAcl(writer, cmisVersion, true, acl); XMLUtils.endXmlDocument(writer); } }
@Override public void write(OutputStream out) throws Exception { XmlSerializer writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer); XMLConverter.writeQuery(writer, cmisVersion, query); XMLUtils.endXmlDocument(writer); } });
@Override public void write(OutputStream out) throws Exception { XMLStreamWriter writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer); XMLConverter.writeAcl(writer, cmisVersion, true, acl); XMLUtils.endXmlDocument(writer); } });
@Override public void write(OutputStream out) throws Exception { XmlSerializer writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer); XMLConverter.writeAcl(writer, cmisVersion, true, acl); XMLUtils.endXmlDocument(writer); } });
XMLStreamWriter writer = XMLUtils.createWriter(out); XMLUtils.startXmlDocument(writer);
XMLUtils.startXmlDocument(writer); XMLConverter.writeAllowableActions(writer, context.getCmisVersion(), true, allowableActions); XMLUtils.endXmlDocument(writer);