@Test public void testWriteODataContent() throws Exception { startDocument(); odataUri = new ODataParserImpl().parseUri("http: AtomMetadataWriter metadataWriter = new AtomMetadataWriter( xmlWriter, odataUri, entityDataModel, nsConfigurationProvider); AtomDataWriter dataWriter = new AtomDataWriter(xmlWriter, entityDataModel, nsConfigurationProvider); metadataWriter.writeODataMetadata(CUSTOMER_URL); dataWriter.writeData(customer, getAndCheckEntityType(entityDataModel, customer.getClass())); endDocument(); assertEquals(prettyPrintXml(readContent(EXPECTED_CUSTOMER_DATA_PATH)), prettyPrintXml(outputStream.toString())); }
public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException { xmlWriter.writeStartElement(ODATA_CONTENT); xmlWriter.writeAttribute(TYPE, XML.toString()); xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, ""); marshall(entity, entityType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); }
AtomDataWriter { public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException { xmlWriter.writeStartElement(ODATA_CONTENT); xmlWriter.writeAttribute(TYPE, XML.toString()); xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, ""); marshall(entity, entityType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); } }
AtomDataWriter { public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException { xmlWriter.writeStartElement(ODATA_CONTENT); xmlWriter.writeAttribute(TYPE, XML.toString()); xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, ""); marshall(entity, entityType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); } AtomDataWriter(XMLStreamWriter xmlWriter, EntityDataModel entityDataModel,
                          AtomNSConfigurationProvider nsConfigurationProvider); }
AtomDataWriter { public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException { xmlWriter.writeStartElement(ODATA_CONTENT); xmlWriter.writeAttribute(TYPE, XML.toString()); xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, ""); marshall(entity, entityType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); } AtomDataWriter(XMLStreamWriter xmlWriter, EntityDataModel entityDataModel,
                          AtomNSConfigurationProvider nsConfigurationProvider); void writeData(Object entity, EntityType entityType); }
AtomDataWriter { public void writeData(Object entity, EntityType entityType) throws XMLStreamException, ODataRenderException { xmlWriter.writeStartElement(ODATA_CONTENT); xmlWriter.writeAttribute(TYPE, XML.toString()); xmlWriter.writeStartElement(METADATA, ODATA_PROPERTIES, ""); marshall(entity, entityType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); } AtomDataWriter(XMLStreamWriter xmlWriter, EntityDataModel entityDataModel,
                          AtomNSConfigurationProvider nsConfigurationProvider); void writeData(Object entity, EntityType entityType);  }