All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.p2.provider.CompositeArtifacts Maven / Gradle / Ivy

There is a newer version: 7.1.0
Show newest version
package aQute.p2.provider;

import java.io.InputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import aQute.lib.strings.Strings;

/**
 * 
 * {@code
 * 
 * 
 * 
 *   
 *     
 *   
 *   
 *     
 *     
 *   
 * }
 * 
*/ class CompositeArtifacts extends XML { final List uris = new ArrayList<>(); final URI base; CompositeArtifacts(InputStream in, URI base) throws Exception { super(getDocument(in)); this.base = base; } void parse() throws Exception { NodeList nodes = getNodes("repository/children/child"); for (int i = 0; i < nodes.getLength(); i++) { Node child = nodes.item(i); String textContent = Strings.trim(getAttribute(child, "location")); URI uri = base.resolve(textContent); uris.add(uri); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy