class ReclassificationRequestDslParser {

    public ParsedReclassificationDslRequest parseReclassificationRequest(JsonNode reclassificationDslJson)
        throws InvalidParseOperationException {

        if (!reclassificationDslJson.isArray() || reclassificationDslJson.size() == 0) {
            throw new InvalidParseOperationException("Expected array of reclassification updates DSLs");
        }

        List<ParsedReclassificationDslRequestEntry> entries = new ArrayList<>();

        for (JsonNode singleReclassificationDslJson : reclassificationDslJson) {

            SelectMultiQuery selectMultiQuery =
                parseSelectMultiQuery(singleReclassificationDslJson);

            Set<String> attachments = parseReclassificationDslAttachments(singleReclassificationDslJson);
            Set<String> detachments = parseReclassificationDslDetachments(singleReclassificationDslJson);

            entries.add(new ParsedReclassificationDslRequestEntry(
                selectMultiQuery, attachments, detachments));
        }

        return new ParsedReclassificationDslRequest(entries);
    }

}