@Override protected void writeRestrictedInfo(final Restricted restricted) throws IOException { writeStartElement("restricted"); if (restricted != null) { writeTextElement("generalRestrictionExplanation", restricted.value()); final Restriction[] restrictions = restricted.restrictions(); if (restrictions != null) { writeArray("restrictions", Arrays.asList(restrictions), this::writeRestriction); } } writeEndElement(); }