@Test public void testWriteEntryCategory() throws Exception { startDocument(false); metadataWriter = new AtomMetadataWriter(xmlWriter, odataUri, entityDataModel, nsConfigurationProvider); metadataWriter.writeEntryCategory(customer); endDocument(); assertEquals(prettyPrintXml(readContent(EXPECTED_ENTRY_CATEGORY_PATH)), prettyPrintXml(outputStream.toString())); }
void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); }
AtomMetadataWriter { void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); } }
AtomMetadataWriter { void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); }
AtomMetadataWriter { void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); void writeEntryEntityLink(Object entity); void writeCount(Object count); }
AtomMetadataWriter { void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); } AtomMetadataWriter(XMLStreamWriter xmlWriter, ODataUri oDataUri,
                              EntityDataModel entityDataModel, AtomNSConfigurationProvider nsConfigurationProvider); void writeEntryEntityLink(Object entity); void writeCount(Object count);  }