Search in sources :

Example 1 with DomServiceClusterBuilder

use of com.yahoo.vespa.model.generic.builder.DomServiceClusterBuilder in project vespa by vespa-engine.

the class VespaDomBuilder method getClusters.

@Override
public List<ServiceCluster> getClusters(ApplicationPackage pkg, AbstractConfigProducer parent) {
    List<ServiceCluster> clusters = new ArrayList<>();
    Document services = XmlHelper.getDocument(pkg.getServices());
    for (Element clusterSpec : XML.getChildren(services.getDocumentElement(), "cluster")) {
        DomServiceClusterBuilder clusterBuilder = new DomServiceClusterBuilder(clusterSpec.getAttribute("name"));
        clusters.add(clusterBuilder.build(parent.getRoot(), clusterSpec));
    }
    return clusters;
}
Also used : ServiceCluster(com.yahoo.vespa.model.generic.service.ServiceCluster) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList) Document(org.w3c.dom.Document) DomServiceClusterBuilder(com.yahoo.vespa.model.generic.builder.DomServiceClusterBuilder)

Aggregations

DomServiceClusterBuilder (com.yahoo.vespa.model.generic.builder.DomServiceClusterBuilder)1 ServiceCluster (com.yahoo.vespa.model.generic.service.ServiceCluster)1 ArrayList (java.util.ArrayList)1 Document (org.w3c.dom.Document)1 Element (org.w3c.dom.Element)1