private String generateXMLForComplexProperty(Object entity, StructuredType type) throws ODataException { LOG.trace("Complex property rendering started"); try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { String typeFullyQualifiedName = type.getFullyQualifiedName(); String context = getContextURL(getODataUri(), getEntityDataModel()); LOG.trace("Context for complex property is {}", context); XMLStreamWriter writer = startElement(outputStream, VALUE, HASH + typeFullyQualifiedName, context, true); handleCollectionAndComplexProperties(entity, type, writer); endElement(writer); return outputStream.toString(UTF_8.name()); } catch (XMLStreamException | IOException e) { throw new ODataRenderException("Error while rendering complex property value.", e); } }
private String generateXMLForComplexProperty(Object entity, StructuredType type) throws ODataException { LOG.trace("Complex property rendering started"); try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { String typeFullyQualifiedName = type.getFullyQualifiedName(); String context = getContextURL(getODataUri(), getEntityDataModel()); LOG.trace("Context for complex property is {}", context); XMLStreamWriter writer = startElement(outputStream, VALUE, HASH + typeFullyQualifiedName, context, true); handleCollectionAndComplexProperties(entity, type, writer); endElement(writer); return outputStream.toString(UTF_8.name()); } catch (XMLStreamException | IOException e) { throw new ODataRenderException("Error while rendering complex property value.", e); } }
switch (action) { case START_DOCUMENT: String typeFullyQualifiedName = type.getFullyQualifiedName(); String context = getContextURL(getODataUri(), getEntityDataModel()); LOG.debug("Context for complex property is {}", context);
switch (action) { case START_DOCUMENT: String typeFullyQualifiedName = type.getFullyQualifiedName(); String context = getContextURL(getODataUri(), getEntityDataModel()); LOG.debug("Context for complex property is {}", context);