Search in sources :

Example 1 with RefSerialization

use of org.atlasapi.content.v2.serialization.RefSerialization in project atlas-deer by atlasapi.

the class BrandSetter method serialize.

public void serialize(Content internal, org.atlasapi.content.Content content) {
    if (!Brand.class.isInstance(content)) {
        return;
    }
    Brand brand = (Brand) content;
    ImmutableList<org.atlasapi.content.SeriesRef> seriesRefs = brand.getSeriesRefs();
    if (seriesRefs != null) {
        internal.setSeriesRefs(seriesRefs.stream().collect(MoreCollectors.toImmutableMap(refSerialization::serialize, seriesRefSerialization::serialize)));
    }
}
Also used : Brand(org.atlasapi.content.Brand) SeriesRef(org.atlasapi.content.v2.model.udt.SeriesRef)

Aggregations

Brand (org.atlasapi.content.Brand)1 SeriesRef (org.atlasapi.content.v2.model.udt.SeriesRef)1