class WorkItemDefinitionParser {

    public static Collection<WorkItemDefinition> parse(final String content,
                                                       final Function<WorkDefinitionImpl, String> uriProvider,
                                                       final Function<String, String> dataUriProvider) throws Exception {
        final Map<String, WorkDefinitionImpl> definitionMap = parseJBPMWorkItemDefinitions(content,
                                                                                           dataUriProvider);
        return definitionMap.values().stream()
                .map(wid -> parse(wid,
                                  uriProvider,
                                  dataUriProvider))
                .collect(Collectors.toList());
    }

}