private String createAtomId(final EntityInfoAggregator eia) throws EntityProviderException { return properties.getServiceRoot() + createSelfLink(eia); } }
/** * * @param properties * @return EntityCollectionPropertiesBuilder */ public static EntityCollectionPropertiesBuilder fromProperties (final EntityCollectionSerializerProperties properties) { final EntityCollectionPropertiesBuilder builder = EntityCollectionSerializerProperties.serviceRoot(properties.getServiceRoot()); return builder.fromProperties(properties); } }
/** * * @param properties * @return EntityCollectionPropertiesBuilder */ public static EntityCollectionPropertiesBuilder fromProperties (final EntityCollectionSerializerProperties properties) { final EntityCollectionPropertiesBuilder builder = EntityCollectionSerializerProperties.serviceRoot(properties.getServiceRoot()); return builder.fromProperties(properties); } }
final EntityCollection data, final boolean isInline) throws EntityProviderException { try { if (properties.getServiceRoot() == null) { throw new EntityProviderProducerException(EntityProviderException.MANDATORY_WRITE_PROPERTY); writer.writeAttribute(Edm.PREFIX_XML, Edm.NAMESPACE_XML_1998, FormatXml.XML_BASE, properties.getServiceRoot() .toASCIIString());
private void appendEntries(final XMLStreamWriter writer, final EntityInfoAggregator eia, final EntityCollection data) throws EntityProviderException { AtomEntryEntitySerializer entryProvider; for (Entity singleEntryData : data.getEntities()) { entryProvider = singleEntryData.getWriteProperties() == null? data.getGlobalEntityProperties() == null ? new AtomEntryEntitySerializer (EntitySerializerProperties.serviceRoot(data.getCollectionProperties().getServiceRoot()).build()) : new AtomEntryEntitySerializer(data.getGlobalEntityProperties()): new AtomEntryEntitySerializer(singleEntryData.getWriteProperties()); entryProvider.append(writer, eia, singleEntryData, false, true); } }
private void appendEntries(final Writer writer, final EntityInfoAggregator entityInfo, final EntityCollection data, JsonStreamWriter jsonStreamWriter) throws EntityProviderException, IOException { boolean first = true; for (Entity entryData : data.getEntities()) { if (first) { first = false; } else { jsonStreamWriter.separator(); } EntitySerializerProperties entryProperties = entryData == null || entryData.getWriteProperties() == null ? data.getGlobalEntityProperties() != null? data.getGlobalEntityProperties(): EntitySerializerProperties. serviceRoot(properties.getServiceRoot()). build() : entryData.getWriteProperties(); JsonEntryEntitySerializer entryProducer = new JsonEntryEntitySerializer(entryProperties); entryProducer.append(writer, entityInfo, entryData); } } }