// Path: src/main/java/com/github/quiram/buildhotspots/clients/CiClient.java
// public interface CiClient {
//     Optional<LocalDateTime> getDateOfOldestBuildFor(String jobName);
// 
//     List<String> getAllBuildConfigurations();
// 
//     List<String> getDependenciesFor(String jobName);
// 
//     List<String> getDependentsFor(String jobName);
// }
// 
// Path: src/main/java/com/github/quiram/buildhotspots/drawingdata/DependencyType.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "DependencyType", propOrder = { "buildConfigurationName" })
// public class DependencyType {
// 
//     @XmlElement(name = "BuildConfigurationName", required = true)
//     protected String buildConfigurationName;
// 
//     /**
//      * Gets the value of the buildConfigurationName property.
//      *
//      * @return
//      *     possible object is
//      *     {@link String }
//      *
//      */
//     public String getBuildConfigurationName() {
//         return buildConfigurationName;
//     }
// 
//     /**
//      * Sets the value of the buildConfigurationName property.
//      *
//      * @param value
//      *     allowed object is
//      *     {@link String }
//      *
//      */
//     public void setBuildConfigurationName(String value) {
//         this.buildConfigurationName = value;
//     }
// 
// }


import com.github.quiram.buildhotspots.clients.CiClient;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType.BuildStats;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType.Dependencies;
import com.github.quiram.buildhotspots.drawingdata.DependencyType;
import com.github.quiram.buildhotspots.drawingdata.Root;
import com.github.quiram.buildhotspots.drawingdata.Root.BuildConfigurations;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.BiFunction;
import static java.lang.String.format;
import static java.util.stream.Collectors.toSet;
package com.github.quiram.buildhotspots;




public class DrawingBuilder {

    private final CiClient ciClient;
    private final DateToFrequencyTransformer transformer;

    public DrawingBuilder(CiClient ciClient, DateToFrequencyTransformer transformer) {
        this.ciClient = ciClient;
        this.transformer = transformer;
    }

    public Root buildForAll() {
        final List<String> allBuildConfigurations = ciClient.getAllBuildConfigurations();

        return buildRootDocument(allBuildConfigurations);
    }

// Path: src/main/java/com/github/quiram/buildhotspots/clients/CiClient.java
// public interface CiClient {
//     Optional<LocalDateTime> getDateOfOldestBuildFor(String jobName);
// 
//     List<String> getAllBuildConfigurations();
// 
//     List<String> getDependenciesFor(String jobName);
// 
//     List<String> getDependentsFor(String jobName);
// }
// 
// Path: src/main/java/com/github/quiram/buildhotspots/drawingdata/DependencyType.java
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "DependencyType", propOrder = { "buildConfigurationName" })
// public class DependencyType {
// 
//     @XmlElement(name = "BuildConfigurationName", required = true)
//     protected String buildConfigurationName;
// 
//     /**
//      * Gets the value of the buildConfigurationName property.
//      *
//      * @return
//      *     possible object is
//      *     {@link String }
//      *
//      */
//     public String getBuildConfigurationName() {
//         return buildConfigurationName;
//     }
// 
//     /**
//      * Sets the value of the buildConfigurationName property.
//      *
//      * @param value
//      *     allowed object is
//      *     {@link String }
//      *
//      */
//     public void setBuildConfigurationName(String value) {
//         this.buildConfigurationName = value;
//     }
// 
// }


// Path: src/main/java/com/github/quiram/buildhotspots/DrawingBuilder.java
import com.github.quiram.buildhotspots.clients.CiClient;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType.BuildStats;
import com.github.quiram.buildhotspots.drawingdata.BuildConfigurationType.Dependencies;
import com.github.quiram.buildhotspots.drawingdata.DependencyType;
import com.github.quiram.buildhotspots.drawingdata.Root;
import com.github.quiram.buildhotspots.drawingdata.Root.BuildConfigurations;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.BiFunction;
import static java.lang.String.format;
import static java.util.stream.Collectors.toSet;

package com.github.quiram.buildhotspots;




public class DrawingBuilder {

    private final CiClient ciClient;
    private final DateToFrequencyTransformer transformer;

    public DrawingBuilder(CiClient ciClient, DateToFrequencyTransformer transformer) {
        this.ciClient = ciClient;
        this.transformer = transformer;
    }

    public Root buildForAll() {
        final List<String> allBuildConfigurations = ciClient.getAllBuildConfigurations();

        return buildRootDocument(allBuildConfigurations);
    }

    public Root buildFor(List<String> buildNames) {